fusion-bench 0.2.2__tar.gz → 0.2.4__tar.gz

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.
Files changed (513) hide show
  1. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/PKG-INFO +38 -3
  2. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/README.md +37 -1
  3. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/__init__.py +1 -1
  4. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/taskpool/clip_image_classification.py +12 -0
  5. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/taskpool/flan_t5_glue_text_generation.py +9 -0
  6. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/dataset/gsm8k.py +3 -0
  7. fusion_bench-0.2.4/fusion_bench/dataset/imdb.py +11 -0
  8. fusion_bench-0.2.4/fusion_bench/dataset/llama/alpaca.py +142 -0
  9. fusion_bench-0.2.4/fusion_bench/dataset/llama/openai.py +160 -0
  10. fusion_bench-0.2.4/fusion_bench/dataset/llama/sharegpt.py +141 -0
  11. fusion_bench-0.2.4/fusion_bench/dataset/llama/squad.py +125 -0
  12. fusion_bench-0.2.4/fusion_bench/dataset/llama/wikitext.py +89 -0
  13. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/dataset/nyuv2.py +9 -0
  14. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/__init__.py +11 -7
  15. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/ada_svd/clip_vision.py +2 -2
  16. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/adamerging/clip_layer_wise_adamerging.py +13 -0
  17. fusion_bench-0.2.4/fusion_bench/method/adamerging/llama_adamerging.py +330 -0
  18. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/adamerging/task_wise_adamerging.py +13 -1
  19. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/analysis/__init__.py +1 -0
  20. fusion_bench-0.2.4/fusion_bench/method/analysis/task_vector_cos_similarity.py +172 -0
  21. fusion_bench-0.2.4/fusion_bench/method/analysis/task_vector_violin_plot.py +205 -0
  22. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/base_algorithm.py +5 -2
  23. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/dare/__init__.py +1 -0
  24. fusion_bench-0.2.4/fusion_bench/method/dare/simple_average.py +31 -0
  25. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/dare/task_arithmetic.py +16 -9
  26. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/dawe/dawe_for_clip.py +11 -2
  27. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/depth_upscaling/depth_upscaling.py +3 -3
  28. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/dummy.py +5 -2
  29. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/ensemble.py +32 -5
  30. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/fisher_merging/fisher_merging.py +3 -3
  31. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/linear/__init__.py +2 -0
  32. fusion_bench-0.2.4/fusion_bench/method/linear/expo.py +79 -0
  33. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/linear/linear_interpolation.py +4 -4
  34. fusion_bench-0.2.4/fusion_bench/method/linear/llama_expo.py +229 -0
  35. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/linear/simple_average_for_llama.py +3 -3
  36. fusion_bench-0.2.4/fusion_bench/method/lm_finetune/causal_lm_pretrain.py +7 -0
  37. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/mixture_of_experts/mixtral_upcycling.py +5 -5
  38. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/model_recombination.py +3 -3
  39. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/llama_magnitude_prune.py +3 -3
  40. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/llama_random_prune.py +3 -3
  41. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/llama_wanda_prune.py +3 -3
  42. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/magnitude_diff_pruning.py +9 -4
  43. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/prune_utils.py +10 -3
  44. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pwe_moe/clip_pwe_moe.py +3 -3
  45. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/regmean/regmean.py +2 -2
  46. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/simple_average.py +12 -5
  47. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/slerp/slerp.py +3 -3
  48. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/smile_upscaling/smile_upscaling.py +3 -3
  49. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/sparselo/sparselo.py +3 -3
  50. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/task_arithmetic/task_arithmetic.py +3 -3
  51. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/ties_merging/ties_merging.py +3 -3
  52. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/trust_region/clip_task_arithmetic.py +2 -2
  53. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/weighted_average/llama.py +3 -3
  54. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/weighted_average/weighted_average.py +3 -3
  55. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/mixins/clip_classification.py +39 -3
  56. fusion_bench-0.2.4/fusion_bench/mixins/optim/adamw_with_warmup.py +42 -0
  57. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/base_pool.py +1 -1
  58. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/causal_lm/causal_lm.py +3 -1
  59. fusion_bench-0.2.4/fusion_bench/models/llama/__init__.py +16 -0
  60. fusion_bench-0.2.4/fusion_bench/models/llama/model_utils/embedding.py +70 -0
  61. fusion_bench-0.2.4/fusion_bench/models/llama/model_utils/liger_kernel.py +86 -0
  62. fusion_bench-0.2.4/fusion_bench/models/llama/model_utils/misc.py +112 -0
  63. fusion_bench-0.2.4/fusion_bench/models/llama/model_utils/mod.py +52 -0
  64. fusion_bench-0.2.4/fusion_bench/models/llama/model_utils/visual.py +242 -0
  65. fusion_bench-0.2.4/fusion_bench/models/llama/patcher.py +80 -0
  66. fusion_bench-0.2.4/fusion_bench/models/llama/tokenizer_loader.py +157 -0
  67. fusion_bench-0.2.4/fusion_bench/models/wrappers/ensemble.py +183 -0
  68. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/wrappers/layer_wise_fusion.py +107 -2
  69. fusion_bench-0.2.4/fusion_bench/optim/__init__.py +0 -0
  70. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/programs/fabric_fusion_program.py +7 -4
  71. fusion_bench-0.2.4/fusion_bench/scripts/__init__.py +0 -0
  72. fusion_bench-0.2.4/fusion_bench/scripts/clip/__init__.py +0 -0
  73. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/taskpool/__init__.py +2 -0
  74. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/taskpool/clip_vision/taskpool.py +15 -0
  75. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/taskpool/dummy.py +23 -8
  76. fusion_bench-0.2.4/fusion_bench/taskpool/llama/__init__.py +1 -0
  77. fusion_bench-0.2.4/fusion_bench/taskpool/llama/test_generation.py +185 -0
  78. fusion_bench-0.2.4/fusion_bench/tasks/flan_t5_text_generation/__init__.py +0 -0
  79. fusion_bench-0.2.4/fusion_bench/utils/__init__.py +13 -0
  80. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/cache_utils.py +2 -2
  81. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/data.py +3 -2
  82. fusion_bench-0.2.4/fusion_bench/utils/devices.py +210 -0
  83. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/dtype.py +27 -0
  84. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/functools.py +12 -1
  85. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/instantiate.py +24 -15
  86. fusion_bench-0.2.4/fusion_bench/utils/misc.py +18 -0
  87. fusion_bench-0.2.4/fusion_bench/utils/packages.py +84 -0
  88. fusion_bench-0.2.4/fusion_bench/utils/parameters.py +258 -0
  89. fusion_bench-0.2.4/fusion_bench/utils/path.py +7 -0
  90. fusion_bench-0.2.4/fusion_bench/utils/strenum/__init__.py +325 -0
  91. fusion_bench-0.2.4/fusion_bench/utils/strenum/_name_mangler.py +127 -0
  92. fusion_bench-0.2.4/fusion_bench/utils/strenum/_version.py +556 -0
  93. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench.egg-info/PKG-INFO +38 -3
  94. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench.egg-info/SOURCES.txt +43 -1
  95. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench.egg-info/requires.txt +0 -1
  96. fusion_bench-0.2.4/fusion_bench_config/README.md +12 -0
  97. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/fabric_model_fusion.yaml +2 -0
  98. fusion_bench-0.2.4/fusion_bench_config/llama_model_fusion.yaml +17 -0
  99. fusion_bench-0.2.4/fusion_bench_config/method/adamerging/clip.yaml +23 -0
  100. fusion_bench-0.2.4/fusion_bench_config/method/adamerging/llama_sft.yaml +33 -0
  101. fusion_bench-0.2.4/fusion_bench_config/method/analysis/task_vector_cos_similarity.yaml +6 -0
  102. fusion_bench-0.2.4/fusion_bench_config/method/analysis/task_vector_violin_plot.yaml +6 -0
  103. fusion_bench-0.2.4/fusion_bench_config/method/dare/simple_average.yaml +5 -0
  104. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/dare/task_arithmetic.yaml +1 -0
  105. fusion_bench-0.2.4/fusion_bench_config/method/linear/expo.yaml +8 -0
  106. fusion_bench-0.2.4/fusion_bench_config/method/linear/llama_expo.yaml +19 -0
  107. fusion_bench-0.2.4/fusion_bench_config/method/linear/llama_expo_with_dare.yaml +19 -0
  108. fusion_bench-0.2.4/fusion_bench_config/method/pruning/magnitude_diff_pruning.yaml +4 -0
  109. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/pyproject.toml +1 -2
  110. fusion_bench-0.2.2/fusion_bench/method/analysis/task_vector_cos_similarity.py +0 -98
  111. fusion_bench-0.2.2/fusion_bench/models/wrappers/ensemble.py +0 -90
  112. fusion_bench-0.2.2/fusion_bench/utils/__init__.py +0 -30
  113. fusion_bench-0.2.2/fusion_bench/utils/devices.py +0 -107
  114. fusion_bench-0.2.2/fusion_bench/utils/parameters.py +0 -126
  115. fusion_bench-0.2.2/fusion_bench_config/README.md +0 -4
  116. fusion_bench-0.2.2/fusion_bench_config/method/task_vector_cos_similarity.yaml +0 -3
  117. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/LICENSE +0 -0
  118. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/__init__.py +0 -0
  119. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/method/__init__.py +0 -0
  120. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/method/base_algorithm.py +0 -0
  121. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/modelpool/AutoModelForSeq2SeqLM.py +0 -0
  122. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/modelpool/__init__.py +0 -0
  123. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/modelpool/base_pool.py +0 -0
  124. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/modelpool/huggingface_clip_vision.py +0 -0
  125. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/taskpool/__init__.py +0 -0
  126. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/compat/taskpool/base_pool.py +0 -0
  127. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/constants/__init__.py +0 -0
  128. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/constants/paths.py +0 -0
  129. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/dataset/__init__.py +0 -0
  130. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/dataset/clip_dataset.py +0 -0
  131. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/dataset/gpt2_glue.py +0 -0
  132. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/dataset/image_dataset.py +0 -0
  133. {fusion_bench-0.2.2/fusion_bench/metrics → fusion_bench-0.2.4/fusion_bench/dataset/llama}/__init__.py +0 -0
  134. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/ada_svd/__init__.py +0 -0
  135. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/adamerging/__init__.py +0 -0
  136. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/adamerging/clip_task_wise_adamerging.py +0 -0
  137. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/adamerging/entropy_loss.py +0 -0
  138. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/adamerging/layer_wise_adamerging.py +0 -0
  139. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/classification/__init__.py +0 -0
  140. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/classification/clip_finetune.py +0 -0
  141. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/concrete_subspace/__init__.py +0 -0
  142. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/concrete_subspace/clip_concrete_adamerging.py +0 -0
  143. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/concrete_subspace/clip_concrete_task_arithmetic.py +0 -0
  144. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/dare/utils.py +0 -0
  145. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/dawe/__init__.py +0 -0
  146. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/dawe/warppers/__init__.py +0 -0
  147. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/dawe/warppers/dawe_model.py +0 -0
  148. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/depth_upscaling/__init__.py +0 -0
  149. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/depth_upscaling/depth_upscaling_for_llama.py +0 -0
  150. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/fisher_merging/__init__.py +0 -0
  151. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/fisher_merging/clip_fisher_merging.py +0 -0
  152. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/fisher_merging/gpt2_fisher_merging.py +0 -0
  153. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/linear/task_arithmetic_for_llama.py +0 -0
  154. {fusion_bench-0.2.2/fusion_bench/models/linearized → fusion_bench-0.2.4/fusion_bench/method/lm_finetune}/__init__.py +0 -0
  155. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/mixture_of_experts/__init__.py +0 -0
  156. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/mixture_of_experts/mixtral_merging.py +0 -0
  157. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/__init__.py +0 -0
  158. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/wanda_utils/__init__.py +0 -0
  159. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/wanda_utils/ablate.py +0 -0
  160. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/wanda_utils/data.py +0 -0
  161. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/wanda_utils/eval.py +0 -0
  162. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/wanda_utils/layerwrapper.py +0 -0
  163. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/wanda_utils/prune.py +0 -0
  164. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/wanda_utils/prune_opt.py +0 -0
  165. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pruning/wanda_utils/sparsegpt.py +0 -0
  166. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pwe_moe/__init__.py +0 -0
  167. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pwe_moe/module.py +0 -0
  168. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pwe_moe/phn/__init__.py +0 -0
  169. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pwe_moe/phn/solvers.py +0 -0
  170. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/pwe_moe/utils.py +0 -0
  171. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/regmean/__init__.py +0 -0
  172. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/regmean/clip_regmean.py +0 -0
  173. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/regmean/gpt2_regmean.py +0 -0
  174. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/slerp/__init__.py +0 -0
  175. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/slerp/slerp_utils.py +0 -0
  176. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/smile_upscaling/__init__.py +0 -0
  177. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/smile_upscaling/singular_projection_merging.py +0 -0
  178. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/smile_upscaling/smile_mistral_upscaling.py +0 -0
  179. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/sparse_we_moe/__init__.py +0 -0
  180. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/sparse_we_moe/sparse_clip_we_moe.py +0 -0
  181. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/sparse_we_moe/sparse_we_moe.py +0 -0
  182. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/sparselo/__init__.py +0 -0
  183. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/task_arithmetic/__init__.py +0 -0
  184. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/ties_merging/__init__.py +0 -0
  185. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/ties_merging/ties_merging_utils.py +0 -0
  186. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/trust_region/__init__.py +0 -0
  187. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/trust_region/utils.py +0 -0
  188. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/we_moe/__init__.py +0 -0
  189. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/we_moe/clip_we_moe.py +0 -0
  190. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/we_moe/we_moe.py +0 -0
  191. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/method/weighted_average/__init__.py +0 -0
  192. {fusion_bench-0.2.2/fusion_bench/models/nyuv2 → fusion_bench-0.2.4/fusion_bench/metrics}/__init__.py +0 -0
  193. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/nyuv2/__init__.py +0 -0
  194. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/nyuv2/depth.py +0 -0
  195. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/nyuv2/loss.py +0 -0
  196. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/nyuv2/noise.py +0 -0
  197. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/nyuv2/normal.py +0 -0
  198. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/nyuv2/segmentation.py +0 -0
  199. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/text_to_image_generation/__init__.py +0 -0
  200. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/text_to_image_generation/aesthetic_scorer.py +0 -0
  201. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/text_to_image_generation/compressibility.py +0 -0
  202. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/metrics/text_to_image_generation/pickscore_scorer.py +0 -0
  203. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/mixins/__init__.py +0 -0
  204. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/mixins/lightning_fabric.py +0 -0
  205. {fusion_bench-0.2.2/fusion_bench/models/smile_moe → fusion_bench-0.2.4/fusion_bench/mixins/optim}/__init__.py +0 -0
  206. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/mixins/rich_live.py +0 -0
  207. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/mixins/serialization.py +0 -0
  208. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/mixins/simple_profiler.py +0 -0
  209. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/PeftModelForSeq2SeqLM.py +0 -0
  210. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/__init__.py +0 -0
  211. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/causal_lm/__init__.py +0 -0
  212. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/clip_vision/__init__.py +0 -0
  213. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/clip_vision/modelpool.py +0 -0
  214. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/huggingface_automodel.py +0 -0
  215. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/huggingface_gpt2_classification.py +0 -0
  216. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/nyuv2_modelpool.py +0 -0
  217. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/seq2seq_lm/__init__.py +0 -0
  218. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/modelpool/seq2seq_lm/modelpool.py +0 -0
  219. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/__init__.py +0 -0
  220. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/hf_clip.py +0 -0
  221. {fusion_bench-0.2.2/fusion_bench/models/wrappers → fusion_bench-0.2.4/fusion_bench/models/linearized}/__init__.py +0 -0
  222. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/linearized/linearized_model_utils.py +0 -0
  223. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/linearized/vision_model.py +0 -0
  224. {fusion_bench-0.2.2/fusion_bench/optim → fusion_bench-0.2.4/fusion_bench/models/llama/model_utils}/__init__.py +0 -0
  225. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/masks/__init__.py +0 -0
  226. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/masks/mask_model.py +0 -0
  227. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_losparse_llama/__init__.py +0 -0
  228. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_losparse_llama/configuration_losparse_llama.py +0 -0
  229. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_losparse_llama/losparse_linear.py +0 -0
  230. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_losparse_llama/modeling_losparse_llama.py +0 -0
  231. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_losparse_llama/register.py +0 -0
  232. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_losparse_llama/utils.py +0 -0
  233. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_smile_mistral/__init__.py +0 -0
  234. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_smile_mistral/configuration_smile_mistral.py +0 -0
  235. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_smile_mistral/modeling_smile_mistral.py +0 -0
  236. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/modeling_smile_mistral/register.py +0 -0
  237. {fusion_bench-0.2.2/fusion_bench/scripts → fusion_bench-0.2.4/fusion_bench/models/nyuv2}/__init__.py +0 -0
  238. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/nyuv2/aspp.py +0 -0
  239. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/nyuv2/lightning_module.py +0 -0
  240. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/nyuv2/resnet.py +0 -0
  241. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/nyuv2/resnet_dilated.py +0 -0
  242. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/parameter_dict.py +0 -0
  243. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/separate_io.py +0 -0
  244. {fusion_bench-0.2.2/fusion_bench/scripts/clip → fusion_bench-0.2.4/fusion_bench/models/smile_moe}/__init__.py +0 -0
  245. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/smile_moe/linear.py +0 -0
  246. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/sparse_we_moe.py +0 -0
  247. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/utils.py +0 -0
  248. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/we_moe.py +0 -0
  249. {fusion_bench-0.2.2/fusion_bench/tasks/flan_t5_text_generation → fusion_bench-0.2.4/fusion_bench/models/wrappers}/__init__.py +0 -0
  250. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/models/wrappers/task_wise_fusion.py +0 -0
  251. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/optim/mezo.py +0 -0
  252. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/programs/__init__.py +0 -0
  253. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/programs/base_program.py +0 -0
  254. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/scripts/cli.py +0 -0
  255. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/scripts/clip/convert_checkpoint.py +0 -0
  256. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/scripts/imgui.py +0 -0
  257. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/scripts/nyuv2_mtl_train.py +0 -0
  258. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/scripts/webui.py +0 -0
  259. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/taskpool/base_pool.py +0 -0
  260. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/taskpool/clip_vision/__init__.py +0 -0
  261. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/taskpool/clip_vision/clip_sparse_wemoe_taskpool.py +0 -0
  262. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/taskpool/gpt2_text_classification.py +0 -0
  263. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/taskpool/nyuv2_taskpool.py +0 -0
  264. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/__init__.py +0 -0
  265. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/base_task.py +0 -0
  266. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/classification.py +0 -0
  267. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/__init__.py +0 -0
  268. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/cifar10.py +0 -0
  269. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/cifar100.py +0 -0
  270. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/clip_dataset.py +0 -0
  271. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/dtd.py +0 -0
  272. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/eurosat.py +0 -0
  273. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/flower102.py +0 -0
  274. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/gtsrb.py +0 -0
  275. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/imagenet.py +0 -0
  276. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/mnist.py +0 -0
  277. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/oxford_iiit_pet.py +0 -0
  278. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/rendered_sst2.py +0 -0
  279. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/resisc45.py +0 -0
  280. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/stanford_cars.py +0 -0
  281. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/stl10.py +0 -0
  282. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/sun397.py +0 -0
  283. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/svhn.py +0 -0
  284. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/clip_classification/tiny_imagenet.py +0 -0
  285. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/flan_t5_text_generation/datasets_preprocess.py +0 -0
  286. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/flan_t5_text_generation/glue_evaluation.py +0 -0
  287. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/flan_t5_text_generation/glue_load_dataset.py +0 -0
  288. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/flan_t5_text_generation/glue_preprocessors.py +0 -0
  289. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/tasks/flan_t5_text_generation/glue_prompt_templates.py +0 -0
  290. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/auto.py +0 -0
  291. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/hydra_utils.py +0 -0
  292. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/json.py +0 -0
  293. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/lazy_imports.py +0 -0
  294. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/pylogger.py +0 -0
  295. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/rich_utils.py +0 -0
  296. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/state_dict_arithmetic.py +0 -0
  297. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/timer.py +0 -0
  298. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench/utils/type.py +0 -0
  299. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench.egg-info/dependency_links.txt +0 -0
  300. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench.egg-info/entry_points.txt +0 -0
  301. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench.egg-info/top_level.txt +0 -0
  302. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/clip-vit-base-patch32_robustness_corrupted.yaml +0 -0
  303. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/cifar10.yaml +0 -0
  304. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/cifar100.yaml +0 -0
  305. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/dtd.yaml +0 -0
  306. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/eurosat.yaml +0 -0
  307. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/gtsrb.yaml +0 -0
  308. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/mnist.yaml +0 -0
  309. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/resisc45.yaml +0 -0
  310. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/stanford-cars.yaml +0 -0
  311. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/sun397.yaml +0 -0
  312. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/svhn.yaml +0 -0
  313. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/the_eight_tasks.yaml +0 -0
  314. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/test/tiny-imagenet.yaml +0 -0
  315. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/cifar10.yaml +0 -0
  316. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/cifar100.yaml +0 -0
  317. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/dtd.yaml +0 -0
  318. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/eurosat.yaml +0 -0
  319. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/gtsrb.yaml +0 -0
  320. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/mnist.yaml +0 -0
  321. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/resisc45.yaml +0 -0
  322. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/stanford-cars.yaml +0 -0
  323. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/sun397.yaml +0 -0
  324. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/svhn.yaml +0 -0
  325. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/the_eight_tasks.yaml +0 -0
  326. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/train/tiny-imagenet.yaml +0 -0
  327. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/dtd.yaml +0 -0
  328. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/eurosat.yaml +0 -0
  329. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/gtsrb.yaml +0 -0
  330. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/mnist.yaml +0 -0
  331. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/resisc45.yaml +0 -0
  332. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/stanford-cars.yaml +0 -0
  333. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/sun397.yaml +0 -0
  334. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/svhn.yaml +0 -0
  335. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/image_classification/val/the_eight_tasks.yaml +0 -0
  336. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/question_answering/search_qa.yaml +0 -0
  337. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/question_answering/test/search_qa.yaml +0 -0
  338. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/question_answering/train/MetaMathQA.yaml +0 -0
  339. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/question_answering/train/search_qa.yaml +0 -0
  340. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/question_answering/val/search_qa.yaml +0 -0
  341. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/summarization/test/xsum.yaml +0 -0
  342. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/summarization/train/xsum.yaml +0 -0
  343. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/summarization/val/xsum.yaml +0 -0
  344. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/summarization/xsum.yaml +0 -0
  345. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/text_generation/test/gsm-hard.yaml +0 -0
  346. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/text_generation/test/gsm8k.yaml +0 -0
  347. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/text_generation/test/gsm8k_question_label.yaml +0 -0
  348. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/text_generation/train/CodeAlpaca-20k.yaml +0 -0
  349. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/text_generation/train/gsm8k.yaml +0 -0
  350. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/dataset/text_generation/train/gsm8k_question_label.yaml +0 -0
  351. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/fabric/auto.yaml +0 -0
  352. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/fabric_logger/tensorboard_logger.yaml +0 -0
  353. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/hydra/default.yaml +0 -0
  354. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/hydra/help/fusion_bench_help.yaml +0 -0
  355. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/hydra/job_logging/rich_logging.yaml +0 -0
  356. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/llama_magnitude_pruning.yaml +0 -0
  357. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/llama_weighted_average.yaml +0 -0
  358. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/ada_svd/clip_vision.yaml +0 -0
  359. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/adamerging.yaml +0 -0
  360. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/clip_finetune.yaml +0 -0
  361. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/concrete_subspace/clip_concrete_layer_wise_adamerging.yaml +0 -0
  362. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/concrete_subspace/clip_concrete_task_arithmetic.yaml +0 -0
  363. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/concrete_subspace/clip_concrete_task_wise_adamerging.yaml +0 -0
  364. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/dawe/dawe_for_clip.yaml +0 -0
  365. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/depth_upscaling.yaml +0 -0
  366. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/dummy.yaml +0 -0
  367. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/ensemble/max_model_predictor.yaml +0 -0
  368. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/ensemble/simple_ensemble.yaml +0 -0
  369. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/ensemble/weighted_ensemble.yaml +0 -0
  370. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/fisher_merging/clip_fisher_merging.yaml +0 -0
  371. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/fisher_merging/fisher_merging.yaml +0 -0
  372. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/fisher_merging/gpt2_fisher_merging.yaml +0 -0
  373. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/linear/linear_interpolation.yaml +0 -0
  374. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/linear/simple_average_for_llama.yaml +0 -0
  375. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/linear/task_arithmetic_for_llama.yaml +0 -0
  376. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/linear/weighted_average.yaml +0 -0
  377. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/linear/weighted_average_for_llama.yaml +0 -0
  378. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/magnitude_diff_pruning.yaml +0 -0
  379. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/mixtral_moe_merging.yaml +0 -0
  380. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/mixtral_moe_upscaling.yaml +0 -0
  381. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/model_recombination.yaml +0 -0
  382. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/pruning/llama_magnitude_pruning.yaml +0 -0
  383. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/pruning/llama_random_pruning.yaml +0 -0
  384. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/pruning/llama_wanda_pruning.yaml +0 -0
  385. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/pwe_moe_ls_for_clip.yaml +0 -0
  386. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/regmean/clip_regmean.yaml +0 -0
  387. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/regmean/gpt2_regmean.yaml +0 -0
  388. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/regmean/regmean.yaml +0 -0
  389. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/simple_average.yaml +0 -0
  390. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/slerp/slerp.yaml +0 -0
  391. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/smile_upscaling/singular_projection_merging.yaml +0 -0
  392. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/smile_upscaling/smile_mistral_upscaling.yaml +0 -0
  393. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/smile_upscaling/smile_upscaling.yaml +0 -0
  394. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/sparselo_pruning/llama_iterative_sparselo.yaml +0 -0
  395. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/sparselo_pruning/llama_pcp_sparselo.yaml +0 -0
  396. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/sparselo_pruning/llama_sparselo.yaml +0 -0
  397. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/task_arithmetic.yaml +0 -0
  398. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/ties_merging.yaml +0 -0
  399. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/trust_region/clip_task_arithmetic.yaml +0 -0
  400. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/wemoe/sparse_weight_ensembling_moe.yaml +0 -0
  401. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/method/wemoe/weight_ensembling_moe.yaml +0 -0
  402. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16.yaml +0 -0
  403. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_dtd.yaml +0 -0
  404. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_eight_tasks.yaml +0 -0
  405. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_eurosat.yaml +0 -0
  406. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_gtsrb.yaml +0 -0
  407. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_mnist.yaml +0 -0
  408. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_resisc45.yaml +0 -0
  409. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_stanford-cars.yaml +0 -0
  410. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_sun397.yaml +0 -0
  411. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch16_svhn.yaml +0 -0
  412. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32.yaml +0 -0
  413. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_dtd.yaml +0 -0
  414. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_eight_tasks.yaml +0 -0
  415. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_eurosat.yaml +0 -0
  416. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_gtsrb.yaml +0 -0
  417. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_mnist.yaml +0 -0
  418. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_resisc45.yaml +0 -0
  419. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_stanford-cars.yaml +0 -0
  420. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_sun397.yaml +0 -0
  421. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-base-patch32_svhn.yaml +0 -0
  422. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14.yaml +0 -0
  423. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_dtd.yaml +0 -0
  424. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_eight_tasks.yaml +0 -0
  425. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_eurosat.yaml +0 -0
  426. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_gtsrb.yaml +0 -0
  427. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_mnist.yaml +0 -0
  428. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_resisc45.yaml +0 -0
  429. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_stanford-cars.yaml +0 -0
  430. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_sun397.yaml +0 -0
  431. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/clip-vit-large-patch14_svhn.yaml +0 -0
  432. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/clip-vit/generate_vit_model_config.sh +0 -0
  433. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base.yaml +0 -0
  434. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-cola.yaml +0 -0
  435. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-cola_lora-16.yaml +0 -0
  436. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-mnli.yaml +0 -0
  437. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-mnli_lora-16.yaml +0 -0
  438. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-mrpc.yaml +0 -0
  439. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-mrpc_lora-16.yaml +0 -0
  440. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-qnli.yaml +0 -0
  441. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-qnli_lora-16.yaml +0 -0
  442. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-qqp.yaml +0 -0
  443. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-qqp_lora-16.yaml +0 -0
  444. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-rte.yaml +0 -0
  445. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-rte_lora-16.yaml +0 -0
  446. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-sst2.yaml +0 -0
  447. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-sst2_lora-16.yaml +0 -0
  448. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-stsb.yaml +0 -0
  449. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-base_glue-stsb_lora-16.yaml +0 -0
  450. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large.yaml +0 -0
  451. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large_glue-cola_lora-16.yaml +0 -0
  452. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large_glue-mnli_lora-16.yaml +0 -0
  453. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large_glue-mrpc_lora-16.yaml +0 -0
  454. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large_glue-qnli_lora-16.yaml +0 -0
  455. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large_glue-qqp_lora-16.yaml +0 -0
  456. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large_glue-rte_lora-16.yaml +0 -0
  457. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large_glue-sst2_lora-16.yaml +0 -0
  458. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/flan-t5-large_glue-stsb_lora-16.yaml +0 -0
  459. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/model/flan-t5/generate_flan-t5.sh +0 -0
  460. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/_template.yaml +0 -0
  461. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch16_TA8.yaml +0 -0
  462. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch16_individual.yaml +0 -0
  463. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_TA8.yaml +0 -0
  464. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_TA8_control_task.yaml +0 -0
  465. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_TA8_model_only.yaml +0 -0
  466. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_generalization_exp1.yaml +0 -0
  467. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_generalization_exp2.yaml +0 -0
  468. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_individual.yaml +0 -0
  469. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_mtl.yaml +0 -0
  470. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_robustness_clean.yaml +0 -0
  471. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_robustness_corrupted.yaml +0 -0
  472. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_single_finetuned.yaml +0 -0
  473. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-base-patch32_svhn_and_mnist.yaml +0 -0
  474. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-large-patch14_TA8.yaml +0 -0
  475. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-large-patch14_TA8_model_only.yaml +0 -0
  476. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CLIPVisionModelPool/clip-vit-large-patch14_individual.yaml +0 -0
  477. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CausalLMPool/llama_for_causallm.yaml +0 -0
  478. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CausalLMPool/simle_mixtral_exp_v4.yaml +0 -0
  479. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/CausalLMPool/single_llama_model.yaml +0 -0
  480. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/Seq2SeqLMPool/_template.yaml +0 -0
  481. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/Seq2SeqLMPool/flan-t5-base_glue.yaml +0 -0
  482. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/Seq2SeqLMPool/flan-t5-base_glue_lora16.yaml +0 -0
  483. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/Seq2SeqLMPool/flan-t5-base_individual.yaml +0 -0
  484. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/Seq2SeqLMPool/flan-t5-large_glue_lora16.yaml +0 -0
  485. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/automodelpool.yaml +0 -0
  486. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/gpt-2_glue.yaml +0 -0
  487. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/mixtral_moe_merging.yaml +0 -0
  488. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/mixtral_moe_upscaling.yaml +0 -0
  489. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/nyuv2_modelpool.yaml +0 -0
  490. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/smile_mistral_exp_v1.yaml +0 -0
  491. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/smile_mistral_exp_v2.yaml +0 -0
  492. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/smile_mistral_exp_v3.yaml +0 -0
  493. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/modelpool/smile_mistral_exp_v4.yaml +0 -0
  494. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/nyuv2_config.yaml +0 -0
  495. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/nyuv2_mtl_train.yaml +0 -0
  496. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/CLIPVisionModelTaskPool/_template.yaml +0 -0
  497. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip-vit-classification_TA8.yaml +0 -0
  498. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip-vit-classification_TA8_B16.yaml +0 -0
  499. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip-vit-classification_TA8_L14.yaml +0 -0
  500. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip-vit-classification_TA8_val.yaml +0 -0
  501. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip-vit-classification_TA8_with_control_task.yaml +0 -0
  502. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/CLIPVisionModelTaskPool/clip_sparse_wemoe_clip-vit-classification_TA8.yaml +0 -0
  503. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/clip-vit-base-patch32_robustness_clean.yaml +0 -0
  504. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/clip-vit-base-patch32_robustness_corrupted.yaml +0 -0
  505. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/clip-vit-base-patch32_svhn_and_mnist.yaml +0 -0
  506. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/dummy.yaml +0 -0
  507. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/flan-t5_glue_text_generation.yaml +0 -0
  508. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/gpt-2_glue.yaml +0 -0
  509. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/fusion_bench_config/taskpool/nyuv2_taskpool.yaml +0 -0
  510. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/setup.cfg +0 -0
  511. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/tests/test_depth_upscaling.py +0 -0
  512. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/tests/test_simple_average.py +0 -0
  513. {fusion_bench-0.2.2 → fusion_bench-0.2.4}/tests/test_weighed_ensemble.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fusion_bench
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: A Comprehensive Benchmark of Deep Model Fusion
5
5
  Author-email: Anke Tang <tang.anke@foxmail.com>
