GGUF
English
axolotl
Generated from Trainer
Inference Endpoints
conversational
munish0838 commited on
Commit
253c855
·
verified ·
1 Parent(s): 7d9b011

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +191 -0
README.md ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ license: llama3.1
5
+ base_model: meta-llama/Meta-Llama-3.1-8B
6
+ tags:
7
+ - axolotl
8
+ - generated_from_trainer
9
+ model-index:
10
+ - name: Llama-3.1-8B-Magpie-Align-SFT-v0.1
11
+ results: []
12
+ language:
13
+ - en
14
+ datasets:
15
+ - Magpie-Align/Magpie-Reasoning-150K
16
+ - Magpie-Align/Magpie-Pro-MT-300K-v0.1
17
+
18
+ ---
19
+
20
+ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
21
+
22
+ # QuantFactory/Llama-3.1-8B-Magpie-Align-SFT-v0.1-GGUF
23
+ This is quantized version of [Magpie-Align/Llama-3.1-8B-Magpie-Align-SFT-v0.1](https://huggingface.co/Magpie-Align/Llama-3.1-8B-Magpie-Align-SFT-v0.1) created using llama.cpp
24
+
25
+ # Original Model Card
26
+
27
+
28
+ ![Magpie](https://cdn-uploads.huggingface.co/production/uploads/653df1323479e9ebbe3eb6cc/FWWILXrAGNwWr52aghV0S.png)
29
+
30
+ # 🐦 Llama-3.1-8B-Magpie-Align-SFT-v0.1
31
+
32
+ Project Web: [https://magpie-align.github.io/](https://magpie-align.github.io/)
33
+
34
+ Arxiv Technical Report: [https://arxiv.org/abs/2406.08464](https://arxiv.org/abs/2406.08464)
35
+
36
+ Codes: [https://github.com/magpie-align/magpie](https://github.com/magpie-align/magpie)
37
+
38
+ ## Abstract
39
+ <details><summary>Click Here</summary>
40
+ 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.
41
+ </details><be>
42
+
43
+ ## About This Model
44
+
45
+ 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
46
+ - [Magpie-Align/Magpie-Pro-MT-300K-v0.1](https://huggingface.co/datasets/Magpie-Align/Magpie-Pro-MT-300K-v0.1), and
47
+ - [Magpie-Align/Magpie-Reasoning-150K](https://huggingface.co/datasets/Magpie-Align/Magpie-Reasoning-150K).
48
+
49
+ It achieves performance comparable with the official Llama-3.1-8B-Instruct Model with SFT only!
50
+
51
+ - **Alpaca Eval 2 (GPT-4-Turbo-1106): 24.79 (LC), 25.05 (WR)**
52
+ - **Arena Hard: 21.0**
53
+
54
+ ## Other Information
55
+
56
+ **License**: Please follow [Meta Llama 3 Community License](https://llama.meta.com/llama3/license) (Data) and [Meta Llama 3.1 Community License](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE) (Model).
57
+
58
+ **Conversation Template**: Please use Llama 3 **official chat template** for the best performance.
59
+
60
+ **Questions?** Please contact [Zhangchen](https://zhangchenxu.com/) by email.
61
+
62
+ ## Citation
63
+
64
+ If you find the model, data, or code useful, please cite our paper:
65
+ ```
66
+ @article{xu2024magpie,
67
+ title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing},
68
+ author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
69
+ year={2024},
70
+ eprint={2406.08464},
71
+ archivePrefix={arXiv},
72
+ primaryClass={cs.CL}
73
+ }
74
+ ```
75
+
76
+ ## Training procedure
77
+
78
+ ### Training hyperparameters
79
+
80
+ The following hyperparameters were used during training:
81
+ - learning_rate: 2e-05
82
+ - train_batch_size: 1
83
+ - eval_batch_size: 1
84
+ - seed: 42
85
+ - distributed_type: multi-GPU
86
+ - num_devices: 8
87
+ - gradient_accumulation_steps: 16
88
+ - total_train_batch_size: 128
89
+ - total_eval_batch_size: 8
90
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
91
+ - lr_scheduler_type: cosine
92
+ - lr_scheduler_warmup_steps: 79
93
+ - num_epochs: 2
94
+
95
+ ### Training results
96
+
97
+ | Training Loss | Epoch | Step | Validation Loss |
98
+ |:-------------:|:------:|:----:|:---------------:|
99
+ | 0.7863 | 0.0024 | 1 | 0.7710 |
100
+ | 0.5422 | 0.2007 | 85 | 0.4937 |
101
+ | 0.476 | 0.4014 | 170 | 0.4382 |
102
+ | 0.4594 | 0.6021 | 255 | 0.4174 |
103
+ | 0.4383 | 0.8028 | 340 | 0.4057 |
104
+ | 0.4397 | 1.0035 | 425 | 0.3978 |
105
+ | 0.3927 | 1.1845 | 510 | 0.3956 |
106
+ | 0.3895 | 1.3852 | 595 | 0.3934 |
107
+ | 0.3832 | 1.5859 | 680 | 0.3925 |
108
+ | 0.3957 | 1.7866 | 765 | 0.3924 |
109
+
110
+
111
+ ### Framework versions
112
+
113
+ - Transformers 4.43.1
114
+ - Pytorch 2.3.0+cu121
115
+ - Datasets 2.19.1
116
+ - Tokenizers 0.19.1
117
+
118
+ [<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)
119
+ <details><summary>See axolotl config</summary>
120
+
121
+ axolotl version: `0.4.1`
122
+ ```yaml
123
+
124
+ base_model: meta-llama/Meta-Llama-3.1-8B
125
+ model_type: LlamaForCausalLM
126
+ tokenizer_type: AutoTokenizer
127
+
128
+ load_in_8bit: false
129
+ load_in_4bit: false
130
+ strict: false
131
+
132
+ datasets:
133
+ - path: Magpie-Align/Magpie-Reasoning-150K
134
+ type: sharegpt
135
+ conversation: llama3
136
+ - path: Magpie-Align/Magpie-Pro-MT-300K-v0.1
137
+ type: sharegpt
138
+ conversation: llama3
139
+ dataset_prepared_path: last_run_prepared
140
+ val_set_size: 0.001
141
+ output_dir: /data/axolotl_out/Llama-3.1-8B-Mix-SFT
142
+
143
+ sequence_len: 8192
144
+ sample_packing: true
145
+ eval_sample_packing: false
146
+ pad_to_sequence_len: true
147
+
148
+ wandb_project: SynDa
149
+ wandb_entity:
150
+ wandb_watch:
151
+ wandb_name: Llama-3.1-8B-Mix-SFT
152
+ wandb_log_model:
153
+ hub_model_id: Magpie-Align/Llama-3.1-8B-Magpie-Align-SFT-v0.1
154
+
155
+ gradient_accumulation_steps: 16
156
+ micro_batch_size: 1
157
+ num_epochs: 2
158
+ optimizer: paged_adamw_8bit
159
+ lr_scheduler: cosine
160
+ learning_rate: 2e-5
161
+
162
+ train_on_inputs: false
163
+ group_by_length: false
164
+ bf16: auto
165
+ fp16:
166
+ tf32: false
167
+
168
+ gradient_checkpointing: true
169
+ gradient_checkpointing_kwargs:
170
+ use_reentrant: false
171
+ early_stopping_patience:
172
+ resume_from_checkpoint:
173
+ logging_steps: 1
174
+ xformers_attention:
175
+ flash_attention: true
176
+
177
+ warmup_ratio: 0.1
178
+ evals_per_epoch: 5
179
+ eval_table_size:
180
+ saves_per_epoch: 1
181
+ debug:
182
+ deepspeed:
183
+ weight_decay: 0.0
184
+ fsdp:
185
+ fsdp_config:
186
+ special_tokens:
187
+ pad_token: <|end_of_text|>
188
+
189
+ ```
190
+
191
+ </details><be>