flydust commited on
Commit
ecdf500
1 Parent(s): 29cf3c1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +80 -66
README.md CHANGED
@@ -5,12 +5,86 @@ tags:
5
  - axolotl
6
  - generated_from_trainer
7
  model-index:
8
- - name: Llama-3-8B-SynDa-70BQA-300K-Filtered-L
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 +100,18 @@ load_in_4bit: false
26
  strict: false
27
 
28
  datasets:
29
- - path: SynDa/Llama-3-70B-SynDa-300K-Filtered-L
30
  type: sharegpt
31
  conversation: llama3
32
  dataset_prepared_path: last_run_prepared
33
  val_set_size: 0.001
34
- output_dir: ./out_Llama-3-70B-SynDa-300K-Filtered-L
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-70B-SynDa-300K-FilteredL-2EP-FFT
45
- wandb_log_model:
46
- hub_model_id: SynDa/Llama-3-8B-SynDa-70BQA-300K-Filtered-L
47
-
48
  gradient_accumulation_steps: 8
49
  micro_batch_size: 1
50
  num_epochs: 2
@@ -81,57 +148,4 @@ special_tokens:
81
 
82
  ```
83
 
84
- </details><br>
85
-
86
- # Llama-3-8B-SynDa-70BQA-300K-Filtered-L
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.4219
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.8664 | 0.0012 | 1 | 0.8860 |
128
- | 0.4038 | 0.9989 | 825 | 0.4250 |
129
- | 0.327 | 1.9830 | 1650 | 0.4219 |
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
 
5
  - axolotl
6
  - generated_from_trainer
7
  model-index:
8
+ - name: Llama-3-8B-Magpie-Pro-SFT-v0.1
9
  results: []
10
  ---
11
 
12
+ # 🐦 Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing
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
+
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
+
24
+ ## About This Model
25
+
26
+ 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-Pro-300K-Filtered](https://huggingface.co/datasets/Magpie-Align/Magpie-Pro-300K-Filtered) dataset.
27
+
28
+ It achieves performance comparable with the official Llama-3-8B-Instruct Model.
29
+
30
+ - **Alpaca Eval 2 (GPT-4-Turbo-1106): 25.08 (LC), 29.47 (WR)**
31
+ - **Alpaca Eval 2 (Llama-3-8B-Instruct): 52.12 (LC), 53.43 (WR)**
32
+ - **Arena Hard: 18.9**
33
+
34
+ ## Other Information
35
+
36
+ **License**: Please follow [Meta Llama 3 Community License](https://llama.meta.com/llama3/license).
37
+
38
+ **Conversation Template**: Please use Llama 3 **official chat template** for the best performance.
39
+
40
+ ## Citation
41
+
42
+ If you find the model, data, or code useful, please cite our paper:
43
+ ```
44
+ @misc{xu2024magpie,
45
+ title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing},
46
+ author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
47
+ year={2024},
48
+ eprint={2406.08464},
49
+ archivePrefix={arXiv},
50
+ primaryClass={cs.CL}
51
+ }
52
+ ```
53
+
54
+ ## Training procedure
55
+
56
+ ### Training hyperparameters
57
+
58
+ The following hyperparameters were used during training:
59
+ - learning_rate: 2e-05
60
+ - train_batch_size: 1
61
+ - eval_batch_size: 1
62
+ - seed: 42
63
+ - distributed_type: multi-GPU
64
+ - num_devices: 4
65
+ - gradient_accumulation_steps: 8
66
+ - total_train_batch_size: 32
67
+ - total_eval_batch_size: 4
68
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
69
+ - lr_scheduler_type: cosine
70
+ - lr_scheduler_warmup_steps: 100
71
+ - num_epochs: 2
72
+
73
+ ### Training results
74
+
75
+ | Training Loss | Epoch | Step | Validation Loss |
76
+ |:-------------:|:------:|:----:|:---------------:|
77
+ | 0.8664 | 0.0012 | 1 | 0.8860 |
78
+ | 0.4038 | 0.9989 | 825 | 0.4250 |
79
+ | 0.327 | 1.9830 | 1650 | 0.4219 |
80
+
81
+
82
+ ### Framework versions
83
+
84
+ - Transformers 4.40.2
85
+ - Pytorch 2.3.0+cu121
86
+ - Datasets 2.19.1
87
+ - Tokenizers 0.19.1
88
 
89
  [<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)
90
  <details><summary>See axolotl config</summary>
 
100
  strict: false
101
 
102
  datasets:
103
+ - path: Magpie-Align/Magpie-Pro-300K-Filtered
104
  type: sharegpt
105
  conversation: llama3
106
  dataset_prepared_path: last_run_prepared
107
  val_set_size: 0.001
108
+ output_dir: ./out_Llama-3-8B-Magpie-Pro-300K-FilteredL
109
 
110
  sequence_len: 8192
111
  sample_packing: true
112
  eval_sample_packing: false
113
  pad_to_sequence_len: true
114
 
 
 
 
 
 
 
 
115
  gradient_accumulation_steps: 8
116
  micro_batch_size: 1
117
  num_epochs: 2
 
148
 
149
  ```
150
 
151
+ </details><br>