RichardErkhov
commited on
Commit
•
1171545
1
Parent(s):
69a1f6a
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
Starling-LM-7B-alpha - GGUF
|
11 |
+
- Model creator: https://huggingface.co/berkeley-nest/
|
12 |
+
- Original model: https://huggingface.co/berkeley-nest/Starling-LM-7B-alpha/
|
13 |
+
|
14 |
+
|
15 |
+
| Name | Quant method | Size |
|
16 |
+
| ---- | ---- | ---- |
|
17 |
+
| [Starling-LM-7B-alpha.Q2_K.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q2_K.gguf) | Q2_K | 2.53GB |
|
18 |
+
| [Starling-LM-7B-alpha.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.IQ3_XS.gguf) | IQ3_XS | 2.81GB |
|
19 |
+
| [Starling-LM-7B-alpha.IQ3_S.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.IQ3_S.gguf) | IQ3_S | 2.96GB |
|
20 |
+
| [Starling-LM-7B-alpha.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q3_K_S.gguf) | Q3_K_S | 2.95GB |
|
21 |
+
| [Starling-LM-7B-alpha.IQ3_M.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.IQ3_M.gguf) | IQ3_M | 3.06GB |
|
22 |
+
| [Starling-LM-7B-alpha.Q3_K.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q3_K.gguf) | Q3_K | 3.28GB |
|
23 |
+
| [Starling-LM-7B-alpha.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q3_K_M.gguf) | Q3_K_M | 3.28GB |
|
24 |
+
| [Starling-LM-7B-alpha.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q3_K_L.gguf) | Q3_K_L | 3.56GB |
|
25 |
+
| [Starling-LM-7B-alpha.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.IQ4_XS.gguf) | IQ4_XS | 3.67GB |
|
26 |
+
| [Starling-LM-7B-alpha.Q4_0.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q4_0.gguf) | Q4_0 | 3.83GB |
|
27 |
+
| [Starling-LM-7B-alpha.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.IQ4_NL.gguf) | IQ4_NL | 3.87GB |
|
28 |
+
| [Starling-LM-7B-alpha.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q4_K_S.gguf) | Q4_K_S | 3.86GB |
|
29 |
+
| [Starling-LM-7B-alpha.Q4_K.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q4_K.gguf) | Q4_K | 4.07GB |
|
30 |
+
| [Starling-LM-7B-alpha.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q4_K_M.gguf) | Q4_K_M | 4.07GB |
|
31 |
+
| [Starling-LM-7B-alpha.Q4_1.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q4_1.gguf) | Q4_1 | 4.24GB |
|
32 |
+
| [Starling-LM-7B-alpha.Q5_0.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q5_0.gguf) | Q5_0 | 4.65GB |
|
33 |
+
| [Starling-LM-7B-alpha.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q5_K_S.gguf) | Q5_K_S | 4.65GB |
|
34 |
+
| [Starling-LM-7B-alpha.Q5_K.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q5_K.gguf) | Q5_K | 4.78GB |
|
35 |
+
| [Starling-LM-7B-alpha.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q5_K_M.gguf) | Q5_K_M | 4.78GB |
|
36 |
+
| [Starling-LM-7B-alpha.Q5_1.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q5_1.gguf) | Q5_1 | 5.07GB |
|
37 |
+
| [Starling-LM-7B-alpha.Q6_K.gguf](https://huggingface.co/RichardErkhov/berkeley-nest_-_Starling-LM-7B-alpha-gguf/blob/main/Starling-LM-7B-alpha.Q6_K.gguf) | Q6_K | 5.53GB |
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
Original model description:
|
43 |
+
---
|
44 |
+
license: apache-2.0
|
45 |
+
datasets:
|
46 |
+
- berkeley-nest/Nectar
|
47 |
+
language:
|
48 |
+
- en
|
49 |
+
library_name: transformers
|
50 |
+
tags:
|
51 |
+
- reward model
|
52 |
+
- RLHF
|
53 |
+
- RLAIF
|
54 |
+
---
|
55 |
+
# Starling-LM-7B-alpha
|
56 |
+
|
57 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
58 |
+
|
59 |
+
- **Developed by:** Banghua Zhu * , Evan Frick * , Tianhao Wu * , Hanlin Zhu and Jiantao Jiao.
|
60 |
+
- **Model type:** Language Model finetuned with RLHF / RLAIF
|
61 |
+
- **License:** Apache-2.0 license under the condition that the model is not used to compete with OpenAI
|
62 |
+
- **Finetuned from model:** [Openchat 3.5](https://huggingface.co/openchat/openchat_3.5) (based on [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1))
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
We introduce Starling-7B, an open large language model (LLM) trained by Reinforcement Learning from AI Feedback (RLAIF). The model harnesses the power of our new GPT-4 labeled ranking dataset, [berkeley-nest/Nectar](https://huggingface.co/datasets/berkeley-nest/Nectar), and our new reward training and policy tuning pipeline. Starling-7B-alpha scores 8.09 in MT Bench with GPT-4 as a judge, outperforming every model to date on MT-Bench except for OpenAI's GPT-4 and GPT-4 Turbo. We release the ranking dataset [Nectar](https://huggingface.co/datasets/berkeley-nest/Nectar), the reward model [Starling-RM-7B-alpha](https://huggingface.co/berkeley-nest/Starling-RM-7B-alpha) and the language model [Starling-LM-7B-alpha](https://huggingface.co/berkeley-nest/Starling-LM-7B-alpha) on HuggingFace, and an online demo in LMSYS [Chatbot Arena](https://chat.lmsys.org). Stay tuned for our forthcoming code and paper, which will provide more details on the whole process.
|
67 |
+
|
68 |
+
Starling-LM-7B-alpha is a language model trained from [Openchat 3.5](https://huggingface.co/openchat/openchat_3.5) with reward model [berkeley-nest/Starling-RM-7B-alpha](https://huggingface.co/berkeley-nest/Starling-RM-7B-alpha) and policy optimization method [advantage-induced policy alignment (APA)](https://arxiv.org/abs/2306.02231). The evaluation results are listed below.
|
69 |
+
|
70 |
+
|
71 |
+
| Model | Tuning Method | MT Bench | AlpacaEval | MMLU |
|
72 |
+
|-----------------------|------------------|----------|------------|------|
|
73 |
+
| GPT-4-Turbo | ? | 9.32 | 97.70 | |
|
74 |
+
| GPT-4 | SFT + PPO | 8.99 | 95.28 | 86.4 |
|
75 |
+
| **Starling-7B** | C-RLFT + APA | 8.09 | 91.99 | 63.9 |
|
76 |
+
| Claude-2 | ? | 8.06 | 91.36 | 78.5 |
|
77 |
+
| GPT-3.5-Turbo | ? | 7.94 | 89.37 | 70 |
|
78 |
+
| Claude-1 | ? | 7.9 | 88.39 | 77 |
|
79 |
+
| Tulu-2-dpo-70b | SFT + DPO | 7.89 | 95.1 | |
|
80 |
+
| Openchat-3.5 | C-RLFT | 7.81 | 88.51 | 64.3 |
|
81 |
+
| Zephyr-7B-beta | SFT + DPO | 7.34 | 90.60 | 61.4 |
|
82 |
+
| Llama-2-70b-chat-hf | SFT + PPO | 6.86 | 92.66 | 63 |
|
83 |
+
| Neural-chat-7b-v3-1 | SFT + DPO | 6.84 | 84.53 | 62.4 |
|
84 |
+
| Tulu-2-dpo-7b | SFT + DPO | 6.29 | 85.1 | |
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
For more detailed discussions, please check out our [blog post](https://starling.cs.berkeley.edu), and stay tuned for our upcoming code and paper!
|
89 |
+
<!-- Provide the basic links for the model. -->
|
90 |
+
|
91 |
+
- **Blog:** https://starling.cs.berkeley.edu/
|
92 |
+
- **Paper:** Coming soon!
|
93 |
+
- **Code:** Coming soon!
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
+
## Uses
|
98 |
+
|
99 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
100 |
+
|
101 |
+
**Important: Please use the exact chat template provided below for the model. Otherwise there will be a degrade in the performance. The model output can be verbose in rare cases. Please consider setting temperature = 0 to make this happen less.**
|
102 |
+
|
103 |
+
Our model follows the exact chat template and usage as [Openchat 3.5](https://huggingface.co/openchat/openchat_3.5). Please refer to their model card for more details.
|
104 |
+
In addition, our model is hosted on LMSYS [Chatbot Arena](https://chat.lmsys.org) for free test.
|
105 |
+
|
106 |
+
The conversation template is the same as Openchat 3.5:
|
107 |
+
```
|
108 |
+
import transformers
|
109 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained("openchat/openchat_3.5")
|
110 |
+
|
111 |
+
# Single-turn
|
112 |
+
tokens = tokenizer("GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant:").input_ids
|
113 |
+
assert tokens == [1, 420, 6316, 28781, 3198, 3123, 1247, 28747, 22557, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747]
|
114 |
+
|
115 |
+
# Multi-turn
|
116 |
+
tokens = tokenizer("GPT4 Correct User: Hello<|end_of_turn|>GPT4 Correct Assistant: Hi<|end_of_turn|>GPT4 Correct User: How are you today?<|end_of_turn|>GPT4 Correct Assistant:").input_ids
|
117 |
+
assert tokens == [1, 420, 6316, 28781, 3198, 3123, 1247, 28747, 22557, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747, 15359, 32000, 420, 6316, 28781, 3198, 3123, 1247, 28747, 1602, 460, 368, 3154, 28804, 32000, 420, 6316, 28781, 3198, 3123, 21631, 28747]
|
118 |
+
|
119 |
+
# Coding Mode
|
120 |
+
tokens = tokenizer("Code User: Implement quicksort using C++<|end_of_turn|>Code Assistant:").input_ids
|
121 |
+
assert tokens == [1, 7596, 1247, 28747, 26256, 2936, 7653, 1413, 334, 1680, 32000, 7596, 21631, 28747]
|
122 |
+
```
|
123 |
+
## Code Examples
|
124 |
+
|
125 |
+
```python
|
126 |
+
import transformers
|
127 |
+
|
128 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained("berkeley-nest/Starling-LM-7B-alpha")
|
129 |
+
model = transformers.AutoModelForCausalLM.from_pretrained("berkeley-nest/Starling-LM-7B-alpha")
|
130 |
+
|
131 |
+
def generate_response(prompt):
|
132 |
+
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
133 |
+
outputs = model.generate(
|
134 |
+
input_ids,
|
135 |
+
max_length=256,
|
136 |
+
pad_token_id=tokenizer.pad_token_id,
|
137 |
+
eos_token_id=tokenizer.eos_token_id,
|
138 |
+
)
|
139 |
+
response_ids = outputs[0]
|
140 |
+
response_text = tokenizer.decode(response_ids, skip_special_tokens=True)
|
141 |
+
return response_text
|
142 |
+
|
143 |
+
# Single-turn conversation
|
144 |
+
prompt = "Hello, how are you?"
|
145 |
+
single_turn_prompt = f"GPT4 Correct User: {prompt}<|end_of_turn|>GPT4 Correct Assistant:"
|
146 |
+
response_text = generate_response(single_turn_prompt)
|
147 |
+
print("Response:", response_text)
|
148 |
+
|
149 |
+
## Multi-turn conversation
|
150 |
+
prompt = "Hello"
|
151 |
+
follow_up_question = "How are you today?"
|
152 |
+
response = ""
|
153 |
+
multi_turn_prompt = f"GPT4 Correct User: {prompt}<|end_of_turn|>GPT4 Correct Assistant: {response}<|end_of_turn|>GPT4 Correct User: {follow_up_question}<|end_of_turn|>GPT4 Correct Assistant:"
|
154 |
+
response_text = generate_response(multi_turn_prompt)
|
155 |
+
print("Multi-turn conversation response:", response_text)
|
156 |
+
|
157 |
+
### Coding conversation
|
158 |
+
prompt = "Implement quicksort using C++"
|
159 |
+
coding_prompt = f"Code User: {prompt}<|end_of_turn|>Code Assistant:"
|
160 |
+
response = generate_response(coding_prompt)
|
161 |
+
print("Coding conversation response:", response)
|
162 |
+
```
|
163 |
+
|
164 |
+
## License
|
165 |
+
The dataset, model and online demo is a research preview intended for non-commercial use only, subject to the data distillation [License](https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md) of LLaMA, [Terms of Use](https://openai.com/policies/terms-of-use) of the data generated by OpenAI, and [Privacy Practices](https://chrome.google.com/webstore/detail/sharegpt-share-your-chatg/daiacboceoaocpibfodeljbdfacokfjb) of ShareGPT. Please contact us if you find any potential violation.
|
166 |
+
|
167 |
+
|
168 |
+
## Acknowledgment
|
169 |
+
We would like to thank Wei-Lin Chiang from Berkeley for detailed feedback of the blog and the projects. We would like to thank the [LMSYS Organization](https://lmsys.org/) for their support of [lmsys-chat-1M](https://huggingface.co/datasets/lmsys/lmsys-chat-1m) dataset, evaluation and online demo. We would like to thank the open source community for their efforts in providing the datasets and base models we used to develope the project, including but not limited to Anthropic, Llama, Mistral, Hugging Face H4, LMSYS, OpenChat, OpenBMB, Flan and ShareGPT.
|
170 |
+
|
171 |
+
## Citation
|
172 |
+
```
|
173 |
+
@misc{starling2023,
|
174 |
+
title = {Starling-7B: Improving LLM Helpfulness & Harmlessness with RLAIF},
|
175 |
+
url = {},
|
176 |
+
author = {Zhu, Banghua and Frick, Evan and Wu, Tianhao and Zhu, Hanlin and Jiao, Jiantao},
|
177 |
+
month = {November},
|
178 |
+
year = {2023}
|
179 |
+
}
|
180 |
+
```
|
181 |
+
|