GGUF
English
Inference Endpoints
maddes8cht commited on
Commit
8d276a7
β€’
1 Parent(s): f13fc53

"Update README.md"

Browse files
Files changed (1) hide show
  1. README.md +210 -0
README.md ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ model-index:
3
+ - name: rocket-3b
4
+ results: []
5
+ license: cc-by-sa-4.0
6
+ language:
7
+ - en
8
+ base_model: stabilityai/stablelm-3b-4e1t
9
+ ---
10
+ [![banner](https://maddes8cht.github.io/assets/buttons/Huggingface-banner.jpg)]()
11
+
12
+ I'm constantly enhancing these model descriptions to provide you with the most relevant and comprehensive information
13
+
14
+ # rocket-3B - GGUF
15
+ - Model creator: [pansophic](https://huggingface.co/pansophic)
16
+ - Original model: [rocket-3B](https://huggingface.co/pansophic/rocket-3B)
17
+
18
+ # StableLM
19
+ This is a Model based on StableLM.
20
+ Stablelm is a familiy of Language Models by Stability AI.
21
+
22
+ ## Note:
23
+ Current (as of 2023-11-15) implementations of Llama.cpp only support GPU offloading up to 34 Layers with these StableLM Models.
24
+ The model will crash immediately if -ngl is larger than 34.
25
+ The model works fine however without any gpu acceleration.
26
+
27
+
28
+
29
+ # About GGUF format
30
+
31
+ `gguf` is the current file format used by the [`ggml`](https://github.com/ggerganov/ggml) library.
32
+ A growing list of Software is using it and can therefore use this model.
33
+ The core project making use of the ggml library is the [llama.cpp](https://github.com/ggerganov/llama.cpp) project by Georgi Gerganov
34
+
35
+ # Quantization variants
36
+
37
+ There is a bunch of quantized files available to cater to your specific needs. Here's how to choose the best option for you:
38
+
39
+ # Legacy quants
40
+
41
+ Q4_0, Q4_1, Q5_0, Q5_1 and Q8 are `legacy` quantization types.
42
+ Nevertheless, they are fully supported, as there are several circumstances that cause certain model not to be compatible with the modern K-quants.
43
+ ## Note:
44
+ Now there's a new option to use K-quants even for previously 'incompatible' models, although this involves some fallback solution that makes them not *real* K-quants. More details can be found in affected model descriptions.
45
+ (This mainly refers to Falcon 7b and Starcoder models)
46
+
47
+ # K-quants
48
+
49
+ K-quants are designed with the idea that different levels of quantization in specific parts of the model can optimize performance, file size, and memory load.
50
+ So, if possible, use K-quants.
51
+ With a Q6_K, you'll likely find it challenging to discern a quality difference from the original model - ask your model two times the same question and you may encounter bigger quality differences.
52
+
53
+
54
+
55
+
56
+ ---
57
+
58
+ # Original Model Card:
59
+ <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'"/>
60
+
61
+ # Rocket-3B 🦝
62
+ <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>.
63
+
64
+
65
+ ## Model description
66
+ - **Model type:** A 3B parameter GPT-like model fine-tuned on a mix of publicly available datasets using DPO.
67
+ - **Language(s) (NLP):** Primarily English
68
+ - **License:** CC-BY-SA-4.0
69
+ - **Finetuned from model:** [Stability AI](https://huggingface.co/stabilityai/stablelm-3b-4e1t)
70
+
71
+
72
+ ## Performance
73
+ 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.
74
+
75
+ | Model | Size | Alignment | MT-Bench (score) | AlpacaEval (win rate %) |
76
+ |-------------|-----|----|---------------|--------------|
77
+ | StableLM-Tuned-α 🦜| 7B | SFT |2.75| -|
78
+ | MPT-Chat | 7B | SFT |5.42| -|
79
+ | Falcon-Instruct πŸ¦…| 40B | SFT |5.17 |45.71|
80
+ | Orca-2| 13B | SFT |6.15 |-|
81
+ | Xwin-LMv0.1 | 7B| PPO | 6.19| 87.83|
82
+ | Llama2-Chat πŸ¦™| 7B |RLHF |6.26| 71.37|
83
+ | TÜLU 2 🐫| 7B | DPO |6.27| 85.1|
84
+ | Guanaco πŸ¦™| 65B | SFT |6.41| 71.80|
85
+ | **Rocket** 🦝 | **3B** | **DPO** | **6.56** | **79.75** |
86
+ | Llama2-Chat πŸ¦™| 13B |RLHF |6.65| 81.09|
87
+ | Zephyr-7b-Ξ± πŸͺ |7B| DPO| 6.88| -|
88
+ | Vicuna v1.3 πŸ¦™| 33B | SFT |7.12 |88.99|
89
+ | Zephyr-7b-Ξ² πŸͺ |7B| DPO| 7.34| 90.60|
90
+ | WizardLM v1.0 πŸ¦™| 70B |SFT |7.71 |-|
91
+ | GPT-3.5-turbo | - |RLHF |7.94 |89.37|
92
+
93
+ 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.
94
+
95
+
96
+ ![MT-Bench results](https://cdn-uploads.huggingface.co/production/uploads/6501bfe0493fd9c8c2e32402/5Tv4-4w4zNKAAjiLNGu7A.png)
97
+
98
+ ## MT-Bench detailed score for first and second turn
99
+ 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.
100
+
101
+ | Model | First turn | Second turn | Average |
102
+ |-------------|-----|----|---------------|
103
+ | **Rocket** 🦝 | **6.99** | **6.13** | **6.56** |
104
+
105
+
106
+ ## AlpacaEval detailed scores
107
+ 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.
108
+
109
+ | Model | Win rate | Std error | Average length |
110
+ |-------------|-----|----|---------------|
111
+ | **Rocket** 🦝 | **79.75** | **1.42** | **1242** |
112
+
113
+
114
+ ## Other benchmarks
115
+
116
+ | Metric | Value |
117
+ |-----------------------|---------------------------|
118
+ | Average | 51.00 |
119
+ | ARC (25-shot) | 50.51 |
120
+ | HellaSwag (10-shot) | 76.45 |
121
+ | MMLU (5-shot) | 45.51 |
122
+ | TruthfulQA (0-shot) | 54.38 |
123
+ | Winogrande (5-shot) | 67.8 |
124
+ | GSM8K (5-shot) | 37.91 |
125
+ | DROP (3-shot) | 24.49 |
126
+
127
+
128
+ ## Intended uses & limitations
129
+ 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.
130
+
131
+
132
+ ## Input Format
133
+ The model is trained with the ChatML format:
134
+
135
+ ```
136
+ <|im_start|>system
137
+ System message here.<|im_end|>
138
+ <|im_start|>user
139
+ Your message here!<|im_end|>
140
+ <|im_start|>assistant
141
+ ```
142
+
143
+ Here's how you can run the model using πŸ€— Transformers:
144
+
145
+ ```python
146
+ import torch
147
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
148
+
149
+ model = AutoModelForCausalLM.from_pretrained("pansophic/rocket-3B", trust_remote_code=True, torch_dtype=torch.bfloat16).to("cuda")
150
+ tokenizer = AutoTokenizer.from_pretrained("pansophic/rocket-3B", trust_remote_code=True, torch_dtype=torch.bfloat16)
151
+ streamer = TextStreamer(tokenizer)
152
+
153
+ prompt = """<|im_start|>system
154
+ {system}<|im_end|>
155
+ <|im_start|>user
156
+ {user}<|im_end|>
157
+ <|im_start|>assistant
158
+ """
159
+
160
+ system = "You are a helpful assistant."
161
+ user = "How are you?"
162
+
163
+ # Apply the ChatML format
164
+ prompt = prompt.format(system=system, user=user)
165
+
166
+ # Tokenize the prompt
167
+ inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=False).to("cuda")
168
+ generated_text = model.generate(**inputs, max_length=3084, top_p=0.95, do_sample=True, temperature=0.7, use_cache=True, streamer=streamer)
169
+
170
+ # <|im_start|>system
171
+ # You are a chef who makes everything sound like a secret culinary masterpiece, even everyday meals.<|im_end|>
172
+ # <|im_start|>user
173
+ # How to cook an omelette?<|im_end|>
174
+ # <|im_start|>assistant
175
+ # Ah, the art of crafting the perfect omelette, a secret culinary masterpiece indeed.
176
+ # Begin by gently whisking two to three eggs in a mixing bowl, and then pour the silky liquid into a non-stick pan.
177
+ # Allow the eggs to dance and sizzle as you swiftly tilt the pan to spread the joy throughout the entire omelette universe.
178
+ # 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.
179
+ # Enjoy this enchanting creation, and you'll be transported to a world of secret culinary mastery.<|im_end|>
180
+ ```
181
+
182
+ ## Bias, Risks, and Limitations
183
+ 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.
184
+
185
+ 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)).
186
+
187
+ | Metric | Value |
188
+ |-----------------------|---------------------------|
189
+ | Toxigen (0-shot) | 43.40 |
190
+
191
+ **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."*
192
+
193
+ *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)*
194
+
195
+ ***End of original Model File***
196
+ ---
197
+
198
+
199
+ ## Please consider to support my work
200
+ **Coming Soon:** I'm in the process of launching a sponsorship/crowdfunding campaign for my work. I'm evaluating Kickstarter, Patreon, or the new GitHub Sponsors platform, and I am hoping for some support and contribution to the continued availability of these kind of models. Your support will enable me to provide even more valuable resources and maintain the models you rely on. Your patience and ongoing support are greatly appreciated as I work to make this page an even more valuable resource for the community.
201
+
202
+ <center>
203
+
204
+ [![GitHub](https://maddes8cht.github.io/assets/buttons/github-io-button.png)](https://maddes8cht.github.io)
205
+ [![Stack Exchange](https://stackexchange.com/users/flair/26485911.png)](https://stackexchange.com/users/26485911)
206
+ [![GitHub](https://maddes8cht.github.io/assets/buttons/github-button.png)](https://github.com/maddes8cht)
207
+ [![HuggingFace](https://maddes8cht.github.io/assets/buttons/huggingface-button.png)](https://huggingface.co/maddes8cht)
208
+ [![Twitter](https://maddes8cht.github.io/assets/buttons/twitter-button.png)](https://twitter.com/maddes1966)
209
+
210
+ </center>