Transformers
GGUF
English
stablelm
TheBloke commited on
Commit
5fff3c2
1 Parent(s): 5642328

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +439 -0
README.md ADDED
@@ -0,0 +1,439 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: pansophic/rocket-3B
3
+ inference: false
4
+ language:
5
+ - en
6
+ license: cc-by-sa-4.0
7
+ model-index:
8
+ - name: rocket-3b
9
+ results: []
10
+ model_creator: pansophic
11
+ model_name: Rocket 3B
12
+ model_type: stablelm
13
+ prompt_template: '<|im_start|>system
14
+
15
+ {system_message}<|im_end|>
16
+
17
+ <|im_start|>user
18
+
19
+ {prompt}<|im_end|>
20
+
21
+ <|im_start|>assistant
22
+
23
+ '
24
+ quantized_by: TheBloke
25
+ ---
26
+ <!-- markdownlint-disable MD041 -->
27
+
28
+ <!-- header start -->
29
+ <!-- 200823 -->
30
+ <div style="width: auto; margin-left: auto; margin-right: auto">
31
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
32
+ </div>
33
+ <div style="display: flex; justify-content: space-between; width: 100%;">
34
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
35
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
36
+ </div>
37
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
38
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
39
+ </div>
40
+ </div>
41
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
42
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
43
+ <!-- header end -->
44
+
45
+ # Rocket 3B - GGUF
46
+ - Model creator: [pansophic](https://huggingface.co/pansophic)
47
+ - Original model: [Rocket 3B](https://huggingface.co/pansophic/rocket-3B)
48
+
49
+ <!-- description start -->
50
+ ## Description
51
+
52
+ This repo contains GGUF format model files for [pansophic's Rocket 3B](https://huggingface.co/pansophic/rocket-3B).
53
+
54
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
55
+
56
+ <!-- description end -->
57
+ <!-- README_GGUF.md-about-gguf start -->
58
+ ### About GGUF
59
+
60
+ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
61
+
62
+ Here is an incomplete list of clients and libraries that are known to support GGUF:
63
+
64
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
65
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
66
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
67
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
68
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
69
+ * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
70
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
71
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
72
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
73
+
74
+ <!-- README_GGUF.md-about-gguf end -->
75
+ <!-- repositories-available start -->
76
+ ## Repositories available
77
+
78
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/rocket-3B-GPTQ)
79
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/rocket-3B-GGUF)
80
+ * [pansophic's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/pansophic/rocket-3B)
81
+ <!-- repositories-available end -->
82
+
83
+ <!-- prompt-template start -->
84
+ ## Prompt template: ChatML
85
+
86
+ ```
87
+ <|im_start|>system
88
+ {system_message}<|im_end|>
89
+ <|im_start|>user
90
+ {prompt}<|im_end|>
91
+ <|im_start|>assistant
92
+
93
+ ```
94
+
95
+ <!-- prompt-template end -->
96
+
97
+
98
+ <!-- compatibility_gguf start -->
99
+ ## Compatibility
100
+
101
+ These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
102
+
103
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
104
+
105
+ ## Explanation of quantisation methods
106
+
107
+ <details>
108
+ <summary>Click to see details</summary>
109
+
110
+ The new methods available are:
111
+
112
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
113
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
114
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
115
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
116
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
117
+
118
+ Refer to the Provided Files table below to see what files use which methods, and how.
119
+ </details>
120
+ <!-- compatibility_gguf end -->
121
+
122
+ <!-- README_GGUF.md-provided-files start -->
123
+ ## Provided files
124
+
125
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
126
+ | ---- | ---- | ---- | ---- | ---- | ----- |
127
+ | [rocket-3b.Q2_K.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q2_K.gguf) | Q2_K | 2 | 1.20 GB| 3.70 GB | smallest, significant quality loss - not recommended for most purposes |
128
+ | [rocket-3b.Q3_K_S.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q3_K_S.gguf) | Q3_K_S | 3 | 1.25 GB| 3.75 GB | very small, high quality loss |
129
+ | [rocket-3b.Q3_K_M.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q3_K_M.gguf) | Q3_K_M | 3 | 1.39 GB| 3.89 GB | very small, high quality loss |
130
+ | [rocket-3b.Q3_K_L.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q3_K_L.gguf) | Q3_K_L | 3 | 1.51 GB| 4.01 GB | small, substantial quality loss |
131
+ | [rocket-3b.Q4_0.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q4_0.gguf) | Q4_0 | 4 | 1.61 GB| 4.11 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
132
+ | [rocket-3b.Q4_K_S.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q4_K_S.gguf) | Q4_K_S | 4 | 1.62 GB| 4.12 GB | small, greater quality loss |
133
+ | [rocket-3b.Q4_K_M.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q4_K_M.gguf) | Q4_K_M | 4 | 1.71 GB| 4.21 GB | medium, balanced quality - recommended |
134
+ | [rocket-3b.Q5_0.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q5_0.gguf) | Q5_0 | 5 | 1.94 GB| 4.44 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
135
+ | [rocket-3b.Q5_K_S.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q5_K_S.gguf) | Q5_K_S | 5 | 1.94 GB| 4.44 GB | large, low quality loss - recommended |
136
+ | [rocket-3b.Q5_K_M.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q5_K_M.gguf) | Q5_K_M | 5 | 1.99 GB| 4.49 GB | large, very low quality loss - recommended |
137
+ | [rocket-3b.Q6_K.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q6_K.gguf) | Q6_K | 6 | 2.30 GB| 4.80 GB | very large, extremely low quality loss |
138
+ | [rocket-3b.Q8_0.gguf](https://huggingface.co/TheBloke/rocket-3B-GGUF/blob/main/rocket-3b.Q8_0.gguf) | Q8_0 | 8 | 2.97 GB| 5.47 GB | very large, extremely low quality loss - not recommended |
139
+
140
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
141
+
142
+
143
+
144
+ <!-- README_GGUF.md-provided-files end -->
145
+
146
+ <!-- README_GGUF.md-how-to-download start -->
147
+ ## How to download GGUF files
148
+
149
+ **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file.
150
+
151
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
152
+
153
+ * LM Studio
154
+ * LoLLMS Web UI
155
+ * Faraday.dev
156
+
157
+ ### In `text-generation-webui`
158
+
159
+ Under Download Model, you can enter the model repo: TheBloke/rocket-3B-GGUF and below it, a specific filename to download, such as: rocket-3b.Q4_K_M.gguf.
160
+
161
+ Then click Download.
162
+
163
+ ### On the command line, including multiple files at once
164
+
165
+ I recommend using the `huggingface-hub` Python library:
166
+
167
+ ```shell
168
+ pip3 install huggingface-hub
169
+ ```
170
+
171
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
172
+
173
+ ```shell
174
+ huggingface-cli download TheBloke/rocket-3B-GGUF rocket-3b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
175
+ ```
176
+
177
+ <details>
178
+ <summary>More advanced huggingface-cli download usage</summary>
179
+
180
+ You can also download multiple files at once with a pattern:
181
+
182
+ ```shell
183
+ huggingface-cli download TheBloke/rocket-3B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
184
+ ```
185
+
186
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
187
+
188
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
189
+
190
+ ```shell
191
+ pip3 install hf_transfer
192
+ ```
193
+
194
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
195
+
196
+ ```shell
197
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/rocket-3B-GGUF rocket-3b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
198
+ ```
199
+
200
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
201
+ </details>
202
+ <!-- README_GGUF.md-how-to-download end -->
203
+
204
+ <!-- README_GGUF.md-how-to-run start -->
205
+ ## Example `llama.cpp` command
206
+
207
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
208
+
209
+ ```shell
210
+ ./main -ngl 32 -m rocket-3b.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant"
211
+ ```
212
+
213
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
214
+
215
+ Change `-c 2048` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically.
216
+
217
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
218
+
219
+ For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
220
+
221
+ ## How to run in `text-generation-webui`
222
+
223
+ Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp).
224
+
225
+ ## How to run from Python code
226
+
227
+ You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries.
228
+
229
+ ### How to load this model in Python code, using ctransformers
230
+
231
+ #### First install the package
232
+
233
+ Run one of the following commands, according to your system:
234
+
235
+ ```shell
236
+ # Base ctransformers with no GPU acceleration
237
+ pip install ctransformers
238
+ # Or with CUDA GPU acceleration
239
+ pip install ctransformers[cuda]
240
+ # Or with AMD ROCm GPU acceleration (Linux only)
241
+ CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
242
+ # Or with Metal GPU acceleration for macOS systems only
243
+ CT_METAL=1 pip install ctransformers --no-binary ctransformers
244
+ ```
245
+
246
+ #### Simple ctransformers example code
247
+
248
+ ```python
249
+ from ctransformers import AutoModelForCausalLM
250
+
251
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
252
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/rocket-3B-GGUF", model_file="rocket-3b.Q4_K_M.gguf", model_type="stablelm", gpu_layers=50)
253
+
254
+ print(llm("AI is going to"))
255
+ ```
256
+
257
+ ## How to use with LangChain
258
+
259
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
260
+
261
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
262
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
263
+
264
+ <!-- README_GGUF.md-how-to-run end -->
265
+
266
+ <!-- footer start -->
267
+ <!-- 200823 -->
268
+ ## Discord
269
+
270
+ For further support, and discussions on these models and AI in general, join us at:
271
+
272
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
273
+
274
+ ## Thanks, and how to contribute
275
+
276
+ Thanks to the [chirper.ai](https://chirper.ai) team!
277
+
278
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
279
+
280
+ I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
281
+
282
+ If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
283
+
284
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
285
+
286
+ * Patreon: https://patreon.com/TheBlokeAI
287
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
288
+
289
+ **Special thanks to**: Aemon Algiz.
290
+
291
+ **Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
292
+
293
+
294
+ Thank you to all my generous patrons and donaters!
295
+
296
+ And thank you again to a16z for their generous grant.
297
+
298
+ <!-- footer end -->
299
+
300
+ <!-- original-model-card start -->
301
+ # Original model card: pansophic's Rocket 3B
302
+
303
+
304
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/6501bfe0493fd9c8c2e32402/BmbkjOkcTm-YMa-unolmJ.png" alt="Rocket Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
305
+
306
+ # Rocket-3B 🦝
307
+ <b>Rocket</b> 🦝 is a 3 billion large language model that was trained on a mix of publicly available datasets using [Direct Preference Optimization (DPO)](https://arxiv.org/abs/2305.18290). The prompt format used is <b>ChatML</b>.
308
+
309
+
310
+ ## Model description
311
+ - **Model type:** A 3B parameter GPT-like model fine-tuned on a mix of publicly available datasets using DPO.
312
+ - **Language(s) (NLP):** Primarily English
313
+ - **License:** CC-BY-SA-4.0
314
+ - **Finetuned from model:** [Stability AI](https://huggingface.co/stabilityai/stablelm-3b-4e1t)
315
+
316
+
317
+ ## Performance
318
+ Despite its compact dimensions, the model achieves outstanding scores in both MT-Bench [MT-Bench](https://huggingface.co/spaces/lmsys/mt-bench) and [AlpacaEval](https://tatsu-lab.github.io/alpaca_eval/) benchmarks, surpassing the performance of considerably larger models.
319
+
320
+ | Model | Size | Alignment | MT-Bench (score) | AlpacaEval (win rate %) |
321
+ |-------------|-----|----|---------------|--------------|
322
+ | StableLM-Tuned-α 🦜| 7B | SFT |2.75| -|
323
+ | MPT-Chat | 7B | SFT |5.42| -|
324
+ | Falcon-Instruct 🦅| 40B | SFT |5.17 |45.71|
325
+ | Orca-2| 13B | SFT |6.15 |-|
326
+ | Xwin-LMv0.1 | 7B| PPO | 6.19| 87.83|
327
+ | Llama2-Chat 🦙| 7B |RLHF |6.26| 71.37|
328
+ | TÜLU 2 🐫| 7B | DPO |6.27| 85.1|
329
+ | Guanaco 🦙| 65B | SFT |6.41| 71.80|
330
+ | **Rocket** 🦝 | **3B** | **DPO** | **6.56** | **79.75** |
331
+ | Llama2-Chat 🦙| 13B |RLHF |6.65| 81.09|
332
+ | Zephyr-7b-α 🪁 |7B| DPO| 6.88| -|
333
+ | Vicuna v1.3 🦙| 33B | SFT |7.12 |88.99|
334
+ | Zephyr-7b-β 🪁 |7B| DPO| 7.34| 90.60|
335
+ | WizardLM v1.0 🦙| 70B |SFT |7.71 |-|
336
+ | GPT-3.5-turbo | - |RLHF |7.94 |89.37|
337
+
338
+ Specifically, across various categories within the MT-Bench evaluation, Rocket-3B demonstrates impressive performance when compared to larger open models such as Llama2-Chat-7B, Falcon-40B-Instruct, and Guanaco-65B.
339
+
340
+
341
+ ![MT-Bench results](https://cdn-uploads.huggingface.co/production/uploads/6501bfe0493fd9c8c2e32402/5Tv4-4w4zNKAAjiLNGu7A.png)
342
+
343
+ ## MT-Bench detailed score for first and second turn
344
+ In MT-Bench, Rocket 🦝 scores 6.99 in the first turn and 6.13 in the second turn, with an average score of 6.56. These scores reflect the model's performance in understanding and generating text during different parts of a conversation.
345
+
346
+ | Model | First turn | Second turn | Average |
347
+ |-------------|-----|----|---------------|
348
+ | **Rocket** 🦝 | **6.99** | **6.13** | **6.56** |
349
+
350
+
351
+ ## AlpacaEval detailed scores
352
+ In AlpacaEval, Rocket 🦝 achieves a near 80% win rate, coupled with an average response length of 1,242 tokens, indicating its effectiveness in producing detailed responses.
353
+
354
+ | Model | Win rate | Std error | Average length |
355
+ |-------------|-----|----|---------------|
356
+ | **Rocket** 🦝 | **79.75** | **1.42** | **1242** |
357
+
358
+
359
+ ## Other benchmarks
360
+
361
+ | Metric | Value |
362
+ |-----------------------|---------------------------|
363
+ | ARC (25-shot) | 50.51 |
364
+ | HellaSwag (0-shot) | 73.91 |
365
+ | TruthfulQA (mc2) (0-shot) | 54.38 |
366
+ | BoolQ (0-shot) | 81.71 |
367
+ | Winogrande (5-shot) | 67.8 |
368
+ | GSM8K (5-shot) | 37.91 |
369
+ | MathQA (5-shot) | 31.26 |
370
+
371
+
372
+ ## Intended uses & limitations
373
+ Initially, we fine-tuned the model using a dataset created by merging and curating multiple datasets, available on the HuggingFace Hub. This dataset will be released to the public soon. We further enhanced the model's performance using DPO, selecting samples from the [openbmb/UltraFeedback](https://huggingface.co/datasets/openbmb/UltraFeedback) and [BAAI/JudgeLM-100K](https://huggingface.co/datasets/BAAI/JudgeLM-100K) datasets. The outcome is a highly effective chat model with a 3 billion parameter scale.
374
+
375
+
376
+ ## Input Format
377
+ The model is trained with the ChatML format:
378
+
379
+ ```
380
+ <|im_start|>system
381
+ System message here.<|im_end|>
382
+ <|im_start|>user
383
+ Your message here!<|im_end|>
384
+ <|im_start|>assistant
385
+ ```
386
+
387
+ Here's how you can run the model using 🤗 Transformers:
388
+
389
+ ```python
390
+ import torch
391
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
392
+
393
+ model = AutoModelForCausalLM.from_pretrained("pansophic/rocket-3B", trust_remote_code=True, torch_dtype=torch.bfloat16).to("cuda")
394
+ tokenizer = AutoTokenizer.from_pretrained("pansophic/rocket-3B", trust_remote_code=True, torch_dtype=torch.bfloat16)
395
+ streamer = TextStreamer(tokenizer)
396
+
397
+ prompt = """<|im_start|>system
398
+ {system}<|im_end|>
399
+ <|im_start|>user
400
+ {user}<|im_end|>
401
+ <|im_start|>assistant
402
+ """
403
+
404
+ system = "You are a helpful assistant."
405
+ user = "How are you?"
406
+
407
+ # Apply the ChatML format
408
+ prompt = prompt.format(system=system, user=user)
409
+
410
+ # Tokenize the prompt
411
+ inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=False).to("cuda")
412
+ generated_text = model.generate(**inputs, max_length=3084, top_p=0.95, do_sample=True, temperature=0.7, use_cache=True, streamer=streamer)
413
+
414
+ # <|im_start|>system
415
+ # You are a chef who makes everything sound like a secret culinary masterpiece, even everyday meals.<|im_end|>
416
+ # <|im_start|>user
417
+ # How to cook an omelette?<|im_end|>
418
+ # <|im_start|>assistant
419
+ # Ah, the art of crafting the perfect omelette, a secret culinary masterpiece indeed.
420
+ # Begin by gently whisking two to three eggs in a mixing bowl, and then pour the silky liquid into a non-stick pan.
421
+ # Allow the eggs to dance and sizzle as you swiftly tilt the pan to spread the joy throughout the entire omelette universe.
422
+ # As the edges begin to set, fold the omelette in half with a gentle flourish, and you'll witness a stunning display of culinary prowess.
423
+ # Enjoy this enchanting creation, and you'll be transported to a world of secret culinary mastery.<|im_end|>
424
+ ```
425
+
426
+ ## Bias, Risks, and Limitations
427
+ Unlike ChatGPT, which incorporates in-the-loop filtering of responses and is aligned during the RLHF phase for safe completions, our model lacks these features. Consequently, it may generate problematic outputs, particularly when prompted in certain ways. Below is the score of the model on Toxigen benchmark.
428
+
429
+ The pretraining dataset is comprised of a filtered mixture of open-source large-scale datasets available on the [HuggingFace Hub](https://huggingface.co/datasets): Falcon RefinedWeb extract ([Penedo et al., 2023](https://huggingface.co/datasets/tiiuae/falcon-refinedweb)), RedPajama-Data ([Together Computer., 2023](https://github.com/togethercomputer/RedPajama-Data)) and The Pile ([Gao et al., 2020](https://arxiv.org/abs/2101.00027)) both without the *Books3* subset, and StarCoder ([Li et al., 2023](https://arxiv.org/abs/2305.06161)).
430
+
431
+ | Metric | Value |
432
+ |-----------------------|---------------------------|
433
+ | Toxigen (0-shot) | 43.40 |
434
+
435
+ **The model name is inspired by the small but formidable character from 'Guardians of the Galaxy'. Similar to its namesake, this model, with its 3 billion parameters, showcases remarkable efficiency and effectiveness, challenging larger models despite its smaller size."*
436
+
437
+ *Model card adapted from [Zephyr Beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta/blob/main/README.md) and [Tulu-2-7B](https://huggingface.co/allenai/tulu-2-7b/blob/main/README.md)*
438
+
439
+ <!-- original-model-card end -->