TheBloke commited on
Commit
69caded
1 Parent(s): 4f7845f

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +418 -0
README.md ADDED
@@ -0,0 +1,418 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Kooten/DaringMaid-20B
3
+ inference: false
4
+ language:
5
+ - en
6
+ license: cc-by-nc-4.0
7
+ model_creator: Kooten
8
+ model_name: DaringMaid 20B
9
+ model_type: llama
10
+ pipeline_tag: text-generation
11
+ prompt_template: 'Below is an instruction that describes a task. Write a response
12
+ that appropriately completes the request.
13
+
14
+
15
+ ### Instruction:
16
+
17
+ {prompt}
18
+
19
+
20
+ ### Response:
21
+
22
+ '
23
+ quantized_by: TheBloke
24
+ ---
25
+ <!-- markdownlint-disable MD041 -->
26
+
27
+ <!-- header start -->
28
+ <!-- 200823 -->
29
+ <div style="width: auto; margin-left: auto; margin-right: auto">
30
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
31
+ </div>
32
+ <div style="display: flex; justify-content: space-between; width: 100%;">
33
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
34
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
35
+ </div>
36
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
37
+ <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>
38
+ </div>
39
+ </div>
40
+ <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>
41
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
42
+ <!-- header end -->
43
+
44
+ # DaringMaid 20B - AWQ
45
+ - Model creator: [Kooten](https://huggingface.co/Kooten)
46
+ - Original model: [DaringMaid 20B](https://huggingface.co/Kooten/DaringMaid-20B)
47
+
48
+ <!-- description start -->
49
+ ## Description
50
+
51
+ This repo contains AWQ model files for [Kooten's DaringMaid 20B](https://huggingface.co/Kooten/DaringMaid-20B).
52
+
53
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
54
+
55
+
56
+ ### About AWQ
57
+
58
+ 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.
59
+
60
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
61
+
62
+ It is supported by:
63
+
64
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
65
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
66
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
67
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
68
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
69
+
70
+ <!-- description end -->
71
+ <!-- repositories-available start -->
72
+ ## Repositories available
73
+
74
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/DaringMaid-20B-AWQ)
75
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/DaringMaid-20B-GPTQ)
76
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/DaringMaid-20B-GGUF)
77
+ * [Kooten's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Kooten/DaringMaid-20B)
78
+ <!-- repositories-available end -->
79
+
80
+ <!-- prompt-template start -->
81
+ ## Prompt template: Alpaca
82
+
83
+ ```
84
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
85
+
86
+ ### Instruction:
87
+ {prompt}
88
+
89
+ ### Response:
90
+
91
+ ```
92
+
93
+ <!-- prompt-template end -->
94
+ <!-- licensing start -->
95
+ ## Licensing
96
+
97
+ The creator of the source model has listed its license as `cc-by-nc-4.0`, and this quantization has therefore used that same license.
98
+
99
+ As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly.
100
+
101
+ In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [Kooten's DaringMaid 20B](https://huggingface.co/Kooten/DaringMaid-20B).
102
+ <!-- licensing end -->
103
+ <!-- README_AWQ.md-provided-files start -->
104
+ ## Provided files, and AWQ parameters
105
+
106
+ I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
107
+
108
+ Models are released as sharded safetensors files.
109
+
110
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
111
+ | ------ | ---- | -- | ----------- | ------- | ---- |
112
+ | [main](https://huggingface.co/TheBloke/DaringMaid-20B-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 10.87 GB
113
+
114
+ <!-- README_AWQ.md-provided-files end -->
115
+
116
+ <!-- README_AWQ.md-text-generation-webui start -->
117
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
118
+
119
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
120
+
121
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
122
+
123
+ 1. Click the **Model tab**.
124
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/DaringMaid-20B-AWQ`.
125
+ 3. Click **Download**.
126
+ 4. The model will start downloading. Once it's finished it will say "Done".
127
+ 5. In the top left, click the refresh icon next to **Model**.
128
+ 6. In the **Model** dropdown, choose the model you just downloaded: `DaringMaid-20B-AWQ`
129
+ 7. Select **Loader: AutoAWQ**.
130
+ 8. Click Load, and the model will load and is now ready for use.
131
+ 9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
132
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
133
+ <!-- README_AWQ.md-text-generation-webui end -->
134
+
135
+ <!-- README_AWQ.md-use-from-vllm start -->
136
+ ## Multi-user inference server: vLLM
137
+
138
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
139
+
140
+ - Please ensure you are using vLLM version 0.2 or later.
141
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
142
+
143
+ For example:
144
+
145
+ ```shell
146
+ python3 -m vllm.entrypoints.api_server --model TheBloke/DaringMaid-20B-AWQ --quantization awq --dtype auto
147
+ ```
148
+
149
+ - When using vLLM from Python code, again set `quantization=awq`.
150
+
151
+ For example:
152
+
153
+ ```python
154
+ from vllm import LLM, SamplingParams
155
+
156
+ prompts = [
157
+ "Tell me about AI",
158
+ "Write a story about llamas",
159
+ "What is 291 - 150?",
160
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
161
+ ]
162
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
163
+
164
+ ### Instruction:
165
+ {prompt}
166
+
167
+ ### Response:
168
+ '''
169
+
170
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
171
+
172
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
173
+
174
+ llm = LLM(model="TheBloke/DaringMaid-20B-AWQ", quantization="awq", dtype="auto")
175
+
176
+ outputs = llm.generate(prompts, sampling_params)
177
+
178
+ # Print the outputs.
179
+ for output in outputs:
180
+ prompt = output.prompt
181
+ generated_text = output.outputs[0].text
182
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
183
+ ```
184
+ <!-- README_AWQ.md-use-from-vllm start -->
185
+
186
+ <!-- README_AWQ.md-use-from-tgi start -->
187
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
188
+
189
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
190
+
191
+ Example Docker parameters:
192
+
193
+ ```shell
194
+ --model-id TheBloke/DaringMaid-20B-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
195
+ ```
196
+
197
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
198
+
199
+ ```shell
200
+ pip3 install huggingface-hub
201
+ ```
202
+
203
+ ```python
204
+ from huggingface_hub import InferenceClient
205
+
206
+ endpoint_url = "https://your-endpoint-url-here"
207
+
208
+ prompt = "Tell me about AI"
209
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
210
+
211
+ ### Instruction:
212
+ {prompt}
213
+
214
+ ### Response:
215
+ '''
216
+
217
+ client = InferenceClient(endpoint_url)
218
+ response = client.text_generation(prompt,
219
+ max_new_tokens=128,
220
+ do_sample=True,
221
+ temperature=0.7,
222
+ top_p=0.95,
223
+ top_k=40,
224
+ repetition_penalty=1.1)
225
+
226
+ print(f"Model output: ", response)
227
+ ```
228
+ <!-- README_AWQ.md-use-from-tgi end -->
229
+
230
+ <!-- README_AWQ.md-use-from-python start -->
231
+ ## Inference from Python code using Transformers
232
+
233
+ ### Install the necessary packages
234
+
235
+ - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
236
+ - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
237
+
238
+ ```shell
239
+ pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
240
+ ```
241
+
242
+ Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
243
+
244
+ If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
245
+
246
+ ```shell
247
+ pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
248
+ ```
249
+
250
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
251
+
252
+ ```shell
253
+ pip3 uninstall -y autoawq
254
+ git clone https://github.com/casper-hansen/AutoAWQ
255
+ cd AutoAWQ
256
+ pip3 install .
257
+ ```
258
+
259
+ ### Transformers example code (requires Transformers 4.35.0 and later)
260
+
261
+ ```python
262
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
263
+
264
+ model_name_or_path = "TheBloke/DaringMaid-20B-AWQ"
265
+
266
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
267
+ model = AutoModelForCausalLM.from_pretrained(
268
+ model_name_or_path,
269
+ low_cpu_mem_usage=True,
270
+ device_map="cuda:0"
271
+ )
272
+
273
+ # Using the text streamer to stream output one token at a time
274
+ streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
275
+
276
+ prompt = "Tell me about AI"
277
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
278
+
279
+ ### Instruction:
280
+ {prompt}
281
+
282
+ ### Response:
283
+ '''
284
+
285
+ # Convert prompt to tokens
286
+ tokens = tokenizer(
287
+ prompt_template,
288
+ return_tensors='pt'
289
+ ).input_ids.cuda()
290
+
291
+ generation_params = {
292
+ "do_sample": True,
293
+ "temperature": 0.7,
294
+ "top_p": 0.95,
295
+ "top_k": 40,
296
+ "max_new_tokens": 512,
297
+ "repetition_penalty": 1.1
298
+ }
299
+
300
+ # Generate streamed output, visible one token at a time
301
+ generation_output = model.generate(
302
+ tokens,
303
+ streamer=streamer,
304
+ **generation_params
305
+ )
306
+
307
+ # Generation without a streamer, which will include the prompt in the output
308
+ generation_output = model.generate(
309
+ tokens,
310
+ **generation_params
311
+ )
312
+
313
+ # Get the tokens from the output, decode them, print them
314
+ token_output = generation_output[0]
315
+ text_output = tokenizer.decode(token_output)
316
+ print("model.generate output: ", text_output)
317
+
318
+ # Inference is also possible via Transformers' pipeline
319
+ from transformers import pipeline
320
+
321
+ pipe = pipeline(
322
+ "text-generation",
323
+ model=model,
324
+ tokenizer=tokenizer,
325
+ **generation_params
326
+ )
327
+
328
+ pipe_output = pipe(prompt_template)[0]['generated_text']
329
+ print("pipeline output: ", pipe_output)
330
+
331
+ ```
332
+ <!-- README_AWQ.md-use-from-python end -->
333
+
334
+ <!-- README_AWQ.md-compatibility start -->
335
+ ## Compatibility
336
+
337
+ The files provided are tested to work with:
338
+
339
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
340
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
341
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
342
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
343
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
344
+
345
+ <!-- README_AWQ.md-compatibility end -->
346
+
347
+ <!-- footer start -->
348
+ <!-- 200823 -->
349
+ ## Discord
350
+
351
+ For further support, and discussions on these models and AI in general, join us at:
352
+
353
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
354
+
355
+ ## Thanks, and how to contribute
356
+
357
+ Thanks to the [chirper.ai](https://chirper.ai) team!
358
+
359
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
360
+
361
+ 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.
362
+
363
+ 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.
364
+
365
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
366
+
367
+ * Patreon: https://patreon.com/TheBlokeAI
368
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
369
+
370
+ **Special thanks to**: Aemon Algiz.
371
+
372
+ **Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros
373
+
374
+
375
+ Thank you to all my generous patrons and donaters!
376
+
377
+ And thank you again to a16z for their generous grant.
378
+
379
+ <!-- footer end -->
380
+
381
+ # Original model card: Kooten's DaringMaid 20B
382
+
383
+
384
+ # DaringMaid-20B
385
+ My goal was to make a Noromaid that's smarter and better at following instructions.
386
+
387
+ After trying a bunch of different recipes I think this one turned out pretty good
388
+
389
+ - I used [sequelbox/DynamicFactor](https://huggingface.co/sequelbox/DynamicFactor) as a base to as its supposed "improve overall knowledge, precise communication, conceptual understanding, and technical skill" over the base llama2.
390
+ - [NeverSleep/Noromaid](https://huggingface.co/NeverSleep/Noromaid-13b-v0.1.1) of course.
391
+ - [Undi95/Utopia](https://huggingface.co/Undi95/Utopia-13B) has been recommended again recently and its still really good so in the mixer it goes
392
+ - I liked [tavtav/Rose](https://huggingface.co/tavtav/Rose-20B) so i threw in a bit of [CalderaAI/Thorns](https://huggingface.co/CalderaAI/13B-Thorns-l2)
393
+ - There was recently a model that tried to pass itself off as [Gryphe/MythoMax](https://huggingface.co/Gryphe/MythoMax-L2-13b), i made a merge with that model before it was revealed to be MythoMax and it turned out pretty good so i used it.
394
+
395
+ The .yml config files for mergekit with the exact merges can be found in the ["Recipe"](https://huggingface.co/Kooten/DaringMaid/tree/main/Recipe) folder in the [fp16 repo](https://huggingface.co/Kooten/DaringMaid-20B)
396
+
397
+ # Quants
398
+ EXL2: [6bpw](https://huggingface.co/Kooten/DaringMaid-20B-6bpw-exl2), [3bpw](https://huggingface.co/Kooten/DaringMaid-20B-3bpw-exl2)
399
+
400
+ [GGUF](https://huggingface.co/Kooten/DaringMaid-20B-GGUF):
401
+ [Q3_K_M](https://huggingface.co/Kooten/DaringMaid-20B-GGUF/blob/main/DaringMaid-20B-Q3_K_M.gguf) - [Q4_K_M](https://huggingface.co/Kooten/DaringMaid-20B-GGUF/blob/main/DaringMaid-20B-Q4_K_M.gguf) - [Q5_K_M](https://huggingface.co/Kooten/DaringMaid-20B-GGUF/blob/main/DaringMaid-20B-Q5_K_M.gguf)
402
+
403
+ ## Prompt template:
404
+ I have been using Undi/Ikaris SillyTavern presets for Noromaid: [Context](https://files.catbox.moe/ifmhai.json), [Instruct](https://files.catbox.moe/ttw1l9.json).
405
+
406
+ ### Alpaca:
407
+ ```
408
+ Below is an instruction that describes a task. Write a response that appropriately completes the request. Do not include descriptions of non-visual qualities such as personality, movements, scents, mental traits, or anything which could not be seen in a still photograph. Do not write in full sentences. Prefix your description with the phrase 'full body portrait,'
409
+
410
+ ### Instruction:
411
+ {prompt}
412
+
413
+ ### Response:
414
+
415
+ ```
416
+
417
+ ### Contact
418
+ Kooten on discord.