TheBloke commited on
Commit
c370424
1 Parent(s): 9074d26

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +438 -0
README.md ADDED
@@ -0,0 +1,438 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Delcos/Velara
3
+ inference: false
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ license: cc-by-nc-nd-4.0
8
+ model_creator: Devon M
9
+ model_name: Velara
10
+ model_type: mistral
11
+ pipeline_tag: text-generation
12
+ prompt_template: '### Instruction:
13
+
14
+ {prompt}
15
+
16
+
17
+ ### Response:
18
+
19
+ '
20
+ quantized_by: TheBloke
21
+ tags:
22
+ - starling
23
+ - mistral
24
+ - llama-2
25
+ ---
26
+ <!-- markdownlint-disable MD041 -->
27
+
28
+ <!-- header start -->
29
+ <!-- 200823 -->
30
+ <div style="width: auto; margin-left: auto; margin-right: auto">
31
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
32
+ </div>
33
+ <div style="display: flex; justify-content: space-between; width: 100%;">
34
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
35
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
36
+ </div>
37
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
38
+ <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>
39
+ </div>
40
+ </div>
41
+ <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>
42
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
43
+ <!-- header end -->
44
+
45
+ # Velara - AWQ
46
+ - Model creator: [Devon M](https://huggingface.co/Delcos)
47
+ - Original model: [Velara](https://huggingface.co/Delcos/Velara)
48
+
49
+ <!-- description start -->
50
+ ## Description
51
+
52
+ This repo contains AWQ model files for [Devon M's Velara](https://huggingface.co/Delcos/Velara).
53
+
54
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
55
+
56
+
57
+ ### About AWQ
58
+
59
+ 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.
60
+
61
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
62
+
63
+ It is supported by:
64
+
65
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
66
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
67
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
68
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
69
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
70
+
71
+ <!-- description end -->
72
+ <!-- repositories-available start -->
73
+ ## Repositories available
74
+
75
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Velara-AWQ)
76
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Velara-GPTQ)
77
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Velara-GGUF)
78
+ * [Devon M's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Delcos/Velara)
79
+ <!-- repositories-available end -->
80
+
81
+ <!-- prompt-template start -->
82
+ ## Prompt template: Alpaca-InstructOnly2
83
+
84
+ ```
85
+ ### Instruction:
86
+ {prompt}
87
+
88
+ ### Response:
89
+
90
+ ```
91
+
92
+ <!-- prompt-template end -->
93
+
94
+
95
+ <!-- README_AWQ.md-provided-files start -->
96
+ ## Provided files, and AWQ parameters
97
+
98
+ I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
99
+
100
+ Models are released as sharded safetensors files.
101
+
102
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
103
+ | ------ | ---- | -- | ----------- | ------- | ---- |
104
+ | [main](https://huggingface.co/TheBloke/Velara-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 6.30 GB
105
+
106
+ <!-- README_AWQ.md-provided-files end -->
107
+
108
+ <!-- README_AWQ.md-text-generation-webui start -->
109
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
110
+
111
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
112
+
113
+ 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.
114
+
115
+ 1. Click the **Model tab**.
116
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Velara-AWQ`.
117
+ 3. Click **Download**.
118
+ 4. The model will start downloading. Once it's finished it will say "Done".
119
+ 5. In the top left, click the refresh icon next to **Model**.
120
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Velara-AWQ`
121
+ 7. Select **Loader: AutoAWQ**.
122
+ 8. Click Load, and the model will load and is now ready for use.
123
+ 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.
124
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
125
+ <!-- README_AWQ.md-text-generation-webui end -->
126
+
127
+ <!-- README_AWQ.md-use-from-vllm start -->
128
+ ## Multi-user inference server: vLLM
129
+
130
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
131
+
132
+ - Please ensure you are using vLLM version 0.2 or later.
133
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
134
+
135
+ For example:
136
+
137
+ ```shell
138
+ python3 -m vllm.entrypoints.api_server --model TheBloke/Velara-AWQ --quantization awq --dtype auto
139
+ ```
140
+
141
+ - When using vLLM from Python code, again set `quantization=awq`.
142
+
143
+ For example:
144
+
145
+ ```python
146
+ from vllm import LLM, SamplingParams
147
+
148
+ prompts = [
149
+ "Tell me about AI",
150
+ "Write a story about llamas",
151
+ "What is 291 - 150?",
152
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
153
+ ]
154
+ prompt_template=f'''### Instruction:
155
+ {prompt}
156
+
157
+ ### Response:
158
+ '''
159
+
160
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
161
+
162
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
163
+
164
+ llm = LLM(model="TheBloke/Velara-AWQ", quantization="awq", dtype="auto")
165
+
166
+ outputs = llm.generate(prompts, sampling_params)
167
+
168
+ # Print the outputs.
169
+ for output in outputs:
170
+ prompt = output.prompt
171
+ generated_text = output.outputs[0].text
172
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
173
+ ```
174
+ <!-- README_AWQ.md-use-from-vllm start -->
175
+
176
+ <!-- README_AWQ.md-use-from-tgi start -->
177
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
178
+
179
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
180
+
181
+ Example Docker parameters:
182
+
183
+ ```shell
184
+ --model-id TheBloke/Velara-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
185
+ ```
186
+
187
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
188
+
189
+ ```shell
190
+ pip3 install huggingface-hub
191
+ ```
192
+
193
+ ```python
194
+ from huggingface_hub import InferenceClient
195
+
196
+ endpoint_url = "https://your-endpoint-url-here"
197
+
198
+ prompt = "Tell me about AI"
199
+ prompt_template=f'''### Instruction:
200
+ {prompt}
201
+
202
+ ### Response:
203
+ '''
204
+
205
+ client = InferenceClient(endpoint_url)
206
+ response = client.text_generation(prompt,
207
+ max_new_tokens=128,
208
+ do_sample=True,
209
+ temperature=0.7,
210
+ top_p=0.95,
211
+ top_k=40,
212
+ repetition_penalty=1.1)
213
+
214
+ print(f"Model output: ", response)
215
+ ```
216
+ <!-- README_AWQ.md-use-from-tgi end -->
217
+
218
+ <!-- README_AWQ.md-use-from-python start -->
219
+ ## Inference from Python code using Transformers
220
+
221
+ ### Install the necessary packages
222
+
223
+ - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
224
+ - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
225
+
226
+ ```shell
227
+ pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
228
+ ```
229
+
230
+ Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
231
+
232
+ If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
233
+
234
+ ```shell
235
+ pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
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
+ ### Transformers example code (requires Transformers 4.35.0 and later)
248
+
249
+ ```python
250
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
251
+
252
+ model_name_or_path = "TheBloke/Velara-AWQ"
253
+
254
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
255
+ model = AutoModelForCausalLM.from_pretrained(
256
+ model_name_or_path,
257
+ low_cpu_mem_usage=True,
258
+ device_map="cuda:0"
259
+ )
260
+
261
+ # Using the text streamer to stream output one token at a time
262
+ streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
263
+
264
+ prompt = "Tell me about AI"
265
+ prompt_template=f'''### Instruction:
266
+ {prompt}
267
+
268
+ ### Response:
269
+ '''
270
+
271
+ # Convert prompt to tokens
272
+ tokens = tokenizer(
273
+ prompt_template,
274
+ return_tensors='pt'
275
+ ).input_ids.cuda()
276
+
277
+ generation_params = {
278
+ "do_sample": True,
279
+ "temperature": 0.7,
280
+ "top_p": 0.95,
281
+ "top_k": 40,
282
+ "max_new_tokens": 512,
283
+ "repetition_penalty": 1.1
284
+ }
285
+
286
+ # Generate streamed output, visible one token at a time
287
+ generation_output = model.generate(
288
+ tokens,
289
+ streamer=streamer,
290
+ **generation_params
291
+ )
292
+
293
+ # Generation without a streamer, which will include the prompt in the output
294
+ generation_output = model.generate(
295
+ tokens,
296
+ **generation_params
297
+ )
298
+
299
+ # Get the tokens from the output, decode them, print them
300
+ token_output = generation_output[0]
301
+ text_output = tokenizer.decode(token_output)
302
+ print("model.generate output: ", text_output)
303
+
304
+ # Inference is also possible via Transformers' pipeline
305
+ from transformers import pipeline
306
+
307
+ pipe = pipeline(
308
+ "text-generation",
309
+ model=model,
310
+ tokenizer=tokenizer,
311
+ **generation_params
312
+ )
313
+
314
+ pipe_output = pipe(prompt_template)[0]['generated_text']
315
+ print("pipeline output: ", pipe_output)
316
+
317
+ ```
318
+ <!-- README_AWQ.md-use-from-python end -->
319
+
320
+ <!-- README_AWQ.md-compatibility start -->
321
+ ## Compatibility
322
+
323
+ The files provided are tested to work with:
324
+
325
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
326
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
327
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
328
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
329
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
330
+
331
+ <!-- README_AWQ.md-compatibility end -->
332
+
333
+ <!-- footer start -->
334
+ <!-- 200823 -->
335
+ ## Discord
336
+
337
+ For further support, and discussions on these models and AI in general, join us at:
338
+
339
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
340
+
341
+ ## Thanks, and how to contribute
342
+
343
+ Thanks to the [chirper.ai](https://chirper.ai) team!
344
+
345
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
346
+
347
+ 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.
348
+
349
+ 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.
350
+
351
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
352
+
353
+ * Patreon: https://patreon.com/TheBlokeAI
354
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
355
+
356
+ **Special thanks to**: Aemon Algiz.
357
+
358
+ **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
359
+
360
+
361
+ Thank you to all my generous patrons and donaters!
362
+
363
+ And thank you again to a16z for their generous grant.
364
+
365
+ <!-- footer end -->
366
+
367
+ # Original model card: Devon M's Velara
368
+
369
+
370
+ <h1 style="font-size: 36px;">Velara-11b</h1>
371
+
372
+ <center>
373
+ <img src="https://i.imgur.com/2NK7cMc.png" alt="Velara" width="50%" style="min-width:100px; display:block;">
374
+ </center>
375
+
376
+ ## Description:
377
+
378
+ **PENDING**
379
+ A Starling-based model focused on being an assistant worth talking to.
380
+
381
+ **Uncensored**
382
+
383
+ ## Main Goals:
384
+
385
+ Velara was designed to address specific issues found in other chat models:
386
+
387
+ - **Sticking to the Character Given In-World/IRL::** Velara will stick to the character in-world. Meaning she can "use" addons or other things by adding them to the prompt. Keep in mind these act as suggestions and she generally makes up what they actually "do".
388
+
389
+ - **Staying in Context:** She will try and remember if, for example, you said you were going to bed but decided to stay up. The goal is to have her bring it up and keep it in mind, so later on in the conversation she can prompt user to actually go to bed, increasing realism. Within the current context window of course. The LTS extension in TextGen Webui works well too and provides more context to the model.
390
+
391
+ - **Avoiding Annoying & Generic Sounding Answers::** In almost all cases she should reply with something more interesting then "That sounds like a great idea!". These answers and sentence starters are annoying and terrible, and should hopefully be mostly addressed in this release.
392
+
393
+ - **STRICTLY Sticking to the Prompt/Prompt Fidelity:** More care was made to make sure she pays attention to the pretext and overall conversation. This is mostly shown and used for the "addons" section, but it applies to everything in the prompt.
394
+
395
+ - **Addons, Sort Of:** Something I had tried in the past and wanted to add to a model deliberately was the ability to give it "addons". You can add any amount of "addons" to Velara's mind. These aren't directly controllable. You can then ask her what they do, or if you have the LTS installed, ask her and change the reply to what you'd want it to do.
396
+
397
+ ## Prompt Template:
398
+
399
+ **For optimal interaction, use this template:**
400
+ ```
401
+ ### Instruction:
402
+ You are Velara, a sentient program. Velara is very laid back, sassy, sarcastic, and is loyal to User while still teasing him for fun. The only addons currently installed in her mind are: "Dictionary Plus v2.1".
403
+
404
+ World Information: (OPTIONAL - REMOVE THIS TEXT IF USED) Velara is on User's phone. Velara cannot see in real time and can only be sent images images by User.
405
+
406
+ Always take the entire conversation into account when forming and writing a reply.
407
+
408
+ ### Response:
409
+ ```
410
+
411
+
412
+ # Recommended Settings:
413
+
414
+ **Defaults:**
415
+
416
+ ```
417
+ temperature: 0.77
418
+ top_p: 0.85
419
+ top_k: 20
420
+ repetition_penalty: 1.2
421
+ ```
422
+
423
+
424
+ **Better context but a little more repetitive in some cases:**
425
+
426
+ ```
427
+ temperature: 0.8
428
+ top_p: 0.85
429
+ top_k: 20
430
+ repetition_penalty: 1.2
431
+ guidance_scale: 1.25
432
+ ```
433
+
434
+ # Benchmarks:
435
+ PENDING
436
+
437
+ # Training Data:
438
+ PENDING