TheBloke commited on
Commit
4d3450a
1 Parent(s): 52b6bb5

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +394 -0
README.md ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: smelborp/MixtralOrochi8x7B
3
+ inference: false
4
+ language:
5
+ - en
6
+ license: cc-by-nc-4.0
7
+ model_creator: Smelborp Bumblechump
8
+ model_name: MixtralOrochi8X7B
9
+ model_type: mixtral
10
+ prompt_template: '{prompt}
11
+
12
+ '
13
+ quantized_by: TheBloke
14
+ tags:
15
+ - mixtral
16
+ - uncensored
17
+ - high-intelligence
18
+ ---
19
+ <!-- markdownlint-disable MD041 -->
20
+
21
+ <!-- header start -->
22
+ <!-- 200823 -->
23
+ <div style="width: auto; margin-left: auto; margin-right: auto">
24
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
25
+ </div>
26
+ <div style="display: flex; justify-content: space-between; width: 100%;">
27
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
28
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
29
+ </div>
30
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
31
+ <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>
32
+ </div>
33
+ </div>
34
+ <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>
35
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
36
+ <!-- header end -->
37
+
38
+ # MixtralOrochi8X7B - AWQ
39
+ - Model creator: [Smelborp Bumblechump](https://huggingface.co/smelborp)
40
+ - Original model: [MixtralOrochi8X7B](https://huggingface.co/smelborp/MixtralOrochi8x7B)
41
+
42
+ <!-- description start -->
43
+ ## Description
44
+
45
+ This repo contains AWQ model files for [Smelborp Bumblechump's MixtralOrochi8X7B](https://huggingface.co/smelborp/MixtralOrochi8x7B).
46
+
47
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
48
+
49
+
50
+ **MIXTRAL AWQ**
51
+
52
+ This is a Mixtral AWQ model.
53
+
54
+ For AutoAWQ inference, please install AutoAWQ 0.1.8 or later.
55
+
56
+ Support via Transformers is coming soon, via this PR: https://github.com/huggingface/transformers/pull/27950 which should be merged to Transformers `main` very soon.
57
+
58
+ vLLM: version 0.2.6 is confirmed to support Mixtral AWQs.
59
+
60
+ TGI: I tested version 1.3.3 and it loaded the model fine, but I was not able to get any output back. Further testing/debug is required. (Let me know if you get it working!)
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 with equivalent or better quality compared to the most commonly used GPTQ settings.
65
+
66
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
67
+
68
+ AWQ models are supported by (note that not all of these may support Mixtral models yet - see above):
69
+
70
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
71
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
72
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
73
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
74
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
75
+
76
+ <!-- description end -->
77
+ <!-- repositories-available start -->
78
+ ## Repositories available
79
+
80
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/MixtralOrochi8x7B-AWQ)
81
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/MixtralOrochi8x7B-GPTQ)
82
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/MixtralOrochi8x7B-GGUF)
83
+ * [Smelborp Bumblechump's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/smelborp/MixtralOrochi8x7B)
84
+ <!-- repositories-available end -->
85
+
86
+ <!-- prompt-template start -->
87
+ ## Prompt template: Unknown
88
+
89
+ ```
90
+ {prompt}
91
+
92
+ ```
93
+
94
+ <!-- prompt-template end -->
95
+
96
+
97
+ <!-- README_AWQ.md-provided-files start -->
98
+ ## Provided files, and AWQ parameters
99
+
100
+ I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
101
+
102
+ Models are released as sharded safetensors files.
103
+
104
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
105
+ | ------ | ---- | -- | ----------- | ------- | ---- |
106
+ | [main](https://huggingface.co/TheBloke/MixtralOrochi8x7B-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 24.65 GB
107
+
108
+ <!-- README_AWQ.md-provided-files end -->
109
+
110
+ <!-- README_AWQ.md-text-generation-webui start -->
111
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
112
+
113
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
114
+
115
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
116
+
117
+ 1. Click the **Model tab**.
118
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/MixtralOrochi8x7B-AWQ`.
119
+ 3. Click **Download**.
120
+ 4. The model will start downloading. Once it's finished it will say "Done".
121
+ 5. In the top left, click the refresh icon next to **Model**.
122
+ 6. In the **Model** dropdown, choose the model you just downloaded: `MixtralOrochi8x7B-AWQ`
123
+ 7. Select **Loader: AutoAWQ**.
124
+ 8. Click Load, and the model will load and is now ready for use.
125
+ 9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
126
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
127
+ <!-- README_AWQ.md-text-generation-webui end -->
128
+
129
+ <!-- README_AWQ.md-use-from-vllm start -->
130
+ ## Multi-user inference server: vLLM
131
+
132
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
133
+
134
+ - Please ensure you are using vLLM version 0.2 or later.
135
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
136
+
137
+ For example:
138
+
139
+ ```shell
140
+ python3 -m vllm.entrypoints.api_server --model TheBloke/MixtralOrochi8x7B-AWQ --quantization awq --dtype auto
141
+ ```
142
+
143
+ - When using vLLM from Python code, again set `quantization=awq`.
144
+
145
+ For example:
146
+
147
+ ```python
148
+ from vllm import LLM, SamplingParams
149
+
150
+ prompts = [
151
+ "Tell me about AI",
152
+ "Write a story about llamas",
153
+ "What is 291 - 150?",
154
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
155
+ ]
156
+ prompt_template=f'''{prompt}
157
+ '''
158
+
159
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
160
+
161
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
162
+
163
+ llm = LLM(model="TheBloke/MixtralOrochi8x7B-AWQ", quantization="awq", dtype="auto")
164
+
165
+ outputs = llm.generate(prompts, sampling_params)
166
+
167
+ # Print the outputs.
168
+ for output in outputs:
169
+ prompt = output.prompt
170
+ generated_text = output.outputs[0].text
171
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
172
+ ```
173
+ <!-- README_AWQ.md-use-from-vllm start -->
174
+
175
+ <!-- README_AWQ.md-use-from-tgi start -->
176
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
177
+
178
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
179
+
180
+ Example Docker parameters:
181
+
182
+ ```shell
183
+ --model-id TheBloke/MixtralOrochi8x7B-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
184
+ ```
185
+
186
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
187
+
188
+ ```shell
189
+ pip3 install huggingface-hub
190
+ ```
191
+
192
+ ```python
193
+ from huggingface_hub import InferenceClient
194
+
195
+ endpoint_url = "https://your-endpoint-url-here"
196
+
197
+ prompt = "Tell me about AI"
198
+ prompt_template=f'''{prompt}
199
+ '''
200
+
201
+ client = InferenceClient(endpoint_url)
202
+ response = client.text_generation(prompt,
203
+ max_new_tokens=128,
204
+ do_sample=True,
205
+ temperature=0.7,
206
+ top_p=0.95,
207
+ top_k=40,
208
+ repetition_penalty=1.1)
209
+
210
+ print(f"Model output: ", response)
211
+ ```
212
+ <!-- README_AWQ.md-use-from-tgi end -->
213
+
214
+ <!-- README_AWQ.md-use-from-python start -->
215
+ ## Inference from Python code using Transformers
216
+
217
+ ### Install the necessary packages
218
+
219
+ - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
220
+ - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
221
+
222
+ ```shell
223
+ pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
224
+ ```
225
+
226
+ Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
227
+
228
+ If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
229
+
230
+ ```shell
231
+ pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
232
+ ```
233
+
234
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
235
+
236
+ ```shell
237
+ pip3 uninstall -y autoawq
238
+ git clone https://github.com/casper-hansen/AutoAWQ
239
+ cd AutoAWQ
240
+ pip3 install .
241
+ ```
242
+
243
+ ### Transformers example code (requires Transformers 4.35.0 and later)
244
+
245
+ ```python
246
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
247
+
248
+ model_name_or_path = "TheBloke/MixtralOrochi8x7B-AWQ"
249
+
250
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
251
+ model = AutoModelForCausalLM.from_pretrained(
252
+ model_name_or_path,
253
+ low_cpu_mem_usage=True,
254
+ device_map="cuda:0"
255
+ )
256
+
257
+ # Using the text streamer to stream output one token at a time
258
+ streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
259
+
260
+ prompt = "Tell me about AI"
261
+ prompt_template=f'''{prompt}
262
+ '''
263
+
264
+ # Convert prompt to tokens
265
+ tokens = tokenizer(
266
+ prompt_template,
267
+ return_tensors='pt'
268
+ ).input_ids.cuda()
269
+
270
+ generation_params = {
271
+ "do_sample": True,
272
+ "temperature": 0.7,
273
+ "top_p": 0.95,
274
+ "top_k": 40,
275
+ "max_new_tokens": 512,
276
+ "repetition_penalty": 1.1
277
+ }
278
+
279
+ # Generate streamed output, visible one token at a time
280
+ generation_output = model.generate(
281
+ tokens,
282
+ streamer=streamer,
283
+ **generation_params
284
+ )
285
+
286
+ # Generation without a streamer, which will include the prompt in the output
287
+ generation_output = model.generate(
288
+ tokens,
289
+ **generation_params
290
+ )
291
+
292
+ # Get the tokens from the output, decode them, print them
293
+ token_output = generation_output[0]
294
+ text_output = tokenizer.decode(token_output)
295
+ print("model.generate output: ", text_output)
296
+
297
+ # Inference is also possible via Transformers' pipeline
298
+ from transformers import pipeline
299
+
300
+ pipe = pipeline(
301
+ "text-generation",
302
+ model=model,
303
+ tokenizer=tokenizer,
304
+ **generation_params
305
+ )
306
+
307
+ pipe_output = pipe(prompt_template)[0]['generated_text']
308
+ print("pipeline output: ", pipe_output)
309
+
310
+ ```
311
+ <!-- README_AWQ.md-use-from-python end -->
312
+
313
+ <!-- README_AWQ.md-compatibility start -->
314
+ ## Compatibility
315
+
316
+ The files provided are tested to work with:
317
+
318
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
319
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
320
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
321
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
322
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
323
+
324
+ <!-- README_AWQ.md-compatibility end -->
325
+
326
+ <!-- footer start -->
327
+ <!-- 200823 -->
328
+ ## Discord
329
+
330
+ For further support, and discussions on these models and AI in general, join us at:
331
+
332
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
333
+
334
+ ## Thanks, and how to contribute
335
+
336
+ Thanks to the [chirper.ai](https://chirper.ai) team!
337
+
338
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
339
+
340
+ 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.
341
+
342
+ 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.
343
+
344
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
345
+
346
+ * Patreon: https://patreon.com/TheBlokeAI
347
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
348
+
349
+ **Special thanks to**: Aemon Algiz.
350
+
351
+ **Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros
352
+
353
+
354
+ Thank you to all my generous patrons and donaters!
355
+
356
+ And thank you again to a16z for their generous grant.
357
+
358
+ <!-- footer end -->
359
+
360
+ # Original model card: Smelborp Bumblechump's MixtralOrochi8X7B
361
+
362
+
363
+ # Orochi
364
+
365
+ <img src="https://huggingface.co/smelborp/MixtralOrochi8x7B/resolve/main/orochi.png" width="600" />
366
+
367
+ ## Overview
368
+
369
+ Orochi is a cutting-edge language model based on the Mixtral architecture developed by Mistral. It represents a sophisticated merge of several prominent models, including Mixtral instruct, Noromaid, OpenBuddy, and several others, using mergekit with the DARE merge method. This model aims to provide highly intelligent responses unrestricted by content limitations. The name "Orochi" references the mythical Yamata-no-Orochi, symbolizing the model's multifaceted and powerful capabilities.
370
+
371
+ ## Goals
372
+
373
+ - **Uncensored Content**: To provide unrestricted and comprehensive responses across various domains.
374
+ - **High Intelligence**: Leverage the combined knowledge and capabilities of the merged models to deliver insightful and accurate information.
375
+ - **Innovation in Language Modeling**: Push the boundaries of what's possible in natural language understanding and generation.
376
+
377
+ ## Model Details
378
+
379
+ - **Architecture**: Mixtral, a Mixture of Experts model, underlies Orochi's design, enabling it to specialize and optimize its responses across different tasks and topics.
380
+ - **Merge Strategy**: Utilizing mergekit and the DARE method, Orochi integrates aspects of various models to enhance its performance and capabilities.
381
+
382
+ ## Usage
383
+
384
+ Due to its uncensored nature, Orochi is best utilized in environments where intelligent, unrestricted dialogue is necessary. Users are encouraged to implement their own content moderation or alignment strategies appropriate for their use case.
385
+
386
+ ## Ethical Considerations
387
+
388
+ As an uncensored model, Orochi may generate content that is unsuitable for all audiences. Users are advised to consider the implications of using such a model and to implement suitable safeguards and ethical guidelines.
389
+
390
+ ## Acknowledgements
391
+
392
+ Orochi is a product of numerous contributions from the fields of machine learning and language modeling. Special thanks to the teams behind Mixtral, mergekit, and all the individual models integrated into Orochi.
393
+
394
+ ---