TheBloke commited on
Commit
6de2d1b
1 Parent(s): 10912a2

Upload README.md

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