TheBloke commited on
Commit
bc89263
1 Parent(s): 3b9a747

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +427 -0
README.md ADDED
@@ -0,0 +1,427 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: NeverSleep/Nethena-20B
3
+ inference: false
4
+ license: cc-by-nc-4.0
5
+ model_creator: NeverSleep
6
+ model_name: Nethena 20B
7
+ model_type: llama
8
+ prompt_template: 'Below is an instruction that describes a task. Write a response
9
+ that appropriately completes the request.
10
+
11
+
12
+ ### Instruction:
13
+
14
+ {prompt}
15
+
16
+
17
+ ### Response:
18
+
19
+ '
20
+ quantized_by: TheBloke
21
+ ---
22
+ <!-- markdownlint-disable MD041 -->
23
+
24
+ <!-- header start -->
25
+ <!-- 200823 -->
26
+ <div style="width: auto; margin-left: auto; margin-right: auto">
27
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
28
+ </div>
29
+ <div style="display: flex; justify-content: space-between; width: 100%;">
30
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
31
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
32
+ </div>
33
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
34
+ <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>
35
+ </div>
36
+ </div>
37
+ <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>
38
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
39
+ <!-- header end -->
40
+
41
+ # Nethena 20B - AWQ
42
+ - Model creator: [NeverSleep](https://huggingface.co/NeverSleep)
43
+ - Original model: [Nethena 20B](https://huggingface.co/NeverSleep/Nethena-20B)
44
+
45
+ <!-- description start -->
46
+ ## Description
47
+
48
+ This repo contains AWQ model files for [NeverSleep's Nethena 20B](https://huggingface.co/NeverSleep/Nethena-20B).
49
+
50
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
51
+
52
+
53
+ ### About AWQ
54
+
55
+ 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.
56
+
57
+ It is supported by:
58
+
59
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
60
+ - [vLLM](https://github.com/vllm-project/vllm) - Llama and Mistral models only
61
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
62
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
63
+
64
+ <!-- description end -->
65
+ <!-- repositories-available start -->
66
+ ## Repositories available
67
+
68
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Nethena-20B-AWQ)
69
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Nethena-20B-GPTQ)
70
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Nethena-20B-GGUF)
71
+ * [NeverSleep's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/NeverSleep/Nethena-20B)
72
+ <!-- repositories-available end -->
73
+
74
+ <!-- prompt-template start -->
75
+ ## Prompt template: Alpaca
76
+
77
+ ```
78
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
79
+
80
+ ### Instruction:
81
+ {prompt}
82
+
83
+ ### Response:
84
+
85
+ ```
86
+
87
+ <!-- prompt-template end -->
88
+ <!-- licensing start -->
89
+ ## Licensing
90
+
91
+ 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.
92
+
93
+ 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.
94
+
95
+ In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [NeverSleep's Nethena 20B](https://huggingface.co/NeverSleep/Nethena-20B).
96
+ <!-- licensing end -->
97
+ <!-- README_AWQ.md-provided-files start -->
98
+ ## Provided files, and AWQ parameters
99
+
100
+ For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM.
101
+
102
+ Models are released as sharded safetensors files.
103
+
104
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
105
+ | ------ | ---- | -- | ----------- | ------- | ---- |
106
+ | [main](https://huggingface.co/TheBloke/Nethena-20B-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 10.87 GB
107
+
108
+ <!-- README_AWQ.md-provided-files end -->
109
+
110
+ <!-- README_AWQ.md-text-generation-webui start -->
111
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
112
+
113
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
114
+
115
+ 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.
116
+
117
+ 1. Click the **Model tab**.
118
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Nethena-20B-AWQ`.
119
+ 3. Click **Download**.
120
+ 4. The model will start downloading. Once it's finished it will say "Done".
121
+ 5. In the top left, click the refresh icon next to **Model**.
122
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Nethena-20B-AWQ`
123
+ 7. Select **Loader: AutoAWQ**.
124
+ 8. Click Load, and the model will load and is now ready for use.
125
+ 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.
126
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
127
+ <!-- README_AWQ.md-text-generation-webui end -->
128
+
129
+ <!-- README_AWQ.md-use-from-vllm start -->
130
+ ## Multi-user inference server: vLLM
131
+
132
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
133
+
134
+ - Please ensure you are using vLLM version 0.2 or later.
135
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
136
+
137
+ For example:
138
+
139
+ ```shell
140
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/Nethena-20B-AWQ --quantization awq
141
+ ```
142
+
143
+ - When using vLLM from Python code, again set `quantization=awq`.
144
+
145
+ For example:
146
+
147
+ ```python
148
+ from vllm import LLM, SamplingParams
149
+
150
+ prompts = [
151
+ "Tell me about AI",
152
+ "Write a story about llamas",
153
+ "What is 291 - 150?",
154
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
155
+ ]
156
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
157
+
158
+ ### Instruction:
159
+ {prompt}
160
+
161
+ ### Response:
162
+ '''
163
+
164
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
165
+
166
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
167
+
168
+ llm = LLM(model="TheBloke/Nethena-20B-AWQ", quantization="awq", dtype="auto")
169
+
170
+ outputs = llm.generate(prompts, sampling_params)
171
+
172
+ # Print the outputs.
173
+ for output in outputs:
174
+ prompt = output.prompt
175
+ generated_text = output.outputs[0].text
176
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
177
+ ```
178
+ <!-- README_AWQ.md-use-from-vllm start -->
179
+
180
+ <!-- README_AWQ.md-use-from-tgi start -->
181
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
182
+
183
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
184
+
185
+ Example Docker parameters:
186
+
187
+ ```shell
188
+ --model-id TheBloke/Nethena-20B-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
189
+ ```
190
+
191
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
192
+
193
+ ```shell
194
+ pip3 install huggingface-hub
195
+ ```
196
+
197
+ ```python
198
+ from huggingface_hub import InferenceClient
199
+
200
+ endpoint_url = "https://your-endpoint-url-here"
201
+
202
+ prompt = "Tell me about AI"
203
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
204
+
205
+ ### Instruction:
206
+ {prompt}
207
+
208
+ ### Response:
209
+ '''
210
+
211
+ client = InferenceClient(endpoint_url)
212
+ response = client.text_generation(prompt,
213
+ max_new_tokens=128,
214
+ do_sample=True,
215
+ temperature=0.7,
216
+ top_p=0.95,
217
+ top_k=40,
218
+ repetition_penalty=1.1)
219
+
220
+ print(f"Model output: ", response)
221
+ ```
222
+ <!-- README_AWQ.md-use-from-tgi end -->
223
+
224
+ <!-- README_AWQ.md-use-from-python start -->
225
+ ## Inference from Python code using AutoAWQ
226
+
227
+ ### Install the AutoAWQ package
228
+
229
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.1 or later.
230
+
231
+ ```shell
232
+ pip3 install autoawq
233
+ ```
234
+
235
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
236
+
237
+ ```shell
238
+ pip3 uninstall -y autoawq
239
+ git clone https://github.com/casper-hansen/AutoAWQ
240
+ cd AutoAWQ
241
+ pip3 install .
242
+ ```
243
+
244
+ ### AutoAWQ example code
245
+
246
+ ```python
247
+ from awq import AutoAWQForCausalLM
248
+ from transformers import AutoTokenizer
249
+
250
+ model_name_or_path = "TheBloke/Nethena-20B-AWQ"
251
+
252
+ # Load tokenizer
253
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
254
+ # Load model
255
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
256
+ trust_remote_code=False, safetensors=True)
257
+
258
+ prompt = "Tell me about AI"
259
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
260
+
261
+ ### Instruction:
262
+ {prompt}
263
+
264
+ ### Response:
265
+ '''
266
+
267
+ print("*** Running model.generate:")
268
+
269
+ token_input = tokenizer(
270
+ prompt_template,
271
+ return_tensors='pt'
272
+ ).input_ids.cuda()
273
+
274
+ # Generate output
275
+ generation_output = model.generate(
276
+ token_input,
277
+ do_sample=True,
278
+ temperature=0.7,
279
+ top_p=0.95,
280
+ top_k=40,
281
+ max_new_tokens=512
282
+ )
283
+
284
+ # Get the tokens from the output, decode them, print them
285
+ token_output = generation_output[0]
286
+ text_output = tokenizer.decode(token_output)
287
+ print("LLM output: ", text_output)
288
+
289
+ """
290
+ # Inference should be possible with transformers pipeline as well in future
291
+ # But currently this is not yet supported by AutoAWQ (correct as of September 25th 2023)
292
+ from transformers import pipeline
293
+
294
+ print("*** Pipeline:")
295
+ pipe = pipeline(
296
+ "text-generation",
297
+ model=model,
298
+ tokenizer=tokenizer,
299
+ max_new_tokens=512,
300
+ do_sample=True,
301
+ temperature=0.7,
302
+ top_p=0.95,
303
+ top_k=40,
304
+ repetition_penalty=1.1
305
+ )
306
+
307
+ print(pipe(prompt_template)[0]['generated_text'])
308
+ """
309
+ ```
310
+ <!-- README_AWQ.md-use-from-python end -->
311
+
312
+ <!-- README_AWQ.md-compatibility start -->
313
+ ## Compatibility
314
+
315
+ The files provided are tested to work with:
316
+
317
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
318
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
319
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
320
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
321
+
322
+ <!-- README_AWQ.md-compatibility end -->
323
+
324
+ <!-- footer start -->
325
+ <!-- 200823 -->
326
+ ## Discord
327
+
328
+ For further support, and discussions on these models and AI in general, join us at:
329
+
330
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
331
+
332
+ ## Thanks, and how to contribute
333
+
334
+ Thanks to the [chirper.ai](https://chirper.ai) team!
335
+
336
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
337
+
338
+ 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.
339
+
340
+ 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.
341
+
342
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
343
+
344
+ * Patreon: https://patreon.com/TheBlokeAI
345
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
346
+
347
+ **Special thanks to**: Aemon Algiz.
348
+
349
+ **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
350
+
351
+
352
+ Thank you to all my generous patrons and donaters!
353
+
354
+ And thank you again to a16z for their generous grant.
355
+
356
+ <!-- footer end -->
357
+
358
+ # Original model card: NeverSleep's Nethena 20B
359
+
360
+
361
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/630dfb008df86f1e5becadc3/NNs9LlIWuupi4KPLmTFtP.png)
362
+
363
+ # This model is a collab between [IkariDev](https://huggingface.co/IkariDev) and [Undi](https://huggingface.co/Undi95)!
364
+
365
+ Nethena-20B model. Use Alpaca format. Suitable for RP, ERP and general stuff.
366
+
367
+ What would happen if we combine all of out best models? Well.. here it is, the holy grail: **Echidna v0.3** + **Athena v3** + **Nete**
368
+
369
+ This model also has a 13b version, you can check it out right [here](https://huggingface.co/NeverSleep/Nethena-13B).
370
+
371
+ [Recommended settings - No settings yet(Please suggest some over in the Community tab!)]
372
+
373
+ <!-- description start -->
374
+ ## Description
375
+
376
+ <!-- [Recommended settings - contributed by localfultonextractor](https://files.catbox.moe/ue0tja.json) -->
377
+
378
+ This repo contains fp16 files of Nethena-20B.
379
+
380
+ [FP16 - by IkariDev and Undi](https://huggingface.co/NeverSleep/Nethena-20B)
381
+
382
+ <!-- [GGUF - By TheBloke](https://huggingface.co/TheBloke/Athena-v4-GGUF)-->
383
+
384
+ <!-- [GPTQ - By TheBloke](https://huggingface.co/TheBloke/Athena-v4-GPTQ)-->
385
+
386
+ <!--[exl2[8bpw-8h] - by AzureBlack](https://huggingface.co/AzureBlack/Echidna-20B-v0.3-8bpw-8h-exl2)-->
387
+
388
+ <!-- [AWQ - By TheBloke](https://huggingface.co/TheBloke/Athena-v4-AWQ)-->
389
+
390
+ <!-- [fp16 - by IkariDev+Undi95](https://huggingface.co/IkariDev/Athena-v4)-->
391
+
392
+ [GGUF - by IkariDev and Undi](https://huggingface.co/NeverSleep/Nethena-20B-GGUF)
393
+ <!-- [OLD(GGUF - by IkariDev+Undi95)](https://huggingface.co/IkariDev/Athena-v4-GGUF)-->
394
+
395
+ ## Ratings:
396
+
397
+ Note: We have permission of all users to upload their ratings, i DONT screenshot random reviews without asking if i can put them here!
398
+
399
+ No ratings yet!
400
+
401
+ If you want your rating to be here, send us a message over on DC and we'll put up a screenshot of it here. DC name is "ikaridev" and "undi".
402
+
403
+ <!-- description end -->
404
+ <!-- description start -->
405
+ ## Models+loras used and recipe
406
+
407
+ - NeverSleep/Echidna-13b-v0.3
408
+ - IkariDev/Athena-v3
409
+ - Undi95/Nete-13B
410
+ <!-- description end -->
411
+ <!-- prompt-template start -->
412
+ ## Prompt template: Alpaca
413
+
414
+ ```
415
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
416
+
417
+ ### Instruction:
418
+ {prompt}
419
+
420
+ ### Response:
421
+
422
+ ```
423
+ ## Others
424
+
425
+ Undi: If you want to support me, you can [here](https://ko-fi.com/undiai).
426
+
427
+ IkariDev: Visit my [retro/neocities style website](https://ikaridevgit.github.io/) please kek