LoneStriker commited on
Commit
818f6e7
1 Parent(s): 357fed5

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,35 +1,5 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
1
+ zephyr-7b-gemma-v0.1-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
2
+ zephyr-7b-gemma-v0.1-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
3
+ zephyr-7b-gemma-v0.1-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
4
+ zephyr-7b-gemma-v0.1-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
5
+ zephyr-7b-gemma-v0.1-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: gemma-terms-of-use
4
+ license_link: https://ai.google.dev/gemma/terms
5
+ base_model: HuggingFaceH4/zephyr-7b-gemma-sft-v0.1
6
+ tags:
7
+ - alignment-handbook
8
+ - trl
9
+ - dpo
10
+ - generated_from_trainer
11
+ datasets:
12
+ - argilla/dpo-mix-7k
13
+ pipeline_tag: text-generation
14
+ model-index:
15
+ - name: zephyr-7b-gemma
16
+ results:
17
+ # MT-Bench (taken from model card)
18
+ - task:
19
+ type: text-generation
20
+ name: Text Generation
21
+ dataset:
22
+ name: MT-Bench
23
+ type: unknown
24
+ metrics:
25
+ - type: unknown
26
+ name: score
27
+ value: 7.81
28
+ source:
29
+ url: https://huggingface.co/spaces/lmsys/mt-bench
30
+ ---
31
+
32
+ <img src="https://huggingface.co/HuggingFaceH4/zephyr-7b-gemma-v0.1/resolve/main/thumbnail.png" alt="Zephyr 7B Gemma Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
33
+
34
+ # Model Card for Zephyr 7B Gemma
35
+
36
+ Zephyr is a series of language models that are trained to act as helpful assistants. Zephyr 7B Gemma is the third model in the series, and is a fine-tuned version of [`google/gemma-7b`](https://huggingface.co/google/gemma-7b) that was trained on on a mix of publicly available, synthetic datasets using Direct Preference Optimization (DPO). You can reproduce the training of this model via the recipe provided in the [Alignment Handbook](https://github.com/huggingface/alignment-handbook).
37
+
38
+ ## Model description
39
+
40
+ - **Model type:** A 7B parameter GPT-like model fine-tuned on a mix of publicly available, synthetic datasets.
41
+ - **Language(s) (NLP):** Primarily English
42
+ - **License:** Gemma Terms of Use
43
+ - **Finetuned from model:** [google/gemma-7b](https://huggingface.co/google/gemma-7b)
44
+
45
+ ### Model Sources
46
+
47
+ <!-- Provide the basic links for the model. -->
48
+
49
+ - **Repository:** https://github.com/huggingface/alignment-handbook
50
+ - **Demo:** https://huggingface.co/spaces/HuggingFaceH4/zephyr-7b-gemma-chat
51
+
52
+ ## Performance
53
+
54
+ | Model |MT Bench⬇️|IFEval|
55
+ |-----------------------------------------------------------------------|------:|------:|
56
+ |[zephyr-7b-gemma-v0.1](https://huggingface.co/HuggingFaceH4/zephyr-7b-gemma-v0.1)| 7.81 | 28.76|
57
+ |[zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) | 7.34 | 43.81|
58
+ |[google/gemma-7b-it](https://huggingface.co/google/gemma-7b-it) | 6.38 | 38.01|
59
+
60
+
61
+
62
+ | Model |AGIEval|GPT4All|TruthfulQA|BigBench|Average ⬇️|
63
+ |-----------------------------------------------------------------------|------:|------:|---------:|-------:|------:|
64
+ |[zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) | 37.52| 71.77| 55.26| 39.77| 51.08|
65
+ |[zephyr-7b-gemma-v0.1](https://huggingface.co/HuggingFaceH4/zephyr-7b-gemma-v0.1)| 34.22| 66.37| 52.19| 37.10| 47.47|
66
+ |[mlabonne/Gemmalpaca-7B](https://huggingface.co/mlabonne/Gemmalpaca-7B)| 21.6 | 40.87| 44.85 | 30.49| 34.45|
67
+ |[google/gemma-7b-it](https://huggingface.co/google/gemma-7b-it) | 21.33| 40.84| 41.70| 30.25| 33.53|
68
+
69
+
70
+ <details><summary>Details of AGIEval, GPT4All, TruthfulQA, BigBench </summary>
71
+
72
+ ### AGIEval
73
+ | Task |Version| Metric |Value| |Stderr|
74
+ |------------------------------|------:|--------|----:|---|-----:|
75
+ |agieval_aqua_rat | 0|acc |21.65|± | 2.59|
76
+ | | |acc_norm|25.20|± | 2.73|
77
+ |agieval_logiqa_en | 0|acc |34.72|± | 1.87|
78
+ | | |acc_norm|35.94|± | 1.88|
79
+ |agieval_lsat_ar | 0|acc |19.57|± | 2.62|
80
+ | | |acc_norm|21.74|± | 2.73|
81
+ |agieval_lsat_lr | 0|acc |30.59|± | 2.04|
82
+ | | |acc_norm|32.55|± | 2.08|
83
+ |agieval_lsat_rc | 0|acc |49.07|± | 3.05|
84
+ | | |acc_norm|42.75|± | 3.02|
85
+ |agieval_sat_en | 0|acc |54.85|± | 3.48|
86
+ | | |acc_norm|53.40|± | 3.48|
87
+ |agieval_sat_en_without_passage| 0|acc |37.38|± | 3.38|
88
+ | | |acc_norm|33.98|± | 3.31|
89
+ |agieval_sat_math | 0|acc |30.91|± | 3.12|
90
+ | | |acc_norm|28.18|± | 3.04|
91
+
92
+ Average: 34.22%
93
+
94
+ ### GPT4All
95
+ | Task |Version| Metric |Value| |Stderr|
96
+ |-------------|------:|--------|----:|---|-----:|
97
+ |arc_challenge| 0|acc |49.15|± | 1.46|
98
+ | | |acc_norm|52.47|± | 1.46|
99
+ |arc_easy | 0|acc |77.44|± | 0.86|
100
+ | | |acc_norm|74.75|± | 0.89|
101
+ |boolq | 1|acc |79.69|± | 0.70|
102
+ |hellaswag | 0|acc |60.59|± | 0.49|
103
+ | | |acc_norm|78.00|± | 0.41|
104
+ |openbookqa | 0|acc |29.20|± | 2.04|
105
+ | | |acc_norm|37.80|± | 2.17|
106
+ |piqa | 0|acc |76.82|± | 0.98|
107
+ | | |acc_norm|77.80|± | 0.97|
108
+ |winogrande | 0|acc |64.09|± | 1.35|
109
+
110
+ Average: 66.37%
111
+
112
+ ### TruthfulQA
113
+ | Task |Version|Metric|Value| |Stderr|
114
+ |-------------|------:|------|----:|---|-----:|
115
+ |truthfulqa_mc| 1|mc1 |35.74|± | 1.68|
116
+ | | |mc2 |52.19|± | 1.59|
117
+
118
+ Average: 52.19%
119
+
120
+ ### Bigbench
121
+ | Task |Version| Metric |Value| |Stderr|
122
+ |------------------------------------------------|------:|---------------------|----:|---|-----:|
123
+ |bigbench_causal_judgement | 0|multiple_choice_grade|53.68|± | 3.63|
124
+ |bigbench_date_understanding | 0|multiple_choice_grade|59.89|± | 2.55|
125
+ |bigbench_disambiguation_qa | 0|multiple_choice_grade|30.23|± | 2.86|
126
+ |bigbench_geometric_shapes | 0|multiple_choice_grade|11.42|± | 1.68|
127
+ | | |exact_str_match | 0.00|± | 0.00|
128
+ |bigbench_logical_deduction_five_objects | 0|multiple_choice_grade|28.40|± | 2.02|
129
+ |bigbench_logical_deduction_seven_objects | 0|multiple_choice_grade|19.14|± | 1.49|
130
+ |bigbench_logical_deduction_three_objects | 0|multiple_choice_grade|44.67|± | 2.88|
131
+ |bigbench_movie_recommendation | 0|multiple_choice_grade|26.80|± | 1.98|
132
+ |bigbench_navigate | 0|multiple_choice_grade|50.00|± | 1.58|
133
+ |bigbench_reasoning_about_colored_objects | 0|multiple_choice_grade|52.75|± | 1.12|
134
+ |bigbench_ruin_names | 0|multiple_choice_grade|33.04|± | 2.22|
135
+ |bigbench_salient_translation_error_detection | 0|multiple_choice_grade|33.37|± | 1.49|
136
+ |bigbench_snarks | 0|multiple_choice_grade|48.62|± | 3.73|
137
+ |bigbench_sports_understanding | 0|multiple_choice_grade|58.11|± | 1.57|
138
+ |bigbench_temporal_sequences | 0|multiple_choice_grade|37.20|± | 1.53|
139
+ |bigbench_tracking_shuffled_objects_five_objects | 0|multiple_choice_grade|20.08|± | 1.13|
140
+ |bigbench_tracking_shuffled_objects_seven_objects| 0|multiple_choice_grade|15.77|± | 0.87|
141
+ |bigbench_tracking_shuffled_objects_three_objects| 0|multiple_choice_grade|44.67|± | 2.88|
142
+
143
+ Average: 37.1%
144
+
145
+ </details>
146
+
147
+
148
+ ## Intended uses & limitations
149
+
150
+ The model was initially fine-tuned on the [DEITA 10K](https://huggingface.co/datasets/HuggingFaceH4/deita-10k-v0-sft) dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT.
151
+ We then further aligned the model with [🤗 TRL's](https://github.com/huggingface/trl) `DPOTrainer` on the [argilla/dpo-mix-7k](https://huggingface.co/datasets/argilla/dpo-mix-7k) dataset, which contains 7k prompts and model completions that are ranked by GPT-4. As a result, the model can be used for chat and you can check out our [demo](https://huggingface.co/spaces/HuggingFaceH4/zephyr-chat) to test its capabilities.
152
+
153
+ Here's how you can run the model using the `pipeline()` function from 🤗 Transformers:
154
+
155
+ ```python
156
+ # pip install transformers>=4.38.2
157
+ # pip install accelerate
158
+
159
+ import torch
160
+ from transformers import pipeline
161
+
162
+ pipe = pipeline(
163
+ "text-generation",
164
+ model="HuggingFaceH4/zephyr-7b-gemma-v0.1",
165
+ device_map="auto",
166
+ torch_dtype=torch.bfloat16,
167
+ )
168
+ messages = [
169
+ {
170
+ "role": "system",
171
+ "content": "", # Model not yet trained for follow this
172
+ },
173
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
174
+ ]
175
+ outputs = pipe(
176
+ messages,
177
+ max_new_tokens=128,
178
+ do_sample=True,
179
+ temperature=0.7,
180
+ top_k=50,
181
+ top_p=0.95,
182
+ stop_sequence="<|im_end|>",
183
+ )
184
+ print(outputs[0]["generated_text"][-1]["content"])
185
+ # It is not possible for a human to eat a helicopter in one sitting, as a
186
+ # helicopter is a large and inedible machine. Helicopters are made of metal,
187
+ # plastic, and other materials that are not meant to be consumed by humans.
188
+ # Eating a helicopter would be extremely dangerous and would likely cause
189
+ # serious health problems, including choking, suffocation, and poisoning. It is
190
+ # important to only eat food that is safe and intended for human consumption.
191
+ ```
192
+
193
+ ## Bias, Risks, and Limitations
194
+
195
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
196
+
197
+ Zephyr 7B Gemma has not been aligned to human preferences for safety within the RLHF phase or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so). It is also unknown what the size and composition of the corpus was used to train the base model (`google/gemma-7b`), however it is likely to have included a mix of Web data and technical sources like books and code. See the [StarCoder2 model card](https://huggingface.co/bigcode/starcoder2-15b) for an example of this.
198
+
199
+
200
+ ## Training and evaluation data
201
+
202
+
203
+ This model is a fine-tuned version of [HuggingFaceH4/zephyr-7b-gemma-sft-v0.1](https://huggingface.co/HuggingFaceH4/zephyr-7b-gemma-sft-v0.1) on the argilla/dpo-mix-7k dataset.
204
+
205
+ It achieves the following results on the evaluation set:
206
+ - Loss: 0.4695
207
+ - Rewards/chosen: -3.3746
208
+ - Rewards/rejected: -4.9715
209
+ - Rewards/accuracies: 0.7188
210
+ - Rewards/margins: 1.5970
211
+ - Logps/rejected: -459.4853
212
+ - Logps/chosen: -429.9115
213
+ - Logits/rejected: 86.4684
214
+ - Logits/chosen: 92.8200
215
+
216
+ ### Training hyperparameters
217
+
218
+ The following hyperparameters were used during training:
219
+ - learning_rate: 5e-07
220
+ - train_batch_size: 2
221
+ - eval_batch_size: 4
222
+ - seed: 42
223
+ - distributed_type: multi-GPU
224
+ - num_devices: 8
225
+ - gradient_accumulation_steps: 8
226
+ - total_train_batch_size: 128
227
+ - total_eval_batch_size: 32
228
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
229
+ - lr_scheduler_type: cosine
230
+ - lr_scheduler_warmup_ratio: 0.1
231
+ - num_epochs: 2
232
+
233
+ ### Training results
234
+
235
+ | Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
236
+ |:-------------:|:-----:|:----:|:---------------:|:--------------:|:----------------:|:------------------:|:---------------:|:--------------:|:------------:|:---------------:|:-------------:|
237
+ | 0.1923 | 1.9 | 100 | 0.4736 | -3.4575 | -4.9556 | 0.75 | 1.4980 | -459.1662 | -431.5707 | 86.3863 | 92.7360 |
238
+
239
+
240
+ ### Framework versions
241
+
242
+ - Transformers 4.39.0.dev0
243
+ - Pytorch 2.1.2+cu121
244
+ - Datasets 2.14.6
245
+ - Tokenizers 0.15.1
246
+
247
+ ## Citation Information
248
+
249
+ If you find this model useful in your work, please consider citing the Zephyr technical report:
250
+
251
+ ```
252
+ @misc{tunstall2023zephyr,
253
+ title={Zephyr: Direct Distillation of LM Alignment},
254
+ author={Lewis Tunstall and Edward Beeching and Nathan Lambert and Nazneen Rajani and Kashif Rasul and Younes Belkada and Shengyi Huang and Leandro von Werra and Clémentine Fourrier and Nathan Habib and Nathan Sarrazin and Omar Sanseviero and Alexander M. Rush and Thomas Wolf},
255
+ year={2023},
256
+ eprint={2310.16944},
257
+ archivePrefix={arXiv},
258
+ primaryClass={cs.LG}
259
+ }
260
+ ```
261
+
262
+ You may also wish to cite the creators of this model as well:
263
+
264
+ ```
265
+ @misc{zephyr_7b_gemma,
266
+ author = {Lewis Tunstall and Philipp Schmid},
267
+ title = {Zephyr 7B Gemma},
268
+ year = {2024},
269
+ publisher = {Hugging Face},
270
+ journal = {Hugging Face repository},
271
+ howpublished = {\url{https://huggingface.co/HuggingFaceH4/zephyr-7b-gemma-v0.1}}
272
+ }
273
+ ```
thumbnail.png ADDED
zephyr-7b-gemma-v0.1-Q3_K_L.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25b97d3c476faaa74209c43e48d560044ecd0c2ad9b21f2e6a49b4dd923be553
3
+ size 4401867488
zephyr-7b-gemma-v0.1-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8060078d8a2c39eeef47fb4923ac2fcb9f3a0487f1aec164bfc78e8aefa7b255
3
+ size 5127006944
zephyr-7b-gemma-v0.1-Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8524f188d091e668e374e4c5451cf0867535efd0bd336867bfba8d9e52a3784
3
+ size 6040054496
zephyr-7b-gemma-v0.1-Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a4811b702ffa079214944ededc9f216132bd0c4594a05060bc7617683256224
3
+ size 7010167520
zephyr-7b-gemma-v0.1-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08678d7eb7c4b11727a4028725ec5dbd282b276328f1c743bead4fb6305b6725
3
+ size 9077844704