TheBloke commited on
Commit
453eedf
1 Parent(s): 7054fda

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +398 -0
README.md ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Undi95/Nete-13B
3
+ inference: false
4
+ license: cc-by-nc-4.0
5
+ model_creator: Undi
6
+ model_name: Nete 13B
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
+ tags:
22
+ - not-for-all-audiences
23
+ - nsfw
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
+ # Nete 13B - AWQ
45
+ - Model creator: [Undi](https://huggingface.co/Undi95)
46
+ - Original model: [Nete 13B](https://huggingface.co/Undi95/Nete-13B)
47
+
48
+ <!-- description start -->
49
+ ## Description
50
+
51
+ This repo contains AWQ model files for [Undi's Nete 13B](https://huggingface.co/Undi95/Nete-13B).
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
+ It is supported by:
61
+
62
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
63
+ - [vLLM](https://github.com/vllm-project/vllm) - Llama and Mistral models only
64
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
65
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
66
+
67
+ <!-- description end -->
68
+ <!-- repositories-available start -->
69
+ ## Repositories available
70
+
71
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Nete-13B-AWQ)
72
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Nete-13B-GPTQ)
73
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Nete-13B-GGUF)
74
+ * [Undi's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Undi95/Nete-13B)
75
+ <!-- repositories-available end -->
76
+
77
+ <!-- prompt-template start -->
78
+ ## Prompt template: Alpaca
79
+
80
+ ```
81
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
82
+
83
+ ### Instruction:
84
+ {prompt}
85
+
86
+ ### Response:
87
+
88
+ ```
89
+
90
+ <!-- prompt-template end -->
91
+ <!-- licensing start -->
92
+ ## Licensing
93
+
94
+ 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.
95
+
96
+ 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.
97
+
98
+ In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [Undi's Nete 13B](https://huggingface.co/Undi95/Nete-13B).
99
+ <!-- licensing end -->
100
+ <!-- README_AWQ.md-provided-files start -->
101
+ ## Provided files, and AWQ parameters
102
+
103
+ 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.
104
+
105
+ Models are released as sharded safetensors files.
106
+
107
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
108
+ | ------ | ---- | -- | ----------- | ------- | ---- |
109
+ | [main](https://huggingface.co/TheBloke/Nete-13B-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.25 GB
110
+
111
+ <!-- README_AWQ.md-provided-files end -->
112
+
113
+ <!-- README_AWQ.md-text-generation-webui start -->
114
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
115
+
116
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
117
+
118
+ 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.
119
+
120
+ 1. Click the **Model tab**.
121
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Nete-13B-AWQ`.
122
+ 3. Click **Download**.
123
+ 4. The model will start downloading. Once it's finished it will say "Done".
124
+ 5. In the top left, click the refresh icon next to **Model**.
125
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Nete-13B-AWQ`
126
+ 7. Select **Loader: AutoAWQ**.
127
+ 8. Click Load, and the model will load and is now ready for use.
128
+ 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.
129
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
130
+ <!-- README_AWQ.md-text-generation-webui end -->
131
+
132
+ <!-- README_AWQ.md-use-from-vllm start -->
133
+ ## Multi-user inference server: vLLM
134
+
135
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
136
+
137
+ - Please ensure you are using vLLM version 0.2 or later.
138
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
139
+
140
+ For example:
141
+
142
+ ```shell
143
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/Nete-13B-AWQ --quantization awq
144
+ ```
145
+
146
+ - When using vLLM from Python code, again set `quantization=awq`.
147
+
148
+ For example:
149
+
150
+ ```python
151
+ from vllm import LLM, SamplingParams
152
+
153
+ prompts = [
154
+ "Tell me about AI",
155
+ "Write a story about llamas",
156
+ "What is 291 - 150?",
157
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
158
+ ]
159
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
160
+
161
+ ### Instruction:
162
+ {prompt}
163
+
164
+ ### Response:
165
+ '''
166
+
167
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
168
+
169
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
170
+
171
+ llm = LLM(model="TheBloke/Nete-13B-AWQ", quantization="awq", dtype="auto")
172
+
173
+ outputs = llm.generate(prompts, sampling_params)
174
+
175
+ # Print the outputs.
176
+ for output in outputs:
177
+ prompt = output.prompt
178
+ generated_text = output.outputs[0].text
179
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
180
+ ```
181
+ <!-- README_AWQ.md-use-from-vllm start -->
182
+
183
+ <!-- README_AWQ.md-use-from-tgi start -->
184
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
185
+
186
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
187
+
188
+ Example Docker parameters:
189
+
190
+ ```shell
191
+ --model-id TheBloke/Nete-13B-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
192
+ ```
193
+
194
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
195
+
196
+ ```shell
197
+ pip3 install huggingface-hub
198
+ ```
199
+
200
+ ```python
201
+ from huggingface_hub import InferenceClient
202
+
203
+ endpoint_url = "https://your-endpoint-url-here"
204
+
205
+ prompt = "Tell me about AI"
206
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
207
+
208
+ ### Instruction:
209
+ {prompt}
210
+
211
+ ### Response:
212
+ '''
213
+
214
+ client = InferenceClient(endpoint_url)
215
+ response = client.text_generation(prompt,
216
+ max_new_tokens=128,
217
+ do_sample=True,
218
+ temperature=0.7,
219
+ top_p=0.95,
220
+ top_k=40,
221
+ repetition_penalty=1.1)
222
+
223
+ print(f"Model output: ", response)
224
+ ```
225
+ <!-- README_AWQ.md-use-from-tgi end -->
226
+
227
+ <!-- README_AWQ.md-use-from-python start -->
228
+ ## Inference from Python code using AutoAWQ
229
+
230
+ ### Install the AutoAWQ package
231
+
232
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.1 or later.
233
+
234
+ ```shell
235
+ pip3 install autoawq
236
+ ```
237
+
238
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
239
+
240
+ ```shell
241
+ pip3 uninstall -y autoawq
242
+ git clone https://github.com/casper-hansen/AutoAWQ
243
+ cd AutoAWQ
244
+ pip3 install .
245
+ ```
246
+
247
+ ### AutoAWQ example code
248
+
249
+ ```python
250
+ from awq import AutoAWQForCausalLM
251
+ from transformers import AutoTokenizer
252
+
253
+ model_name_or_path = "TheBloke/Nete-13B-AWQ"
254
+
255
+ # Load tokenizer
256
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
257
+ # Load model
258
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
259
+ trust_remote_code=False, safetensors=True)
260
+
261
+ prompt = "Tell me about AI"
262
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
263
+
264
+ ### Instruction:
265
+ {prompt}
266
+
267
+ ### Response:
268
+ '''
269
+
270
+ print("*** Running model.generate:")
271
+
272
+ token_input = tokenizer(
273
+ prompt_template,
274
+ return_tensors='pt'
275
+ ).input_ids.cuda()
276
+
277
+ # Generate output
278
+ generation_output = model.generate(
279
+ token_input,
280
+ do_sample=True,
281
+ temperature=0.7,
282
+ top_p=0.95,
283
+ top_k=40,
284
+ max_new_tokens=512
285
+ )
286
+
287
+ # Get the tokens from the output, decode them, print them
288
+ token_output = generation_output[0]
289
+ text_output = tokenizer.decode(token_output)
290
+ print("LLM output: ", text_output)
291
+
292
+ """
293
+ # Inference should be possible with transformers pipeline as well in future
294
+ # But currently this is not yet supported by AutoAWQ (correct as of September 25th 2023)
295
+ from transformers import pipeline
296
+
297
+ print("*** Pipeline:")
298
+ pipe = pipeline(
299
+ "text-generation",
300
+ model=model,
301
+ tokenizer=tokenizer,
302
+ max_new_tokens=512,
303
+ do_sample=True,
304
+ temperature=0.7,
305
+ top_p=0.95,
306
+ top_k=40,
307
+ repetition_penalty=1.1
308
+ )
309
+
310
+ print(pipe(prompt_template)[0]['generated_text'])
311
+ """
312
+ ```
313
+ <!-- README_AWQ.md-use-from-python end -->
314
+
315
+ <!-- README_AWQ.md-compatibility start -->
316
+ ## Compatibility
317
+
318
+ The files provided are tested to work with:
319
+
320
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
321
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
322
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
323
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
324
+
325
+ <!-- README_AWQ.md-compatibility end -->
326
+
327
+ <!-- footer start -->
328
+ <!-- 200823 -->
329
+ ## Discord
330
+
331
+ For further support, and discussions on these models and AI in general, join us at:
332
+
333
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
334
+
335
+ ## Thanks, and how to contribute
336
+
337
+ Thanks to the [chirper.ai](https://chirper.ai) team!
338
+
339
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
340
+
341
+ 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.
342
+
343
+ 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.
344
+
345
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
346
+
347
+ * Patreon: https://patreon.com/TheBlokeAI
348
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
349
+
350
+ **Special thanks to**: Aemon Algiz.
351
+
352
+ **Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski
353
+
354
+
355
+ Thank you to all my generous patrons and donaters!
356
+
357
+ And thank you again to a16z for their generous grant.
358
+
359
+ <!-- footer end -->
360
+
361
+ # Original model card: Undi's Nete 13B
362
+
363
+
364
+ *Insert picture of a hot woman [here](https://cdn-uploads.huggingface.co/production/uploads/63ab1241ad514ca8d1430003/aJIfY5W9CV095wzEH7uo1.png)*
365
+
366
+ This model is based on the Xwin-MLewd recipe, trying to get a better result.
367
+
368
+ <!-- description start -->
369
+ ## Description
370
+
371
+ This repo contains fp16 files of Nete-13B, a powered up version of Xwin-MLewd-13B.
372
+
373
+ <!-- description end -->
374
+ <!-- description start -->
375
+ ## Models and loras used
376
+
377
+ - [Undi95/Mlewd-v2.4-13B](https://huggingface.co/Undi95/MLewd-v2.4-13B)
378
+ - [Xwin-LM/Xwin-LM-13B-V0.2](https://huggingface.co/Xwin-LM/Xwin-LM-13B-V0.2)
379
+ - [cgato/Thespis-13b-v0.4](https://huggingface.co/cgato/Thespis-13b-v0.4)
380
+ - [Undi95/PsyMedRP-v1-13B](https://huggingface.co/Undi95/PsyMedRP-v1-13B)
381
+ - [Undi95/Storytelling-v2.1-13B-lora](https://huggingface.co/Undi95/Storytelling-v2.1-13B-lora)
382
+ - [lemonilia/LimaRP-Llama2-13B-v3-EXPERIMENT](https://huggingface.co/lemonilia/LimaRP-Llama2-13B-v3-EXPERIMENT)
383
+
384
+ <!-- description end -->
385
+ <!-- prompt-template start -->
386
+ ## Prompt template: Alpaca
387
+
388
+ ```
389
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
390
+
391
+ ### Instruction:
392
+ {prompt}
393
+
394
+ ### Response:
395
+
396
+ ```
397
+
398
+ If you want to support me, you can [here](https://ko-fi.com/undiai).