fiveflow commited on
Commit
6514a17
1 Parent(s): 2f63e65

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +243 -195
README.md CHANGED
@@ -1,199 +1,247 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  library_name: transformers
3
+ language:
4
+ - ko
5
+ base_model:
6
+ - meta-llama/Llama-3.1-8B
7
+ - NCSOFT/Llama-VARCO-8B-Instruct
8
+ - akjindal53244/Llama-3.1-Storm-8B
9
+ pipeline_tag: text-generation
10
  ---
11
 
12
+ # 🤖 LLM Evolutionary Merge
13
+
14
+ 🤗 [Model](https://huggingface.co/fiveflow/LLMEvoLLaMA-3.1-8B-v0.1) | 📂 [Github](https://github.com/kwon13/LLM-Evo-Merge) | ✍️ [Blog](작성중..) | 💡[Inspired by Sakana AI](https://github.com/SakanaAI/evolutionary-model-merge)
15
+
16
+ ![robot](./assets/robot.jpeg)
17
+ This project aims to optimize model merging by integrating LLMs into evolutionary strategies in a novel way. Instead of using the [CMA-ES](https://en.wikipedia.org/wiki/CMA-ES) approach, the goal is to improve model optimization by [leveraging the search capabilities of LLMs](https://arxiv.org/abs/2402.18381) to explore the parameter space more efficiently and adjust the search scope based on high-performing solutions.
18
+
19
+ Currently, the project supports optimization only within the Parameter Space, but I plan to extend its functionality to enable merging and optimization in the Data Flow Space as well. This will further enhance model merging by optimizing the interaction between data flow and parameters.
20
+
21
+ ## Performance
22
+ I focused on creating a high-performing Korean model solely through merging, without additional model training.
23
+ <details>
24
+ <summary>Merging Recipe</summary>
25
+
26
+ ```YAML
27
+ base_model: meta-llama/Llama-3.1-8B
28
+ dtype: bfloat16
29
+ merge_method: task_arithmetic
30
+ allow_negative_weights: true
31
+ parameters:
32
+ int8_mask: 1.0
33
+ normalize: 1.0
34
+ slices:
35
+ - sources:
36
+ - layer_range: [0, 2]
37
+ model: NCSOFT/Llama-VARCO-8B-Instruct
38
+ parameters:
39
+ weight: 1
40
+ - layer_range: [0, 2]
41
+ model: akjindal53244/Llama-3.1-Storm-8B
42
+ parameters:
43
+ weight: 0.3475802891062396
44
+ - layer_range: [0, 2]
45
+ model: meta-llama/Llama-3.1-8B
46
+
47
+ - sources:
48
+ - layer_range: [2, 4]
49
+ model: NCSOFT/Llama-VARCO-8B-Instruct
50
+ parameters:
51
+ weight: 0.8971381657317269
52
+ - layer_range: [2, 4]
53
+ model: akjindal53244/Llama-3.1-Storm-8B
54
+ parameters:
55
+ weight: 0.45369921781118544
56
+ - layer_range: [2, 4]
57
+ model: meta-llama/Llama-3.1-8B
58
+
59
+ - sources:
60
+ - layer_range: [4, 6]
61
+ model: NCSOFT/Llama-VARCO-8B-Instruct
62
+ parameters:
63
+ weight: 0.5430828084884667
64
+ - layer_range: [4, 6]
65
+ model: akjindal53244/Llama-3.1-Storm-8B
66
+ parameters:
67
+ weight: 0.2834723715836387
68
+ - layer_range: [4, 6]
69
+ model: meta-llama/Llama-3.1-8B
70
+
71
+ - sources:
72
+ - layer_range: [6, 8]
73
+ model: NCSOFT/Llama-VARCO-8B-Instruct
74
+ parameters:
75
+ weight: 0.419043948030593
76
+ - layer_range: [6, 8]
77
+ model: akjindal53244/Llama-3.1-Storm-8B
78
+ parameters:
79
+ weight: 0.3705268601566145
80
+ - layer_range: [6, 8]
81
+ model: meta-llama/Llama-3.1-8B
82
+
83
+ - sources:
84
+ - layer_range: [8, 10]
85
+ model: NCSOFT/Llama-VARCO-8B-Instruct
86
+ parameters:
87
+ weight: 0.3813333860404775
88
+ - layer_range: [8, 10]
89
+ model: akjindal53244/Llama-3.1-Storm-8B
90
+ parameters:
91
+ weight: 0.7634501436288518
92
+ - layer_range: [8, 10]
93
+ model: meta-llama/Llama-3.1-8B
94
+
95
+ - sources:
96
+ - layer_range: [10, 12]
97
+ model: NCSOFT/Llama-VARCO-8B-Instruct
98
+ parameters:
99
+ weight: 0.49134830660275863
100
+ - layer_range: [10, 12]
101
+ model: akjindal53244/Llama-3.1-Storm-8B
102
+ parameters:
103
+ weight: 0.7211994938499454
104
+ - layer_range: [10, 12]
105
+ model: meta-llama/Llama-3.1-8B
106
+
107
+ - sources:
108
+ - layer_range: [12, 14]
109
+ model: NCSOFT/Llama-VARCO-8B-Instruct
110
+ parameters:
111
+ weight: 0.9218963071448836
112
+ - layer_range: [12, 14]
113
+ model: akjindal53244/Llama-3.1-Storm-8B
114
+ parameters:
115
+ weight: 0.5117022419864319
116
+ - layer_range: [12, 14]
117
+ model: meta-llama/Llama-3.1-8B
118
+
119
+ - sources:
120
+ - layer_range: [14, 16]
121
+ model: NCSOFT/Llama-VARCO-8B-Instruct
122
+ parameters:
123
+ weight: 0.8238938467581831
124
+ - layer_range: [14, 16]
125
+ model: akjindal53244/Llama-3.1-Storm-8B
126
+ parameters:
127
+ weight: 0.851712316016478
128
+ - layer_range: [14, 16]
129
+ model: meta-llama/Llama-3.1-8B
130
+
131
+ - sources:
132
+ - layer_range: [16, 18]
133
+ model: NCSOFT/Llama-VARCO-8B-Instruct
134
+ parameters:
135
+ weight: 0.3543028846914006
136
+ - layer_range: [16, 18]
137
+ model: akjindal53244/Llama-3.1-Storm-8B
138
+ parameters:
139
+ weight: 0.6864368345788241
140
+ - layer_range: [16, 18]
141
+ model: meta-llama/Llama-3.1-8B
142
+
143
+ - sources:
144
+ - layer_range: [18, 20]
145
+ model: NCSOFT/Llama-VARCO-8B-Instruct
146
+ parameters:
147
+ weight: 0.9189961100847883
148
+ - layer_range: [18, 20]
149
+ model: akjindal53244/Llama-3.1-Storm-8B
150
+ parameters:
151
+ weight: 0.5800251781306379
152
+ - layer_range: [18, 20]
153
+ model: meta-llama/Llama-3.1-8B
154
+
155
+ - sources:
156
+ - layer_range: [20, 22]
157
+ model: NCSOFT/Llama-VARCO-8B-Instruct
158
+ parameters:
159
+ weight: 0.9281691677008521
160
+ - layer_range: [20, 22]
161
+ model: akjindal53244/Llama-3.1-Storm-8B
162
+ parameters:
163
+ weight: 0.5356892784211416
164
+ - layer_range: [20, 22]
165
+ model: meta-llama/Llama-3.1-8B
166
+
167
+ - sources:
168
+ - layer_range: [22, 24]
169
+ model: NCSOFT/Llama-VARCO-8B-Instruct
170
+ parameters:
171
+ weight: 0.839268407952539
172
+ - layer_range: [22, 24]
173
+ model: akjindal53244/Llama-3.1-Storm-8B
174
+ parameters:
175
+ weight: 0.5082186376599986
176
+ - layer_range: [22, 24]
177
+ model: meta-llama/Llama-3.1-8B
178
+
179
+ - sources:
180
+ - layer_range: [24, 26]
181
+ model: NCSOFT/Llama-VARCO-8B-Instruct
182
+ parameters:
183
+ weight: 0.6241902192095534
184
+ - layer_range: [24, 26]
185
+ model: akjindal53244/Llama-3.1-Storm-8B
186
+ parameters:
187
+ weight: 0.2945221540685877
188
+ - layer_range: [24, 26]
189
+ model: meta-llama/Llama-3.1-8B
190
+
191
+ - sources:
192
+ - layer_range: [26, 28]
193
+ model: NCSOFT/Llama-VARCO-8B-Instruct
194
+ parameters:
195
+ weight: 0.7030728026501202
196
+ - layer_range: [26, 28]
197
+ model: akjindal53244/Llama-3.1-Storm-8B
198
+ parameters:
199
+ weight: 0.2350478509634181
200
+ - layer_range: [26, 28]
201
+ model: meta-llama/Llama-3.1-8B
202
+
203
+ - sources:
204
+ - layer_range: [28, 30]
205
+ model: NCSOFT/Llama-VARCO-8B-Instruct
206
+ parameters:
207
+ weight: 0.2590342230366074
208
+ - layer_range: [28, 30]
209
+ model: akjindal53244/Llama-3.1-Storm-8B
210
+ parameters:
211
+ weight: 0.006083182855312869
212
+ - layer_range: [28, 30]
213
+ model: meta-llama/Llama-3.1-8B
214
+
215
+ - sources:
216
+ - layer_range: [30, 32]
217
+ model: NCSOFT/Llama-VARCO-8B-Instruct
218
+ parameters:
219
+ weight: 1
220
+ - layer_range: [30, 32]
221
+ model: akjindal53244/Llama-3.1-Storm-8B
222
+ parameters:
223
+ weight: 0.234650395825126
224
+ - layer_range: [30, 32]
225
+ model: meta-llama/Llama-3.1-8B
226
+ ```
227
+ </details>
228
+
229
+ The models used for merging are listed below.
230
+ ```
231
+ Base Model: meta-llama/Llama-3.1-8B
232
+ Model 1: NCSOFT/Llama-VARCO-8B-Instruct
233
+ Model 2: akjindal53244/Llama-3.1-Storm-8B
234
+ ```
235
+ ### Comparing LLMEvoLlama with Source in Korean Benchmark
236
+ ![korean_performance](./assets/output.png)
237
+ - LogicKor: A benchmark that evaluates various linguistic abilities in Korean, including math, writing, coding, comprehension, grammar, and reasoning skills. (https://lk.instruct.kr/)
238
+
239
+ - KoBest: A benchmark consisting of five natural language understanding tasks designed to test advanced Korean language comprehension. (https://arxiv.org/abs/2204.04541)
240
+
241
+ ### Comparing LLMEvoLlama with Source in English Benchmark and Total Average
242
+ | Model | truthfulqa_mc2 (0-shot acc) | arc_challenge (0-shot acc) | Korean + English Performance (avg) |
243
+ |-----------------|-------------------------|------------------------|------------------------------|
244
+ | [VARCO](https://huggingface.co/NCSOFT/Llama-VARCO-8B-Instruct) | 0.53 | 0.47 | 0.68 |
245
+ | [Llama-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct) | 0.53 | 0.52 | 0.66 |
246
+ | [Llama-Storm](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B) | 0.59 | 0.52 | 0.67 |
247
+ | [LLMEvoLLaMA](https://huggingface.co/fiveflow/LLMEvoLLaMA-3.1-8B-v0.1) | 0.57 | 0.50 | **0.71** |