RichardErkhov commited on
Commit
1570c9b
1 Parent(s): 28b40ff

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +202 -0
README.md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ stablelm-2-zephyr-1_6b - GGUF
11
+ - Model creator: https://huggingface.co/ganser4566/
12
+ - Original model: https://huggingface.co/ganser4566/stablelm-2-zephyr-1_6b/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [stablelm-2-zephyr-1_6b.Q2_K.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q2_K.gguf) | Q2_K | 0.65GB |
18
+ | [stablelm-2-zephyr-1_6b.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.IQ3_XS.gguf) | IQ3_XS | 0.71GB |
19
+ | [stablelm-2-zephyr-1_6b.IQ3_S.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.IQ3_S.gguf) | IQ3_S | 0.74GB |
20
+ | [stablelm-2-zephyr-1_6b.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q3_K_S.gguf) | Q3_K_S | 0.74GB |
21
+ | [stablelm-2-zephyr-1_6b.IQ3_M.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.IQ3_M.gguf) | IQ3_M | 0.77GB |
22
+ | [stablelm-2-zephyr-1_6b.Q3_K.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q3_K.gguf) | Q3_K | 0.8GB |
23
+ | [stablelm-2-zephyr-1_6b.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q3_K_M.gguf) | Q3_K_M | 0.8GB |
24
+ | [stablelm-2-zephyr-1_6b.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q3_K_L.gguf) | Q3_K_L | 0.85GB |
25
+ | [stablelm-2-zephyr-1_6b.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.IQ4_XS.gguf) | IQ4_XS | 0.88GB |
26
+ | [stablelm-2-zephyr-1_6b.Q4_0.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q4_0.gguf) | Q4_0 | 0.92GB |
27
+ | [stablelm-2-zephyr-1_6b.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.IQ4_NL.gguf) | IQ4_NL | 0.92GB |
28
+ | [stablelm-2-zephyr-1_6b.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q4_K_S.gguf) | Q4_K_S | 0.92GB |
29
+ | [stablelm-2-zephyr-1_6b.Q4_K.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q4_K.gguf) | Q4_K | 0.96GB |
30
+ | [stablelm-2-zephyr-1_6b.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q4_K_M.gguf) | Q4_K_M | 0.96GB |
31
+ | [stablelm-2-zephyr-1_6b.Q4_1.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q4_1.gguf) | Q4_1 | 1.0GB |
32
+ | [stablelm-2-zephyr-1_6b.Q5_0.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q5_0.gguf) | Q5_0 | 1.08GB |
33
+ | [stablelm-2-zephyr-1_6b.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q5_K_S.gguf) | Q5_K_S | 1.08GB |
34
+ | [stablelm-2-zephyr-1_6b.Q5_K.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q5_K.gguf) | Q5_K | 1.11GB |
35
+ | [stablelm-2-zephyr-1_6b.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q5_K_M.gguf) | Q5_K_M | 1.11GB |
36
+ | [stablelm-2-zephyr-1_6b.Q5_1.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q5_1.gguf) | Q5_1 | 1.17GB |
37
+ | [stablelm-2-zephyr-1_6b.Q6_K.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q6_K.gguf) | Q6_K | 1.26GB |
38
+ | [stablelm-2-zephyr-1_6b.Q8_0.gguf](https://huggingface.co/RichardErkhov/ganser4566_-_stablelm-2-zephyr-1_6b-gguf/blob/main/stablelm-2-zephyr-1_6b.Q8_0.gguf) | Q8_0 | 1.63GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ datasets:
46
+ - HuggingFaceH4/ultrachat_200k
47
+ - allenai/ultrafeedback_binarized_cleaned
48
+ - meta-math/MetaMathQA
49
+ - WizardLM/WizardLM_evol_instruct_V2_196k
50
+ - openchat/openchat_sharegpt4_dataset
51
+ - LDJnr/Capybara
52
+ - Intel/orca_dpo_pairs
53
+ - hkust-nlp/deita-10k-v0
54
+ language:
55
+ - en
56
+ tags:
57
+ - causal-lm
58
+ extra_gated_fields:
59
+ Name: text
60
+ Email: text
61
+ Country: text
62
+ Organization or Affiliation: text
63
+ I ALLOW Stability AI to email me about new model releases: checkbox
64
+ license: other
65
+ ---
66
+ # `StableLM 2 Zephyr 1.6B`
67
+
68
+ ## Model Description
69
+
70
+ `Stable LM 2 Zephyr 1.6B` is a 1.6 billion parameter instruction tuned language model inspired by [HugginFaceH4's Zephyr 7B](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) training pipeline. The model is trained on a mix of publicly available datasets and synthetic datasets, utilizing [Direct Preference Optimization (DPO)](https://arxiv.org/abs/2305.18290).
71
+
72
+ ## Usage
73
+
74
+ `StableLM 2 Zephyr 1.6B` uses the following instruction format:
75
+ ```
76
+ <|user|>
77
+ Which famous math number begins with 1.6 ...?<|endoftext|>
78
+ <|assistant|>
79
+ The number you are referring to is 1.618033988749895. This is the famous value known as the golden ratio<|endoftext|>
80
+ ```
81
+
82
+ This format is also available through the tokenizer's `apply_chat_template` method:
83
+
84
+ ```python
85
+ from transformers import AutoModelForCausalLM, AutoTokenizer
86
+
87
+ tokenizer = AutoTokenizer.from_pretrained('stabilityai/stablelm-2-zephyr-1_6b')
88
+ model = AutoModelForCausalLM.from_pretrained(
89
+ 'stabilityai/stablelm-2-zephyr-1_6b',
90
+ device_map="auto"
91
+ )
92
+
93
+ prompt = [{'role': 'user', 'content': 'Which famous math number begins with 1.6 ...?'}]
94
+ inputs = tokenizer.apply_chat_template(
95
+ prompt,
96
+ add_generation_prompt=True,
97
+ return_tensors='pt'
98
+ )
99
+
100
+ tokens = model.generate(
101
+ inputs.to(model.device),
102
+ max_new_tokens=1024,
103
+ temperature=0.5,
104
+ do_sample=True
105
+ )
106
+
107
+ print(tokenizer.decode(tokens[0], skip_special_tokens=False))
108
+ ```
109
+
110
+ ## Model Details
111
+
112
+ * **Developed by**: [Stability AI](https://stability.ai/)
113
+ * **Model type**: `StableLM 2 Zephyr 1.6B` model is an auto-regressive language model based on the transformer decoder architecture.
114
+ * **Language(s)**: English
115
+ * **Paper**: [Stable LM 2 1.6B Technical Report](https://drive.google.com/file/d/1JYJHszhS8EFChTbNAf8xmqhKjogWRrQF/view?usp=sharing)
116
+ * **Library**: [Alignment Handbook](https://github.com/huggingface/alignment-handbook.git)
117
+ * **Finetuned from model**: [https://huggingface.co/stabilityai/stablelm-2-1_6b](https://huggingface.co/stabilityai/stablelm-2-1_6b)
118
+ * **License**: [StabilityAI Non-Commercial Research Community License](https://huggingface.co/stabilityai/stablelm-2-zephyr-1_6b/blob/main/LICENSE). If you want to use this model for your commercial products or purposes, please contact us [here](https://stability.ai/contact) to learn more.
119
+ * **Contact**: For questions and comments about the model, please email `[email protected]`
120
+
121
+ ### Training Dataset
122
+
123
+ The dataset is comprised of a mixture of open datasets large-scale datasets available on the [HuggingFace Hub](https://huggingface.co/datasets):
124
+ 1. SFT Datasets
125
+ - HuggingFaceH4/ultrachat_200k
126
+ - meta-math/MetaMathQA
127
+ - WizardLM/WizardLM_evol_instruct_V2_196k
128
+ - Open-Orca/SlimOrca
129
+ - openchat/openchat_sharegpt4_dataset
130
+ - LDJnr/Capybara
131
+ - hkust-nlp/deita-10k-v0
132
+
133
+ 2. Preference Datasets:
134
+ - allenai/ultrafeedback_binarized_cleaned
135
+ - Intel/orca_dpo_pairs
136
+
137
+ ## Performance
138
+
139
+ ### MT-Bench
140
+
141
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/61b2bf4f5b1f7cad1799cfbb/QH00HVM3lg-5f17U_py4K.png" alt="mt_bench_plot" width="600"/>
142
+
143
+ | Model | Size | MT-Bench |
144
+ |-------------------------|------|----------|
145
+ | Mistral-7B-Instruct-v0.2| 7B | 7.61 |
146
+ | Llama2-Chat | 70B | 6.86 |
147
+ | stablelm-zephyr-3b | 3B | 6.64 |
148
+ | MPT-30B-Chat | 30B | 6.39 |
149
+ | **stablelm-2-zephyr-1.6b** | 1.6B | 5.42 |
150
+ | Falcon-40B-Instruct | 40B | 5.17 |
151
+ | Qwen-1.8B-Chat | 1.8B | 4.95 |
152
+ | dolphin-2.6-phi-2 | 2.7B | 4.93 |
153
+ | phi-2 | 2.7B | 4.29 |
154
+ | TinyLlama-1.1B-Chat-v1.0| 1.1B | 3.46 |
155
+
156
+ ### OpenLLM Leaderboard
157
+
158
+ | Model | Size | Average | ARC Challenge (acc_norm) | HellaSwag (acc_norm) | MMLU (acc_norm) | TruthfulQA (mc2) | Winogrande (acc) | Gsm8k (acc) |
159
+ |----------------------------------------|------|---------|-------------------------|----------------------|-----------------|------------------|------------------|-------------|
160
+ | microsoft/phi-2 | 2.7B | 61.32% | 61.09% | 75.11% | 58.11% | 44.47% | 74.35% | 54.81% |
161
+ | **stabilityai/stablelm-2-zephyr-1_6b** | 1.6B | 49.89% | 43.69% | 69.34% | 41.85% | 45.21% | 64.09% | 35.18% |
162
+ | microsoft/phi-1_5 | 1.3B | 47.69% | 52.90% | 63.79% | 43.89% | 40.89% | 72.22% | 12.43% |
163
+ | stabilityai/stablelm-2-1_6b | 1.6B | 45.54% | 43.43% | 70.49% | 38.93% | 36.65% | 65.90% | 17.82% |
164
+ | mosaicml/mpt-7b | 7B | 44.28% | 47.70% | 77.57% | 30.80% | 33.40% | 72.14% | 4.02% |
165
+ | KnutJaegersberg/Qwen-1_8B-Llamaified* | 1.8B | 44.75% | 37.71% | 58.87% | 46.37% | 39.41% | 61.72% | 24.41% |
166
+ | openlm-research/open_llama_3b_v2 | 3B | 40.28% | 40.27% | 71.60% | 27.12% | 34.78% | 67.01% | 0.91% |
167
+ | iiuae/falcon-rw-1b | 1B | 37.07% | 35.07% | 63.56% | 25.28% | 35.96% | 62.04% | 0.53% |
168
+ | TinyLlama/TinyLlama-1.1B-3T | 1.1B | 36.40% | 33.79% | 60.31% | 26.04% | 37.32% | 59.51% | 1.44% |
169
+
170
+
171
+
172
+ ### Training Infrastructure
173
+
174
+ * **Hardware**: `StableLM 2 Zephyr 1.6B` was trained on the Stability AI cluster across 8 nodes with 8 A100 80GBs GPUs for each nodes.
175
+ * **Code Base**: We use our internal script for SFT steps and used [HuggingFace Alignment Handbook script](https://github.com/huggingface/alignment-handbook) for DPO training.
176
+
177
+ ## Use and Limitations
178
+
179
+ ### Intended Use
180
+
181
+ The model is intended to be used in chat-like applications. Developers must evaluate the model for safety performance in their specific use case. Read more about [safety and limitations](#limitations-and-bias) below.
182
+
183
+ ### Limitations and Bias
184
+
185
+ This model is not trained against adversarial inputs. We strongly recommend pairing this model with an input and output classifier to prevent harmful responses.
186
+
187
+ Through our internal red teaming, we discovered that while the model will not output harmful information if not prompted to do so, it will hallucinate many facts. It is also willing to output potentially harmful outputs or misinformation when the user requests it.
188
+ Using this model will require guardrails around your inputs and outputs to ensure that any outputs returned are not misinformation or harmful.
189
+ Additionally, as each use case is unique, we recommend running your own suite of tests to ensure proper performance of this model.
190
+ Finally, do not use the models if they are unsuitable for your application, or for any applications that may cause deliberate or unintentional harm to others.
191
+
192
+
193
+ ## How to Cite
194
+
195
+ ```bibtex
196
+ @misc{StableLM-2-1.6B,
197
+ url={[https://huggingface.co/stabilityai/stablelm-2-1.6b](https://huggingface.co/stabilityai/stablelm-2-1.6b)},
198
+ title={Stable LM 2 1.6B},
199
+ author={Stability AI Language Team}
200
+ }
201
+ ```
202
+