flydust commited on
Commit
3e5e5f8
1 Parent(s): a6b2b30

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +102 -68
README.md CHANGED
@@ -5,14 +5,109 @@ tags:
5
  - axolotl
6
  - generated_from_trainer
7
  model-index:
8
- - name: Llama-3-8B-Magpie-Mix-300KMT-150KR
9
  results: []
 
 
 
 
 
10
  ---
11
 
12
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
- should probably proofread and complete it, then remove this comment. -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- Original Name: Llama-3-8B-Magpie-Mix-300KMT-150KR
16
 
17
  [<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)
18
  <details><summary>See axolotl config</summary>
@@ -36,7 +131,7 @@ datasets:
36
  conversation: llama3
37
  dataset_prepared_path: last_run_prepared
38
  val_set_size: 0.001
39
- output_dir: /home/cc/axolotl/axolotl_out/Llama-3-8B-base-150KR-Llama3-Pro-MT-300K
40
 
41
  sequence_len: 8192
42
  sample_packing: true
@@ -46,7 +141,7 @@ pad_to_sequence_len: true
46
  wandb_project: SynDa
47
  wandb_entity:
48
  wandb_watch:
49
- wandb_name: Llama-3-8B-base-150KR-Llama3-Pro-MT-300K
50
  wandb_log_model:
51
  hub_model_id: Magpie-Align/Llama-3-8B-Magpie-Mix-300KMT-150KR
52
 
@@ -86,65 +181,4 @@ special_tokens:
86
 
