Paper: Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch
code: official repogitory
You can add models in merge_llms_instruct_math_code.py and inference_llms_instruct_math_code.
Llama 2 base
Llama 3 base
Llama 2 base
Llama 3 base
huggingface-cli login
Fill in [MODEL NAME] .
w/o DARE (drop rate 0.0)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.0
Drop Only (drop rate 0.9)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.9
Magnitude-Based Pruning (drop rate 0.9)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.9 --mask_strategy magnitude
Masking Fine-Tuned Parameters (drop rate 0.9)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.9 --use_weight_rescale --weight_format finetuned_weight
DARE (drop rate 0.9 and Re-scale)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.9 --use_weight_rescale
Fill in [MODEL NAME1] and [MODEL NAME2] .
Avg Merging
python merge_llms_instruct_math_code.py --[MODEL NAME1] --[MODEL NAME2] --merging_method_name average_merging --tensor_parallel_size 1
Task Arithmetic
python merge_llms_instruct_math_code.py --[MODEL NAME1] --[MODEL NAME2] --merging_method_name task_arithmetic --scaling_coefficient 1.0 --tensor_parallel_size 1
AvgMerging and DARE (drop rate 0.9 and Re-scale)
python merge_llms_instruct_math_code.py --[MODEL NAME1] --[MODEL NAME2] --merging_method_name mask_merging --use_weight_rescale --weight_mask_rate 0.9 --mask_apply_method average_merging --tensor_parallel_size 1
Python
99.9%
Paper: Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch
code: official repogitory
You can add models in merge_llms_instruct_math_code.py and inference_llms_instruct_math_code.
Llama 2 base
Llama 3 base
Llama 2 base
Llama 3 base
huggingface-cli login
Fill in [MODEL NAME] .
w/o DARE (drop rate 0.0)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.0
Drop Only (drop rate 0.9)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.9
Magnitude-Based Pruning (drop rate 0.9)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.9 --mask_strategy magnitude
Masking Fine-Tuned Parameters (drop rate 0.9)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.9 --use_weight_rescale --weight_format finetuned_weight
DARE (drop rate 0.9 and Re-scale)
python inference_llms_instruct_math_code.py --dataset_name gsm8k --finetuned_model_name [MODEL NAME] --tensor_parallel_size 1 --weight_mask_rate 0.9 --use_weight_rescale
Fill in [MODEL NAME1] and [MODEL NAME2] .
Avg Merging
python merge_llms_instruct_math_code.py --[MODEL NAME1] --[MODEL NAME2] --merging_method_name average_merging --tensor_parallel_size 1
Task Arithmetic
python merge_llms_instruct_math_code.py --[MODEL NAME1] --[MODEL NAME2] --merging_method_name task_arithmetic --scaling_coefficient 1.0 --tensor_parallel_size 1
AvgMerging and DARE (drop rate 0.9 and Re-scale)
python merge_llms_instruct_math_code.py --[MODEL NAME1] --[MODEL NAME2] --merging_method_name mask_merging --use_weight_rescale --weight_mask_rate 0.9 --mask_apply_method average_merging --tensor_parallel_size 1
Python
99.9%