Zhangchen Xu commited on
Commit
b120f23
·
verified ·
1 Parent(s): 39e4902

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -68
README.md CHANGED
@@ -1,14 +1,103 @@
1
  ---
 
 
2
  tags:
3
  - axolotl
4
  - generated_from_trainer
5
  model-index:
6
- - name: Llama-3.1-8B-Magpie-Mix-300KMT-150KR
7
  results: []
 
 
8
  ---
9
 
10
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
11
- should probably proofread and complete it, then remove this comment. -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  [<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl)
14
  <details><summary>See axolotl config</summary>
@@ -16,7 +105,7 @@ should probably proofread and complete it, then remove this comment. -->
16
  axolotl version: `0.4.1`
17
  ```yaml
18
 
19
- base_model: /data/zhangchen_xu/model/Meta-Llama-3.1-8B
20
  model_type: LlamaForCausalLM
21
  tokenizer_type: AutoTokenizer
22
 
@@ -33,7 +122,7 @@ datasets:
33
  conversation: llama3
34
  dataset_prepared_path: last_run_prepared
35
  val_set_size: 0.001
36
- output_dir: /data/zhangchen_xu/axolotl_out/Llama-3.1-8B-Mix-SFT
37
 
38
  sequence_len: 8192
39
  sample_packing: true
@@ -45,7 +134,7 @@ wandb_entity:
45
  wandb_watch:
46
  wandb_name: Llama-3.1-8B-Mix-SFT
47
  wandb_log_model:
48
- hub_model_id: Magpie-Align/Llama-3.1-8B-Magpie-Mix-300KMT-150KR
49
 
50
  gradient_accumulation_steps: 16
51
  micro_batch_size: 1
@@ -83,65 +172,4 @@ special_tokens:
83
 
84
  ```
85
 
