Smokeweaver commited on
Commit
c9b9a90
1 Parent(s): f599545

Add model card

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