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