TheBloke commited on
Commit
280fccc
·
1 Parent(s): 5c18dfc

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +254 -0
README.md ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: https://huggingface.co/Henk717/spring-dragon
3
+ inference: false
4
+ license: llama2
5
+ model_creator: Henky!!
6
+ model_name: Spring Dragon
7
+ model_type: llama
8
+ prompt_template: 'Info on prompt template will be added shortly.
9
+
10
+ '
11
+ quantized_by: TheBloke
12
+ ---
13
+
14
+ <!-- header start -->
15
+ <!-- 200823 -->
16
+ <div style="width: auto; margin-left: auto; margin-right: auto">
17
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
18
+ </div>
19
+ <div style="display: flex; justify-content: space-between; width: 100%;">
20
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
21
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
22
+ </div>
23
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
24
+ <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>
25
+ </div>
26
+ </div>
27
+ <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>
28
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
29
+ <!-- header end -->
30
+
31
+ # Spring Dragon - AWQ
32
+ - Model creator: [Henky!!](https://huggingface.co/Henk717)
33
+ - Original model: [Spring Dragon](https://huggingface.co/Henk717/spring-dragon)
34
+
35
+ <!-- description start -->
36
+ ## Description
37
+
38
+ This repo contains AWQ model files for [Henky!!'s Spring Dragon](https://huggingface.co/Henk717/spring-dragon).
39
+
40
+
41
+ ### About AWQ
42
+
43
+ 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.
44
+
45
+ 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.
46
+ <!-- description end -->
47
+ <!-- repositories-available start -->
48
+ ## Repositories available
49
+
50
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Spring-Dragon-AWQ)
51
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Spring-Dragon-GPTQ)
52
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Spring-Dragon-GGUF)
53
+ * [Henky!!'s original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Henk717/spring-dragon)
54
+ <!-- repositories-available end -->
55
+
56
+ <!-- prompt-template start -->
57
+ ## Prompt template: TBC
58
+
59
+ ```
60
+ Info on prompt template will be added shortly.
61
+
62
+ ```
63
+
64
+ <!-- prompt-template end -->
65
+
66
+
67
+ <!-- README_AWQ.md-provided-files start -->
68
+ ## Provided files and AWQ parameters
69
+
70
+ 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.
71
+
72
+ Models are released as sharded safetensors files.
73
+
74
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
75
+ | ------ | ---- | -- | ----------- | ------- | ---- |
76
+ | [main](https://huggingface.co/TheBloke/Spring-Dragon-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.25 GB
77
+
78
+ <!-- README_AWQ.md-provided-files end -->
79
+
80
+ <!-- README_AWQ.md-use-from-vllm start -->
81
+ ## Serving this model from vLLM
82
+
83
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
84
+
85
+ - When using vLLM as a server, pass the `--quantization awq` parameter, for example:
86
+
87
+ ```shell
88
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/Spring-Dragon-AWQ --quantization awq
89
+ ```
90
+
91
+ When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
92
+
93
+ ```python
94
+ from vllm import LLM, SamplingParams
95
+
96
+ prompts = [
97
+ "Hello, my name is",
98
+ "The president of the United States is",
99
+ "The capital of France is",
100
+ "The future of AI is",
101
+ ]
102
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
103
+
104
+ llm = LLM(model="TheBloke/Spring-Dragon-AWQ", quantization="awq")
105
+
106
+ outputs = llm.generate(prompts, sampling_params)
107
+
108
+ # Print the outputs.
109
+ for output in outputs:
110
+ prompt = output.prompt
111
+ generated_text = output.outputs[0].text
112
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
113
+ ```
114
+ <!-- README_AWQ.md-use-from-vllm start -->
115
+
116
+ <!-- README_AWQ.md-use-from-python start -->
117
+ ## How to use this AWQ model from Python code
118
+
119
+ ### Install the necessary packages
120
+
121
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later
122
+
123
+ ```shell
124
+ pip3 install autoawq
125
+ ```
126
+
127
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
128
+
129
+ ```shell
130
+ pip3 uninstall -y autoawq
131
+ git clone https://github.com/casper-hansen/AutoAWQ
132
+ cd AutoAWQ
133
+ pip3 install .
134
+ ```
135
+
136
+ ### You can then try the following example code
137
+
138
+ ```python
139
+ from awq import AutoAWQForCausalLM
140
+ from transformers import AutoTokenizer
141
+
142
+ model_name_or_path = "TheBloke/Spring-Dragon-AWQ"
143
+
144
+ # Load model
145
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
146
+ trust_remote_code=False, safetensors=True)
147
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
148
+
149
+ prompt = "Tell me about AI"
150
+ prompt_template=f'''Info on prompt template will be added shortly.
151
+
152
+ '''
153
+
154
+ print("\n\n*** Generate:")
155
+
156
+ tokens = tokenizer(
157
+ prompt_template,
158
+ return_tensors='pt'
159
+ ).input_ids.cuda()
160
+
161
+ # Generate output
162
+ generation_output = model.generate(
163
+ tokens,
164
+ do_sample=True,
165
+ temperature=0.7,
166
+ top_p=0.95,
167
+ top_k=40,
168
+ max_new_tokens=512
169
+ )
170
+
171
+ print("Output: ", tokenizer.decode(generation_output[0]))
172
+
173
+ # Inference can also be done using transformers' pipeline
174
+ from transformers import pipeline
175
+
176
+ print("*** Pipeline:")
177
+ pipe = pipeline(
178
+ "text-generation",
179
+ model=model,
180
+ tokenizer=tokenizer,
181
+ max_new_tokens=512,
182
+ do_sample=True,
183
+ temperature=0.7,
184
+ top_p=0.95,
185
+ top_k=40,
186
+ repetition_penalty=1.1
187
+ )
188
+
189
+ print(pipe(prompt_template)[0]['generated_text'])
190
+ ```
191
+ <!-- README_AWQ.md-use-from-python end -->
192
+
193
+ <!-- README_AWQ.md-compatibility start -->
194
+ ## Compatibility
195
+
196
+ The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm).
197
+
198
+ [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).
199
+ <!-- README_AWQ.md-compatibility end -->
200
+
201
+ <!-- footer start -->
202
+ <!-- 200823 -->
203
+ ## Discord
204
+
205
+ For further support, and discussions on these models and AI in general, join us at:
206
+
207
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
208
+
209
+ ## Thanks, and how to contribute
210
+
211
+ Thanks to the [chirper.ai](https://chirper.ai) team!
212
+
213
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
214
+
215
+ 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.
216
+
217
+ 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.
218
+
219
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
220
+
221
+ * Patreon: https://patreon.com/TheBlokeAI
222
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
223
+
224
+ **Special thanks to**: Aemon Algiz.
225
+
226
+ **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
227
+
228
+
229
+ Thank you to all my generous patrons and donaters!
230
+
231
+ And thank you again to a16z for their generous grant.
232
+
233
+ <!-- footer end -->
234
+
235
+ # Original model card: Henky!!'s Spring Dragon
236
+
237
+ This model is a recreation attempt of the AI Dungeon 2 Dragon model, to achieve this text_adventures.txt was used that was bundled with the original AI Dungeon 2 github release prior to the online service.
238
+ From what we know the same dataset file was used to create the Dragon model, Dragon being a GPT3 175B Davinci model from 2020.
239
+
240
+ Since LLaMA1 13B has been benchmarking similarly to the original GPT3 175B the hope is that this recreation is faithful to the original Dragon model.
241
+ But, since it is not known how close it performs without releasing it to former AI Dungeon players we dubbed it "Spring Dragon" instead of "Summer Dragon", consider it Dragon in its growing up phase.
242
+
243
+ This model is best used with KoboldAI's adventure mode prefixing your actions with You (2020 AI Dungeon did this automatically) and writing in the second person.
244
+ ## Warning: This model is purposefully flawed and should only be used by people Nostalgic for old 2020 era text adventure models. It is not recommended to be used in model merges, and you can very likely get a much better experience from modern instruct models by asking them to "Start a text adventure game about X"
245
+ ### If the recreation was succesfull expect the following recurring themes:
246
+ Names: Alison, Annah, Ben, Big Red, Brutus, Camid, Captain Hayes, Captain Roldan, Castus, Catia, Count Grey, Cyrus, Dendrin, Dr. Gaange (also Mr Gaange), Dr. Gossey, Dr. Kessel, Dr. Kovas, Durge, Elder Flynn, Elios, Elizabeth/Eliza, Fay, Father Féval, Fenrir, Great Lich Lord, Grolik, Isabella, *Jacob, *Karth, Kyros, Lilith, Lord Rostov, Magos Cern, Meliodas, Mistress, Mr. Matasan, Mr. Mol, Mr. Reynolds, Naji, Quintus, Ral, Rolomag, Rose, (Sir) Kit, Talia, Tanya, The Emperor, Ulivik, *Vamp/*Vampy, Velzix, Yvette, Zalmora/Zal. (* means the AI likes calling the player these)
247
+
248
+ Locations: Dert, Fort Defiance, Fort Glory, Hessla, Holgard, Klyton, Kyros, Nyttrus, Rask, Teckleville, The Delantium Kingdom, The Empire of Man (also called Imperium of Man), The Felkan Kingdom
249
+
250
+ Factions: The Black Rats, Chaos Space Marines, The Crimson Talons, The Dark Order, Dornans (worshippers of Dorna), Ebony Claw Syndicate (often called ECS or The Syndicate), The Empire, Eternals, Joachimites (The Church of Joachim), The Nocturnal League, Psykers, The Shadows, Techpriests, Thieves Guild, Vampire Clan.
251
+
252
+ Deities: Dorna, Joachim, Nyx, Slaanesh, Virgil, Yag.
253
+
254
+ Species/Races: Eternals, Goliaths, Oalkwardners, The Craxil, ghouls,kobolds, orks, psykers, svelks, vampires, wendigos, werewolves.