Text Generation
Transformers
PyTorch
Safetensors
llama
axolotl
Generated from Trainer
conversational
text-generation-inference
Inference Endpoints
flydust commited on
Commit
4cb5cb2
1 Parent(s): 8b994c1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +93 -65
README.md CHANGED
@@ -4,13 +4,102 @@ 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-SFT-650KR
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/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)
16
  <details><summary>See axolotl config</summary>
@@ -45,9 +134,9 @@ pad_to_sequence_len: true
45
  wandb_project: SynDa
46
  wandb_entity:
47
  wandb_watch:
48
- wandb_name: Llama-3.1-8B-Magpie-SFT-650KR
49
  wandb_log_model:
50
- hub_model_id: Magpie-Align/Llama-3.1-8B-Magpie-SFT-650KR
51
 
52
  gradient_accumulation_steps: 32
53
  micro_batch_size: 1
@@ -86,64 +175,3 @@ special_tokens:
86
  ```
87
 
88
  </details><br>
89
-
90
- # Llama-3.1-8B-Magpie-SFT-650KR
91
-
92
- 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 the None dataset.
93
- It achieves the following results on the evaluation set:
94
- - Loss: 0.3370
95
-
96
- ## Model description
97
-
98
- More information needed
99
-
100
- ## Intended uses & limitations
101
-
102
- More information needed
103
-
104
- ## Training and evaluation data
105
-
106
- More information needed
107
-
108
- ## Training procedure
109
-
110
- ### Training hyperparameters
111
-
112
- The following hyperparameters were used during training:
113
- - learning_rate: 2e-05
114
- - train_batch_size: 1
115
- - eval_batch_size: 1
116
- - seed: 42
117
- - distributed_type: multi-GPU
118
- - num_devices: 4
119
- - gradient_accumulation_steps: 32
120
- - total_train_batch_size: 128
121
- - total_eval_batch_size: 4
122
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
123
- - lr_scheduler_type: cosine
124
- - lr_scheduler_warmup_steps: 65
125
- - num_epochs: 2
126
-
127
- ### Training results
128
-
129
- | Training Loss | Epoch | Step | Validation Loss |
130
- |:-------------:|:------:|:----:|:---------------:|
131
- | 0.6921 | 0.0029 | 1 | 0.7830 |
132
- | 0.4187 | 0.1998 | 69 | 0.4135 |
133
- | 0.3744 | 0.3997 | 138 | 0.3695 |
134
- | 0.36 | 0.5995 | 207 | 0.3549 |
135
- | 0.3603 | 0.7993 | 276 | 0.3459 |
136
- | 0.3517 | 0.9992 | 345 | 0.3407 |
137
- | 0.3064 | 1.1881 | 414 | 0.3392 |
138
- | 0.3149 | 1.3879 | 483 | 0.3378 |
139
- | 0.304 | 1.5877 | 552 | 0.3372 |
140
- | 0.3059 | 1.7876 | 621 | 0.3370 |
141
- | 0.323 | 1.9874 | 690 | 0.3370 |
142
-
143
-
144
- ### Framework versions
145
-
146
- - Transformers 4.43.3
147
- - Pytorch 2.4.0+cu121
148
- - Datasets 2.19.1
149
- - Tokenizers 0.19.1
 
4
  tags:
5
  - axolotl
6
  - generated_from_trainer
7
+ datasets:
8
+ - Magpie-Align/Magpie-Llama-3.1-Pro-500K-Filtered
9
+ - Magpie-Align/Magpie-Reasoning-150K
10
  model-index:
11
  - name: Llama-3.1-8B-Magpie-SFT-650KR
12
  results: []
13
  ---
14
 
15
+ ![Magpie](https://cdn-uploads.huggingface.co/production/uploads/653df1323479e9ebbe3eb6cc/FWWILXrAGNwWr52aghV0S.png)
16
+
17
+ # 🐦 Llama-3.1-8B-Magpie-Align-SFT-v0.2
18
+
19
+ Project Web: [https://magpie-align.github.io/](https://magpie-align.github.io/)
20
+
21
+ Arxiv Technical Report: [https://arxiv.org/abs/2406.08464](https://arxiv.org/abs/2406.08464)
22
+
23
+ Codes: [https://github.com/magpie-align/magpie](https://github.com/magpie-align/magpie)
24
+
25
+ ## Abstract
26
+ <details><summary>Click Here</summary>
27
+ 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.
28
+ </details><be>
29
+
30
+ ## About This Model
31
+
32
+ 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
33
+ - [Magpie-Align/Magpie-Llama-3.1-Pro-500K-Filtered](https://huggingface.co/datasets/Magpie-Align/Magpie-Llama-3.1-Pro-500K-Filtered), and
34
+ - [Magpie-Align/Magpie-Reasoning-150K](https://huggingface.co/datasets/Magpie-Align/Magpie-Reasoning-150K).
35
+
36
+ It achieves performance comparable with the official Llama-3.1-8B-Instruct Model with SFT only!
37
+
38
+ - **Alpaca Eval 2 (GPT-4-Turbo-1106): 20.66 (LC), 22.26 (WR)**
39
+ - **Arena Hard: 22.2**
40
+
41
+ ## Other Information
42
+
43
+ **License**: Please follow [Meta Llama 3.1 Community License](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE).
44
+
45
+ **Conversation Template**: Please use Llama 3 **official chat template** for the best performance.
46
+
47
+ ## Citation
48
+
49
+ If you find the model, data, or code useful, please cite our paper:
50
+ ```
51
+ @article{xu2024magpie,
52
+ title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing},
53
+ author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
54
+ year={2024},
55
+ eprint={2406.08464},
56
+ archivePrefix={arXiv},
57
+ primaryClass={cs.CL}
58
+ }
59
+ ```
60
+
61
+ ## Training procedure
62
+
63
+ ### Training hyperparameters
64
+
65
+ The following hyperparameters were used during training:
66
+ - learning_rate: 2e-05
67
+ - train_batch_size: 1
68
+ - eval_batch_size: 1
69
+ - seed: 42
70
+ - distributed_type: multi-GPU
71
+ - num_devices: 4
72
+ - gradient_accumulation_steps: 32
73
+ - total_train_batch_size: 128
74
+ - total_eval_batch_size: 4
75
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
76
+ - lr_scheduler_type: cosine
77
+ - lr_scheduler_warmup_steps: 65
78
+ - num_epochs: 2
79
+
80
+ ### Training results
81
+
82
+ | Training Loss | Epoch | Step | Validation Loss |
83
+ |:-------------:|:------:|:----:|:---------------:|
84
+ | 0.6921 | 0.0029 | 1 | 0.7830 |
85
+ | 0.4187 | 0.1998 | 69 | 0.4135 |
86
+ | 0.3744 | 0.3997 | 138 | 0.3695 |
87
+ | 0.36 | 0.5995 | 207 | 0.3549 |
88
+ | 0.3603 | 0.7993 | 276 | 0.3459 |
89
+ | 0.3517 | 0.9992 | 345 | 0.3407 |
90
+ | 0.3064 | 1.1881 | 414 | 0.3392 |
91
+ | 0.3149 | 1.3879 | 483 | 0.3378 |
92
+ | 0.304 | 1.5877 | 552 | 0.3372 |
93
+ | 0.3059 | 1.7876 | 621 | 0.3370 |
94
+ | 0.323 | 1.9874 | 690 | 0.3370 |
95
+
96
+
97
+ ### Framework versions
98
+
99
+ - Transformers 4.43.3
100
+ - Pytorch 2.4.0+cu121
101
+ - Datasets 2.19.1
102
+ - Tokenizers 0.19.1
103
 
104
  [<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)
105
  <details><summary>See axolotl config</summary>
 
134
  wandb_project: SynDa
135
  wandb_entity:
136
  wandb_watch:
137
+ wandb_name: Llama-3.1-8B-Magpie-Align-SFT-v0.2
138
  wandb_log_model:
139
+ hub_model_id: Magpie-Align/Llama-3.1-8B-Magpie-Align-SFT-v0.2
140
 
141
  gradient_accumulation_steps: 32
142
  micro_batch_size: 1
 
175
  ```
176
 
177
  </details><br>