Smokeweaver commited on
Commit
6f0108c
·
verified ·
1 Parent(s): 5857890

Add model card

Browse files
Files changed (1) hide show
  1. README.md +86 -1
README.md CHANGED
@@ -142,4 +142,89 @@ prompt_template: '<|im_start|>system
142
  '
143
  quantized_by: Suparious
144
  ---
145
- # mlabonne/Darewin-7B AWQ
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  '
143
  quantized_by: Suparious
144
  ---
145
+ # mlabonne/Darewin-7B AWQ
146
+
147
+ - Model creator: [mlabonne](https://huggingface.co/mlabonne)
148
+ - Original model: [Darewin-7B](https://huggingface.co/mlabonne/Darewin-7B)
149
+
150
+ ## Model Summary
151
+
152
+ Darewin-7B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
153
+ * [Intel/neural-chat-7b-v3-3](https://huggingface.co/Intel/neural-chat-7b-v3-3)
154
+ * [openaccess-ai-collective/DPOpenHermes-7B-v2](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2)
155
+ * [fblgit/una-cybertron-7b-v2-bf16](https://huggingface.co/fblgit/una-cybertron-7b-v2-bf16)
156
+ * [openchat/openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106)
157
+ * [OpenPipe/mistral-ft-optimized-1227](https://huggingface.co/OpenPipe/mistral-ft-optimized-1227)
158
+ * [mlabonne/NeuralHermes-2.5-Mistral-7B](https://huggingface.co/mlabonne/NeuralHermes-2.5-Mistral-7B)
159
+
160
+ ## How to use
161
+
162
+ ### Install the necessary packages
163
+
164
+ ```bash
165
+ pip install --upgrade autoawq autoawq-kernels
166
+ ```
167
+
168
+ ### Example Python code
169
+
170
+ ```python
171
+ from awq import AutoAWQForCausalLM
172
+ from transformers import AutoTokenizer, TextStreamer
173
+
174
+ model_path = "solidrust/Darewin-7B-AWQ"
175
+ system_message = "You are Darewin, incarnated as a powerful AI."
176
+
177
+ # Load model
178
+ model = AutoAWQForCausalLM.from_quantized(model_path,
179
+ fuse_layers=True)
180
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
181
+ trust_remote_code=True)
182
+ streamer = TextStreamer(tokenizer,
183
+ skip_prompt=True,
184
+ skip_special_tokens=True)
185
+
186
+ # Convert prompt to tokens
187
+ prompt_template = """\
188
+ <|im_start|>system
189
+ {system_message}<|im_end|>
190
+ <|im_start|>user
191
+ {prompt}<|im_end|>
192
+ <|im_start|>assistant"""
193
+
194
+ prompt = "You're standing on the surface of the Earth. "\
195
+ "You walk one mile south, one mile west and one mile north. "\
196
+ "You end up exactly where you started. Where are you?"
197
+
198
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
199
+ return_tensors='pt').input_ids.cuda()
200
+
201
+ # Generate output
202
+ generation_output = model.generate(tokens,
203
+ streamer=streamer,
204
+ max_new_tokens=512)
205
+
206
+ ```
207
+
208
+ ### About AWQ
209
+
210
+ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
211
+
212
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
213
+
214
+ It is supported by:
215
+
216
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
217
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
218
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
219
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
220
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
221
+
222
+ ## Prompt template: ChatML
223
+
224
+ ```plaintext
225
+ <|im_start|>system
226
+ {system_message}<|im_end|>
227
+ <|im_start|>user
228
+ {prompt}<|im_end|>
229
+ <|im_start|>assistant
230
+ ```