TheBloke commited on
Commit
5b865e2
1 Parent(s): 1973aee

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +327 -0
README.md ADDED
@@ -0,0 +1,327 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: https://huggingface.co/digitous/13B-HyperMantis
3
+ inference: false
4
+ language:
5
+ - en
6
+ license: other
7
+ model_creator: Erik
8
+ model_name: 13B Hypermantis
9
+ model_type: llama
10
+ prompt_template: 'Below is an instruction that describes a task. Write a response
11
+ that appropriately completes the request.
12
+
13
+
14
+ ### Instruction:
15
+
16
+ {prompt}
17
+
18
+
19
+ ### Response:
20
+
21
+ '
22
+ quantized_by: TheBloke
23
+ tags:
24
+ - llama
25
+ - alpaca
26
+ - vicuna
27
+ - mix
28
+ - merge
29
+ - model merge
30
+ - roleplay
31
+ - chat
32
+ - instruct
33
+ ---
34
+
35
+ <!-- header start -->
36
+ <!-- 200823 -->
37
+ <div style="width: auto; margin-left: auto; margin-right: auto">
38
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
39
+ </div>
40
+ <div style="display: flex; justify-content: space-between; width: 100%;">
41
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
42
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
43
+ </div>
44
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
45
+ <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>
46
+ </div>
47
+ </div>
48
+ <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>
49
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
50
+ <!-- header end -->
51
+
52
+ # 13B Hypermantis - AWQ
53
+ - Model creator: [Erik](https://huggingface.co/digitous)
54
+ - Original model: [13B Hypermantis](https://huggingface.co/digitous/13B-HyperMantis)
55
+
56
+ <!-- description start -->
57
+ ## Description
58
+
59
+ This repo contains AWQ model files for [digitous' 13B HyperMantis](https://huggingface.co/digitous/13B-HyperMantis).
60
+
61
+
62
+ ### About AWQ
63
+
64
+ 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.
65
+
66
+ 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.
67
+ <!-- description end -->
68
+ <!-- repositories-available start -->
69
+ ## Repositories available
70
+
71
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/13B-HyperMantis-AWQ)
72
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/digitous/13B-HyperMantis_GPTQ_4bit-128g)
73
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/13B-HyperMantis-GGUF)
74
+ * [Erik's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/digitous/13B-HyperMantis)
75
+ <!-- repositories-available end -->
76
+
77
+ <!-- prompt-template start -->
78
+ ## Prompt template: Alpaca
79
+
80
+ ```
81
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
82
+
83
+ ### Instruction:
84
+ {prompt}
85
+
86
+ ### Response:
87
+
88
+ ```
89
+
90
+ <!-- prompt-template end -->
91
+ <!-- licensing start -->
92
+ ## Licensing
93
+
94
+ The creator of the source model has listed its license as `other`, and this quantization has therefore used that same license.
95
+
96
+ As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly.
97
+
98
+ In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [digitous' 13B HyperMantis](https://huggingface.co/digitous/13B-HyperMantis).
99
+ <!-- licensing end -->
100
+ <!-- README_AWQ.md-provided-files start -->
101
+ ## Provided files and AWQ parameters
102
+
103
+ 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.
104
+
105
+ Models are released as sharded safetensors files.
106
+
107
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
108
+ | ------ | ---- | -- | ----------- | ------- | ---- |
109
+ | [main](https://huggingface.co/TheBloke/13B-HyperMantis-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.25 GB
110
+
111
+ <!-- README_AWQ.md-provided-files end -->
112
+
113
+ <!-- README_AWQ.md-use-from-vllm start -->
114
+ ## Serving this model from vLLM
115
+
116
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
117
+
118
+ - When using vLLM as a server, pass the `--quantization awq` parameter, for example:
119
+
120
+ ```shell
121
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/13B-HyperMantis-AWQ --quantization awq
122
+ ```
123
+
124
+ When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
125
+
126
+ ```python
127
+ from vllm import LLM, SamplingParams
128
+
129
+ prompts = [
130
+ "Hello, my name is",
131
+ "The president of the United States is",
132
+ "The capital of France is",
133
+ "The future of AI is",
134
+ ]
135
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
136
+
137
+ llm = LLM(model="TheBloke/13B-HyperMantis-AWQ", quantization="awq")
138
+
139
+ outputs = llm.generate(prompts, sampling_params)
140
+
141
+ # Print the outputs.
142
+ for output in outputs:
143
+ prompt = output.prompt
144
+ generated_text = output.outputs[0].text
145
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
146
+ ```
147
+ <!-- README_AWQ.md-use-from-vllm start -->
148
+
149
+ <!-- README_AWQ.md-use-from-python start -->
150
+ ## How to use this AWQ model from Python code
151
+
152
+ ### Install the necessary packages
153
+
154
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later
155
+
156
+ ```shell
157
+ pip3 install autoawq
158
+ ```
159
+
160
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
161
+
162
+ ```shell
163
+ pip3 uninstall -y autoawq
164
+ git clone https://github.com/casper-hansen/AutoAWQ
165
+ cd AutoAWQ
166
+ pip3 install .
167
+ ```
168
+
169
+ ### You can then try the following example code
170
+
171
+ ```python
172
+ from awq import AutoAWQForCausalLM
173
+ from transformers import AutoTokenizer
174
+
175
+ model_name_or_path = "TheBloke/13B-HyperMantis-AWQ"
176
+
177
+ # Load model
178
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
179
+ trust_remote_code=False, safetensors=True)
180
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
181
+
182
+ prompt = "Tell me about AI"
183
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
184
+
185
+ ### Instruction:
186
+ {prompt}
187
+
188
+ ### Response:
189
+
190
+ '''
191
+
192
+ print("\n\n*** Generate:")
193
+
194
+ tokens = tokenizer(
195
+ prompt_template,
196
+ return_tensors='pt'
197
+ ).input_ids.cuda()
198
+
199
+ # Generate output
200
+ generation_output = model.generate(
201
+ tokens,
202
+ do_sample=True,
203
+ temperature=0.7,
204
+ top_p=0.95,
205
+ top_k=40,
206
+ max_new_tokens=512
207
+ )
208
+
209
+ print("Output: ", tokenizer.decode(generation_output[0]))
210
+
211
+ # Inference can also be done using transformers' pipeline
212
+ from transformers import pipeline
213
+
214
+ print("*** Pipeline:")
215
+ pipe = pipeline(
216
+ "text-generation",
217
+ model=model,
218
+ tokenizer=tokenizer,
219
+ max_new_tokens=512,
220
+ do_sample=True,
221
+ temperature=0.7,
222
+ top_p=0.95,
223
+ top_k=40,
224
+ repetition_penalty=1.1
225
+ )
226
+
227
+ print(pipe(prompt_template)[0]['generated_text'])
228
+ ```
229
+ <!-- README_AWQ.md-use-from-python end -->
230
+
231
+ <!-- README_AWQ.md-compatibility start -->
232
+ ## Compatibility
233
+
234
+ The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm).
235
+
236
+ [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).
237
+ <!-- README_AWQ.md-compatibility end -->
238
+
239
+ <!-- footer start -->
240
+ <!-- 200823 -->
241
+ ## Discord
242
+
243
+ For further support, and discussions on these models and AI in general, join us at:
244
+
245
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
246
+
247
+ ## Thanks, and how to contribute
248
+
249
+ Thanks to the [chirper.ai](https://chirper.ai) team!
250
+
251
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
252
+
253
+ 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.
254
+
255
+ 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.
256
+
257
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
258
+
259
+ * Patreon: https://patreon.com/TheBlokeAI
260
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
261
+
262
+ **Special thanks to**: Aemon Algiz.
263
+
264
+ **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
265
+
266
+
267
+ Thank you to all my generous patrons and donaters!
268
+
269
+ And thank you again to a16z for their generous grant.
270
+
271
+ <!-- footer end -->
272
+
273
+ # Original model card: digitous' 13B HyperMantis
274
+
275
+
276
+ ### 13B-HyperMantis
277
+
278
+ is a weight-sum multi model-merge comprised of:
279
+
280
+ ((MantiCore3E+VicunaCocktail)+(SuperCOT+(StorytellingV2+BluemoonRP))) [All 13B Models]
281
+
282
+ (GGML and GPTQ are no longer in this repo and will be migrated to a separate repo for easier git download convenience)
283
+
284
+ Subjective testing shows quality results with KoboldAI (similar results are likely in Text Generation Webui, please disregard KAI-centric settings for that platform); Godlike preset with these tweaks - 2048 context, 800 Output Length, 1.3 Temp, 1.13 Repetition Penalty, AltTextGen:On, AltRepPen:Off, No Prompt Gen:On
285
+
286
+ Despite being primarily uncensored Vicuna models at its core, HyperMantis seems to respond best to the Alpaca instruct format. Speculatively due to manticore's eclectic instruct datasets generalizing the model's understanding of following instruct formats to some degree. What is known is HyperMantis responds best to the formality of Alpaca's format, whereas Human/Assistant appears to trigger vestigial traces of moralizing and servitude that aren't conducive for roleplay or freeform instructions.
287
+
288
+ Here is an example of what to place in KAI's Memory (or TGUI's equivalent) to leverage chat as a Roleplay Adventure.
289
+ [Define what the role of the named Human/AI are here, let's say our name is 'Player' and we named the AI 'Narrator']
290
+
291
+ Game Mode:Chat [Remember to name yourself and the AI and reference them in the instruction block]
292
+
293
+ \#\#\# Instruction:
294
+
295
+ Make Narrator perform as a text based adventure game with Player as Narrator's user input. Make Narrator describe the scene, scenario, actions of characters, reactions of characters to the player's actions, and potential consequences of their actions and Player's actions when relevant with visually descriptive, detailed, and long storytelling. Allow characters and Player to converse to immerse Player in a rich narrative driven story. When Player encounters a new character, Narrator will name the new character and describe their behavior and appearance. Narrator will internally determine their underlying motivations and weave it into the story where possible.
296
+
297
+ \#\#\# Response:
298
+ [Put A Carriage Return Here]
299
+
300
+ In KAI, this is why 'No Prompt Gen:On' is important; make your first entry a short writeup of your current situation, or simply reiterate Narrator is a text adventure game and Player is the input. Then your next entry, despite simply being a chat interface, it will kick off what will happen next for Narrator to riff off of. In TGUI, an equivalent setup works the same. Of course, tailor this to whatever you want it to be; instruct models can be as versatile as your imagination. If things go sideways have fun.
301
+
302
+ Possibly also useful as a regular chatbot, waifu, husbando, TavernAI character, freeform instruct shenanigans, it's whatever. 4bit-128g safetensor [Cuda] included for convenience, might do ggml. Mileage may vary, warranty void if the void stares back.
303
+
304
+ Credits:
305
+
306
+ manticore-13b [Epoch3] by openaccess-ai-collective
307
+
308
+ https://huggingface.co/openaccess-ai-collective/manticore-13b
309
+
310
+ vicuna-13b-cocktail by reeducator
311
+
312
+ https://huggingface.co/reeducator/vicuna-13b-cocktail
313
+
314
+ SuperCOT-LoRA [13B] by kaiokendev
315
+
316
+ https://huggingface.co/kaiokendev/SuperCOT-LoRA
317
+
318
+ Storytelling-LLaMa-LoRA [13B, Version 2] by GamerUnTouch
319
+
320
+ https://huggingface.co/GamerUntouch/Storytelling-LLaMa-LoRAs
321
+
322
+ bluemoonrp-13b by reeducator
323
+
324
+ https://huggingface.co/reeducator/bluemoonrp-13b
325
+
326
+
327
+ "Such as gravity's rainbow, sufficiently complex systems stir emergent behavior near imperceptible, uncanny; a Schrodinger's puzzlebox of what may be intrinsic or agentic. Best not to startle what black box phantoms there may be."