TheBloke commited on
Commit
c681a53
1 Parent(s): 00bd74a

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +306 -0
README.md ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: https://huggingface.co/Undi95/mlewd-l2-chat-13B
3
+ inference: false
4
+ license: cc-by-nc-4.0
5
+ model_creator: Undi95
6
+ model_name: MLewd L2 Chat 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
+
26
+ <!-- header start -->
27
+ <!-- 200823 -->
28
+ <div style="width: auto; margin-left: auto; margin-right: auto">
29
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
30
+ </div>
31
+ <div style="display: flex; justify-content: space-between; width: 100%;">
32
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
33
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
34
+ </div>
35
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
36
+ <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>
37
+ </div>
38
+ </div>
39
+ <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>
40
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
41
+ <!-- header end -->
42
+
43
+ # MLewd L2 Chat 13B - AWQ
44
+ - Model creator: [Undi95](https://huggingface.co/Undi95)
45
+ - Original model: [MLewd L2 Chat 13B](https://huggingface.co/Undi95/mlewd-l2-chat-13B)
46
+
47
+ <!-- description start -->
48
+ ## Description
49
+
50
+ This repo contains AWQ model files for [Undi95's MLewd L2 Chat 13B](https://huggingface.co/Undi95/mlewd-l2-chat-13B).
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.
56
+
57
+ It is also now supported by continuous batching server [vLLM](https://github.com/vllm-project/vllm), allowing use of AWQ models for high-throughput concurrent inference in multi-user server scenarios. Note that, at the time of writing, overall throughput is still lower than running vLLM with unquantised models, however using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB.
58
+ <!-- description end -->
59
+ <!-- repositories-available start -->
60
+ ## Repositories available
61
+
62
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/MLewd-L2-Chat-13B-AWQ)
63
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/MLewd-L2-Chat-13B-GPTQ)
64
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/MLewd-L2-Chat-13B-GGUF)
65
+ * [Undi95's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Undi95/mlewd-l2-chat-13B)
66
+ <!-- repositories-available end -->
67
+
68
+ <!-- prompt-template start -->
69
+ ## Prompt template: Alpaca
70
+
71
+ ```
72
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
73
+
74
+ ### Instruction:
75
+ {prompt}
76
+
77
+ ### Response:
78
+
79
+ ```
80
+
81
+ <!-- prompt-template end -->
82
+ <!-- licensing start -->
83
+ ## Licensing
84
+
85
+ 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.
86
+
87
+ 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.
88
+
89
+ In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [Undi95's MLewd L2 Chat 13B](https://huggingface.co/Undi95/mlewd-l2-chat-13B).
90
+ <!-- licensing end -->
91
+ <!-- README_AWQ.md-provided-files start -->
92
+ ## Provided files and AWQ parameters
93
+
94
+ 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.
95
+
96
+ Models are released as sharded safetensors files.
97
+
98
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
99
+ | ------ | ---- | -- | ----------- | ------- | ---- |
100
+ | [main](https://huggingface.co/TheBloke/MLewd-L2-Chat-13B-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.25 GB
101
+
102
+ <!-- README_AWQ.md-provided-files end -->
103
+
104
+ <!-- README_AWQ.md-use-from-vllm start -->
105
+ ## Serving this model from vLLM
106
+
107
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
108
+
109
+ - When using vLLM as a server, pass the `--quantization awq` parameter, for example:
110
+
111
+ ```shell
112
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/MLewd-L2-Chat-13B-AWQ --quantization awq
113
+ ```
114
+
115
+ When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
116
+
117
+ ```python
118
+ from vllm import LLM, SamplingParams
119
+
120
+ prompts = [
121
+ "Hello, my name is",
122
+ "The president of the United States is",
123
+ "The capital of France is",
124
+ "The future of AI is",
125
+ ]
126
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
127
+
128
+ llm = LLM(model="TheBloke/MLewd-L2-Chat-13B-AWQ", quantization="awq")
129
+
130
+ outputs = llm.generate(prompts, sampling_params)
131
+
132
+ # Print the outputs.
133
+ for output in outputs:
134
+ prompt = output.prompt
135
+ generated_text = output.outputs[0].text
136
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
137
+ ```
138
+ <!-- README_AWQ.md-use-from-vllm start -->
139
+
140
+ <!-- README_AWQ.md-use-from-python start -->
141
+ ## How to use this AWQ model from Python code
142
+
143
+ ### Install the necessary packages
144
+
145
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later
146
+
147
+ ```shell
148
+ pip3 install autoawq
149
+ ```
150
+
151
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
152
+
153
+ ```shell
154
+ pip3 uninstall -y autoawq
155
+ git clone https://github.com/casper-hansen/AutoAWQ
156
+ cd AutoAWQ
157
+ pip3 install .
158
+ ```
159
+
160
+ ### You can then try the following example code
161
+
162
+ ```python
163
+ from awq import AutoAWQForCausalLM
164
+ from transformers import AutoTokenizer
165
+
166
+ model_name_or_path = "TheBloke/MLewd-L2-Chat-13B-AWQ"
167
+
168
+ # Load model
169
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
170
+ trust_remote_code=False, safetensors=True)
171
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
172
+
173
+ prompt = "Tell me about AI"
174
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
175
+
176
+ ### Instruction:
177
+ {prompt}
178
+
179
+ ### Response:
180
+
181
+ '''
182
+
183
+ print("\n\n*** Generate:")
184
+
185
+ tokens = tokenizer(
186
+ prompt_template,
187
+ return_tensors='pt'
188
+ ).input_ids.cuda()
189
+
190
+ # Generate output
191
+ generation_output = model.generate(
192
+ tokens,
193
+ do_sample=True,
194
+ temperature=0.7,
195
+ top_p=0.95,
196
+ top_k=40,
197
+ max_new_tokens=512
198
+ )
199
+
200
+ print("Output: ", tokenizer.decode(generation_output[0]))
201
+
202
+ # Inference can also be done using transformers' pipeline
203
+ from transformers import pipeline
204
+
205
+ print("*** Pipeline:")
206
+ pipe = pipeline(
207
+ "text-generation",
208
+ model=model,
209
+ tokenizer=tokenizer,
210
+ max_new_tokens=512,
211
+ do_sample=True,
212
+ temperature=0.7,
213
+ top_p=0.95,
214
+ top_k=40,
215
+ repetition_penalty=1.1
216
+ )
217
+
218
+ print(pipe(prompt_template)[0]['generated_text'])
219
+ ```
220
+ <!-- README_AWQ.md-use-from-python end -->
221
+
222
+ <!-- README_AWQ.md-compatibility start -->
223
+ ## Compatibility
224
+
225
+ The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm).
226
+
227
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is not yet compatible with AWQ, but a PR is open which should bring support soon: [TGI PR #781](https://github.com/huggingface/text-generation-inference/issues/781).
228
+ <!-- README_AWQ.md-compatibility end -->
229
+
230
+ <!-- footer start -->
231
+ <!-- 200823 -->
232
+ ## Discord
233
+
234
+ For further support, and discussions on these models and AI in general, join us at:
235
+
236
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
237
+
238
+ ## Thanks, and how to contribute
239
+
240
+ Thanks to the [chirper.ai](https://chirper.ai) team!
241
+
242
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
243
+
244
+ 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.
245
+
246
+ 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.
247
+
248
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
249
+
250
+ * Patreon: https://patreon.com/TheBlokeAI
251
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
252
+
253
+ **Special thanks to**: Aemon Algiz.
254
+
255
+ **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov
256
+
257
+
258
+ Thank you to all my generous patrons and donaters!
259
+
260
+ And thank you again to a16z for their generous grant.
261
+
262
+ <!-- footer end -->
263
+
264
+ # Original model card: Undi95's MLewd L2 Chat 13B
265
+
266
+
267
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63ab1241ad514ca8d1430003/v6lvAhmkl02GoUQoarFaG.png)
268
+
269
+ THIS MODEL IS MADE FOR LEWD
270
+
271
+ SEXUAL, CRUDE AND KINKY CONTENT IN OUTPUT CAN AND WILL HAPPEN. YOU'RE WARNED
272
+
273
+ This is an attempt to make an uncensored Llama2-chat that can RP. It's not perfect, but I'm satified.
274
+
275
+ The beginning of the conversation is important for keeping good context and consistancy!
276
+
277
+ <!-- description start -->
278
+ ## Description
279
+
280
+ This repo contains fp16 files of MLewd-L2-Chat-13B, very hot and lewd model based on Llama2-chat.
281
+
282
+ <!-- description end -->
283
+ <!-- description start -->
284
+ ## Models and loras used
285
+
286
+ - Undi95/MLewd-L2-13B-Part3 (checkpoint of MLewd without LORA)
287
+ - posicube/Llama2-chat-AYT-13B
288
+ - zattio770/120-Days-of-LORA-v2-13B
289
+ - royallab/Pygmalion-2-13b-SuperCOT
290
+ - Undi95/MMSoul-13b-lora
291
+
292
+ <!-- description end -->
293
+ <!-- prompt-template start -->
294
+ ## Prompt template: Alpaca
295
+
296
+ ```
297
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
298
+
299
+ ### Instruction:
300
+ {prompt}
301
+
302
+ ### Response:
303
+
304
+ ```
305
+
306
+ Special thanks to Sushi and Shena ♥