TheBloke commited on
Commit
1e34d5a
1 Parent(s): 321a44c

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +442 -0
README.md ADDED
@@ -0,0 +1,442 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: cloudyu/Mixtral_34Bx2_MoE_60B
3
+ inference: false
4
+ license: cc-by-nc-4.0
5
+ model_creator: hai
6
+ model_name: Mixtral 34Bx2 MoE 60B
7
+ model_type: mixtral
8
+ prompt_template: '{prompt}
9
+
10
+ '
11
+ quantized_by: TheBloke
12
+ ---
13
+ <!-- markdownlint-disable MD041 -->
14
+
15
+ <!-- header start -->
16
+ <!-- 200823 -->
17
+ <div style="width: auto; margin-left: auto; margin-right: auto">
18
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
19
+ </div>
20
+ <div style="display: flex; justify-content: space-between; width: 100%;">
21
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
22
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
23
+ </div>
24
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
25
+ <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>
26
+ </div>
27
+ </div>
28
+ <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>
29
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
30
+ <!-- header end -->
31
+
32
+ # Mixtral 34Bx2 MoE 60B - GPTQ
33
+ - Model creator: [hai](https://huggingface.co/cloudyu)
34
+ - Original model: [Mixtral 34Bx2 MoE 60B](https://huggingface.co/cloudyu/Mixtral_34Bx2_MoE_60B)
35
+
36
+ <!-- description start -->
37
+ # Description
38
+
39
+ This repo contains GPTQ model files for [hai's Mixtral 34Bx2 MoE 60B](https://huggingface.co/cloudyu/Mixtral_34Bx2_MoE_60B).
40
+
41
+ Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
42
+
43
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
44
+
45
+ <!-- description end -->
46
+ <!-- repositories-available start -->
47
+ ## Repositories available
48
+
49
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-AWQ)
50
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ)
51
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GGUF)
52
+ * [hai's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/cloudyu/Mixtral_34Bx2_MoE_60B)
53
+ <!-- repositories-available end -->
54
+
55
+ <!-- prompt-template start -->
56
+ ## Prompt template: None
57
+
58
+ ```
59
+ {prompt}
60
+
61
+ ```
62
+
63
+ <!-- prompt-template end -->
64
+
65
+
66
+
67
+ <!-- README_GPTQ.md-compatible clients start -->
68
+ ## Known compatible clients / servers
69
+
70
+ GPTQ models are currently supported on Linux (NVidia/AMD) and Windows (NVidia only). macOS users: please use GGUF models.
71
+
72
+ These GPTQ models are known to work in the following inference servers/webuis.
73
+
74
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
75
+ - [KoboldAI United](https://github.com/henk717/koboldai)
76
+ - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
77
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
78
+
79
+ This may not be a complete list; if you know of others, please let me know!
80
+ <!-- README_GPTQ.md-compatible clients end -->
81
+
82
+ <!-- README_GPTQ.md-provided-files start -->
83
+ ## Provided files, and GPTQ parameters
84
+
85
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
86
+
87
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
88
+
89
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
90
+
91
+ <details>
92
+ <summary>Explanation of GPTQ parameters</summary>
93
+
94
+ - Bits: The bit size of the quantised model.
95
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
96
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
97
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
98
+ - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
99
+ - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
100
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit.
101
+
102
+ </details>
103
+
104
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
105
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
106
+ | [main](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 31.84 GB | No | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
107
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 32.99 GB | No | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
108
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 36.50 GB | No | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
109
+ | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 24.35 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
110
+ | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ/tree/gptq-3bit-128g-actorder_True) | 3 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 25.45 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False. |
111
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 61.79 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
112
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 63.17 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
113
+
114
+ <!-- README_GPTQ.md-provided-files end -->
115
+
116
+ <!-- README_GPTQ.md-download-from-branches start -->
117
+ ## How to download, including from branches
118
+
119
+ ### In text-generation-webui
120
+
121
+ To download from the `main` branch, enter `TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ` in the "Download model" box.
122
+
123
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ:gptq-4bit-128g-actorder_True`
124
+
125
+ ### From the command line
126
+
127
+ I recommend using the `huggingface-hub` Python library:
128
+
129
+ ```shell
130
+ pip3 install huggingface-hub
131
+ ```
132
+
133
+ To download the `main` branch to a folder called `Mixtral_34Bx2_MoE_60B-GPTQ`:
134
+
135
+ ```shell
136
+ mkdir Mixtral_34Bx2_MoE_60B-GPTQ
137
+ huggingface-cli download TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ --local-dir Mixtral_34Bx2_MoE_60B-GPTQ --local-dir-use-symlinks False
138
+ ```
139
+
140
+ To download from a different branch, add the `--revision` parameter:
141
+
142
+ ```shell
143
+ mkdir Mixtral_34Bx2_MoE_60B-GPTQ
144
+ huggingface-cli download TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ --revision gptq-4bit-128g-actorder_True --local-dir Mixtral_34Bx2_MoE_60B-GPTQ --local-dir-use-symlinks False
145
+ ```
146
+
147
+ <details>
148
+ <summary>More advanced huggingface-cli download usage</summary>
149
+
150
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Hugging Face cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.
151
+
152
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
153
+
154
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
155
+
156
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
157
+
158
+ ```shell
159
+ pip3 install hf_transfer
160
+ ```
161
+
162
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
163
+
164
+ ```shell
165
+ mkdir Mixtral_34Bx2_MoE_60B-GPTQ
166
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ --local-dir Mixtral_34Bx2_MoE_60B-GPTQ --local-dir-use-symlinks False
167
+ ```
168
+
169
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
170
+ </details>
171
+
172
+ ### With `git` (**not** recommended)
173
+
174
+ To clone a specific branch with `git`, use a command like this:
175
+
176
+ ```shell
177
+ git clone --single-branch --branch gptq-4bit-128g-actorder_True https://huggingface.co/TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ
178
+ ```
179
+
180
+ Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.)
181
+
182
+ <!-- README_GPTQ.md-download-from-branches end -->
183
+ <!-- README_GPTQ.md-text-generation-webui start -->
184
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
185
+
186
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
187
+
188
+ 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.
189
+
190
+ 1. Click the **Model tab**.
191
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ`.
192
+
193
+ - To download from a specific branch, enter for example `TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ:gptq-4bit-128g-actorder_True`
194
+ - see Provided Files above for the list of branches for each option.
195
+
196
+ 3. Click **Download**.
197
+ 4. The model will start downloading. Once it's finished it will say "Done".
198
+ 5. In the top left, click the refresh icon next to **Model**.
199
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Mixtral_34Bx2_MoE_60B-GPTQ`
200
+ 7. The model will automatically load, and is now ready for use!
201
+ 8. 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.
202
+
203
+ - Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
204
+
205
+ 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
206
+
207
+ <!-- README_GPTQ.md-text-generation-webui end -->
208
+
209
+ <!-- README_GPTQ.md-use-from-tgi start -->
210
+ ## Serving this model from Text Generation Inference (TGI)
211
+
212
+ It's recommended to use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
213
+
214
+ Example Docker parameters:
215
+
216
+ ```shell
217
+ --model-id TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
218
+ ```
219
+
220
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
221
+
222
+ ```shell
223
+ pip3 install huggingface-hub
224
+ ```
225
+
226
+ ```python
227
+ from huggingface_hub import InferenceClient
228
+
229
+ endpoint_url = "https://your-endpoint-url-here"
230
+
231
+ prompt = "Tell me about AI"
232
+ prompt_template=f'''{prompt}
233
+ '''
234
+
235
+ client = InferenceClient(endpoint_url)
236
+ response = client.text_generation(
237
+ prompt_template,
238
+ max_new_tokens=128,
239
+ do_sample=True,
240
+ temperature=0.7,
241
+ top_p=0.95,
242
+ top_k=40,
243
+ repetition_penalty=1.1
244
+ )
245
+
246
+ print(f"Model output: {response}")
247
+ ```
248
+ <!-- README_GPTQ.md-use-from-tgi end -->
249
+ <!-- README_GPTQ.md-use-from-python start -->
250
+ ## Python code example: inference from this GPTQ model
251
+
252
+ ### Install the necessary packages
253
+
254
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
255
+
256
+ ```shell
257
+ pip3 install --upgrade transformers optimum
258
+ # If using PyTorch 2.1 + CUDA 12.x:
259
+ pip3 install --upgrade auto-gptq
260
+ # or, if using PyTorch 2.1 + CUDA 11.x:
261
+ pip3 install --upgrade auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
262
+ ```
263
+
264
+ If you are using PyTorch 2.0, you will need to install AutoGPTQ from source. Likewise if you have problems with the pre-built wheels, you should try building from source:
265
+
266
+ ```shell
267
+ pip3 uninstall -y auto-gptq
268
+ git clone https://github.com/PanQiWei/AutoGPTQ
269
+ cd AutoGPTQ
270
+ git checkout v0.5.1
271
+ pip3 install .
272
+ ```
273
+
274
+ ### Example Python code
275
+
276
+ ```python
277
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
278
+
279
+ model_name_or_path = "TheBloke/Mixtral_34Bx2_MoE_60B-GPTQ"
280
+ # To use a different branch, change revision
281
+ # For example: revision="gptq-4bit-128g-actorder_True"
282
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
283
+ device_map="auto",
284
+ trust_remote_code=False,
285
+ revision="main")
286
+
287
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
288
+
289
+ prompt = "Write a story about llamas"
290
+ system_message = "You are a story writing assistant"
291
+ prompt_template=f'''{prompt}
292
+ '''
293
+
294
+ print("\n\n*** Generate:")
295
+
296
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
297
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
298
+ print(tokenizer.decode(output[0]))
299
+
300
+ # Inference can also be done using transformers' pipeline
301
+
302
+ print("*** Pipeline:")
303
+ pipe = pipeline(
304
+ "text-generation",
305
+ model=model,
306
+ tokenizer=tokenizer,
307
+ max_new_tokens=512,
308
+ do_sample=True,
309
+ temperature=0.7,
310
+ top_p=0.95,
311
+ top_k=40,
312
+ repetition_penalty=1.1
313
+ )
314
+
315
+ print(pipe(prompt_template)[0]['generated_text'])
316
+ ```
317
+ <!-- README_GPTQ.md-use-from-python end -->
318
+
319
+ <!-- README_GPTQ.md-compatibility start -->
320
+ ## Compatibility
321
+
322
+ The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly.
323
+
324
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama architecture models (including Mistral, Yi, DeepSeek, SOLAR, etc) in 4-bit. Please see the Provided Files table above for per-file compatibility.
325
+
326
+ For a list of clients/servers, please see "Known compatible clients / servers", above.
327
+ <!-- README_GPTQ.md-compatibility end -->
328
+
329
+ <!-- footer start -->
330
+ <!-- 200823 -->
331
+ ## Discord
332
+
333
+ For further support, and discussions on these models and AI in general, join us at:
334
+
335
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
336
+
337
+ ## Thanks, and how to contribute
338
+
339
+ Thanks to the [chirper.ai](https://chirper.ai) team!
340
+
341
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
342
+
343
+ 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.
344
+
345
+ 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.
346
+
347
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
348
+
349
+ * Patreon: https://patreon.com/TheBlokeAI
350
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
351
+
352
+ **Special thanks to**: Aemon Algiz.
353
+
354
+ **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
355
+
356
+
357
+ Thank you to all my generous patrons and donaters!
358
+
359
+ And thank you again to a16z for their generous grant.
360
+
361
+ <!-- footer end -->
362
+
363
+ # Original model card: hai's Mixtral 34Bx2 MoE 60B
364
+
365
+
366
+ # Mixtral MOE 2x34B
367
+
368
+ This is my first English & Chinese MoE Model based on
369
+ * [jondurbin/bagel-dpo-34b-v0.2]
370
+ * [SUSTech/SUS-Chat-34B]
371
+
372
+
373
+ gpu code example
374
+
375
+ ```
376
+ import torch
377
+ from transformers import AutoTokenizer, AutoModelForCausalLM
378
+ import math
379
+
380
+ ## v2 models
381
+ model_path = "cloudyu/Mixtral_34Bx2_MoE_60B"
382
+
383
+ tokenizer = AutoTokenizer.from_pretrained(model_path, use_default_system_prompt=False)
384
+ model = AutoModelForCausalLM.from_pretrained(
385
+ model_path, torch_dtype=torch.float32, device_map='auto',local_files_only=False, load_in_4bit=True
386
+ )
387
+ print(model)
388
+ prompt = input("please input prompt:")
389
+ while len(prompt) > 0:
390
+ input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to("cuda")
391
+
392
+ generation_output = model.generate(
393
+ input_ids=input_ids, max_new_tokens=500,repetition_penalty=1.2
394
+ )
395
+ print(tokenizer.decode(generation_output[0]))
396
+ prompt = input("please input prompt:")
397
+ ```
398
+
399
+ CPU example
400
+
401
+ ```
402
+ import torch
403
+ from transformers import AutoTokenizer, AutoModelForCausalLM
404
+ import math
405
+
406
+ ## v2 models
407
+ model_path = "cloudyu/Mixtral_34Bx2_MoE_60B"
408
+
409
+ tokenizer = AutoTokenizer.from_pretrained(model_path, use_default_system_prompt=False)
410
+ model = AutoModelForCausalLM.from_pretrained(
411
+ model_path, torch_dtype=torch.bfloat16, device_map='cpu'
412
+ )
413
+ print(model)
414
+ prompt = input("please input prompt:")
415
+ while len(prompt) > 0:
416
+ input_ids = tokenizer(prompt, return_tensors="pt").input_ids
417
+
418
+ generation_output = model.generate(
419
+ input_ids=input_ids, max_new_tokens=500,repetition_penalty=1.2
420
+ )
421
+ print(tokenizer.decode(generation_output[0]))
422
+ prompt = input("please input prompt:")
423
+
424
+ ```
425
+
426
+ Output Examples:
427
+ ```
428
+ please input prompt:write a story about yosemite
429
+ write a story about yosemite national park
430
+ Yosemite National Park is located in the Sierra Nevada Mountains of California, USA. It was established on October 1st, 1890 and covers an area of approximately 747,956 acres (302,687 hectares). The park boasts some of America's most iconic natural wonders such as Yosemite Valley, Half Dome, El Capitan, Bridalveil Fall, Tuolumne Meadows, Glacier Point, Mariposa Grove, and many more breathtaking landscapes that attract millions of visitors each year.
431
+
432
+ The history of Yosemite dates back to over seven million years ago when glaciers carved out its stunning granite cliffs and valleys. Native American tribes like Miwok and Paiute have lived here for thousands of years before European explorers arrived during the mid-nineteenth century. In fact, it was John Muir - one of America’s greatest conservationists who helped establish this region as a protected wilderness area by advocating for its preservation through his writings and activism.
433
+
434
+ Today, Yosemite offers various recreational activities including hiking, rock climbing, camping, fishing, horseback riding, wildlife watching, photography, and winter sports like skiing and snowshoeing. Visitors can also enjoy ranger programs, guided tours, educational exhibits at visitor centers, or simply take time to appreciate nature while strolling along scenic trails surrounded by towering sequoia trees, cascading waterfalls, and crystal clear lakes.
435
+
436
+ In addition to preserving these awe-inspiring vistas, Yosemite plays a crucial role in protecting numerous plant and animal species found within its boundaries. Some notable inhabitants include black bears, mountain lions, mule deer, coyotes, bobcats, golden eagles, peregrine falcons, bighorn sheep, and several types of fish native to the Merced River which runs through the heart of the valley.
437
+
438
+ As we continue our journey into the future, let us remember the importance of safeguarding places like Yosemite so they may remain pristine sanctuaries where both humans and animals alike can thrive together amidst unspoiled beauty.</s>
439
+ please input prompt:李开复是谁?
440
+ 李开复是谁?
441
+ 他是一个在人工智能领域有着卓越贡献的科学家,也是一位成功的企业家。他的名字与谷歌、微软等科技巨头紧密相连,他是创新工场的创始人之一,更是无数创业者心中的偶像和导师。然而,除了这些耀眼的光环之外,李开复还有着怎样的故事呢?让我们一起来揭秘这位传奇人物的人生历程吧!</s>
442
+ ```