flydust commited on
Commit
949ff1b
1 Parent(s): 3a9daea

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -64
README.md CHANGED
@@ -9,8 +9,83 @@ model-index:
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>
@@ -26,25 +101,18 @@ load_in_4bit: false
26
  strict: false
27
 
28
  datasets:
29
- - path: SynDa/Llama-3-8B-SynDa-300K-FMGR
30
  type: sharegpt
31
  conversation: llama3
32
  dataset_prepared_path: last_run_prepared
33
  val_set_size: 0.001
34
- output_dir: ./out_Llama-8B-SynDa-300K-FMGR
35
 
36
  sequence_len: 8192
37
  sample_packing: true
38
  eval_sample_packing: false
39
  pad_to_sequence_len: true
40
 
41
- wandb_project: SynDa
42
- wandb_entity:
43
- wandb_watch:
44
- wandb_name: Llama-3-8B-SynDa-300K-FMGR-2EP-FFT
45
- wandb_log_model:
46
- hub_model_id: SynDa/Llama-3-8B-SynDa-300K-FMGR
47
-
48
  gradient_accumulation_steps: 8
49
  micro_batch_size: 1
50
  num_epochs: 2
@@ -82,56 +150,3 @@ special_tokens:
82
  ```
83
 
84
  </details><br>
85
-
86
- # Llama-3-8B-SynDa-300K-FMGR
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.2120
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.7074 | 0.0013 | 1 | 0.7241 |
128
- | 0.2182 | 1.0 | 781 | 0.2195 |
129
- | 0.1328 | 1.9878 | 1562 | 0.2120 |
130
-
131
-
132
- ### Framework versions
133
-
134
- - Transformers 4.40.2
135
- - Pytorch 2.3.0+cu121
136
- - Datasets 2.19.1
137
- - Tokenizers 0.19.1
 
9
  results: []
10
  ---
11
 
12
+ # 🐦 Llama-3-8B-Magpie-Pro-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-300K-Filtered](https://huggingface.co/datasets/Magpie-Align/Magpie-Air-300K-Filtered) 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.66 (LC), 23.99 (WR)**
32
+ - **Alpaca Eval 2 (Llama-3-8B-Instruct): 49.27 (LC), 50.80 (WR)**
33
+ - **Arena Hard: 14.9**
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.7074 | 0.0013 | 1 | 0.7241 |
79
+ | 0.2182 | 1.0 | 781 | 0.2195 |
80
+ | 0.1328 | 1.9878 | 1562 | 0.2120 |
81
+
82
+
83
+ ### Framework versions
84
+
85
+ - Transformers 4.40.2
86
+ - Pytorch 2.3.0+cu121
87
+ - Datasets 2.19.1
88
+ - Tokenizers 0.19.1
89
 
90
  [<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)
91
  <details><summary>See axolotl config</summary>
 
101
  strict: false
102
 
103
  datasets:
104
+ - path: Magpie-Align/Magpie-Air-300K-Filtered
105
  type: sharegpt
106
  conversation: llama3
107
  dataset_prepared_path: last_run_prepared
108
  val_set_size: 0.001
109
+ output_dir: ./out_Llama-3-8B-Magpie-Air-300K-FMGR
110
 
111
  sequence_len: 8192
112
  sample_packing: true
113
  eval_sample_packing: false
114
  pad_to_sequence_len: true
115
 
 
 
 
 
 
 
 
116
  gradient_accumulation_steps: 8
117
  micro_batch_size: 1
118
  num_epochs: 2
 
150
  ```
151
 
152
  </details><br>