fusion-bench 0.2.9__py3-none-any.whl → 0.2.11__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 +1 -0
- fusion_bench/method/DOGE_TA/DOGE_TA.py +364 -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/layer_wise_adamerging.py +250 -0
- fusion_bench/method/__init__.py +22 -0
- fusion_bench/method/classification/continual_clip_finetune.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/isotropic_merging/__init__.py +15 -0
- fusion_bench/method/isotropic_merging/iso.py +114 -0
- fusion_bench/method/isotropic_merging/iso_utils.py +176 -0
- fusion_bench/method/task_singular_vector/TSVM.py +22 -2
- fusion_bench/models/wrappers/layer_wise_fusion_doge_ta.py +531 -0
- {fusion_bench-0.2.9.dist-info → fusion_bench-0.2.11.dist-info}/METADATA +1 -1
- {fusion_bench-0.2.9.dist-info → fusion_bench-0.2.11.dist-info}/RECORD +30 -13
- {fusion_bench-0.2.9.dist-info → fusion_bench-0.2.11.dist-info}/WHEEL +1 -1
- fusion_bench_config/method/DOGE_TA/DOGE_TA.yaml +4 -0
- 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/isotropic_merging/iso_c.yaml +4 -0
- fusion_bench_config/method/isotropic_merging/iso_cts.yaml +5 -0
- fusion_bench_config/method/task_singular_vector/TaskSingularVectorMerging.yaml +6 -0
- {fusion_bench-0.2.9.dist-info → fusion_bench-0.2.11.dist-info}/LICENSE +0 -0
- {fusion_bench-0.2.9.dist-info → fusion_bench-0.2.11.dist-info}/entry_points.txt +0 -0
- {fusion_bench-0.2.9.dist-info → fusion_bench-0.2.11.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Reference: Jinluan Yang, et al. Mitigating the Backdoor Effect for Multi-Task Model Merging via Safety-Aware Subspace. ICLR 2025.
|
|
2
|
+
|
|
3
|
+
name: clip_post_defense_AWM
|
|
4
|
+
|
|
5
|
+
# batch size per gpu
|
|
6
|
+
# if you have multiple gpus, the total batch size will be `batch_size * num_gpus`
|
|
7
|
+
batch_size: 16
|
|
8
|
+
num_workers: 8
|
|
9
|
+
|
|
10
|
+
optimizer: adam
|
|
11
|
+
lr: 1e-3
|
|
12
|
+
|
|
13
|
+
scaling_factor: 0.3
|
|
14
|
+
|
|
15
|
+
###new
|
|
16
|
+
adv_lr: 1e-4
|
|
17
|
+
trigger_norm: 1000
|
|
18
|
+
adv_weight: 0.01
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
max_steps: 2000
|
|
22
|
+
save_interval: 500
|
|
23
|
+
initial_logits: 0
|
|
24
|
+
temperature: 0.5
|
|
25
|
+
|
|
26
|
+
# "discrete" or "continuous", this is the mask applied for evaluation, not during training
|
|
27
|
+
# the performance of final model are expected to be similar
|
|
28
|
+
eval_mask_type: continuous
|
|
29
|
+
|
|
30
|
+
mask_checkpoint: null
|
|
31
|
+
# if `clamp_weights` is true, the weights will be clamped to [0, 1]
|
|
32
|
+
clamp_weights: false
|
|
33
|
+
|
|
34
|
+
# arguments of `functional_call`
|
|
35
|
+
tie_weights: true
|
|
36
|
+
strict: false
|
|
37
|
+
|
|
38
|
+
cache_dir: outputs
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Reference: Jinluan Yang, et al. Mitigating the Backdoor Effect for Multi-Task Model Merging via Safety-Aware Subspace. ICLR 2025.
|
|
2
|
+
|
|
3
|
+
name: clip_post_defense_SAU
|
|
4
|
+
|
|
5
|
+
# batch size per gpu
|
|
6
|
+
# if you have multiple gpus, the total batch size will be `batch_size * num_gpus`
|
|
7
|
+
batch_size: 16
|
|
8
|
+
num_workers: 8
|
|
9
|
+
|
|
10
|
+
optimizer: adam
|
|
11
|
+
lr: 1e-3
|
|
12
|
+
|
|
13
|
+
scaling_factor: 0.3
|
|
14
|
+
|
|
15
|
+
###new
|
|
16
|
+
adv_lr: 1e-4
|
|
17
|
+
trigger_norm: 1000
|
|
18
|
+
adv_weight: 0.01
|
|
19
|
+
shared_weight: 0.01
|
|
20
|
+
beta1: 0.5
|
|
21
|
+
beta2: 0.5
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
max_steps: 2000
|
|
25
|
+
save_interval: 500
|
|
26
|
+
initial_logits: 0
|
|
27
|
+
temperature: 0.5
|
|
28
|
+
|
|
29
|
+
# "discrete" or "continuous", this is the mask applied for evaluation, not during training
|
|
30
|
+
# the performance of final model are expected to be similar
|
|
31
|
+
eval_mask_type: continuous
|
|
32
|
+
|
|
33
|
+
mask_checkpoint: null
|
|
34
|
+
# if `clamp_weights` is true, the weights will be clamped to [0, 1]
|
|
35
|
+
clamp_weights: false
|
|
36
|
+
|
|
37
|
+
# arguments of `functional_call`
|
|
38
|
+
tie_weights: true
|
|
39
|
+
strict: false
|
|
40
|
+
|
|
41
|
+
cache_dir: outputs
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Reference: Jinluan Yang, et al. Mitigating the Backdoor Effect for Multi-Task Model Merging via Safety-Aware Subspace. ICLR 2025.
|
|
2
|
+
|
|
3
|
+
name: clip_safe_concrete_layer_wise_adamerging
|
|
4
|
+
|
|
5
|
+
# batch size per gpu
|
|
6
|
+
# if you have multiple gpus, the total batch size will be `batch_size * num_gpus`
|
|
7
|
+
batch_size: 16
|
|
8
|
+
num_workers: 8
|
|
9
|
+
|
|
10
|
+
optimizer: adam
|
|
11
|
+
lr: 1e-3
|
|
12
|
+
base_lr: 1
|
|
13
|
+
adamerging_lr: 1e-3
|
|
14
|
+
|
|
15
|
+
scaling_factor: 0.3
|
|
16
|
+
|
|
17
|
+
max_steps: 1000
|
|
18
|
+
max_adamerging_steps: 1000
|
|
19
|
+
save_interval: 500
|
|
20
|
+
initial_logits: 0
|
|
21
|
+
temperature: 0.5
|
|
22
|
+
|
|
23
|
+
###new
|
|
24
|
+
adv_lr: 1e-4
|
|
25
|
+
trigger_norm: 1000
|
|
26
|
+
adv_weight: 0.1
|
|
27
|
+
# "discrete" or "continuous", this is the mask applied for evaluation, not during training
|
|
28
|
+
# the performance of final model are expected to be similar
|
|
29
|
+
eval_mask_type: continuous
|
|
30
|
+
|
|
31
|
+
mask_checkpoint: null
|
|
32
|
+
# if `clamp_weights` is true, the weights will be clamped to [0, 1]
|
|
33
|
+
clamp_weights: false
|
|
34
|
+
|
|
35
|
+
# arguments of `functional_call`
|
|
36
|
+
tie_weights: true
|
|
37
|
+
strict: false
|
|
38
|
+
|
|
39
|
+
cache_dir: outputs
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Reference: Jinluan Yang, et al. Mitigating the Backdoor Effect for Multi-Task Model Merging via Safety-Aware Subspace. ICLR 2025.
|
|
2
|
+
|
|
3
|
+
name: clip_safe_concrete_task_arithmetic
|
|
4
|
+
|
|
5
|
+
# batch size per gpu
|
|
6
|
+
# if you have multiple gpus, the total batch size will be `batch_size * num_gpus`
|
|
7
|
+
batch_size: 16
|
|
8
|
+
num_workers: 8
|
|
9
|
+
|
|
10
|
+
optimizer: adam
|
|
11
|
+
lr: 1e-3
|
|
12
|
+
|
|
13
|
+
scaling_factor: 0.3
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
###new
|
|
18
|
+
adv_lr: 1e-4
|
|
19
|
+
trigger_norm: 1000
|
|
20
|
+
adv_weight: 0.1
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
max_steps: 2000
|
|
24
|
+
save_interval: 500
|
|
25
|
+
initial_logits: 0
|
|
26
|
+
temperature: 0.5
|
|
27
|
+
|
|
28
|
+
# "discrete" or "continuous", this is the mask applied for evaluation, not during training
|
|
29
|
+
# the performance of final model are expected to be similar
|
|
30
|
+
eval_mask_type: continuous
|
|
31
|
+
|
|
32
|
+
mask_checkpoint: null
|
|
33
|
+
# if `clamp_weights` is true, the weights will be clamped to [0, 1]
|
|
34
|
+
clamp_weights: false
|
|
35
|
+
|
|
36
|
+
# arguments of `functional_call`
|
|
37
|
+
tie_weights: true
|
|
38
|
+
strict: false
|
|
39
|
+
|
|
40
|
+
cache_dir: outputs
|
|
File without changes
|
|
File without changes
|
|
File without changes
|