86
- </details><br>
87
-
88
- [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="200" height="32"/>](https://wandb.ai/uw-nsl/SynDa/runs/kb9nqo04)
89
- # Llama-3.1-8B-Magpie-Mix-300KMT-150KR
90
-
91
- This model was trained from scratch on the None dataset.
92
- It achieves the following results on the evaluation set:
93
- - Loss: 0.3924
94
-
95
- ## Model description
96
-
97
- More information needed
98
-
99
- ## Intended uses & limitations
100
-
101
- More information needed
102
-
103
- ## Training and evaluation data
104
-
105
- More information needed
106
-
107
- ## Training procedure
108
-
109
- ### Training hyperparameters
110
-
111
- The following hyperparameters were used during training:
112
- - learning_rate: 2e-05
113
- - train_batch_size: 1
114
- - eval_batch_size: 1
115
- - seed: 42
116
- - distributed_type: multi-GPU
117
- - num_devices: 8
118
- - gradient_accumulation_steps: 16
119
- - total_train_batch_size: 128
120
- - total_eval_batch_size: 8
121
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
122
- - lr_scheduler_type: cosine
123
- - lr_scheduler_warmup_steps: 79
124
- - num_epochs: 2
125
-
126
- ### Training results
127
-
128
- | Training Loss | Epoch | Step | Validation Loss |
129
- |:-------------:|:------:|:----:|:---------------:|
130
- | 0.7863 | 0.0024 | 1 | 0.7710 |
131
- | 0.5422 | 0.2007 | 85 | 0.4937 |
132
- | 0.476 | 0.4014 | 170 | 0.4382 |
133
- | 0.4594 | 0.6021 | 255 | 0.4174 |
134
- | 0.4383 | 0.8028 | 340 | 0.4057 |
135
- | 0.4397 | 1.0035 | 425 | 0.3978 |
136
- | 0.3927 | 1.1845 | 510 | 0.3956 |
137
- | 0.3895 | 1.3852 | 595 | 0.3934 |
138
- | 0.3832 | 1.5859 | 680 | 0.3925 |
139
- | 0.3957 | 1.7866 | 765 | 0.3924 |
140
-
141
-
142
- ### Framework versions
143
-
144
- - Transformers 4.43.1
145
- - Pytorch 2.3.0+cu121
146
- - Datasets 2.19.1
147
- - Tokenizers 0.19.1
 
1
  ---
2
+ license: llama3.1
3
+ base_model: meta-llama/Meta-Llama-3.1-8B
4
  tags:
5
  - axolotl
6
  - generated_from_trainer
7
  model-index:
8
+ - name: Llama-3.1-8B-Magpie-Align-SFT-v0.1
9
  results: []
10
+ language:
11
+ - en
12
  ---
13
 
14
+ ![Magpie](https://cdn-uploads.huggingface.co/production/uploads/653df1323479e9ebbe3eb6cc/FWWILXrAGNwWr52aghV0S.png)
15
+
16
+ # 🐦 Llama-3.1-8B-Magpie-Align-SFT-v0.1
17
+
18
+ Project Web: [https://magpie-align.github.io/](https://magpie-align.github.io/)
19
+
20
+ Arxiv Technical Report: [https://arxiv.org/abs/2406.08464](https://arxiv.org/abs/2406.08464)
21
+
22
+ Codes: [https://github.com/magpie-align/magpie](https://github.com/magpie-align/magpie)
23
+
24
+ ## Abstract
25
+ <details><summary>Click Here</summary>
26
+ High-quality instruction data is critical for aligning large language models (LLMs). Although some models, such as Llama-3-Instruct, have open weights, their alignment data remain private, which hinders the democratization of AI. High human labor costs and a limited, predefined scope for prompting prevent existing open-source data creation methods from scaling effectively, potentially limiting the diversity and quality of public alignment datasets. Is it possible to synthesize high-quality instruction data at scale by extracting it directly from an aligned LLM? We present a self-synthesis method for generating large-scale alignment data named Magpie. Our key observation is that aligned LLMs like Llama-3-Instruct can generate a user query when we input only the left-side templates up to the position reserved for user messages, thanks to their auto-regressive nature. We use this method to prompt Llama-3-Instruct and generate 4 million instructions along with their corresponding responses. We perform a comprehensive analysis of the extracted data and select 300K high-quality instances. To compare Magpie data with other public instruction datasets, we fine-tune Llama-3-8B-Base with each dataset and evaluate the performance of the fine-tuned models. Our results indicate that in some tasks, models fine-tuned with Magpie perform comparably to the official Llama-3-8B-Instruct, despite the latter being enhanced with 10 million data points through supervised fine-tuning (SFT) and subsequent feedback learning. We also show that using Magpie solely for SFT can surpass the performance of previous public datasets utilized for both SFT and preference optimization, such as direct preference optimization with UltraFeedback. This advantage is evident on alignment benchmarks such as AlpacaEval, ArenaHard, and WildBench.
27
+ </details><be>
28
+
29
+ ## About This Model
30
+
31
+ This model is a fine-tuned version of [meta-llama/Meta-Llama-3.1-8B](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B) on
32
+ - [Magpie-Align/Magpie-Pro-MT-300K-v0.1](https://huggingface.co/datasets/Magpie-Align/Magpie-Pro-MT-300K-v0.1), and
33
+ - [Magpie-Align/Magpie-Reasoning-150K](https://huggingface.co/datasets/Magpie-Align/Magpie-Reasoning-150K).
34
+
35
+ It achieves performance comparable with the official Llama-3.1-8B-Instruct Model with SFT only!
36
+
37
+ - **Alpaca Eval 2 (GPT-4-Turbo-1106): 24.79 (LC), 25.05 (WR)**
38
+ - **Arena Hard: 21.0**
39
+ -
40
+ ## Other Information
41
+
42
+ **License**: Please follow [Meta Llama 3 Community License](https://llama.meta.com/llama3/license) (Data) and [Meta Llama 3.1 Community License](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE) (Model).
43
+
44
+ **Conversation Template**: Please use Llama 3 **official chat template** for the best performance.
45
+
46
+ ## Citation
47
+
48
+ If you find the model, data, or code useful, please cite our paper:
49
+ ```
50
+ @article{xu2024magpie,
51
+ title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing},
52
+ author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
53
+ year={2024},
54
+ eprint={2406.08464},
55
+ archivePrefix={arXiv},
56
+ primaryClass={cs.CL}
57
+ }
58
+ ```
59
+
60
+ ## Training procedure
61
+
62
+ ### Training hyperparameters
63
+
64
+ The following hyperparameters were used during training:
65
+ - learning_rate: 2e-05
66
+ - train_batch_size: 1
67
+ - eval_batch_size: 1
68
+ - seed: 42
69
+ - distributed_type: multi-GPU
70
+ - num_devices: 8
71
+ - gradient_accumulation_steps: 16
72
+ - total_train_batch_size: 128
73
+ - total_eval_batch_size: 8
74
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
75
+ - lr_scheduler_type: cosine
76
+ - lr_scheduler_warmup_steps: 79
77
+ - num_epochs: 2
78
+
79
+ ### Training results
80
+
81
+ | Training Loss | Epoch | Step | Validation Loss |
82
+ |:-------------:|:------:|:----:|:---------------:|
83
+ | 0.7863 | 0.0024 | 1 | 0.7710 |
84
+ | 0.5422 | 0.2007 | 85 | 0.4937 |
85
+ | 0.476 | 0.4014 | 170 | 0.4382 |
86
+ | 0.4594 | 0.6021 | 255 | 0.4174 |
87
+ | 0.4383 | 0.8028 | 340 | 0.4057 |
88
+ | 0.4397 | 1.0035 | 425 | 0.3978 |
89
+ | 0.3927 | 1.1845 | 510 | 0.3956 |
90
+ | 0.3895 | 1.3852 | 595 | 0.3934 |
91
+ | 0.3832 | 1.5859 | 680 | 0.3925 |
92
+ | 0.3957 | 1.7866 | 765 | 0.3924 |
93
+
94
+
95
+ ### Framework versions
96
+
97
+ - Transformers 4.43.1
98
+ - Pytorch 2.3.0+cu121
99
+ - Datasets 2.19.1
100
+ - Tokenizers 0.19.1
101
 
102
  [<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl)
103
  <details><summary>See axolotl config</summary>
 
105
  axolotl version: `0.4.1`
106
  ```yaml
107
 
108
+ base_model: meta-llama/Meta-Llama-3.1-8B
109
  model_type: LlamaForCausalLM
110
  tokenizer_type: AutoTokenizer
111
 
 
122
  conversation: llama3
123
  dataset_prepared_path: last_run_prepared
124
  val_set_size: 0.001
125
+ output_dir: /data/axolotl_out/Llama-3.1-8B-Mix-SFT
126
 
127
  sequence_len: 8192
128
  sample_packing: true
 
134
  wandb_watch:
135
  wandb_name: Llama-3.1-8B-Mix-SFT
136
  wandb_log_model:
137
+ hub_model_id: Magpie-Align/Llama-3.1-8B-Magpie-Align-SFT-v0.1
138
 
139
  gradient_accumulation_steps: 16
140
  micro_batch_size: 1
 
172
 
173
  ```
174
 
175
+ </details><br>