87
  ```
88
 
89
- </details><br>
90
-
91
- [<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/xcfr08zf)
92
- # Llama-3-8B-Magpie-Mix-300KMT-150KR
93
-
94
- This model is a fine-tuned version of [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) on the None dataset.
95
- It achieves the following results on the evaluation set:
96
- - Loss: 0.3813
97
-
98
- ## Model description
99
-
100
- More information needed
101
-
102
- ## Intended uses & limitations
103
-
104
- More information needed
105
-
106
- ## Training and evaluation data
107
-
108
- More information needed
109
-
110
- ## Training procedure
111
-
112
- ### Training hyperparameters
113
-
114
- The following hyperparameters were used during training:
115
- - learning_rate: 2e-05
116
- - train_batch_size: 1
117
- - eval_batch_size: 1
118
- - seed: 42
119
- - distributed_type: multi-GPU
120
- - num_devices: 4
121
- - gradient_accumulation_steps: 32
122
- - total_train_batch_size: 128
123
- - total_eval_batch_size: 4
124
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
125
- - lr_scheduler_type: cosine
126
- - lr_scheduler_warmup_steps: 79
127
- - num_epochs: 2
128
-
129
- ### Training results
130
-
131
- | Training Loss | Epoch | Step | Validation Loss |
132
- |:-------------:|:------:|:----:|:---------------:|
133
- | 0.8241 | 0.0024 | 1 | 0.8068 |
134
- | 0.5623 | 0.2007 | 85 | 0.5087 |
135
- | 0.4704 | 0.4014 | 170 | 0.4326 |
136
- | 0.4478 | 0.6020 | 255 | 0.4079 |
137
- | 0.4256 | 0.8027 | 340 | 0.3948 |
138
- | 0.4261 | 1.0034 | 425 | 0.3867 |
139
- | 0.3662 | 1.1844 | 510 | 0.3850 |
140
- | 0.363 | 1.3851 | 595 | 0.3823 |
141
- | 0.357 | 1.5858 | 680 | 0.3813 |
142
- | 0.3677 | 1.7865 | 765 | 0.3813 |
143
-
144
-
145
- ### Framework versions
146
-
147
- - Transformers 4.42.3
148
- - Pytorch 2.3.1+cu121
149
- - Datasets 2.19.1
150
- - Tokenizers 0.19.1
 
5
  - axolotl
6
  - generated_from_trainer
7
  model-index:
8
+ - name: Llama-3-8B-Magpie-Align-SFT-v0.2
9
  results: []
10
+ datasets:
11
+ - Magpie-Align/Magpie-Reasoning-150K
12
+ - Magpie-Align/Magpie-Pro-MT-300K-v0.1
13
+ language:
14
+ - en
15
  ---
16
 
17
+ ![Magpie](https://cdn-uploads.huggingface.co/production/uploads/653df1323479e9ebbe3eb6cc/FWWILXrAGNwWr52aghV0S.png)
18
+
19
+ # 🐦 Llama-3-8B-Magpie-Align-SFT-v0.2
20
+
21
+ Project Web: [https://magpie-align.github.io/](https://magpie-align.github.io/)
22
+
23
+ Arxiv Technical Report: [https://arxiv.org/abs/2406.08464](https://arxiv.org/abs/2406.08464)
24
+
25
+ Codes: [https://github.com/magpie-align/magpie](https://github.com/magpie-align/magpie)
26
+
27
+ ## About This Model
28
+
29
+ This model is a fine-tuned version of [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) on
30
+ - [Magpie-Align/Magpie-Pro-MT-300K-v0.1](https://huggingface.co/datasets/Magpie-Align/Magpie-Pro-MT-300K-v0.1), and
31
+ - [Magpie-Align/Magpie-Reasoning-150K](https://huggingface.co/datasets/Magpie-Align/Magpie-Reasoning-150K).
32
+
33
+ Compared to [v0.1](https://huggingface.co/Magpie-Align/Llama-3-8B-Magpie-Align-SFT-v0.1), we enhance its reasoning ability by incorporating a reasoning dataset (150K math, code, and reasoning data). It achieves performance comparable with the official Llama-3-8B-Instruct Model with SFT only! The detailed benchmark performance is as follows:
34
+
35
+ - **MT-Bench: 8.350 (1st Turn), 7.700 (Second Turn), 8.025 (Average)**
36
+ - **Alpaca Eval 2 (GPT-4-Turbo-1106): 24.89 (LC), 24.63 (WR)**
37
+ - **Alpaca Eval 2 (Llama-3-8B-Instruct): 54.70 (LC), 54.73 (WR)**
38
+ - **Arena Hard: 19.1**
39
+
40
+ ## Other Information
41
+
42
+ **License**: Please follow [Meta Llama 3 Community License](https://llama.meta.com/llama3/license).
43
+
44
+ **Conversation Template**: Please use Llama 3 **official chat template** for the best performance.
45
+
46
+ **How to use it?** Please check the official [Llama 3 repository](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct#how-to-use) for detailed instructions. Simply replace the original `model_id` with `Magpie-Align/Llama-3-8B-Magpie-Align-SFT-v0.2`.
47
+
48
+ ## Citation
49
+
50
+ If you find the model, data, or code useful, please cite our paper:
51
+ ```
52
+ @article{xu2024magpie,
53
+ title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing},
54
+ author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
55
+ year={2024},
56
+ eprint={2406.08464},
57
+ archivePrefix={arXiv},
58
+ primaryClass={cs.CL}
59
+ }
60
+ ```
61
+ **Questions?** Please contact [Zhangchen](https://zhangchenxu.com/) by email.
62
+
63
+ ## Paper Abstract
64
+ <details><summary>Click Here</summary>
65
+ 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.
66
+ </details><be>
67
+
68
+ ## Training procedure
69
+
70
+ ### Training hyperparameters
71
+
72
+ The following hyperparameters were used during training:
73
+ - learning_rate: 2e-05
74
+ - train_batch_size: 1
75
+ - eval_batch_size: 1
76
+ - seed: 42
77
+ - distributed_type: multi-GPU
78
+ - num_devices: 4
79
+ - gradient_accumulation_steps: 32
80
+ - total_train_batch_size: 128
81
+ - total_eval_batch_size: 4
82
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
83
+ - lr_scheduler_type: cosine
84
+ - lr_scheduler_warmup_steps: 79
85
+ - num_epochs: 2
86
+
87
+ ### Training results
88
+
89
+ | Training Loss | Epoch | Step | Validation Loss |
90
+ |:-------------:|:------:|:----:|:---------------:|
91
+ | 0.8241 | 0.0024 | 1 | 0.8068 |
92
+ | 0.5623 | 0.2007 | 85 | 0.5087 |
93
+ | 0.4704 | 0.4014 | 170 | 0.4326 |
94
+ | 0.4478 | 0.6020 | 255 | 0.4079 |
95
+ | 0.4256 | 0.8027 | 340 | 0.3948 |
96
+ | 0.4261 | 1.0034 | 425 | 0.3867 |
97
+ | 0.3662 | 1.1844 | 510 | 0.3850 |
98
+ | 0.363 | 1.3851 | 595 | 0.3823 |
99
+ | 0.357 | 1.5858 | 680 | 0.3813 |
100
+ | 0.3677 | 1.7865 | 765 | 0.3813 |
101
+
102
+
103
+ ### Framework versions
104
+
105
+ - Transformers 4.42.3
106
+ - Pytorch 2.3.1+cu121
107
+ - Datasets 2.19.1
108
+ - Tokenizers 0.19.1
109
 
110
+ *Internal name for identification: Llama-3-8B-Magpie-Mix-300KMT-150KR*. Please change the model name in the below Axolotl config.
111
 
112
  [<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)
113
  <details><summary>See axolotl config</summary>
 
131
  conversation: llama3
132
  dataset_prepared_path: last_run_prepared
133
  val_set_size: 0.001
134
+ output_dir: axolotl_out/Llama-3-8B-Magpie-Mix-300KMT-150KR
135
 
136
  sequence_len: 8192
137
  sample_packing: true
 
141
  wandb_project: SynDa
142
  wandb_entity:
143
  wandb_watch:
144
+ wandb_name: Llama-3-8B-Magpie-Mix-300KMT-150KR
145
  wandb_log_model:
146
  hub_model_id: Magpie-Align/Llama-3-8B-Magpie-Mix-300KMT-150KR
147
 
 
181
 
182
  ```
183
 
184
+ </details><br>