Crataco commited on
Commit
c085e19
1 Parent(s): 0f37843

Create README.md

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