TheBloke commited on
Commit
538c35c
1 Parent(s): 7f1831e

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +636 -0
README.md ADDED
@@ -0,0 +1,636 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: WizardLM/WizardCoder-33B-V1.1
3
+ inference: false
4
+ library_name: transformers
5
+ metrics:
6
+ - code_eval
7
+ model-index:
8
+ - name: WizardCoder
9
+ results:
10
+ - dataset:
11
+ name: HumanEval
12
+ type: openai_humaneval
13
+ metrics:
14
+ - name: pass@1
15
+ type: pass@1
16
+ value: 0.799
17
+ verified: false
18
+ task:
19
+ type: text-generation
20
+ model_creator: WizardLM
21
+ model_name: Wizardcoder 33B V1.1
22
+ model_type: deepseek
23
+ prompt_template: 'Below is an instruction that describes a task. Write a response
24
+ that appropriately completes the request.
25
+
26
+
27
+ ### Instruction:
28
+
29
+ {prompt}
30
+
31
+
32
+ ### Response:
33
+
34
+ '
35
+ quantized_by: TheBloke
36
+ tags:
37
+ - code
38
+ ---
39
+ <!-- markdownlint-disable MD041 -->
40
+
41
+ <!-- header start -->
42
+ <!-- 200823 -->
43
+ <div style="width: auto; margin-left: auto; margin-right: auto">
44
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
45
+ </div>
46
+ <div style="display: flex; justify-content: space-between; width: 100%;">
47
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
48
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
49
+ </div>
50
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
51
+ <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>
52
+ </div>
53
+ </div>
54
+ <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>
55
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
56
+ <!-- header end -->
57
+
58
+ # Wizardcoder 33B V1.1 - GPTQ
59
+ - Model creator: [WizardLM](https://huggingface.co/WizardLM)
60
+ - Original model: [Wizardcoder 33B V1.1](https://huggingface.co/WizardLM/WizardCoder-33B-V1.1)
61
+
62
+ <!-- description start -->
63
+ # Description
64
+
65
+ This repo contains GPTQ model files for [WizardLM's Wizardcoder 33B V1.1](https://huggingface.co/WizardLM/WizardCoder-33B-V1.1).
66
+
67
+ 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.
68
+
69
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
70
+
71
+ <!-- description end -->
72
+ <!-- repositories-available start -->
73
+ ## Repositories available
74
+
75
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-AWQ)
76
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ)
77
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GGUF)
78
+ * [WizardLM's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/WizardLM/WizardCoder-33B-V1.1)
79
+ <!-- repositories-available end -->
80
+
81
+ <!-- prompt-template start -->
82
+ ## Prompt template: Alpaca
83
+
84
+ ```
85
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
86
+
87
+ ### Instruction:
88
+ {prompt}
89
+
90
+ ### Response:
91
+
92
+ ```
93
+
94
+ <!-- prompt-template end -->
95
+
96
+
97
+
98
+ <!-- README_GPTQ.md-compatible clients start -->
99
+ ## Known compatible clients / servers
100
+
101
+ GPTQ models are currently supported on Linux (NVidia/AMD) and Windows (NVidia only). macOS users: please use GGUF models.
102
+
103
+ These GPTQ models are known to work in the following inference servers/webuis.
104
+
105
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
106
+ - [KoboldAI United](https://github.com/henk717/koboldai)
107
+ - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
108
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
109
+
110
+ This may not be a complete list; if you know of others, please let me know!
111
+ <!-- README_GPTQ.md-compatible clients end -->
112
+
113
+ <!-- README_GPTQ.md-provided-files start -->
114
+ ## Provided files, and GPTQ parameters
115
+
116
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
117
+
118
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
119
+
120
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
121
+
122
+ <details>
123
+ <summary>Explanation of GPTQ parameters</summary>
124
+
125
+ - Bits: The bit size of the quantised model.
126
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
127
+ - 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.
128
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
129
+ - 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).
130
+ - 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.
131
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit.
132
+
133
+ </details>
134
+
135
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
136
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
137
+ | [main](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1/viewer/) | 8192 | 17.40 GB | Yes | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
138
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1/viewer/) | 8192 | 18.03 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
139
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1/viewer/) | 8192 | 19.96 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
140
+ | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ/tree/gptq-3bit-128g-actorder_True) | 3 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1/viewer/) | 8192 | 13.89 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False. |
141
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1/viewer/) | 8192 | 33.84 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
142
+ | [gptq-3bit-32g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ/tree/gptq-3bit-32g-actorder_True) | 3 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1/viewer/) | 8192 | 15.72 GB | No | 3-bit, with group size 64g and act-order. Highest quality 3-bit option. |
143
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1/viewer/) | 8192 | 34.60 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
144
+
145
+ <!-- README_GPTQ.md-provided-files end -->
146
+
147
+ <!-- README_GPTQ.md-download-from-branches start -->
148
+ ## How to download, including from branches
149
+
150
+ ### In text-generation-webui
151
+
152
+ To download from the `main` branch, enter `TheBloke/WizardCoder-33B-V1.1-GPTQ` in the "Download model" box.
153
+
154
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/WizardCoder-33B-V1.1-GPTQ:gptq-4bit-128g-actorder_True`
155
+
156
+ ### From the command line
157
+
158
+ I recommend using the `huggingface-hub` Python library:
159
+
160
+ ```shell
161
+ pip3 install huggingface-hub
162
+ ```
163
+
164
+ To download the `main` branch to a folder called `WizardCoder-33B-V1.1-GPTQ`:
165
+
166
+ ```shell
167
+ mkdir WizardCoder-33B-V1.1-GPTQ
168
+ huggingface-cli download TheBloke/WizardCoder-33B-V1.1-GPTQ --local-dir WizardCoder-33B-V1.1-GPTQ --local-dir-use-symlinks False
169
+ ```
170
+
171
+ To download from a different branch, add the `--revision` parameter:
172
+
173
+ ```shell
174
+ mkdir WizardCoder-33B-V1.1-GPTQ
175
+ huggingface-cli download TheBloke/WizardCoder-33B-V1.1-GPTQ --revision gptq-4bit-128g-actorder_True --local-dir WizardCoder-33B-V1.1-GPTQ --local-dir-use-symlinks False
176
+ ```
177
+
178
+ <details>
179
+ <summary>More advanced huggingface-cli download usage</summary>
180
+
181
+ 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.
182
+
183
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
184
+
185
+ 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).
186
+
187
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
188
+
189
+ ```shell
190
+ pip3 install hf_transfer
191
+ ```
192
+
193
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
194
+
195
+ ```shell
196
+ mkdir WizardCoder-33B-V1.1-GPTQ
197
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/WizardCoder-33B-V1.1-GPTQ --local-dir WizardCoder-33B-V1.1-GPTQ --local-dir-use-symlinks False
198
+ ```
199
+
200
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
201
+ </details>
202
+
203
+ ### With `git` (**not** recommended)
204
+
205
+ To clone a specific branch with `git`, use a command like this:
206
+
207
+ ```shell
208
+ git clone --single-branch --branch gptq-4bit-128g-actorder_True https://huggingface.co/TheBloke/WizardCoder-33B-V1.1-GPTQ
209
+ ```
210
+
211
+ 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.)
212
+
213
+ <!-- README_GPTQ.md-download-from-branches end -->
214
+ <!-- README_GPTQ.md-text-generation-webui start -->
215
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
216
+
217
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
218
+
219
+ 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.
220
+
221
+ 1. Click the **Model tab**.
222
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/WizardCoder-33B-V1.1-GPTQ`.
223
+
224
+ - To download from a specific branch, enter for example `TheBloke/WizardCoder-33B-V1.1-GPTQ:gptq-4bit-128g-actorder_True`
225
+ - see Provided Files above for the list of branches for each option.
226
+
227
+ 3. Click **Download**.
228
+ 4. The model will start downloading. Once it's finished it will say "Done".
229
+ 5. In the top left, click the refresh icon next to **Model**.
230
+ 6. In the **Model** dropdown, choose the model you just downloaded: `WizardCoder-33B-V1.1-GPTQ`
231
+ 7. The model will automatically load, and is now ready for use!
232
+ 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.
233
+
234
+ - 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`.
235
+
236
+ 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
237
+
238
+ <!-- README_GPTQ.md-text-generation-webui end -->
239
+
240
+ <!-- README_GPTQ.md-use-from-tgi start -->
241
+ ## Serving this model from Text Generation Inference (TGI)
242
+
243
+ 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`
244
+
245
+ Example Docker parameters:
246
+
247
+ ```shell
248
+ --model-id TheBloke/WizardCoder-33B-V1.1-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
249
+ ```
250
+
251
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
252
+
253
+ ```shell
254
+ pip3 install huggingface-hub
255
+ ```
256
+
257
+ ```python
258
+ from huggingface_hub import InferenceClient
259
+
260
+ endpoint_url = "https://your-endpoint-url-here"
261
+
262
+ prompt = "Tell me about AI"
263
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
264
+
265
+ ### Instruction:
266
+ {prompt}
267
+
268
+ ### Response:
269
+ '''
270
+
271
+ client = InferenceClient(endpoint_url)
272
+ response = client.text_generation(
273
+ prompt_template,
274
+ max_new_tokens=128,
275
+ do_sample=True,
276
+ temperature=0.7,
277
+ top_p=0.95,
278
+ top_k=40,
279
+ repetition_penalty=1.1
280
+ )
281
+
282
+ print(f"Model output: {response}")
283
+ ```
284
+ <!-- README_GPTQ.md-use-from-tgi end -->
285
+ <!-- README_GPTQ.md-use-from-python start -->
286
+ ## Python code example: inference from this GPTQ model
287
+
288
+ ### Install the necessary packages
289
+
290
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
291
+
292
+ ```shell
293
+ pip3 install --upgrade transformers optimum
294
+ # If using PyTorch 2.1 + CUDA 12.x:
295
+ pip3 install --upgrade auto-gptq
296
+ # or, if using PyTorch 2.1 + CUDA 11.x:
297
+ pip3 install --upgrade auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
298
+ ```
299
+
300
+ 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:
301
+
302
+ ```shell
303
+ pip3 uninstall -y auto-gptq
304
+ git clone https://github.com/PanQiWei/AutoGPTQ
305
+ cd AutoGPTQ
306
+ git checkout v0.5.1
307
+ pip3 install .
308
+ ```
309
+
310
+ ### Example Python code
311
+
312
+ ```python
313
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
314
+
315
+ model_name_or_path = "TheBloke/WizardCoder-33B-V1.1-GPTQ"
316
+ # To use a different branch, change revision
317
+ # For example: revision="gptq-4bit-128g-actorder_True"
318
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
319
+ device_map="auto",
320
+ trust_remote_code=False,
321
+ revision="main")
322
+
323
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
324
+
325
+ prompt = "Write a story about llamas"
326
+ system_message = "You are a story writing assistant"
327
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
328
+
329
+ ### Instruction:
330
+ {prompt}
331
+
332
+ ### Response:
333
+ '''
334
+
335
+ print("\n\n*** Generate:")
336
+
337
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
338
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
339
+ print(tokenizer.decode(output[0]))
340
+
341
+ # Inference can also be done using transformers' pipeline
342
+
343
+ print("*** Pipeline:")
344
+ pipe = pipeline(
345
+ "text-generation",
346
+ model=model,
347
+ tokenizer=tokenizer,
348
+ max_new_tokens=512,
349
+ do_sample=True,
350
+ temperature=0.7,
351
+ top_p=0.95,
352
+ top_k=40,
353
+ repetition_penalty=1.1
354
+ )
355
+
356
+ print(pipe(prompt_template)[0]['generated_text'])
357
+ ```
358
+ <!-- README_GPTQ.md-use-from-python end -->
359
+
360
+ <!-- README_GPTQ.md-compatibility start -->
361
+ ## Compatibility
362
+
363
+ The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly.
364
+
365
+ [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.
366
+
367
+ For a list of clients/servers, please see "Known compatible clients / servers", above.
368
+ <!-- README_GPTQ.md-compatibility end -->
369
+
370
+ <!-- footer start -->
371
+ <!-- 200823 -->
372
+ ## Discord
373
+
374
+ For further support, and discussions on these models and AI in general, join us at:
375
+
376
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
377
+
378
+ ## Thanks, and how to contribute
379
+
380
+ Thanks to the [chirper.ai](https://chirper.ai) team!
381
+
382
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
383
+
384
+ 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.
385
+
386
+ 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.
387
+
388
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
389
+
390
+ * Patreon: https://patreon.com/TheBlokeAI
391
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
392
+
393
+ **Special thanks to**: Aemon Algiz.
394
+
395
+ **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
396
+
397
+
398
+ Thank you to all my generous patrons and donaters!
399
+
400
+ And thank you again to a16z for their generous grant.
401
+
402
+ <!-- footer end -->
403
+
404
+ # Original model card: WizardLM's Wizardcoder 33B V1.1
405
+
406
+
407
+ ## WizardCoder: Empowering Code Large Language Models with Evol-Instruct
408
+
409
+ <p style="font-size:28px;" align="center">
410
+ 🏠 <a href="https://wizardlm.github.io/" target="_blank">Home Page</a> </p>
411
+ <p align="center">
412
+ <p align="center">
413
+ 🤗 <a href="https://huggingface.co/WizardLM" target="_blank">HF Repo</a> •🐱 <a href="https://github.com/nlpxucan/WizardLM" target="_blank">Github Repo</a> • 🐦 <a href="https://twitter.com/WizardLM_AI" target="_blank">Twitter</a> </p>
414
+ <p align="center">
415
+ 📃 <a href="https://arxiv.org/abs/2304.12244" target="_blank">[WizardLM]</a> • 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> • 📃 <a href="https://arxiv.org/abs/2308.09583" target="_blank">[WizardMath]</a> <br>
416
+ </p>
417
+ <p align="center">
418
+ 👋 Join our <a href="https://discord.gg/VZjjHtWrKs" target="_blank">Discord</a>
419
+ </p>
420
+
421
+ ## News
422
+
423
+ [2023/01/04] 🔥 We released **WizardCoder-33B-V1.1** trained from deepseek-coder-33b-base, the **SOTA OSS Code LLM** on [EvalPlus Leaderboard](https://evalplus.github.io/leaderboard.html), achieves **79.9 pass@1** on HumanEval, **73.2 pass@1** on HumanEval-Plus, **78.9 pass@1** on MBPP, and **66.9 pass@1** on MBPP-Plus.
424
+
425
+ [2023/01/04] 🔥 **WizardCoder-33B-V1.1** outperforms **ChatGPT 3.5**, **Gemini Pro**, and **DeepSeek-Coder-33B-instruct** on HumanEval and HumanEval-Plus pass@1.
426
+
427
+ [2023/01/04] 🔥 **WizardCoder-33B-V1.1** is comparable with **ChatGPT 3.5**, and surpasses **Gemini Pro** on MBPP and MBPP-Plus pass@1.
428
+
429
+ | Model | Checkpoint | Paper | HumanEval | HumanEval+ | MBPP | MBPP+ | License |
430
+ | ----- |------| ---- |------|-------| ----- | ----- |----- |
431
+ | GPT-4-Turbo (Nov 2023) | - | - | 85.4 | 81.7 | 83.0 | 70.7 |-|
432
+ | GPT-4 (May 2023) | - | - | 88.4 | 76.8 | - | - |-|
433
+ | GPT-3.5-Turbo (Nov 2023) | - | - | 72.6 | 65.9 | 81.7 | 69.4 |-|
434
+ | Gemini Pro | - | - | 63.4 | 55.5 | 72.9 | 57.9 |-|
435
+ | DeepSeek-Coder-33B-instruct | - | - | 78.7 | 72.6 | 78.7 | 66.7 |-|
436
+ | **WizardCoder-33B-V1.1** | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-33B-V1.1" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 79.9 | 73.2 | 78.9 | 66.9 | <a href="https://huggingface.co/WizardLM/WizardMath-7B-V1.1/resolve/main/LICENSE" target="_blank">MSFTResearch</a> |
437
+ | WizardCoder-Python-34B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 73.2 | 64.6 | 73.2 | 59.9 | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
438
+ | WizardCoder-15B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-15B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 59.8 | 52.4 | -- | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
439
+ | WizardCoder-Python-13B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-Python-13B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 64.0 | -- | -- | -- | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
440
+ | WizardCoder-Python-7B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-Python-7B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 55.5 | -- | -- | -- | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
441
+ | WizardCoder-3B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-3B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 34.8 | -- | -- | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
442
+ | WizardCoder-1B-V1.0 | 🤗 <a href="https://huggingface.co/WizardLM/WizardCoder-1B-V1.0" target="_blank">HF Link</a> | 📃 <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 23.8 | -- | -- | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
443
+
444
+
445
+ ## ❗ Data Contamination Check:
446
+
447
+ Before model training, we carefully and rigorously checked all the training data, and used multiple deduplication methods to verify and prevent data leakage on HumanEval and MBPP test set.
448
+
449
+ 🔥
450
+ ❗<b>Note for model system prompts usage:</b>
451
+
452
+ Please use **the same systems prompts strictly** with us, and we do not guarantee the accuracy of the **quantified versions**.
453
+
454
+ **Default version:**
455
+
456
+ ```
457
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"
458
+ ```
459
+
460
+
461
+ ## How to Reproduce the Performance of WizardCoder-33B-V1.1
462
+
463
+ We provide all codes [here](https://github.com/nlpxucan/WizardLM/tree/main/WizardCoder/src).
464
+
465
+ We also provide all generated [results](https://github.com/nlpxucan/WizardLM/blob/main/WizardCoder/data/humaneval_mbpp_wizardcoder33b_v1.1_results.zip).
466
+
467
+ ```
468
+ transformers==4.36.2
469
+ vllm==0.2.5
470
+ ```
471
+
472
+ (1) HumanEval and HumanEval-Plus
473
+
474
+ - Step 1
475
+
476
+ Code Generation (w/o accelerate)
477
+ ```bash
478
+ model="WizardLM/WizardCoder-33B-V1.1"
479
+ temp=0.0
480
+ max_len=2048
481
+ pred_num=1
482
+ num_seqs_per_iter=1
483
+
484
+ output_path=preds/T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode
485
+
486
+ mkdir -p ${output_path}
487
+ echo 'Output path: '$output_path
488
+ echo 'Model to eval: '$model
489
+
490
+ # 164 problems, 21 per GPU if GPU=8
491
+ index=0
492
+ gpu_num=8
493
+ for ((i = 0; i < $gpu_num; i++)); do
494
+ start_index=$((i * 21))
495
+ end_index=$(((i + 1) * 21))
496
+
497
+ gpu=$((i))
498
+ echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu}
499
+ ((index++))
500
+ (
501
+ CUDA_VISIBLE_DEVICES=$gpu python humaneval_gen.py --model ${model} \
502
+ --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
503
+ --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --greedy_decode
504
+ ) &
505
+ if (($index % $gpu_num == 0)); then wait; fi
506
+ done
507
+ ```
508
+
509
+ Code Generation (w/ vllm accelerate)
510
+ ```bash
511
+ model="WizardLM/WizardCoder-33B-V1.1"
512
+ temp=0.0
513
+ max_len=2048
514
+ pred_num=1
515
+ num_seqs_per_iter=1
516
+
517
+ output_path=preds/T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode_vllm
518
+
519
+ mkdir -p ${output_path}
520
+ echo 'Output path: '$output_path
521
+ echo 'Model to eval: '$model
522
+
523
+ CUDA_VISIBLE_DEVICES=0,1,2,3 python humaneval_gen_vllm.py --model ${model} \
524
+ --start_index 0 --end_index 164 --temperature ${temp} \
525
+ --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --num_gpus 4 --overwrite
526
+ ```
527
+
528
+ - Step 2: Get the score
529
+
530
+ Install [Eval-Plus](https://github.com/evalplus/evalplus) benchmark.
531
+ ```bash
532
+ git clone https://github.com/evalplus/evalplus.git
533
+ cd evalplus
534
+ export PYTHONPATH=$PYTHONPATH:$(pwd)
535
+ pip install -r requirements.txt
536
+ ```
537
+ Get HumanEval and HumanEval-Plus scores.
538
+ ```bash
539
+ output_path=preds/T0.0_N1_WizardCoder-33B-V1.1_Greedy_Decode
540
+
541
+ echo 'Output path: '$output_path
542
+ python process_humaneval.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
543
+
544
+ evalplus.evaluate --dataset humaneval --samples ${output_path}.jsonl
545
+ ```
546
+
547
+ (2) MBPP and MBPP-Plus
548
+
549
+ The preprocessed questions are provided in [mbppplus.json](https://github.com/nlpxucan/WizardLM/blob/main/WizardCoder/data/mbppplus.json).
550
+
551
+ - Step 1
552
+
553
+ Code Generation (w/o accelerate)
554
+ ```bash
555
+ model="WizardLM/WizardCoder-33B-V1.1"
556
+ temp=0.0
557
+ max_len=2048
558
+ pred_num=1
559
+ num_seqs_per_iter=1
560
+
561
+ output_path=preds/MBPP_T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode
562
+
563
+ mkdir -p ${output_path}
564
+ echo 'Output path: '$output_path
565
+ echo 'Model to eval: '$model
566
+
567
+ # 399 problems, 50 per GPU if GPU=8
568
+ index=0
569
+ gpu_num=8
570
+ for ((i = 0; i < $gpu_num; i++)); do
571
+ start_index=$((i * 50))
572
+ end_index=$(((i + 1) * 50))
573
+
574
+ gpu=$((i))
575
+ echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu}
576
+ ((index++))
577
+ (
578
+ CUDA_VISIBLE_DEVICES=$gpu python mbppplus_gen.py --model ${model} \
579
+ --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
580
+ --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --mbpp_path "mbppplus.json" --greedy_decode
581
+ ) &
582
+ if (($index % $gpu_num == 0)); then wait; fi
583
+ done
584
+ ```
585
+
586
+ Code Generation (w/ vllm accelerate)
587
+ ```bash
588
+ model="WizardLM/WizardCoder-33B-V1.1"
589
+ temp=0.0
590
+ max_len=2048
591
+ pred_num=1
592
+ num_seqs_per_iter=1
593
+
594
+ output_path=preds/MBPP_T${temp}_N${pred_num}_WizardCoder-33B-V1.1_Greedy_Decode_vllm
595
+
596
+ mkdir -p ${output_path}
597
+ echo 'Output path: '$output_path
598
+ echo 'Model to eval: '$model
599
+
600
+ CUDA_VISIBLE_DEVICES=0,1,2,3 python mbppplus_gen_vllm.py --model ${model} \
601
+ --start_index ${start_index} --end_index ${end_index} --temperature ${temp} \
602
+ --num_seqs_per_iter ${num_seqs_per_iter} --N ${pred_num} --max_len ${max_len} --output_path ${output_path} --mbpp_path "mbppplus.json" --num_gpus 4
603
+ ```
604
+
605
+ - Step 2: Get the score
606
+
607
+ Install [Eval-Plus](https://github.com/evalplus/evalplus) benchmark.
608
+ ```bash
609
+ git clone https://github.com/evalplus/evalplus.git
610
+ cd evalplus
611
+ export PYTHONPATH=$PYTHONPATH:$(pwd)
612
+ pip install -r requirements.txt
613
+ ```
614
+ Get HumanEval and HumanEval-Plus scores.
615
+ ```bash
616
+ output_path=preds/MBPP_T0.0_N1_WizardCoder-33B-V1.1_Greedy_Decode
617
+
618
+ echo 'Output path: '$output_path
619
+ python mbppplus_process_preds.py --path ${output_path} --out_path ${output_path}.jsonl --add_prompt
620
+
621
+ evalplus.evaluate --dataset mbpp --samples ${output_path}.jsonl
622
+ ```
623
+
624
+
625
+ ## Citation
626
+
627
+ Please cite the repo if you use the data, method or code in this repo.
628
+
629
+ ```
630
+ @article{luo2023wizardcoder,
631
+ title={WizardCoder: Empowering Code Large Language Models with Evol-Instruct},
632
+ author={Luo, Ziyang and Xu, Can and Zhao, Pu and Sun, Qingfeng and Geng, Xiubo and Hu, Wenxiang and Tao, Chongyang and Ma, Jing and Lin, Qingwei and Jiang, Daxin},
633
+ journal={arXiv preprint arXiv:2306.08568},
634
+ year={2023}
635
+ }
636
+ ```