flydust commited on
Commit
a6dc559
1 Parent(s): 6f17d26

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -60
README.md CHANGED
@@ -5,12 +5,91 @@ tags:
5
  - axolotl
6
  - generated_from_trainer
7
  model-index:
8
- - name: Llama-3-8B-SynDa-300K-MR
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
  [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
16
  <details><summary>See axolotl config</summary>
@@ -82,60 +161,3 @@ special_tokens:
82
  ```
83
 
84
  </details><br>
85
-
86
- # Llama-3-8B-SynDa-300K-MR
87
-
88
- 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.
89
- It achieves the following results on the evaluation set:
90
- - Loss: 0.2210
91
-
92
- ## Model description
93
-
94
- More information needed
95
-
96
- ## Intended uses & limitations
97
-
98
- More information needed
99
-
100
- ## Training and evaluation data
101
-
102
- More information needed
103
-
104
- ## Training procedure
105
-
106
- ### Training hyperparameters
107
-
108
- The following hyperparameters were used during training:
109
- - learning_rate: 2e-05
110
- - train_batch_size: 1
111
- - eval_batch_size: 1
112
- - seed: 42
113
- - distributed_type: multi-GPU
114
- - num_devices: 4
115
- - gradient_accumulation_steps: 8
116
- - total_train_batch_size: 32
117
- - total_eval_batch_size: 4
118
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
119
- - lr_scheduler_type: cosine
120
- - lr_scheduler_warmup_steps: 100
121
- - num_epochs: 2
122
-
123
- ### Training results
124
-
125
- | Training Loss | Epoch | Step | Validation Loss |
126
- |:-------------:|:------:|:----:|:---------------:|
127
- | 0.7285 | 0.0007 | 1 | 0.7411 |
128
- | 0.2863 | 0.3332 | 509 | 0.2875 |
129
- | 0.2584 | 0.6664 | 1018 | 0.2501 |
130
- | 0.2187 | 0.9996 | 1527 | 0.2282 |
131
- | 0.1445 | 1.3130 | 2036 | 0.2246 |
132
- | 0.1419 | 1.6462 | 2545 | 0.2211 |
133
- | 0.1413 | 1.9794 | 3054 | 0.2210 |
134
-
135
-
136
- ### Framework versions
137
-
138
- - Transformers 4.40.2
139
- - Pytorch 2.3.0+cu121
140
- - Datasets 2.19.1
141
- - Tokenizers 0.19.1
 
5
  - axolotl
6
  - generated_from_trainer
7
  model-index:
8
+ - name: Llama-3-8B-Magpie-Air-MT-SFT-v0.1
9
  results: []
10
  ---
11
 
12
+ # 🐦 Llama-3-8B-Magpie-Air-MT-SFT-v0.1
13
+
14
+ Project Web: [https://magpie-align.github.io/](https://magpie-align.github.io/)
15
+
16
+ Arxiv Technical Report: [https://arxiv.org/abs/2406.08464](https://arxiv.org/abs/2406.08464)
17
+
18
+ Codes: [https://github.com/magpie-align/magpie](https://github.com/magpie-align/magpie)
19
+
20
+ ## Abstract
21
+ <details><summary>Click Here</summary>
22
+ 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.
23
+ </details><be>
24
+
25
+ ## About This Model
26
+
27
+ This model is a fine-tuned version of [meta-llama/Meta-Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) on [Magpie-Align/Magpie-Air-MT-300K-v0.1](https://huggingface.co/datasets/Magpie-Align/Magpie-Air-MT-300K-v0.1) dataset.
28
+
29
+ It achieves performance comparable with the official Llama-3-8B-Instruct Model with SFT only!
30
+
31
+ - **Alpaca Eval 2 (GPT-4-Turbo-1106): 22.98 (LC), 24.02 (WR)**
32
+ - **Alpaca Eval 2 (Llama-3-8B-Instruct): 49.63 (LC), 51.42 (WR)**
33
+ - **Arena Hard: 15.5**
34
+
35
+ ## Other Information
36
+
37
+ **License**: Please follow [Meta Llama 3 Community License](https://llama.meta.com/llama3/license).
38
+
39
+ **Conversation Template**: Please use Llama 3 **official chat template** for the best performance.
40
+
41
+ ## Citation
42
+
43
+ If you find the model, data, or code useful, please cite our paper:
44
+ ```
45
+ @misc{xu2024magpie,
46
+ title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing},
47
+ author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
48
+ year={2024},
49
+ eprint={2406.08464},
50
+ archivePrefix={arXiv},
51
+ primaryClass={cs.CL}
52
+ }
53
+ ```
54
+
55
+ ## Training procedure
56
+
57
+ ### Training hyperparameters
58
+
59
+ The following hyperparameters were used during training:
60
+ - learning_rate: 2e-05
61
+ - train_batch_size: 1
62
+ - eval_batch_size: 1
63
+ - seed: 42
64
+ - distributed_type: multi-GPU
65
+ - num_devices: 4
66
+ - gradient_accumulation_steps: 8
67
+ - total_train_batch_size: 32
68
+ - total_eval_batch_size: 4
69
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
70
+ - lr_scheduler_type: cosine
71
+ - lr_scheduler_warmup_steps: 100
72
+ - num_epochs: 2
73
+
74
+ ### Training results
75
+
76
+ | Training Loss | Epoch | Step | Validation Loss |
77
+ |:-------------:|:------:|:----:|:---------------:|
78
+ | 0.7285 | 0.0007 | 1 | 0.7411 |
79
+ | 0.2863 | 0.3332 | 509 | 0.2875 |
80
+ | 0.2584 | 0.6664 | 1018 | 0.2501 |
81
+ | 0.2187 | 0.9996 | 1527 | 0.2282 |
82
+ | 0.1445 | 1.3130 | 2036 | 0.2246 |
83
+ | 0.1419 | 1.6462 | 2545 | 0.2211 |
84
+ | 0.1413 | 1.9794 | 3054 | 0.2210 |
85
+
86
+
87
+ ### Framework versions
88
+
89
+ - Transformers 4.40.2
90
+ - Pytorch 2.3.0+cu121
91
+ - Datasets 2.19.1
92
+ - Tokenizers 0.19.1
93
 
94
  [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
95
  <details><summary>See axolotl config</summary>
 
161
  ```
162
 
163
  </details><br>