TheBloke commited on
Commit
f442dee
1 Parent(s): 9205276

Upload README.md

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