6
6
  License: MIT License
@@ -33,7 +33,6 @@ Requires-Python: >=3.10
33
33
  Description-Content-Type: text/markdown
34
34
  License-File: LICENSE
35
35
  Requires-Dist: hydra-core
36
- Requires-Dist: torch>=2.0.0
37
36
  Requires-Dist: lightning
38
37
  Requires-Dist: transformers
39
38
  Requires-Dist: datasets
@@ -47,6 +46,8 @@ Requires-Dist: scipy
47
46
  Requires-Dist: h5py
48
47
  Requires-Dist: pytest
49
48
 
49
+ <div align='center'>
50
+
50
51
  # FusionBench: A Comprehensive Benchmark/ToolKit of Deep Model Fusion
51
52
 
52
53
  [![arXiv](https://img.shields.io/badge/arXiv-1234.56789-b31b1b.svg)](http://arxiv.org/abs/2406.03280)
@@ -57,17 +58,23 @@ Requires-Dist: pytest
57
58
  [![Static Badge](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)
58
59
  [![Static Badge](https://img.shields.io/badge/code%20style-yamlfmt-black)](https://github.com/google/yamlfmt)
59
60
 
61
+ </div>
60
62
 
61
63
  > [!TIP]
62
64
  > Documentation is available at [tanganke.github.io/fusion_bench/](https://tanganke.github.io/fusion_bench/).
63
65
 
64
-
65
66
  ## Overview
66
67
 
67
68
  FusionBench is a benchmark suite designed to evaluate the performance of various deep model fusion techniques. It aims to provide a comprehensive comparison of different methods on a variety of datasets and tasks.
68
69
 
69
70
  Projects based on FusionBench:
70
71
 
72
+ <details>
73
+ <summary>Li Shen, Anke Tang, Enneng Yang et al. Efficient and Effective Weight-Ensembling Mixture of Experts for Multi-Task Model Merging. Oct, 2024. https://github.com/EnnengYang/Efficient-WEMoE</summary>
74
+
75
+ <img width="1018" alt="image" src="https://github.com/user-attachments/assets/b7e1279e-87fc-4016-8867-1bff7700e271">
76
+
77
+ </details>
71
78
  <details>
72
79
  <summary>Jinluan Yang et al. Mitigating the Backdoor Effect for Multi-Task Model Merging via Safety-Aware Subspace. Oct, 2024. http://arxiv.org/abs/2410.13910</summary>
73
80
 
@@ -111,9 +118,21 @@ In this benchmark, we evaluate the performance of different fusion methods on a
111
118
  The project is structured as follows:
112
119
 
113
120
  - `fusion_bench/`: the main package of the benchmark.
121
+ - `method`: contains the implementation of the fusion methods.
122
+ > **naming convention**: `fusion_bench/method/{method_name}/{variant}.py` contains the implementation of the specific method or its variants.
123
+ For example, `fusion_bench/method/regmean/clip_regmean.py` contains the implementation of the RegMean algorithm for CLIP vision models.
124
+ - `modelpool`: contains the implementation of the model pool, responsible for managing the models and dataset to be loaded.
125
+ - `taskpool`: contains the implementation of the task pool, responsible for evaluating the performance of models returned by the algorithm.
114
126
  - `config/`: configuration files for the benchmark. We use [Hydra](https://hydra.cc/) to manage the configurations.
127
+ - `method`: configuration files for the fusion methods.
128
+ > **naming convention**: `config/method/{method_name}/{variant}.yaml` contains the configuration for the specific method or its variants.
129
+ - `modelpool`: configuration files for the model pool.
130
+ - `taskpool`: configuration files for the task pool.
131
+ - `model`: configuration files for the models.
132
+ - `dataset`: configuration files for the datasets.
115
133
  - `docs/`: documentation for the benchmark. We use [mkdocs](https://www.mkdocs.org/) to generate the documentation. Start the documentation server locally with `mkdocs serve`. The required packages can be installed with `pip install -r mkdocs-requirements.txt`.
116
134
  - `examples/`: example scripts for running some of the experiments.
135
+ > **naming convention**: `examples/{method_name}/` contains the files such as bash scripts and jupyter notebooks for the specific method.
117
136
  - `tests/`: unit tests for the benchmark.
118
137
 
119
138
  ## A Unified Command Line Interface
@@ -126,6 +145,9 @@ Read the [CLI documentation](https://tanganke.github.io/fusion_bench/cli/fusion_
126
145
 
127
146
  ## Implement your own model fusion algorithm
128
147
 
148
+ First, create a new Python file for the algorithm in the `fusion_bench/method` directory.
149
+ Following the naming convention, the file should be named `{method_name_or_class}/{variant}.py`.
150
+
129
151
  ```python
130
152
  from fusion_bench import BaseModelFusionAlgorithm, BaseModelPool
131
153
 
@@ -158,6 +180,9 @@ class DerivedModelFusionAlgorithm(BaseModelFusionAlgorithm):
158
180
  A corresponding configuration file should be created to specify the class and hyperparameters of the algorithm.
159
181
  Here we assume the configuration file is placed at `config/method/your_algorithm_config.yaml`.
160
182
 
183
+ > [!NOTE]
184
+ > In fact, you can place your implementation anywhere you like, as long as the `_target_` in the configuration file points to the correct class.
185
+
161
186
  ```yaml
162
187
  _target_: path_to_the_module.DerivedModelFusionAlgorithm
163
188
 
@@ -175,6 +200,16 @@ fusion_bench \
175
200
  ... # other configurations
176
201
  ```
177
202
 
203
+ ### :rocket: Quick Start for Experienced Users
204
+
205
+ We provide a project template for quickly starting a new fusion algorithm implementation here: [FusionBench Project Template](https://github.com/fusion-bench/fusion-bench-project-template).
206
+
207
+ <div align='center'>
208
+
209
+ Click on [<kbd>Use this template</kbd>](https://github.com/fusion-bench/fusion-bench-project-template/generate) to initialize new repository.
210
+
211
+ </div>
212
+
178
213
  ### FusionBench Command Generator WebUI (for v0.1.x)
179
214
 
180
215
  FusionBench Command Generator is a user-friendly web interface for generating FusionBench commands based on configuration files.
@@ -1,3 +1,5 @@
1
+ <div align='center'>
2
+
1
3
  # FusionBench: A Comprehensive Benchmark/ToolKit of Deep Model Fusion
2
4
 
3
5
  [![arXiv](https://img.shields.io/badge/arXiv-1234.56789-b31b1b.svg)](http://arxiv.org/abs/2406.03280)
@@ -8,17 +10,23 @@
8
10
  [![Static Badge](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)
9
11
  [![Static Badge](https://img.shields.io/badge/code%20style-yamlfmt-black)](https://github.com/google/yamlfmt)
10
12
 
13
+ </div>
11
14
 
12
15
  > [!TIP]
13
16
  > Documentation is available at [tanganke.github.io/fusion_bench/](https://tanganke.github.io/fusion_bench/).
14
17
 
15
-
16
18
  ## Overview
17
19
 
18
20
  FusionBench is a benchmark suite designed to evaluate the performance of various deep model fusion techniques. It aims to provide a comprehensive comparison of different methods on a variety of datasets and tasks.
19
21
 
20
22
  Projects based on FusionBench:
21
23
 
24
+ <details>
25
+ <summary>Li Shen, Anke Tang, Enneng Yang et al. Efficient and Effective Weight-Ensembling Mixture of Experts for Multi-Task Model Merging. Oct, 2024. https://github.com/EnnengYang/Efficient-WEMoE</summary>
26
+
27
+ <img width="1018" alt="image" src="https://github.com/user-attachments/assets/b7e1279e-87fc-4016-8867-1bff7700e271">
28
+
29
+ </details>
22
30
  <details>
23
31
  <summary>Jinluan Yang et al. Mitigating the Backdoor Effect for Multi-Task Model Merging via Safety-Aware Subspace. Oct, 2024. http://arxiv.org/abs/2410.13910</summary>
24
32
 
@@ -62,9 +70,21 @@ In this benchmark, we evaluate the performance of different fusion methods on a
62
70
  The project is structured as follows:
63
71
 
64
72
  - `fusion_bench/`: the main package of the benchmark.
73
+ - `method`: contains the implementation of the fusion methods.
74
+ > **naming convention**: `fusion_bench/method/{method_name}/{variant}.py` contains the implementation of the specific method or its variants.
75
+ For example, `fusion_bench/method/regmean/clip_regmean.py` contains the implementation of the RegMean algorithm for CLIP vision models.
76
+ - `modelpool`: contains the implementation of the model pool, responsible for managing the models and dataset to be loaded.
77
+ - `taskpool`: contains the implementation of the task pool, responsible for evaluating the performance of models returned by the algorithm.
65
78
  - `config/`: configuration files for the benchmark. We use [Hydra](https://hydra.cc/) to manage the configurations.
79
+ - `method`: configuration files for the fusion methods.
80
+ > **naming convention**: `config/method/{method_name}/{variant}.yaml` contains the configuration for the specific method or its variants.
81
+ - `modelpool`: configuration files for the model pool.
82
+ - `taskpool`: configuration files for the task pool.
83
+ - `model`: configuration files for the models.
84
+ - `dataset`: configuration files for the datasets.
66
85
  - `docs/`: documentation for the benchmark. We use [mkdocs](https://www.mkdocs.org/) to generate the documentation. Start the documentation server locally with `mkdocs serve`. The required packages can be installed with `pip install -r mkdocs-requirements.txt`.
67
86
  - `examples/`: example scripts for running some of the experiments.
87
+ > **naming convention**: `examples/{method_name}/` contains the files such as bash scripts and jupyter notebooks for the specific method.
68
88
  - `tests/`: unit tests for the benchmark.
69
89
 
70
90
  ## A Unified Command Line Interface
@@ -77,6 +97,9 @@ Read the [CLI documentation](https://tanganke.github.io/fusion_bench/cli/fusion_
77
97
 
78
98
  ## Implement your own model fusion algorithm
79
99
 
100
+ First, create a new Python file for the algorithm in the `fusion_bench/method` directory.
101
+ Following the naming convention, the file should be named `{method_name_or_class}/{variant}.py`.
102
+
80
103
  ```python
81
104
  from fusion_bench import BaseModelFusionAlgorithm, BaseModelPool
82
105
 
@@ -109,6 +132,9 @@ class DerivedModelFusionAlgorithm(BaseModelFusionAlgorithm):
109
132
  A corresponding configuration file should be created to specify the class and hyperparameters of the algorithm.
110
133
  Here we assume the configuration file is placed at `config/method/your_algorithm_config.yaml`.
111
134
 
135
+ > [!NOTE]
136
+ > In fact, you can place your implementation anywhere you like, as long as the `_target_` in the configuration file points to the correct class.
137
+
112
138
  ```yaml
113
139
  _target_: path_to_the_module.DerivedModelFusionAlgorithm
114
140
 
@@ -126,6 +152,16 @@ fusion_bench \
126
152
  ... # other configurations
127
153
  ```
128
154
 
155
+ ### :rocket: Quick Start for Experienced Users
156
+
157
+ We provide a project template for quickly starting a new fusion algorithm implementation here: [FusionBench Project Template](https://github.com/fusion-bench/fusion-bench-project-template).
158
+
159
+ <div align='center'>
160
+
161
+ Click on [<kbd>Use this template</kbd>](https://github.com/fusion-bench/fusion-bench-project-template/generate) to initialize new repository.
162
+
163
+ </div>
164
+
129
165
  ### FusionBench Command Generator WebUI (for v0.1.x)
130
166
 
131
167
  FusionBench Command Generator is a user-friendly web interface for generating FusionBench commands based on configuration files.
@@ -13,7 +13,7 @@ from . import (
13
13
  tasks,
14
14
  utils,
15
15
  )
16
- from .method import BaseModelFusionAlgorithm
16
+ from .method import BaseAlgorithm, BaseModelFusionAlgorithm
17
17
  from .modelpool import BaseModelPool
18
18
  from .models import separate_io
19
19
  from .taskpool import BaseTaskPool
@@ -83,6 +83,12 @@ class CLIPImageClassificationTask(ClassificationTask):
83
83
  def evaluate(self, clip_model: CLIPModel):
84
84
  """
85
85
  Evaluate the model on the image classification task.
86
+
87
+ Args:
88
+ clip_model (CLIPModel): The CLIP model to evaluate.
89
+
90
+ Returns:
91
+ dict: A dictionary containing the evaluation results.
86
92
  """
87
93
  classifier = HFCLIPClassifier(
88
94
  clip_model=clip_model, processor=self._clip_processor
@@ -151,6 +157,12 @@ class CLIPImageClassificationTaskPool(TaskPool):
151
157
  def evaluate(self, model: CLIPVisionModel):
152
158
  """
153
159
  Evaluate the model on the image classification task.
160
+
161
+ Args:
162
+ model (CLIPVisionModel): The vision model to evaluate.
163
+
164
+ Returns:
165
+ dict: A dictionary containing the evaluation results for each task.
154
166
  """
155
167
  # if the fabric is not set, and we have a GPU, create a fabric instance
156
168
  if self._fabric is None and torch.cuda.is_available():
@@ -149,6 +149,15 @@ class FlanT5GLUETextGenerationTaskPool(LightningFabricMixin, TaskPool):
149
149
  raise ValueError(f"Unknown task {task_config.name}")
150
150
 
151
151
  def evaluate(self, model: T5ForConditionalGeneration):
152
+ """
153
+ Evaluate the model on the FlanT5 GLUE text generation tasks.
154
+
155
+ Args:
156
+ model (T5ForConditionalGeneration): The model to evaluate.
157
+
158
+ Returns:
159
+ dict: A dictionary containing the evaluation results for each task.
160
+ """
152
161
  if not isinstance(model, T5ForConditionalGeneration):
153
162
  log.warning(
154
163
  f"Model is not an instance of T5ForConditionalGeneration, but {type(model)}"
@@ -16,6 +16,9 @@ def load_gsm8k_question_label_data(
16
16
  {'question': 'Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?',
17
17
  'answer': 'Natalia sold 48/2 = <<48/2=24>>24 clips in May.\nNatalia sold 48+24 = <<48+24=72>>72 clips altogether in April and May.\n#### 72'}
18
18
 
19
+ Args:
20
+ dataset_name (Literal["train", "test", "train_socratic", "test_socratic"]): The name of the dataset to load.
21
+
19
22
  Returns:
20
23
  questions (List[str]): List of questions.
21
24
  labels (List[float]): List of labels. For example, the label for the above example is `72.0`.
@@ -0,0 +1,11 @@
1
+ from typing import Any, Dict, List, Optional
2
+
3
+ from datasets import load_dataset, load_from_disk
4
+ from transformers import PreTrainedTokenizer
5
+
6
+ import fusion_bench
7
+ import os
8
+ import logging
9
+ from trl import SFTConfig, SFTTrainer
10
+
11
+ log = logging.getLogger(__name__)
@@ -0,0 +1,142 @@
1
+ import logging
2
+ import os
3
+ from typing import Any, Dict, List, Optional
4
+
5
+ from datasets import Dataset, load_dataset, load_from_disk
6
+ from transformers import PreTrainedTokenizer
7
+
8
+ import fusion_bench
9
+
10
+ log = logging.getLogger(__name__)
11
+
12
+
13
+ def tokenize_alpaca_dataset(
14
+ dataset: Dataset,
15
+ tokenizer: PreTrainedTokenizer,
16
+ max_length: int = 2048,
17
+ input_template: str = "### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n",
18
+ input_no_template: str = "### Instruction:\n{instruction}\n\n### Response:\n",
19
+ batch_size: int = 1000,
20
+ ) -> Dataset:
21
+ """
22
+ Tokenize Alpaca format dataset with customizable options in batches.
23
+
24
+ Args:
25
+ dataset: The input dataset in Alpaca format
26
+ tokenizer: The tokenizer to use
27
+ max_length: Maximum sequence length
28
+ input_template: Template for samples with input field
29
+ input_no_template: Template for samples without input field
30
+ batch_size: Size of batches to process at once
31
+
32
+ Returns:
33
+ Tokenized dataset
34
+ """
35
+
36
+ def prepare_samples(samples: Dict[str, List[str]]) -> Dict[str, List[List[int]]]:
37
+ # Format prompts based on whether input field exists
38
+ prompts = []
39
+ for instruction, input_text in zip(
40
+ samples["instruction"], samples.get("input", [])
41
+ ):
42
+ if input_text.strip():
43
+ prompt = input_template.format(
44
+ instruction=instruction.strip(), input=input_text.strip()
45
+ )
46
+ else:
47
+ prompt = input_no_template.format(instruction=instruction.strip())
48
+ prompts.append(prompt)
49
+
50
+ responses = [output.strip() for output in samples["output"]]
51
+
52
+ # Tokenize prompts and responses
53
+ prompt_tokens = tokenizer(
54
+ prompts, add_special_tokens=False, padding=False, truncation=False
55
+ )
56
+ response_tokens = tokenizer(
57
+ responses, add_special_tokens=False, padding=False, truncation=False
58
+ )
59
+
60
+ input_ids, labels = [], []
61
+
62
+ # Process each sample in the batch
63
+ for prompt_toks, response_toks in zip(
64
+ prompt_tokens["input_ids"], response_tokens["input_ids"]
65
+ ):
66
+ # Create input_ids with EOS token
67
+ sample_input_ids = prompt_toks + response_toks + [tokenizer.eos_token_id]
68
+
69
+ # Create labels: -100 for prompt, actual tokens for response
70
+ label = [-100] * len(prompt_toks) + response_toks + [tokenizer.eos_token_id]
71
+
72
+ # Truncate if exceeds max length
73
+ if len(sample_input_ids) > max_length:
74
+ sample_input_ids = sample_input_ids[:max_length]
75
+ label = label[:max_length]
76
+
77
+ input_ids.append(sample_input_ids)
78
+ labels.append(label)
79
+
80
+ # Use tokenizer's padding feature for input_ids and attention_mask
81
+ padded_results = tokenizer.pad(
82
+ {"input_ids": input_ids},
83
+ padding=True,
84
+ max_length=max_length,
85
+ return_attention_mask=True,
86
+ )
87
+
88
+ # Pad labels with -100
89
+ padded_labels = []
90
+ for label in labels:
91
+ padding_length = max_length - len(label)
92
+ if padding_length > 0:
93
+ label = label + [-100] * padding_length
94
+ padded_labels.append(label)
95
+
96
+ return {
97
+ "input_ids": padded_results["input_ids"],
98
+ "attention_mask": padded_results["attention_mask"],
99
+ "labels": padded_labels,
100
+ }
101
+
102
+ if tokenizer.pad_token is None:
103
+ log.warning("Tokenizer does not have a `pad_token`. Set it the `eos_token`.")
104
+ tokenizer.pad_token = tokenizer.eos_token
105
+
106
+ # Process the entire dataset in batches
107
+ tokenized_dataset = dataset.map(
108
+ prepare_samples,
109
+ batched=True,
110
+ batch_size=batch_size,
111
+ remove_columns=dataset.column_names,
112
+ desc="Tokenizing dataset",
113
+ )
114
+
115
+ return tokenized_dataset
116
+
117
+
118
+ def load_tokenized_alpaca_dataset_from_json(
119
+ data_files: str,
120
+ tokenizer: PreTrainedTokenizer,
121
+ max_length: int,
122
+ split: Optional[str] = "train",
123
+ cache_path: Optional[str] = None,
124
+ ):
125
+ if cache_path is not None and fusion_bench.utils.path.path_is_dir_and_not_empty(
126
+ cache_path
127
+ ):
128
+ datasets = load_from_disk(cache_path)
129
+ if split is None:
130
+ return datasets
131
+ else:
132
+ return datasets[split]
133
+ else:
134
+ assert (
135
+ tokenizer is not None
136
+ ), "Cached dataset not found. Need tokenizer to process the raw data."
137
+
138
+ dataset = load_dataset("json", data_files=data_files)
139
+ if split is not None:
140
+ dataset = dataset[split]
141
+ dataset = tokenize_alpaca_dataset(dataset, tokenizer, max_length=max_length)
142
+ return dataset
@@ -0,0 +1,160 @@
1
+ import logging
2
+ from typing import Dict, List
3
+
4
+ from datasets import Dataset
5
+ from transformers import PreTrainedTokenizer
6
+
7
+ log = logging.getLogger(__name__)
8
+
9
+
10
+ def tokenize_messages_dataset(
11
+ dataset: Dataset,
12
+ tokenizer: PreTrainedTokenizer,
13
+ max_length: int = 2048,
14
+ padding: bool = True,
15
+ system_template: str = "### System: {message}\n",
16
+ user_template: str = "## User: {message}\n",
17
+ assistant_template: str = "## Assistant: {message}\n",
18
+ ) -> Dataset:
19
+ R"""
20
+ Tokenize dataset with messages format supporting loss calculation flags.
21
+
22
+ write a script to tokenizer datasets with the following format:
23
+
24
+ Examples:
25
+
26
+ ```json
27
+ {
28
+ "messages": [
29
+ {
30
+ "role": "system",
31
+ "content": "XXX",
32
+ "calculate_loss": 0
33
+ },
34
+ {
35
+ "role": "system",
36
+ "content": "XXX",
37
+ "calculate_loss": 0
38
+ },
39
+ {
40
+ "role": "user",
41
+ "content": "XXX",
42
+ "calculate_loss": 0
43
+ },
44
+ {
45
+ "role": "assistant",
46
+ "content": "XXX",
47
+ "calculate_loss": 1
48
+ }
49
+ ],
50
+ "create_info": [
51
+ {
52
+ "date": "20240830",
53
+ "owner": "l00470783",
54
+ "within_source_id": 0,
55
+ "describe": "...",
56
+ "source": [
57
+ "..."
58
+ ],
59
+ "language": "zh"
60
+ }
61
+ ],
62
+ "feature_info": {
63
+ "domain": "...",
64
+ "tags": [
65
+ "..."
66
+ ]
67
+ },
68
+ "source_file": "..."
69
+ }
70
+ ```
71
+
72
+ Args:
73
+ dataset: Input dataset with messages format
74
+ tokenizer: The tokenizer to use
75
+ max_length: Maximum sequence length
76
+ system_template: Template for system messages
77
+ user_template: Template for user messages
78
+ assistant_template: Template for assistant messages
79
+
80
+ Returns:
81
+ Tokenized dataset
82
+ """
83
+
84
+ def build_prompt(messages: List[Dict[str, str]]) -> tuple[str, str]:
85
+ """
86
+ Build prompt and get response that needs loss calculation.
87
+ Returns conversation history and the response to calculate loss on.
88
+ """
89
+ history = ""
90
+ response = ""
91
+
92
+ for message in messages:
93
+ role = message["role"]
94
+ content = message["content"].strip()
95
+ calculate_loss = message.get("calculate_loss", 0)
96
+
97
+ # Build conversation history
98
+ if role == "system":
99
+ history += system_template.format(message=content)
100
+ elif role == "user":
101
+ history += user_template.format(message=content)
102
+ elif role == "assistant":
103
+ if calculate_loss:
104
+ # If this assistant message needs loss calculation,
105
+ # save it as response and don't add to history
106
+ response = content
107
+ else:
108
+ # Otherwise add to conversation history
109
+ history += assistant_template.format(message=content)
110
+
111
+ return history, response
112
+
113
+ def prepare_sample(sample: dict) -> dict:
114
+ # Get conversation history and response
115
+ history, response = build_prompt(sample["messages"])
116
+
117
+ # Tokenize prompt and response
118
+ prompt_tokens = tokenizer.encode(history, add_special_tokens=False)
119
+ response_tokens = tokenizer.encode(response, add_special_tokens=False)
120
+
121
+ # Create input_ids with EOS token
122
+ input_ids = prompt_tokens + response_tokens + [tokenizer.eos_token_id]
123
+
124
+ # Create attention mask
125
+ attention_mask = [1] * len(input_ids)
126
+
127
+ # Create labels: -100 for prompt, actual tokens for response
128
+ labels = (
129
+ [-100] * len(prompt_tokens) + response_tokens + [tokenizer.eos_token_id]
130
+ )
131
+
132
+ # Truncate if exceeds max length
133
+ if len(input_ids) > max_length:
134
+ input_ids = input_ids[:max_length]
135
+ attention_mask = attention_mask[:max_length]
136
+ labels = labels[:max_length]
137
+
138
+ # Pad if necessary
139
+ if padding:
140
+ padding_length = max_length - len(input_ids)
141
+ if padding_length > 0:
142
+ input_ids.extend([tokenizer.pad_token_id] * padding_length)
143
+ attention_mask.extend([0] * padding_length)
144
+ labels.extend([-100] * padding_length)
145
+
146
+ return {
147
+ "input_ids": input_ids,
148
+ "attention_mask": attention_mask,
149
+ "labels": labels,
150
+ }
151
+
152
+ if tokenizer.pad_token is None:
153
+ log.warning("Tokenizer does not have a `pad_token`. Set it the `eos_token`.")
154
+ tokenizer.pad_token = tokenizer.eos_token
155
+ # Process the dataset
156
+ tokenized_dataset = dataset.map(
157
+ prepare_sample, remove_columns=dataset.column_names, desc="Tokenizing dataset"
158
+ )
159
+
160
+ return tokenized_dataset