Add library name and pipeline tag
#1
by
nielsr
HF Staff
- opened
README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
-
|
| 2 |
---
|
| 3 |
license: llama2
|
|
|
|
|
|
|
| 4 |
base_model:
|
| 5 |
- unsloth/llama-2-13b
|
| 6 |
- layoric/llama-2-13b-code-alpaca
|
|
@@ -9,8 +10,8 @@ base_model:
|
|
| 9 |
tags:
|
| 10 |
- merge
|
| 11 |
---
|
| 12 |
-
|
| 13 |
-
This repository includes one of the checkpoints used in the paper "Activation-Informed Merging of Large Language Models". Specifics of this model are as follows:
|
| 14 |
|
| 15 |
- **Merging Method:** dare_linear
|
| 16 |
- **Models Used In Merging**
|
|
@@ -21,3 +22,328 @@ This repository includes one of the checkpoints used in the paper "Activation-In
|
|
| 21 |
- **AIM:** True
|
| 22 |
|
| 23 |
Benchmark results and paper details can be found at the official [GitHub](https://github.com/ahnobari/ActivationInformedMerging.git).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: llama2
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
base_model:
|
| 6 |
- unsloth/llama-2-13b
|
| 7 |
- layoric/llama-2-13b-code-alpaca
|
|
|
|
| 10 |
tags:
|
| 11 |
- merge
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
This repository includes one of the checkpoints used in the paper "[Activation-Informed Merging of Large Language Models](https://huggingface.co/papers/2502.02421)". Specifics of this model are as follows:
|
| 15 |
|
| 16 |
- **Merging Method:** dare_linear
|
| 17 |
- **Models Used In Merging**
|
|
|
|
| 22 |
- **AIM:** True
|
| 23 |
|
| 24 |
Benchmark results and paper details can be found at the official [GitHub](https://github.com/ahnobari/ActivationInformedMerging.git).
|
| 25 |
+
|
| 26 |
+
# File information
|
| 27 |
+
|
| 28 |
+
The repository contains the following file information:
|
| 29 |
+
|
| 30 |
+
Filename: added_tokens.json
|
| 31 |
+
Content: {
|
| 32 |
+
"<pad>": 32001,
|
| 33 |
+
"[PAD]": 32000
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
Filename: tokenizer_config.json
|
| 37 |
+
Content: {
|
| 38 |
+
"add_bos_token": true,
|
| 39 |
+
"add_eos_token": false,
|
| 40 |
+
"add_prefix_space": null,
|
| 41 |
+
"added_tokens_decoder": {
|
| 42 |
+
"0": {
|
| 43 |
+
"content": "<unk>",
|
| 44 |
+
"lstrip": false,
|
| 45 |
+
"normalized": false,
|
| 46 |
+
"rstrip": false,
|
| 47 |
+
"single_word": false,
|
| 48 |
+
"special": true
|
| 49 |
+
},
|
| 50 |
+
"1": {
|
| 51 |
+
"content": "<s>",
|
| 52 |
+
"lstrip": false,
|
| 53 |
+
"normalized": false,
|
| 54 |
+
"rstrip": false,
|
| 55 |
+
"single_word": false,
|
| 56 |
+
"special": true
|
| 57 |
+
},
|
| 58 |
+
"2": {
|
| 59 |
+
"content": "</s>",
|
| 60 |
+
"lstrip": false,
|
| 61 |
+
"normalized": false,
|
| 62 |
+
"rstrip": false,
|
| 63 |
+
"single_word": false,
|
| 64 |
+
"special": true
|
| 65 |
+
},
|
| 66 |
+
"32000": {
|
| 67 |
+
"content": "[PAD]",
|
| 68 |
+
"lstrip": false,
|
| 69 |
+
"normalized": false,
|
| 70 |
+
"rstrip": false,
|
| 71 |
+
"single_word": false,
|
| 72 |
+
"special": true
|
| 73 |
+
},
|
| 74 |
+
"32001": {
|
| 75 |
+
"content": "<pad>",
|
| 76 |
+
"lstrip": false,
|
| 77 |
+
"normalized": false,
|
| 78 |
+
"rstrip": false,
|
| 79 |
+
"single_word": false,
|
| 80 |
+
"special": true
|
| 81 |
+
}
|
| 82 |
+
},
|
| 83 |
+
"bos_token": "<s>",
|
| 84 |
+
"clean_up_tokenization_spaces": false,
|
| 85 |
+
"eos_token": "</s>",
|
| 86 |
+
"extra_special_tokens": {},
|
| 87 |
+
"legacy": false,
|
| 88 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 89 |
+
"pad_token": "<pad>",
|
| 90 |
+
"padding_side": "left",
|
| 91 |
+
"sp_model_kwargs": {},
|
| 92 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 93 |
+
"unk_token": "<unk>",
|
| 94 |
+
"use_default_system_prompt": false
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
Filename: special_tokens_map.json
|
| 98 |
+
Content: {
|
| 99 |
+
"bos_token": {
|
| 100 |
+
"content": "<s>",
|
| 101 |
+
"lstrip": false,
|
| 102 |
+
"normalized": false,
|
| 103 |
+
"rstrip": false,
|
| 104 |
+
"single_word": false
|
| 105 |
+
},
|
| 106 |
+
"eos_token": {
|
| 107 |
+
"content": "</s>",
|
| 108 |
+
"lstrip": false,
|
| 109 |
+
"normalized": false,
|
| 110 |
+
"rstrip": false,
|
| 111 |
+
"single_word": false
|
| 112 |
+
},
|
| 113 |
+
"pad_token": {
|
| 114 |
+
"content": "<pad>",
|
| 115 |
+
"lstrip": false,
|
| 116 |
+
"normalized": false,
|
| 117 |
+
"rstrip": false,
|
| 118 |
+
"single_word": false
|
| 119 |
+
},
|
| 120 |
+
"unk_token": {
|
| 121 |
+
"content": "<unk>",
|
| 122 |
+
"lstrip": false,
|
| 123 |
+
"normalized": false,
|
| 124 |
+
"rstrip": false,
|
| 125 |
+
"single_word": false
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
Filename: config.json
|
| 130 |
+
Content: {
|
| 131 |
+
"_name_or_path": "./FinalSet/AWR_04_dare_linear_Instruction Tuned-Math-Code",
|
| 132 |
+
"architectures": [
|
| 133 |
+
"LlamaForCausalLM"
|
| 134 |
+
],
|
| 135 |
+
"attention_bias": false,
|
| 136 |
+
"attention_dropout": 0.0,
|
| 137 |
+
"bos_token_id": 1,
|
| 138 |
+
"eos_token_id": 2,
|
| 139 |
+
"head_dim": 128,
|
| 140 |
+
"hidden_act": "silu",
|
| 141 |
+
"hidden_size": 5120,
|
| 142 |
+
"initializer_range": 0.02,
|
| 143 |
+
"intermediate_size": 13824,
|
| 144 |
+
"max_position_embeddings": 4096,
|
| 145 |
+
"mlp_bias": false,
|
| 146 |
+
"model_type": "llama",
|
| 147 |
+
"num_attention_heads": 40,
|
| 148 |
+
"num_hidden_layers": 40,
|
| 149 |
+
"num_key_value_heads": 40,
|
| 150 |
+
"pad_token_id": 0,
|
| 151 |
+
"pretraining_tp": 1,
|
| 152 |
+
"rms_norm_eps": 1e-05,
|
| 153 |
+
"rope_scaling": null,
|
| 154 |
+
"rope_theta": 10000.0,
|
| 155 |
+
"tie_word_embeddings": false,
|
| 156 |
+
"torch_dtype": "float16",
|
| 157 |
+
"transformers_version": "4.48.0",
|
| 158 |
+
"unsloth_version": "2024.9",
|
| 159 |
+
"use_cache": true,
|
| 160 |
+
"vocab_size": 32002
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
Filename: tokenizer.json
|
| 164 |
+
Content: "Content of the file is larger than 50 KB, too long to display."
|
| 165 |
+
|
| 166 |
+
Filename: generation_config.json
|
| 167 |
+
Content: {
|
| 168 |
+
"bos_token_id": 1,
|
| 169 |
+
"do_sample": true,
|
| 170 |
+
"eos_token_id": 2,
|
| 171 |
+
"max_length": 4096,
|
| 172 |
+
"pad_token_id": 0,
|
| 173 |
+
"temperature": 0.6,
|
| 174 |
+
"top_p": 0.9,
|
| 175 |
+
"transformers_version": "4.48.0"
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
Filename: tokenizer.model
|
| 179 |
+
Content: "Content of the file is larger than 50 KB, too long to display."
|
| 180 |
+
|
| 181 |
+
Filename: model.safetensors.index.json
|
| 182 |
+
Content: "Content of the file is larger than 50 KB, too long to display."
|
| 183 |
+
|
| 184 |
+
# Project page
|
| 185 |
+
|
| 186 |
+
The project page URL we found has the following URL:
|
| 187 |
+
|
| 188 |
+
# Github README
|
| 189 |
+
|
| 190 |
+
The Github README we found contains the following content:
|
| 191 |
+
|
| 192 |
+
# ActivationInformedMerging
|
| 193 |
+
<img width="100%" alt="Screenshot 2025-02-04 at 9 56 19β―AM" src="https://github.com/user-attachments/assets/5b328cf0-797d-4aa4-9a98-1224cc4a971a" />
|
| 194 |
+
|
| 195 |
+
Model merging, a method that combines the parameters and embeddings of multiple fine-tuned large language models (LLMs), offers a promising approach to enhance model performance across various tasks while maintaining computational efficiency.
|
| 196 |
+
This paper introduces Activation-Informed Merging (AIM), a technique that integrates the information from the activation space of LLMs into the merging process to improve performance and robustness.
|
| 197 |
+
AIM is designed as a flexible, complementary solution that is applicable to any existing merging method.
|
| 198 |
+
It aims to preserve critical weights from the base model, drawing on principles from continual learning(CL) and model compression.
|
| 199 |
+
Utilizing a task-agnostic calibration set, AIM selectively prioritizes essential weights during merging. We empirically demonstrate that AIM significantly enhances the performance of merged models across multiple benchmarks. Our findings suggest that considering the activation-space information can provide substantial advancements in the model merging strategies for LLMs with up to 40% increase in benchmark performance.
|
| 200 |
+
|
| 201 |
+
[π Full Paper](https://arxiv.org/abs/2502.02421) | [π€AIM Checkpoints](https://huggingface.co/collections/ahn1376/aim-merged-checkpoints-with-aim-67a226c77c915124f4bab456) | [π€Baseline Checkpoints](https://huggingface.co/collections/ahn1376/aim-merged-checkpoints-baseline-w-o-aim-67a15f05fa1066b3f642f2c6)
|
| 202 |
+
|
| 203 |
+
# Checkpoints Used In Experiments
|
| 204 |
+
All checkpoints (merged with and without AIM) that were used for experiments in the paper are provided on huggingface. Below are the links to the aforementioned models:
|
| 205 |
+
|
| 206 |
+
## Models with AIM ([Collection π€](https://huggingface.co/collections/ahn1376/aim-merged-checkpoints-with-aim-67a226c77c915124f4bab456))
|
| 207 |
+
|
| 208 |
+
| Method | Code-Math | Code-Instruction | Math-Instruction | Code-Math-Instruction |
|
| 209 |
+
|--------|-----------|------------------|------------------|---------------------|
|
| 210 |
+
| DARE Linear | [Link π€](https://huggingface.co/ahn1376/DARETaskArithmetic___Code-Math___AIM) | [Link π€](https://huggingface.co/ahn1376/DARETaskArithmetic___Code-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/DARETaskArithmetic___Math-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/DARETaskArithmetic___Code-Math-Instruction_Tuned___AIM) |
|
| 211 |
+
| DARE Ties | [Link π€](https://huggingface.co/ahn1376/DARETies___Code-Math___AIM) | [Link π€](https://huggingface.co/ahn1376/DARETies___Code-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/DARETies___Math-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/DARETies___Code-Math-Instruction_Tuned___AIM) |
|
| 212 |
+
| Ties | [Link π€](https://huggingface.co/ahn1376/Ties___Code-Math___AIM) | [Link π€](https://huggingface.co/ahn1376/Ties___Code-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/Ties___Math-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/Ties___Code-Math-Instruction_Tuned___AIM) |
|
| 213 |
+
| Task Arithmetic | [Link π€](https://huggingface.co/ahn1376/TaskArithmetic___Code-Math___AIM) | [Link π€](https://huggingface.co/ahn1376/TaskArithmetic___Code-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/TaskArithmetic___Math-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/TaskArithmetic___Code-Math-Instruction_Tuned___AIM) |
|
| 214 |
+
| WIDEN | [Link π€](https://huggingface.co/ahn1376/WIDEN___Code-Math___AIM) | [Link π€](https://huggingface.co/ahn1376/WIDEN___Code-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/WIDEN___Math-Instruction_Tuned___AIM) | [Link π€](https://huggingface.co/ahn1376/WIDEN___Code-Math-Instruction_Tuned___AIM) |
|
| 215 |
+
|
| 216 |
+
## Models without AIM ([Collection π€](https://huggingface.co/collections/ahn1376/aim-merged-checkpoints-baseline-w-o-aim-67a15f05fa1066b3f642f2c6))
|
| 217 |
+
|
| 218 |
+
| Method | Code-Math | Code-Instruction | Math-Instruction | Code-Math-Instruction |
|
| 219 |
+
|--------|-----------|------------------|------------------|---------------------|
|
| 220 |
+
| DARE Linear | [Link π€](https://huggingface.co/ahn1376/DARETaskArithmetic___Code-Math) | [Link π€](https://huggingface.co/ahn1376/DARETaskArithmetic___Code-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/DARETaskArithmetic___Math-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/DARETaskArithmetic___Code-Math-Instruction_Tuned) |
|
| 221 |
+
| DARE Ties | [Link π€](https://huggingface.co/ahn1376/DARETies___Code-Math) | [Link π€](https://huggingface.co/ahn1376/DARETies___Code-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/DARETies___Math-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/DARETies___Code-Math-Instruction_Tuned) |
|
| 222 |
+
| Ties | [Link π€](https://huggingface.co/ahn1376/Ties___Code-Math) | [Link π€](https://huggingface.co/ahn1376/Ties___Code-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/Ties___Math-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/Ties___Code-Math-Instruction_Tuned) |
|
| 223 |
+
| Task Arithmetic | [Link π€](https://huggingface.co/ahn1376/TaskArithmetic___Code-Math) | [Link π€](https://huggingface.co/ahn1376/TaskArithmetic___Code-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/TaskArithmetic___Math-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/TaskArithmetic___Code-Math-Instruction_Tuned) |
|
| 224 |
+
| WIDEN | [Link π€](https://huggingface.co/ahn1376/WIDEN___Code-Math) | [Link π€](https://huggingface.co/ahn1376/WIDEN___Code-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/WIDEN___Math-Instruction_Tuned) | [Link π€](https://huggingface.co/ahn1376/WIDEN___Code-Math-Instruction_Tuned) |
|
| 225 |
+
|
| 226 |
+
# Usage
|
| 227 |
+
You can re-deo the experiments we have here using the provided code. Below we detail how to replicate the experiments.
|
| 228 |
+
|
| 229 |
+
## Merging Models
|
| 230 |
+
If you wish to merge the models yourself instead of using the provided checkpoints you can do so with the `merge.py` script provided. For example to perform DARE Ties merging on the Code, Math and Instruction Tuned models you can run:
|
| 231 |
+
|
| 232 |
+
```bash
|
| 233 |
+
python merge.py --method dare_ties --base_model unsloth/llama-2-13b --models_to_merge WizardLMTeam/WizardLM-13B-V1.2,vanillaOVO/WizardMath-13B-V1.0,layoric/llama-2-13b-code-alpaca --save_path ./DARE_TIES_InstructMathCode
|
| 234 |
+
```
|
| 235 |
+
|
| 236 |
+
## Evaluating Models on Benchmarks
|
| 237 |
+
Once you have the checkpoints you want to test you can run the `evaluate_model.py` script to run the benchamrks on the model. For example to run the benchmarks on the model merged above you can run:
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
```bash
|
| 241 |
+
python evaluate_model.py --model ./DARE_TIES_InstructMathCode
|
| 242 |
+
```
|
| 243 |
+
|
| 244 |
+
or if you wanted to use the provided checkpoints:
|
| 245 |
+
|
| 246 |
+
```bash
|
| 247 |
+
python evaluate_model.py --model ahn1376/DARETies___Code-Math-Instruction_Tuned
|
| 248 |
+
```
|
| 249 |
+
|
| 250 |
+
## Applying AIM to A Merged Model
|
| 251 |
+
If you want to apply AIM to any merged model you will need to provide the merged checkpoint as well as the base model checkpoint. The only hyper-parameter in AIM is $\omega$, which we recommend to be set between $0.2-0.6$ we set this to $0.4$ for the experiments in our paper, but in some cases lower values (more relaxation) will yeild better results. Below is how you can apply AIM to the checkpoint the code above makes:
|
| 252 |
+
|
| 253 |
+
```bash
|
| 254 |
+
python performAIM.py --merged_model ./DARE_TIES_InstructMathCode --pretrained_model_name unsloth/llama-2-13b --omega 0.4 --save_path ./DARE_TIES_AIM_InstructMathCode
|
| 255 |
+
```
|
| 256 |
+
|
| 257 |
+
|
| 258 |
+
# Summary of Findings
|
| 259 |
+
We find that in basically all merging methods we tested applying AIM improves performance and pushed the pareto front of the resulting model population and achieves the highest scrores in benchmarks. The figure below shows how with decreasing $\omega$ (more AIM relaxation) leads to further improvements in some models (HV gain is the hypervolume gained by adding the model to the population models used for merging (more is better)):
|
| 260 |
+
|
| 261 |
+
<img width="600px" alt="Screenshot 2025-02-04 at 10 15 38β―AM" src="https://github.com/user-attachments/assets/5cd5119e-a292-45d4-972f-b2dd6febf6f8" />
|
| 262 |
+
|
| 263 |
+
We can observe this better by visualizing some of the pareto fronts for different model populations:
|
| 264 |
+
|
| 265 |
+
<img width="100%" alt="Screenshot 2025-02-04 at 10 22 25β―AM" src="https://github.com/user-attachments/assets/5d88a71e-16ca-4f71-84f7-6e8de96ea69a" />
|
| 266 |
+
|
| 267 |
+
Overall the results of our experiments are as follows for the different tests:
|
| 268 |
+
|
| 269 |
+
## Base Models
|
| 270 |
+
|
| 271 |
+
| Method | Model(s) | AIM | HumanEval | MBPP | MMLU | MATH | GSM8K | IFEval | HV Gain |
|
| 272 |
+
|--------|----------|-----|-----------|------|------|------|-------|---------|----------|
|
| 273 |
+
| - | Base | - | 17.07 | 27.80 | 52.18 | 0.70 | 4.20 | 25.10 | - |
|
| 274 |
+
| - | Code | - | 17.07 | 31.60 | 52.91 | 6.00 | 24.10 | 26.25 | - |
|
| 275 |
+
| - | Instruction Tuned | - | **26.83** | **34.80** | **53.41** | 7.50 | 43.40 | **35.67** | - |
|
| 276 |
+
| - | Math | - | 15.24 | 27.60 | 51.89 | **13.10** | **59.10** | 21.58 | - |
|
| 277 |
+
|
| 278 |
+
## Merged Models
|
| 279 |
+
|
| 280 |
+
### DARE Task Arithmetic
|
| 281 |
+
|
| 282 |
+
| Model(s) | AIM | HumanEval | MBPP | MMLU | MATH | GSM8K | IFEval | HV Gain |
|
| 283 |
+
|----------|-----|-----------|------|------|------|-------|---------|----------|
|
| 284 |
+
| Code + Instruction Tuned | No | 26.83 | 34.40 | 53.53 | 8.40 | 45.80 | 33.42 | 0.27 |
|
| 285 |
+
| | Yes | 29.27 (+9.09%) | 36.00 (+4.65%) | 54.18 (+1.21%) | 8.30 (-1.19%) | 46.20 (+0.87%) | 32.00 (-4.25%) | 0.28 (+2.49%) |
|
| 286 |
+
| Code + Math | No | 16.46 | 28.60 | 51.96 | 15.10 | 64.70 | 22.02 | 0.23 |
|
| 287 |
+
| | Yes | 15.85 (-3.71%) | 29.60 (+3.50%) | 52.50 (+1.04%) | 14.80 (-1.99%) | 64.10 (-0.93%) | 21.91 (-0.50%) | 0.23 (-1.65%) |
|
| 288 |
+
| Instruction Tuned + Math | No | 5.49 | 19.00 | 51.08 | 9.80 | 54.30 | 32.35 | 0.18 |
|
| 289 |
+
| | Yes | 12.20 (+122.22%) | 28.20 (+48.42%) | 52.72 (+3.21%) | 12.90 (+31.63%) | 62.20 (+14.55%) | 31.96 (-1.21%) | 0.26 (+40.71%) |
|
| 290 |
+
| Code + Instruction Tuned + Math | No | 11.59 | 19.60 | 50.89 | 9.10 | 49.70 | 33.20 | 0.16 |
|
| 291 |
+
| | Yes | 15.85 (+36.76%) | 27.00 (+37.76%) | 52.59 (+3.34%) | 12.20 (+34.07%) | 60.70 (+22.13%) | 33.59 (+1.17%) | 0.23 (+40.59%) |
|
| 292 |
+
|
| 293 |
+
### DARE Ties
|
| 294 |
+
|
| 295 |
+
| Model(s) | AIM | HumanEval | MBPP | MMLU | MATH | GSM8K | IFEval | HV Gain |
|
| 296 |
+
|----------|-----|-----------|------|------|------|-------|---------|----------|
|
| 297 |
+
| Code + Instruction Tuned | No | 30.49 | 35.20 | 53.40 | 8.60 | 46.20 | 33.28 | 0.28 |
|
| 298 |
+
| | Yes | **30.49** | **36.80** (+4.55%) | 54.02 (+1.16%) | 8.60 | 47.20 (+2.16%) | 33.16 (-0.36%) | 0.29 (+1.63%) |
|
| 299 |
+
| Code + Math | No | 17.07 | 27.40 | 51.92 | 14.90 | 63.60 | 22.53 | 0.23 |
|
| 300 |
+
| | Yes | 17.68 (+3.57%) | 29.00 (+5.84%) | 52.61 (+1.33%) | 15.20 (+2.01%) | 63.90 (+0.47%) | 21.10 (-6.35%) | 0.24 (+4.00%) |
|
| 301 |
+
| Instruction Tuned + Math | No | 8.54 | 23.80 | 51.39 | 9.20 | 54.10 | 33.89 | 0.20 |
|
| 302 |
+
| | Yes | 15.85 (+85.60%) | 30.20 (+26.89%) | 52.89 (+2.92%) | 11.60 (+26.09%) | 57.80 (+6.84%) | 35.63 (+5.13%) | 0.26 (+31.22%) |
|
| 303 |
+
| Code + Instruction Tuned + Math | No | 13.41 | 21.20 | 51.15 | 8.70 | 51.50 | 35.75 | 0.17 |
|
| 304 |
+
| | Yes | 19.51 (+45.49%) | 28.60 (+34.91%) | 52.63 (+2.89%) | 11.60 (+33.33%) | 57.00 (+10.68%) | **36.20** (+1.26%) | 0.24 (+41.28%) |
|
| 305 |
+
|
| 306 |
+
### Task Arithmetic
|
| 307 |
+
|
| 308 |
+
| Model(s) | AIM | HumanEval | MBPP | MMLU | MATH | GSM8K | IFEval | HV Gain |
|
| 309 |
+
|----------|-----|-----------|------|------|------|-------|---------|----------|
|
| 310 |
+
| Code + Instruction Tuned | No | 29.27 | 33.80 | 53.44 | 8.60 | 47.10 | 31.60 | 0.28 |
|
| 311 |
+
| | Yes | 29.88 (+2.08%) | 35.80 (+5.92%) | 54.12 (+1.27%) | 7.80 (-9.30%) | 46.60 (-1.06%) | 32.01 (+1.30%) | 0.28 (+0.61%) |
|
| 312 |
+
| Code + Math | No | 18.29 | 28.60 | 52.10 | 15.00 | 64.70 | 21.92 | 0.24 |
|
| 313 |
+
| | Yes | 17.68 (-3.34%) | 29.20 (+2.10%) | 52.52 (+0.81%) | 14.60 (-2.67%) | 64.50 (-0.31%) | 21.54 (-1.73%) | 0.24 (-2.65%) |
|
| 314 |
+
| Instruction Tuned + Math | No | 4.27 | 20.20 | 51.50 | 10.00 | 54.20 | 31.31 | 0.18 |
|
| 315 |
+
| | Yes | 8.54 (+100.00%) | 26.40 (+30.69%) | 52.83 (+2.58%) | 12.80 (+28.00%) | 61.30 (+13.10%) | 32.62 (+4.18%) | 0.24 (+34.52%) |
|
| 316 |
+
| Code + Instruction Tuned + Math | No | 11.59 | 19.60 | 51.20 | 9.00 | 52.70 | 32.87 | 0.16 |
|
| 317 |
+
| | Yes | 15.24 (+31.49%) | 27.40 (+39.80%) | 52.63 (+2.79%) | 12.00 (+33.33%) | 58.10 (+10.25%) | 33.91 (+3.16%) | 0.22 (+31.97%) |
|
| 318 |
+
|
| 319 |
+
### Ties Merging
|
| 320 |
+
|
| 321 |
+
| Model(s) | AIM | HumanEval | MBPP | MMLU | MATH | GSM8K | IFEval | HV Gain |
|
| 322 |
+
|----------|-----|-----------|------|------|------|-------|---------|----------|
|
| 323 |
+
| Code + Instruction Tuned | No | 16.46 | 23.60 | 52.70 | 2.70 | 5.40 | 24.48 | 0.00 |
|
| 324 |
+
| | Yes | 15.24 (-7.41%) | 24.20 (+2.54%) | 53.15 (+0.85%) | 2.60 (-3.70%) | 5.20 (-3.70%) | 22.87 (-6.58%) | 0.05 (+inf%) |
|
| 325 |
+
| Code + Math | No | 15.85 | 26.80 | 51.86 | 14.30 | 62.60 | 21.63 | 0.20 |
|
| 326 |
+
| | Yes | 15.85 | 28.60 (+6.72%) | 52.29 (+0.83%) | **15.30** (+6.99%) | 63.80 (+1.92%) | 22.64 (+4.67%) | 0.23 (+13.55%) |
|
| 327 |
+
| Instruction Tuned + Math | No | 28.05 | 34.60 | 54.45 | 8.70 | 44.70 | 34.04 | 0.23 |
|
| 328 |
+
| | Yes | 27.44 (-2.17%) | 35.00 (+1.16%) | 54.74 (+0.53%) | 9.30 (+6.90%) | 46.10 (+3.13%) | 34.51 (+1.38%) | 0.25 (+6.38%) |
|
| 329 |
+
| Code + Instruction Tuned + Math | No | 21.34 | 29.20 | 53.97 | 6.30 | 29.20 | 26.95 | 0.11 |
|
| 330 |
+
| | Yes | 20.73 (-2.86%) | 29.20 | 54.46 (+0.91%) | 5.70 (-9.52%) | 23.70 (-18.84%) | 25.98 (-3.60%) | 0.11 (+4.33%) |
|
| 331 |
+
|
| 332 |
+
### WIDEN
|
| 333 |
+
|
| 334 |
+
| Model(s) | AIM | HumanEval | MBPP | MMLU | MATH | GSM8K | IFEval | HV Gain |
|
| 335 |
+
|----------|-----|-----------|------|------|------|-------|---------|----------|
|
| 336 |
+
| Code + Instruction Tuned | No | 26.22 | 35.60 | 54.90 | 8.30 | 45.00 | 30.42 | 0.27 |
|
| 337 |
+
| | Yes | 25.61 (-2.33%) | 34.60 (-2.81%) | 54.97 (+0.13%) | 8.20 (-1.20%) | 44.10 (-2.00%) | 31.60 (+3.88%) | 0.26 (-0.93%) |
|
| 338 |
+
| Code + Math | No | 17.07 | 29.40 | 53.35 | 14.20 | 64.40 | 24.02 | 0.24 |
|
| 339 |
+
| | Yes | 17.07 | 29.60 (+0.68%) | 53.36 (+0.02%) | 14.30 (+0.70%) | 62.20 (-3.42%) | 23.95 (-0.29%) | 0.24 (-1.22%) |
|
| 340 |
+
| Instruction Tuned + Math | No | 24.39 | 30.40 | 54.20 | 14.60 | 66.00 | 30.82 | 0.30 |
|
| 341 |
+
| | Yes | 23.78 (-2.50%) | 32.00 (+5.26%) | 54.69 (+0.90%) | 15.10 (+3.42%) | **68.20** (+3.33%) | 31.23 (+1.33%) | **0.31** (+2.54%) |
|
| 342 |
+
| Code + Instruction Tuned + Math | No | 25.00 | 33.20 | 54.58 | 13.50 | 64.20 | 31.44 | 0.29 |
|
| 343 |
+
| | Yes | 26.83 (+7.32%) | 32.80 (-1.20%) | **54.98** (+0.73%) | 14.40 (+6.67%) | 64.00 (-0.31%) | 32.82 (+4.39%) | 0.30 (+4.70%) |
|
| 344 |
+
|
| 345 |
+
# Citation
|
| 346 |
+
```bib
|
| 347 |
+
@misc{nobari2025activationinformedmerginglargelanguage,
|
| 348 |
+
title={Activation-Informed Merging of Large Language Models},
|
| 349 |
+
author={Amin Heyrani Nobari and Kaveh Alimohammadi and Ali ArjomandBigdeli and Akash Srivastava and Fa
|