RichardErkhov commited on
Commit
f72158c
1 Parent(s): e270cb5

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +176 -0
README.md ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 - bnb 8bits
11
+ - Model creator: https://huggingface.co/stabilityai/
12
+ - Original model: https://huggingface.co/stabilityai/stablelm-2-zephyr-1_6b/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ datasets:
20
+ - HuggingFaceH4/ultrachat_200k
21
+ - allenai/ultrafeedback_binarized_cleaned
22
+ - meta-math/MetaMathQA
23
+ - WizardLM/WizardLM_evol_instruct_V2_196k
24
+ - openchat/openchat_sharegpt4_dataset
25
+ - LDJnr/Capybara
26
+ - Intel/orca_dpo_pairs
27
+ - hkust-nlp/deita-10k-v0
28
+ language:
29
+ - en
30
+ tags:
31
+ - causal-lm
32
+ extra_gated_fields:
33
+ Name: text
34
+ Email: text
35
+ Country: text
36
+ Organization or Affiliation: text
37
+ I ALLOW Stability AI to email me about new model releases: checkbox
38
+ license: other
39
+ ---
40
+ # `StableLM 2 Zephyr 1.6B`
41
+
42
+ ## Model Description
43
+
44
+ `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).
45
+
46
+ ## Usage
47
+
48
+ `StableLM 2 Zephyr 1.6B` uses the following instruction format:
49
+ ```
50
+ <|user|>
51
+ Which famous math number begins with 1.6 ...?<|endoftext|>
52
+ <|assistant|>
53
+ The number you are referring to is 1.618033988749895. This is the famous value known as the golden ratio<|endoftext|>
54
+ ```
55
+
56
+ This format is also available through the tokenizer's `apply_chat_template` method:
57
+
58
+ ```python
59
+ from transformers import AutoModelForCausalLM, AutoTokenizer
60
+
61
+ tokenizer = AutoTokenizer.from_pretrained('stabilityai/stablelm-2-zephyr-1_6b')
62
+ model = AutoModelForCausalLM.from_pretrained(
63
+ 'stabilityai/stablelm-2-zephyr-1_6b',
64
+ device_map="auto"
65
+ )
66
+
67
+ prompt = [{'role': 'user', 'content': 'Which famous math number begins with 1.6 ...?'}]
68
+ inputs = tokenizer.apply_chat_template(
69
+ prompt,
70
+ add_generation_prompt=True,
71
+ return_tensors='pt'
72
+ )
73
+
74
+ tokens = model.generate(
75
+ inputs.to(model.device),
76
+ max_new_tokens=1024,
77
+ temperature=0.5,
78
+ do_sample=True
79
+ )
80
+
81
+ print(tokenizer.decode(tokens[0], skip_special_tokens=False))
82
+ ```
83
+
84
+ ## Model Details
85
+
86
+ * **Developed by**: [Stability AI](https://stability.ai/)
87
+ * **Model type**: `StableLM 2 Zephyr 1.6B` model is an auto-regressive language model based on the transformer decoder architecture.
88
+ * **Language(s)**: English
89
+ * **Paper**: [Stable LM 2 1.6B Technical Report](https://drive.google.com/file/d/1JYJHszhS8EFChTbNAf8xmqhKjogWRrQF/view?usp=sharing)
90
+ * **Library**: [Alignment Handbook](https://github.com/huggingface/alignment-handbook.git)
91
+ * **Finetuned from model**: [https://huggingface.co/stabilityai/stablelm-2-1_6b](https://huggingface.co/stabilityai/stablelm-2-1_6b)
92
+ * **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.
93
+ * **Contact**: For questions and comments about the model, please email `[email protected]`
94
+
95
+ ### Training Dataset
96
+
97
+ The dataset is comprised of a mixture of open datasets large-scale datasets available on the [HuggingFace Hub](https://huggingface.co/datasets):
98
+ 1. SFT Datasets
99
+ - HuggingFaceH4/ultrachat_200k
100
+ - meta-math/MetaMathQA
101
+ - WizardLM/WizardLM_evol_instruct_V2_196k
102
+ - Open-Orca/SlimOrca
103
+ - openchat/openchat_sharegpt4_dataset
104
+ - LDJnr/Capybara
105
+ - hkust-nlp/deita-10k-v0
106
+
107
+ 2. Preference Datasets:
108
+ - allenai/ultrafeedback_binarized_cleaned
109
+ - Intel/orca_dpo_pairs
110
+
111
+ ## Performance
112
+
113
+ ### MT-Bench
114
+
115
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/61b2bf4f5b1f7cad1799cfbb/QH00HVM3lg-5f17U_py4K.png" alt="mt_bench_plot" width="600"/>
116
+
117
+ | Model | Size | MT-Bench |
118
+ |-------------------------|------|----------|
119
+ | Mistral-7B-Instruct-v0.2| 7B | 7.61 |
120
+ | Llama2-Chat | 70B | 6.86 |
121
+ | stablelm-zephyr-3b | 3B | 6.64 |
122
+ | MPT-30B-Chat | 30B | 6.39 |
123
+ | **stablelm-2-zephyr-1.6b** | 1.6B | 5.42 |
124
+ | Falcon-40B-Instruct | 40B | 5.17 |
125
+ | Qwen-1.8B-Chat | 1.8B | 4.95 |
126
+ | dolphin-2.6-phi-2 | 2.7B | 4.93 |
127
+ | phi-2 | 2.7B | 4.29 |
128
+ | TinyLlama-1.1B-Chat-v1.0| 1.1B | 3.46 |
129
+
130
+ ### OpenLLM Leaderboard
131
+
132
+ | Model | Size | Average | ARC Challenge (acc_norm) | HellaSwag (acc_norm) | MMLU (acc_norm) | TruthfulQA (mc2) | Winogrande (acc) | Gsm8k (acc) |
133
+ |----------------------------------------|------|---------|-------------------------|----------------------|-----------------|------------------|------------------|-------------|
134
+ | microsoft/phi-2 | 2.7B | 61.32% | 61.09% | 75.11% | 58.11% | 44.47% | 74.35% | 54.81% |
135
+ | **stabilityai/stablelm-2-zephyr-1_6b** | 1.6B | 49.89% | 43.69% | 69.34% | 41.85% | 45.21% | 64.09% | 35.18% |
136
+ | microsoft/phi-1_5 | 1.3B | 47.69% | 52.90% | 63.79% | 43.89% | 40.89% | 72.22% | 12.43% |
137
+ | stabilityai/stablelm-2-1_6b | 1.6B | 45.54% | 43.43% | 70.49% | 38.93% | 36.65% | 65.90% | 17.82% |
138
+ | mosaicml/mpt-7b | 7B | 44.28% | 47.70% | 77.57% | 30.80% | 33.40% | 72.14% | 4.02% |
139
+ | KnutJaegersberg/Qwen-1_8B-Llamaified* | 1.8B | 44.75% | 37.71% | 58.87% | 46.37% | 39.41% | 61.72% | 24.41% |
140
+ | openlm-research/open_llama_3b_v2 | 3B | 40.28% | 40.27% | 71.60% | 27.12% | 34.78% | 67.01% | 0.91% |
141
+ | iiuae/falcon-rw-1b | 1B | 37.07% | 35.07% | 63.56% | 25.28% | 35.96% | 62.04% | 0.53% |
142
+ | TinyLlama/TinyLlama-1.1B-3T | 1.1B | 36.40% | 33.79% | 60.31% | 26.04% | 37.32% | 59.51% | 1.44% |
143
+
144
+
145
+
146
+ ### Training Infrastructure
147
+
148
+ * **Hardware**: `StableLM 2 Zephyr 1.6B` was trained on the Stability AI cluster across 8 nodes with 8 A100 80GBs GPUs for each nodes.
149
+ * **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.
150
+
151
+ ## Use and Limitations
152
+
153
+ ### Intended Use
154
+
155
+ 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.
156
+
157
+ ### Limitations and Bias
158
+
159
+ This model is not trained against adversarial inputs. We strongly recommend pairing this model with an input and output classifier to prevent harmful responses.
160
+
161
+ 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.
162
+ Using this model will require guardrails around your inputs and outputs to ensure that any outputs returned are not misinformation or harmful.
163
+ Additionally, as each use case is unique, we recommend running your own suite of tests to ensure proper performance of this model.
164
+ 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.
165
+
166
+
167
+ ## How to Cite
168
+
169
+ ```bibtex
170
+ @misc{StableLM-2-1.6B,
171
+ url={[https://huggingface.co/stabilityai/stablelm-2-1.6b](https://huggingface.co/stabilityai/stablelm-2-1.6b)},
172
+ title={Stable LM 2 1.6B},
173
+ author={Stability AI Language Team}
174
+ }
175
+ ```
176
+