fusion-bench 0.2.10__py3-none-any.whl → 0.2.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fusion_bench/compat/method/__init__.py +5 -0
- fusion_bench/dataset/fer2013.py +0 -1
- fusion_bench/method/__init__.py +10 -0
- fusion_bench/method/adamerging/clip_layer_wise_adamerging.py +1 -1
- fusion_bench/method/concrete_subspace/__init__.py +8 -0
- fusion_bench/method/concrete_subspace/clip_post_defense.py +744 -0
- fusion_bench/method/concrete_subspace/clip_safe_concrete_adamerging.py +832 -0
- fusion_bench/method/doge_ta/__init__.py +2 -0
- fusion_bench/method/doge_ta/clip_layer_wise_adamerging.py +46 -0
- fusion_bench/method/doge_ta/doge_ta.py +364 -0
- fusion_bench/method/doge_ta/layer_wise_adamerging.py +250 -0
- fusion_bench/method/isotropic_merging/__init__.py +1 -1
- fusion_bench/method/isotropic_merging/iso.py +2 -2
- fusion_bench/method/opcm/opcm.py +93 -84
- fusion_bench/method/opcm/task_arithmetic.py +35 -21
- fusion_bench/method/opcm/ties_merging.py +71 -52
- fusion_bench/method/task_singular_vector/TSVM.py +3 -3
- fusion_bench/models/wrappers/layer_wise_fusion.py +1 -46
- fusion_bench/models/wrappers/layer_wise_fusion_doge_ta.py +416 -0
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.12.dist-info}/METADATA +15 -2
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.12.dist-info}/RECORD +32 -19
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.12.dist-info}/WHEEL +1 -1
- fusion_bench_config/method/concrete_subspace/clip_post_defense_AWM.yaml +38 -0
- fusion_bench_config/method/concrete_subspace/clip_post_defense_SAU.yaml +41 -0
- fusion_bench_config/method/concrete_subspace/clip_safe_concrete_layer_wise_adamerging.yaml +39 -0
- fusion_bench_config/method/concrete_subspace/clip_safe_concrete_task_arithmetic.yaml +40 -0
- fusion_bench_config/method/doge_ta/doge_ta.yaml +4 -0
- fusion_bench_config/modelpool/Seq2SeqLMPool/flan-t5-base_glue_lora16_tta.yaml +8 -8
- fusion_bench_config/modelpool/Seq2SeqLMPool/flan-t5-base_glue_tta.yaml +68 -0
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.12.dist-info}/entry_points.txt +0 -0
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.12.dist-info/licenses}/LICENSE +0 -0
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.12.dist-info}/top_level.txt +0 -0
|
@@ -20,12 +20,17 @@ class AlgorithmFactory:
|
|
|
20
20
|
# model merging methods
|
|
21
21
|
"clip_task_wise_adamerging": ".adamerging.clip_task_wise_adamerging.CLIPTaskWiseAdaMergingAlgorithm",
|
|
22
22
|
"clip_layer_wise_adamerging": ".adamerging.clip_layer_wise_adamerging.CLIPLayerWiseAdaMergingAlgorithm",
|
|
23
|
+
"clip_layer_wise_adamerging_doge_ta": ".doge_ta.clip_layer_wise_adamerging.CLIPLayerWiseAdaMergingAlgorithm",
|
|
23
24
|
"singular_projection_merging": "fusion_bench.method.smile_upscaling.singular_projection_merging.SingularProjectionMergingAlgorithm",
|
|
24
25
|
"clip_layer_wise_adamerging_surgery": ".surgery.clip_layer_wise_adamerging_surgery.CLIPLayerWiseAdaMergingSurgeryAlgorithm",
|
|
25
26
|
# plug-and-play model merging methods
|
|
26
27
|
"clip_concrete_task_arithmetic": ".concrete_subspace.clip_concrete_task_arithmetic.ConcreteTaskArithmeticAlgorithmForCLIP",
|
|
27
28
|
"clip_concrete_task_wise_adamerging": ".concrete_subspace.clip_concrete_adamerging.ConcreteTaskWiseAdaMergingForCLIP",
|
|
28
29
|
"clip_concrete_layer_wise_adamerging": ".concrete_subspace.clip_concrete_adamerging.ConcreteLayerWiseAdaMergingForCLIP",
|
|
30
|
+
"clip_post_defense_AWM": ".concrete_subspace.clip_post_defense.PostDefenseAWMAlgorithmForCLIP",
|
|
31
|
+
"clip_post_defense_SAU": ".concrete_subspace.clip_post_defense.PostDefenseSAUAlgorithmForCLIP",
|
|
32
|
+
"clip_safe_concrete_layer_wise_adamerging": ".concrete_subspace.clip_safe_concrete_adamerging.ConcreteSafeLayerWiseAdaMergingForCLIP",
|
|
33
|
+
"clip_safe_concrete_task_wise_adamerging": ".concrete_subspace.clip_safe_concrete_adamerging.ConcreteSafeTaskWiseAdaMergingForCLIP",
|
|
29
34
|
# model mixing methods
|
|
30
35
|
"clip_weight_ensembling_moe": ".we_moe.clip_we_moe.CLIPWeightEnsemblingMoEAlgorithm",
|
|
31
36
|
"sparse_clip_weight_ensembling_moe": "fusion_bench.method.SparseCLIPWeightEnsemblingMoEAlgorithm",
|
fusion_bench/dataset/fer2013.py
CHANGED
fusion_bench/method/__init__.py
CHANGED
|
@@ -53,6 +53,7 @@ _import_structure = {
|
|
|
53
53
|
"PWEMoExactParetoOptimalForCLIP",
|
|
54
54
|
],
|
|
55
55
|
"ada_svd": ["AdaSVDMergingForCLIPVisionModel"],
|
|
56
|
+
"doge_ta": ["DOGE_TA_Algorithm"],
|
|
56
57
|
"task_singular_vector": ["TaskSingularVectorMerging"],
|
|
57
58
|
"isotropic_merging": [
|
|
58
59
|
"ISO_C_Merge", # alias
|
|
@@ -66,6 +67,10 @@ _import_structure = {
|
|
|
66
67
|
"ConcreteTaskArithmeticAlgorithmForCLIP",
|
|
67
68
|
"ConcreteTaskWiseAdaMergingForCLIP",
|
|
68
69
|
"ConcreteLayerWiseAdaMergingForCLIP",
|
|
70
|
+
"ConcreteSafeLayerWiseAdaMergingForCLIP",
|
|
71
|
+
"ConcreteSafeTaskWiseAdaMergingForCLIP",
|
|
72
|
+
"PostDefenseAWMAlgorithmForCLIP",
|
|
73
|
+
"PostDefenseSAUAlgorithmForCLIP",
|
|
69
74
|
],
|
|
70
75
|
# model mixing methods
|
|
71
76
|
"depth_upscaling": ["DepthUpscalingAlgorithm", "DepthUpscalingForLlama"],
|
|
@@ -113,12 +118,17 @@ if TYPE_CHECKING:
|
|
|
113
118
|
)
|
|
114
119
|
from .concrete_subspace import (
|
|
115
120
|
ConcreteLayerWiseAdaMergingForCLIP,
|
|
121
|
+
ConcreteSafeLayerWiseAdaMergingForCLIP,
|
|
122
|
+
ConcreteSafeTaskWiseAdaMergingForCLIP,
|
|
116
123
|
ConcreteTaskArithmeticAlgorithmForCLIP,
|
|
117
124
|
ConcreteTaskWiseAdaMergingForCLIP,
|
|
125
|
+
PostDefenseAWMAlgorithmForCLIP,
|
|
126
|
+
PostDefenseSAUAlgorithmForCLIP,
|
|
118
127
|
)
|
|
119
128
|
from .dare import DareSimpleAverage, DareTaskArithmetic, DareTiesMerging
|
|
120
129
|
from .dawe import DataAdaptiveWeightEnsemblingForCLIP
|
|
121
130
|
from .depth_upscaling import DepthUpscalingAlgorithm, DepthUpscalingForLlama
|
|
131
|
+
from .doge_ta import DOGE_TA_Algorithm
|
|
122
132
|
from .dummy import DummyAlgorithm
|
|
123
133
|
from .ensemble import (
|
|
124
134
|
MaxModelPredictorAlgorithm,
|
|
@@ -9,7 +9,7 @@ fusion_bench \
|
|
|
9
9
|
modelpool=clip-vit-base-patch32_TA8 \
|
|
10
10
|
taskpool=clip-vit-classification_TA8 \
|
|
11
11
|
fabric.loggers.root_dir=outputs/logs/ViT-B-32 \
|
|
12
|
-
fabric.loggers.name=
|
|
12
|
+
fabric.loggers.name=clip_layer_wise_adamerging_adamerging
|
|
13
13
|
```
|
|
14
14
|
"""
|
|
15
15
|
|
|
@@ -4,3 +4,11 @@ from .clip_concrete_adamerging import (
|
|
|
4
4
|
ConcreteTaskWiseAdaMergingForCLIP,
|
|
5
5
|
)
|
|
6
6
|
from .clip_concrete_task_arithmetic import ConcreteTaskArithmeticAlgorithmForCLIP
|
|
7
|
+
from .clip_post_defense import (
|
|
8
|
+
PostDefenseAWMAlgorithmForCLIP,
|
|
9
|
+
PostDefenseSAUAlgorithmForCLIP,
|
|
10
|
+
)
|
|
11
|
+
from .clip_safe_concrete_adamerging import (
|
|
12
|
+
ConcreteSafeLayerWiseAdaMergingForCLIP,
|
|
13
|
+
ConcreteSafeTaskWiseAdaMergingForCLIP,
|
|
14
|
+
)
|