fusion-bench 0.2.10__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/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 +10 -0
- 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 +1 -1
- fusion_bench/method/isotropic_merging/iso.py +2 -2
- fusion_bench/method/task_singular_vector/TSVM.py +3 -3
- fusion_bench/models/wrappers/layer_wise_fusion_doge_ta.py +531 -0
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.11.dist-info}/METADATA +1 -1
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.11.dist-info}/RECORD +24 -12
- {fusion_bench-0.2.10.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-0.2.10.dist-info → fusion_bench-0.2.11.dist-info}/LICENSE +0 -0
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.11.dist-info}/entry_points.txt +0 -0
- {fusion_bench-0.2.10.dist-info → fusion_bench-0.2.11.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
fusion_bench/__init__.py,sha256=68dF-zPvb8E2MgYnmgIJsxIHJBy1MApKeOrRZvQEVlg,421
|
|
2
2
|
fusion_bench/__main__.py,sha256=weUjxpP3ULnDgUxCehdbmoCM9cqfkhDhGB85tAF5qoE,81
|
|
3
3
|
fusion_bench/compat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
fusion_bench/compat/method/__init__.py,sha256=
|
|
4
|
+
fusion_bench/compat/method/__init__.py,sha256=97izLAf4JssNAoOXR4MYffFxb3OEwpHeQeSlL_ihMKI,5566
|
|
5
5
|
fusion_bench/compat/method/base_algorithm.py,sha256=63_AQDj1eJOO6RyTSGXVC6G2DsG8yg9E4pT3RJXgP3A,1952
|
|
6
6
|
fusion_bench/compat/modelpool/AutoModelForSeq2SeqLM.py,sha256=m68BRGy4P-P9lLB10oXOBI-p58a-0FOPcrJ4r4MU32k,1100
|
|
7
7
|
fusion_bench/compat/modelpool/__init__.py,sha256=KD8Ddr9D7rJ5YdHEQsTuNmQ0bgQfqF4l3WNMtHmRHD8,4687
|
|
@@ -41,12 +41,16 @@ fusion_bench/dataset/llama/stanford_shp.py,sha256=6ueXKnFXIBBobacU1h5WxGLZrSOtBk
|
|
|
41
41
|
fusion_bench/dataset/llama/ultrachat.py,sha256=Go7WvrDAYnm184fdazHGRYLbSY6Xd7jrESyQeUJtOww,1736
|
|
42
42
|
fusion_bench/dataset/llama/wikitext.py,sha256=9ZHR-nMfXRumd3o-PIj3n7B83YlVeqpGkZ2zJs2B-9Y,2883
|
|
43
43
|
fusion_bench/dataset/llama/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
|
-
fusion_bench/method/__init__.py,sha256=
|
|
44
|
+
fusion_bench/method/__init__.py,sha256=QGJzdOpZxonu_WUNXSFQIiMy4OHsgqmcU5Bs6OB_RT0,7040
|
|
45
45
|
fusion_bench/method/base_algorithm.py,sha256=5dutGZfPqNhO8F8FOlo3UFR91TZu2Xj7O0pTB40JvWo,1135
|
|
46
46
|
fusion_bench/method/dummy.py,sha256=hb1y6LR_geRZ5eRgGwt5zJUcHYorCeIbs5i76CvurUc,1031
|
|
47
47
|
fusion_bench/method/ensemble.py,sha256=rGxvJTeorfcBuE_e0XO-0-MAc9un7ZCC46ikKGuAcN4,3077
|
|
48
48
|
fusion_bench/method/model_recombination.py,sha256=2tviqmYSPOL0_Ktv8_gt_YzQ4tyCANHxXquUot_3Cgo,5360
|
|
49
49
|
fusion_bench/method/simple_average.py,sha256=2ghcL1E-eLbIYDCHYCoR9WtiYSb1GvFAH163OTTTEEI,4481
|
|
50
|
+
fusion_bench/method/DOGE_TA/DOGE_TA.py,sha256=veNjBfq65fB7oqQL66zAuA339WCY5mG-mefkVteg2-k,13785
|
|
51
|
+
fusion_bench/method/DOGE_TA/__init__.py,sha256=OTukCLUlbCUTDqGBtgBZop7eYFDfU2wjG4PkP4fXN4Q,59
|
|
52
|
+
fusion_bench/method/DOGE_TA/clip_layer_wise_adamerging.py,sha256=YdQ4trHohW6QzWC2enYvXA44WHxvzmoH_6sMrPn6z60,1305
|
|
53
|
+
fusion_bench/method/DOGE_TA/layer_wise_adamerging.py,sha256=rLk3Nep5d6wMUNCp6q7pC7L0pfBvUwGBIuiGM7CQOf4,9780
|
|
50
54
|
fusion_bench/method/ada_svd/__init__.py,sha256=4XzQbbvE9HI3NtEmEFvo8iC3ds_85vJXe7P7qJfL7kk,77
|
|
51
55
|
fusion_bench/method/ada_svd/clip_vision.py,sha256=QrT6cSwgVEGxXEpVhkvKQVQaoRW5P9V52Y3_8NX0f-o,12556
|
|
52
56
|
fusion_bench/method/adamerging/__init__.py,sha256=nt0saBT_3bqghk-pINQ-XCWm9UWwSZllu4R1sDuAJAA,376
|
|
@@ -66,9 +70,11 @@ fusion_bench/method/analysis/task_vector_violin_plot.py,sha256=ie8hPl6QsVz9MQ6C2
|
|
|
66
70
|
fusion_bench/method/classification/__init__.py,sha256=emB06UOMDHK5pfQ1WuvLG9Fm0aEEtZxSjpVw8fVE0fM,167
|
|
67
71
|
fusion_bench/method/classification/clip_finetune.py,sha256=DlV1isp8vz6jwXNYQ6zbblAoUfnssL-WBpDeaXI5BVw,15727
|
|
68
72
|
fusion_bench/method/classification/continual_clip_finetune.py,sha256=OLhZKS-6aCnafevZkZYcNMKTWDDj3DATB27eZl_i8EY,11530
|
|
69
|
-
fusion_bench/method/concrete_subspace/__init__.py,sha256=
|
|
73
|
+
fusion_bench/method/concrete_subspace/__init__.py,sha256=jJoFcjnQe-jvccsm9DuCXna378m9XBT9vV1fEZbdfR0,464
|
|
70
74
|
fusion_bench/method/concrete_subspace/clip_concrete_adamerging.py,sha256=90_0HkOIl0XQG89xMa0UiBhrwfV2YqfLxlS04AouR3o,24755
|
|
71
75
|
fusion_bench/method/concrete_subspace/clip_concrete_task_arithmetic.py,sha256=Nx-3AiAeIt5zmcC21Ta2_-4cAQg9hOWvThurXNZzA-w,10580
|
|
76
|
+
fusion_bench/method/concrete_subspace/clip_post_defense.py,sha256=h-c0ioxDopg7pUoRjxx3epqQxVKZAZWz8s7yHjM88mg,32355
|
|
77
|
+
fusion_bench/method/concrete_subspace/clip_safe_concrete_adamerging.py,sha256=eEKKUBgHufYTBaWWxkIKDF0lkuLI2bBgNHVr1JqT41c,35694
|
|
72
78
|
fusion_bench/method/dare/__init__.py,sha256=63Xwkawyl_Ooy4xFxoDlP6wf-rgEWNqPuWTT9-6Ku5o,156
|
|
73
79
|
fusion_bench/method/dare/simple_average.py,sha256=jR08PokPIr5PWSZbGVOp3IApgKvxAIovg3vnB2KiTwk,906
|
|
74
80
|
fusion_bench/method/dare/task_arithmetic.py,sha256=Seno_2BhuogdRxXOni8alnHG-fdW15_OWoAvMoBoJj0,2780
|
|
@@ -85,8 +91,8 @@ fusion_bench/method/fisher_merging/__init__.py,sha256=KWsjrtxKkPYwcUA5rB_6UNIqve
|
|
|
85
91
|
fusion_bench/method/fisher_merging/clip_fisher_merging.py,sha256=QCutGqjkfW3OWETPZsCChqLRAhvfJp4QKD9TGSpTyV0,7635
|
|
86
92
|
fusion_bench/method/fisher_merging/fisher_merging.py,sha256=CPU-tJiDv9FCIBYl7Pn0zA5cdRB1Md5kWchRDlJgly0,20456
|
|
87
93
|
fusion_bench/method/fisher_merging/gpt2_fisher_merging.py,sha256=LZmz41jZ5dSsAHxfOUpr3u2rlCgUPTDR7xMsIlQM-jc,7576
|
|
88
|
-
fusion_bench/method/isotropic_merging/__init__.py,sha256=
|
|
89
|
-
fusion_bench/method/isotropic_merging/iso.py,sha256=
|
|
94
|
+
fusion_bench/method/isotropic_merging/__init__.py,sha256=0mxrl1UIjeFAPQcPcZtbgoCJO-DMW_49GKAhgcG-vEA,585
|
|
95
|
+
fusion_bench/method/isotropic_merging/iso.py,sha256=MwKqfk0oyxqtdOzeSx_9jFXX1a4Rd0WcEPsYvQhBSCg,3773
|
|
90
96
|
fusion_bench/method/isotropic_merging/iso_utils.py,sha256=7L8PYUIJROwHJQmhFY-tdEhkLAnzVKXr-ae55FQ1QSo,6928
|
|
91
97
|
fusion_bench/method/linear/__init__.py,sha256=ChfkoOEAb-rUKwpowFPel-a1hRfS8gCrbnWD-jlRbe4,283
|
|
92
98
|
fusion_bench/method/linear/expo.py,sha256=LCHTWlsPm1Mjhrq0mfpWLVC7skkI9ZksGduy3TxULoU,3939
|
|
@@ -154,7 +160,7 @@ fusion_bench/method/tall_mask/utils.py,sha256=Wlp8WcPwR_lCaBIZ9rgG6ewLfSzz3G7kPk
|
|
|
154
160
|
fusion_bench/method/task_arithmetic/__init__.py,sha256=pSx_NV5Ra_6UXpyYWCi6ANQoAnEtymZt_X1dDN9wT4Y,96
|
|
155
161
|
fusion_bench/method/task_arithmetic/task_arithmetic.py,sha256=1D0uuNtqyA1VS35jh6AnEVsX72HnT02THyerck_lmso,5441
|
|
156
162
|
fusion_bench/method/task_singular_vector/TSVC.py,sha256=yn4SrZNvtA6PoGYJmbmtNeDyDbGnRCgfZ7ZCg914AZU,410
|
|
157
|
-
fusion_bench/method/task_singular_vector/TSVM.py,sha256=
|
|
163
|
+
fusion_bench/method/task_singular_vector/TSVM.py,sha256=H5RzZlQQeF4kZFjuxkz8v3gyVKS3iKPgqNnitKQzbXk,2787
|
|
158
164
|
fusion_bench/method/task_singular_vector/__init__.py,sha256=WMucyl9pu_Ev2kcdrfT4moqMMbzD7hHQVFME5Su5jMA,298
|
|
159
165
|
fusion_bench/method/task_singular_vector/utils/TSVC_utils.py,sha256=FytKbal48EW6iGIA-2zV7QSVbYTVflXr4Mr56q0W75k,2286
|
|
160
166
|
fusion_bench/method/task_singular_vector/utils/TSVM_utils.py,sha256=dsTMQ15zFJ1MPqDOt2TJ01O9Bwq_klyG9xL9hRD2aI0,27521
|
|
@@ -254,6 +260,7 @@ fusion_bench/models/surgery/surgerymodelwrapper.py,sha256=F8jX88K5zVWC6HsfN-nGNk
|
|
|
254
260
|
fusion_bench/models/wrappers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
255
261
|
fusion_bench/models/wrappers/ensemble.py,sha256=wIMZMRyXw5boWAm96c4Tiyebs_HDQovKxpGQ8rLnHUQ,6308
|
|
256
262
|
fusion_bench/models/wrappers/layer_wise_fusion.py,sha256=ZizBGQtSLKOzMLFAhrMNMcv6ZNdvABTyO7M1-DGHh3c,12316
|
|
263
|
+
fusion_bench/models/wrappers/layer_wise_fusion_doge_ta.py,sha256=k335dxzq3ezuYkDVOv4ePi128NVyiHVCW6zyuDRTg30,20689
|
|
257
264
|
fusion_bench/models/wrappers/task_wise_fusion.py,sha256=Wn3buQvWw_lihWaKB03_iz34cBPzwBD94kBT6uafWVQ,8404
|
|
258
265
|
fusion_bench/optim/__init__.py,sha256=lemrcuiA6OLjQkpYm-RP-Ox2MgjngN1ywvCo0NgShlM,61
|
|
259
266
|
fusion_bench/optim/exception.py,sha256=fMgo1heiqfGhuI5RIbf30BwWSShn5RQiyeb30QtfTI0,1607
|
|
@@ -465,6 +472,7 @@ fusion_bench_config/method/pwe_moe_ls_for_clip.yaml,sha256=brs9zYeuXfFnnCoRrSaAY
|
|
|
465
472
|
fusion_bench_config/method/simple_average.yaml,sha256=GtMNvt0-qWOevRX2V6fjiYUO2BwDvMw-EcxRMS_PhZQ,53
|
|
466
473
|
fusion_bench_config/method/task_arithmetic.yaml,sha256=TbpAeTwIX48PFOkZU-Ihuu6U9Y5XHZJGDu7vHLt5FjU,74
|
|
467
474
|
fusion_bench_config/method/ties_merging.yaml,sha256=N-XyOTEW0JRtyRJizpHqtb1GEIogUU22XSG76QvIvnw,292
|
|
475
|
+
fusion_bench_config/method/DOGE_TA/DOGE_TA.yaml,sha256=6R9NRuWmj0oapJ_raMB6R6rZPMckt2JtMLrTQ6HhrFc,77
|
|
468
476
|
fusion_bench_config/method/ada_svd/clip_vision.yaml,sha256=KDpDpzuNVqqyyqJcL0q-Ml2A7IUqn_-2dOZXs8zHKlU,184
|
|
469
477
|
fusion_bench_config/method/adamerging/clip.yaml,sha256=fBG7jBBepygKpCbM3fmUeVAr2zzx0g8C21rGGfnEPkA,730
|
|
470
478
|
fusion_bench_config/method/adamerging/layer_wise_flan_t5.yaml,sha256=7FPPMf6lcOD2dlNUbb5JyF3pqJ3D2jmvbWAbW9WGn0Y,546
|
|
@@ -477,6 +485,10 @@ fusion_bench_config/method/classification/clip_finetune.yaml,sha256=yWjcdKYaKvy5
|
|
|
477
485
|
fusion_bench_config/method/concrete_subspace/clip_concrete_layer_wise_adamerging.yaml,sha256=XsHzr_5NoUZs0Us3eVwP3lUYXYvyJwGEEG9aDI_Z0rU,740
|
|
478
486
|
fusion_bench_config/method/concrete_subspace/clip_concrete_task_arithmetic.yaml,sha256=eNoqcY1iMbs0Y5kKi_ya3rmQQMHqU7ht3EU7G_xmwN0,746
|
|
479
487
|
fusion_bench_config/method/concrete_subspace/clip_concrete_task_wise_adamerging.yaml,sha256=WgTJj28FlVjR0_mCGJC5B8aJa9yezI3QusoXXHOrFoU,739
|
|
488
|
+
fusion_bench_config/method/concrete_subspace/clip_post_defense_AWM.yaml,sha256=eGUCntXzDtW0tYX1vij7BHgDWzWq6sz2yFipVZj6z9E,849
|
|
489
|
+
fusion_bench_config/method/concrete_subspace/clip_post_defense_SAU.yaml,sha256=DUYOU5A8MQw2cTqbraIDMFC7ciO8RXE2qXgVEEUudLM,891
|
|
490
|
+
fusion_bench_config/method/concrete_subspace/clip_safe_concrete_layer_wise_adamerging.yaml,sha256=olDW_p5gyyaynwbGAQgm2ZicYAx9n3i4FprxPecuUsU,923
|
|
491
|
+
fusion_bench_config/method/concrete_subspace/clip_safe_concrete_task_arithmetic.yaml,sha256=KLO3C1BdeB6FBKHT0xG4V0OFk7ib2SeMScKeaN5BlsU,863
|
|
480
492
|
fusion_bench_config/method/dare/simple_average.yaml,sha256=oTFSCHul86NTjTtJYK5pNr3tuxW7XxNI-y6fL9Yo4VI,113
|
|
481
493
|
fusion_bench_config/method/dare/task_arithmetic.yaml,sha256=Cvsam89yquamn_GkITT6q8qFKN_Yb5nv8p-XgvnVrgU,134
|
|
482
494
|
fusion_bench_config/method/dare/ties_merging.yaml,sha256=50mPiRkzLN7gxaIs56sPWkAUSvqvdxjQJ8eVl1yUGOg,418
|
|
@@ -724,9 +736,9 @@ fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip-vit-single-task_sun397
|
|
|
724
736
|
fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip-vit-single-task_svhn.yaml,sha256=2AqMiNCRRunLIrssHvFzu1lUzOaQn8uOHM9yjrQq-_A,109
|
|
725
737
|
fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip_rankone_wemoe_clip-vit-classification_TA8.yaml,sha256=iQMj2VpDTe_D8OfCo94w5Ud2MON-EGa0DzVr6UmphrA,436
|
|
726
738
|
fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip_sparse_wemoe_clip-vit-classification_TA8.yaml,sha256=i5Bn8bLl2cgqvrgtIGmoovUfSMehk_m-6C2wwcx5JMU,435
|
|
727
|
-
fusion_bench-0.2.
|
|
728
|
-
fusion_bench-0.2.
|
|
729
|
-
fusion_bench-0.2.
|
|
730
|
-
fusion_bench-0.2.
|
|
731
|
-
fusion_bench-0.2.
|
|
732
|
-
fusion_bench-0.2.
|
|
739
|
+
fusion_bench-0.2.11.dist-info/LICENSE,sha256=nhnOJlw4CPuPVE0qvkGmxfFgHmKi-6nzXvTu8t0NUdg,1066
|
|
740
|
+
fusion_bench-0.2.11.dist-info/METADATA,sha256=AYdGcKXZ6BeHCv1piGgpK1yktQqVga-PjUDxS4RYwog,16780
|
|
741
|
+
fusion_bench-0.2.11.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
742
|
+
fusion_bench-0.2.11.dist-info/entry_points.txt,sha256=iUQ8MCJvda7HP4vYh2n1Teoapb4G9PBVYZkAfcc5SHU,116
|
|
743
|
+
fusion_bench-0.2.11.dist-info/top_level.txt,sha256=BuO4TL6iHL_2yPBUX9-LlIrHRczA_BNMIFwweK0PQEI,13
|
|
744
|
+
fusion_bench-0.2.11.dist-info/RECORD,,
|
|
@@ -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
|