TheBloke commited on
Commit
ba75324
1 Parent(s): f4d1890

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +266 -0
README.md ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b
3
+ inference: false
4
+ license: llama2
5
+ model_creator: totally-not-an-llm
6
+ model_name: AlpacaCielo 13B
7
+ model_type: llama
8
+ prompt_template: '### Human: {prompt}
9
+
10
+ ### Assistant:
11
+
12
+ '
13
+ quantized_by: TheBloke
14
+ ---
15
+
16
+ <!-- header start -->
17
+ <!-- 200823 -->
18
+ <div style="width: auto; margin-left: auto; margin-right: auto">
19
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
20
+ </div>
21
+ <div style="display: flex; justify-content: space-between; width: 100%;">
22
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
23
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
24
+ </div>
25
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
26
+ <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>
27
+ </div>
28
+ </div>
29
+ <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>
30
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
31
+ <!-- header end -->
32
+
33
+ # AlpacaCielo 13B - AWQ
34
+ - Model creator: [totally-not-an-llm](https://huggingface.co/totally-not-an-llm)
35
+ - Original model: [AlpacaCielo 13B](https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b)
36
+
37
+ <!-- description start -->
38
+ ## Description
39
+
40
+ This repo contains AWQ model files for [totally-not-an-llm's AlpacaCielo 13B](https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b).
41
+
42
+
43
+ ### About AWQ
44
+
45
+ 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.
46
+
47
+ 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.
48
+ <!-- description end -->
49
+ <!-- repositories-available start -->
50
+ ## Repositories available
51
+
52
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/AlpacaCielo-13B-AWQ)
53
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/AlpacaCielo-13B-GPTQ)
54
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/AlpacaCielo-13B-GGUF)
55
+ * [totally-not-an-llm's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b)
56
+ <!-- repositories-available end -->
57
+
58
+ <!-- prompt-template start -->
59
+ ## Prompt template: Guanaco
60
+
61
+ ```
62
+ ### Human: {prompt}
63
+ ### Assistant:
64
+
65
+ ```
66
+
67
+ <!-- prompt-template end -->
68
+
69
+
70
+ <!-- README_AWQ.md-provided-files start -->
71
+ ## Provided files and AWQ parameters
72
+
73
+ 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.
74
+
75
+ Models are released as sharded safetensors files.
76
+
77
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
78
+ | ------ | ---- | -- | ----------- | ------- | ---- |
79
+ | [main](https://huggingface.co/TheBloke/AlpacaCielo-13B-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.25 GB
80
+
81
+ <!-- README_AWQ.md-provided-files end -->
82
+
83
+ <!-- README_AWQ.md-use-from-vllm start -->
84
+ ## Serving this model from vLLM
85
+
86
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
87
+
88
+ - When using vLLM as a server, pass the `--quantization awq` parameter, for example:
89
+
90
+ ```shell
91
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/AlpacaCielo-13B-AWQ --quantization awq
92
+ ```
93
+
94
+ When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
95
+
96
+ ```python
97
+ from vllm import LLM, SamplingParams
98
+
99
+ prompts = [
100
+ "Hello, my name is",
101
+ "The president of the United States is",
102
+ "The capital of France is",
103
+ "The future of AI is",
104
+ ]
105
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
106
+
107
+ llm = LLM(model="TheBloke/AlpacaCielo-13B-AWQ", quantization="awq")
108
+
109
+ outputs = llm.generate(prompts, sampling_params)
110
+
111
+ # Print the outputs.
112
+ for output in outputs:
113
+ prompt = output.prompt
114
+ generated_text = output.outputs[0].text
115
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
116
+ ```
117
+ <!-- README_AWQ.md-use-from-vllm start -->
118
+
119
+ <!-- README_AWQ.md-use-from-python start -->
120
+ ## How to use this AWQ model from Python code
121
+
122
+ ### Install the necessary packages
123
+
124
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later
125
+
126
+ ```shell
127
+ pip3 install autoawq
128
+ ```
129
+
130
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
131
+
132
+ ```shell
133
+ pip3 uninstall -y autoawq
134
+ git clone https://github.com/casper-hansen/AutoAWQ
135
+ cd AutoAWQ
136
+ pip3 install .
137
+ ```
138
+
139
+ ### You can then try the following example code
140
+
141
+ ```python
142
+ from awq import AutoAWQForCausalLM
143
+ from transformers import AutoTokenizer
144
+
145
+ model_name_or_path = "TheBloke/AlpacaCielo-13B-AWQ"
146
+
147
+ # Load model
148
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
149
+ trust_remote_code=False, safetensors=True)
150
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
151
+
152
+ prompt = "Tell me about AI"
153
+ prompt_template=f'''### Human: {prompt}
154
+ ### Assistant:
155
+
156
+ '''
157
+
158
+ print("\n\n*** Generate:")
159
+
160
+ tokens = tokenizer(
161
+ prompt_template,
162
+ return_tensors='pt'
163
+ ).input_ids.cuda()
164
+
165
+ # Generate output
166
+ generation_output = model.generate(
167
+ tokens,
168
+ do_sample=True,
169
+ temperature=0.7,
170
+ top_p=0.95,
171
+ top_k=40,
172
+ max_new_tokens=512
173
+ )
174
+
175
+ print("Output: ", tokenizer.decode(generation_output[0]))
176
+
177
+ # Inference can also be done using transformers' pipeline
178
+ from transformers import pipeline
179
+
180
+ print("*** Pipeline:")
181
+ pipe = pipeline(
182
+ "text-generation",
183
+ model=model,
184
+ tokenizer=tokenizer,
185
+ max_new_tokens=512,
186
+ do_sample=True,
187
+ temperature=0.7,
188
+ top_p=0.95,
189
+ top_k=40,
190
+ repetition_penalty=1.1
191
+ )
192
+
193
+ print(pipe(prompt_template)[0]['generated_text'])
194
+ ```
195
+ <!-- README_AWQ.md-use-from-python end -->
196
+
197
+ <!-- README_AWQ.md-compatibility start -->
198
+ ## Compatibility
199
+
200
+ The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm).
201
+
202
+ [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).
203
+ <!-- README_AWQ.md-compatibility end -->
204
+
205
+ <!-- footer start -->
206
+ <!-- 200823 -->
207
+ ## Discord
208
+
209
+ For further support, and discussions on these models and AI in general, join us at:
210
+
211
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
212
+
213
+ ## Thanks, and how to contribute
214
+
215
+ Thanks to the [chirper.ai](https://chirper.ai) team!
216
+
217
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
218
+
219
+ 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.
220
+
221
+ 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.
222
+
223
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
224
+
225
+ * Patreon: https://patreon.com/TheBlokeAI
226
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
227
+
228
+ **Special thanks to**: Aemon Algiz.
229
+
230
+ **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
231
+
232
+
233
+ Thank you to all my generous patrons and donaters!
234
+
235
+ And thank you again to a16z for their generous grant.
236
+
237
+ <!-- footer end -->
238
+
239
+ # Original model card: totally-not-an-llm's AlpacaCielo 13B
240
+
241
+
242
+ # AlpacaCielo-13b
243
+
244
+ <figure>
245
+ <img src="https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b/resolve/main/alpaca.png" alt="cute cloud alpaca">
246
+ <figcaption style="font-size: 1em;"><i>"super cute baby alpaca laying on a cloud", Model: epicrealism_pureEvolutionV3</i></figcaption>
247
+ </figure>
248
+
249
+ AlpacaCielo-13b is a llama-2 based model designed for creative tasks, such as storytelling and roleplay, while still doing well with other chatbot purposes. It is a triple model merge of Nous-Hermes + Guanaco + Storywriter. While it is mostly *"uncensored"*, it still inherits some alignment from Guanaco.
250
+
251
+ [GPTQ quants](https://huggingface.co/TheBloke/AlpacaCielo-13B-GPTQ)<br>
252
+ [GGML quants](https://huggingface.co/TheBloke/AlpacaCielo-13B-GGML)<br>
253
+ (Courtesy of TheBloke)
254
+
255
+ **Prompt format is this (Guanaco QLORA in oobabooga):**
256
+
257
+ ```
258
+ ### Human: {prompt}
259
+ ### Assistant:
260
+ ```
261
+
262
+ *Thanks to previous similar models such as Alpacino, Alpasta, and AlpacaDente for inspiring the creation of this model. Thanks also to the creators of the models involved in the merge. Original models:*
263
+
264
+ - [Nous-Hermes-Llama-2](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b)
265
+ - [Guanaco QLoRA](https://huggingface.co/Mikael110/llama-2-13b-guanaco-qlora)
266
+ - [Storywriter LoRA](https://huggingface.co/Blackroot/Llama-2-13B-Storywriter-LORA)