TheBloke commited on
Commit
5601f68
β€’
1 Parent(s): e1ab597

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +112 -56
README.md CHANGED
@@ -1,4 +1,5 @@
1
  ---
 
2
  inference: false
3
  library_name: transformers
4
  license: llama2
@@ -18,9 +19,20 @@ model-index:
18
  task:
19
  type: text-generation
20
  model_creator: WizardLM
21
- model_link: https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0
22
  model_name: WizardCoder Python 34B V1.0
23
  model_type: llama
 
 
 
 
 
 
 
 
 
 
 
 
24
  quantized_by: TheBloke
25
  tags:
26
  - code
@@ -47,19 +59,24 @@ tags:
47
  - Model creator: [WizardLM](https://huggingface.co/WizardLM)
48
  - Original model: [WizardCoder Python 34B V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)
49
 
 
50
  ## Description
51
 
52
  This repo contains GPTQ model files for [WizardLM's WizardCoder Python 34B V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0).
53
 
54
  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.
55
 
 
 
56
  ## Repositories available
57
 
 
58
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ)
59
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GGUF)
60
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GGML)
61
  * [WizardLM's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)
 
62
 
 
63
  ## Prompt template: Alpaca
64
 
65
  ```
@@ -69,22 +86,27 @@ Below is an instruction that describes a task. Write a response that appropriate
69
  {prompt}
70
 
71
  ### Response:
 
72
  ```
73
 
 
 
 
 
74
  ## Provided files and GPTQ parameters
75
 
76
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
77
 
78
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
79
 
80
- All GPTQ files are made with AutoGPTQ.
81
 
82
  <details>
83
  <summary>Explanation of GPTQ parameters</summary>
84
 
85
  - Bits: The bit size of the quantised model.
86
  - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
87
- - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have issues with models that use Act Order plus Group Size.
88
  - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
89
  - GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ 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).
90
  - 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.
@@ -94,88 +116,90 @@ All GPTQ files are made with AutoGPTQ.
94
 
95
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
96
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
97
- | [main](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 17.69 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
98
- | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-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) | 8192 | 20.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
99
- | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 18.98 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
100
- | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-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) | 8192 | 18.33 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
101
  | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.54 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
102
- | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-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) | 8192 | 14.14 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False but poor AutoGPTQ CUDA speed. |
103
 
 
 
 
104
  ## How to download from branches
105
 
106
- - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardCoder-Python-34B-V1.0-GPTQ:gptq-4bit-32g-actorder_True`
107
  - With Git, you can clone a branch with:
108
  ```
109
- git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ
110
  ```
111
  - In Python Transformers code, the branch is the `revision` parameter; see below.
112
-
 
113
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
114
 
115
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
116
 
117
- It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
118
 
119
  1. Click the **Model tab**.
120
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardCoder-Python-34B-V1.0-GPTQ`.
121
- - To download from a specific branch, enter for example `TheBloke/WizardCoder-Python-34B-V1.0-GPTQ:gptq-4bit-32g-actorder_True`
122
  - see Provided Files above for the list of branches for each option.
123
  3. Click **Download**.
124
- 4. The model will start downloading. Once it's finished it will say "Done"
125
  5. In the top left, click the refresh icon next to **Model**.
126
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardCoder-Python-34B-V1.0-GPTQ`
127
  7. The model will automatically load, and is now ready for use!
128
  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.
129
- * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
130
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
 
131
 
 
132
  ## How to use this GPTQ model from Python code
133
 
134
- First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) 0.3.1 or later installed:
135
 
136
- ```
137
- pip3 install auto-gptq
138
- ```
139
 
140
- If you have problems installing AutoGPTQ, please build from source instead:
 
 
141
  ```
 
 
 
 
142
  pip3 uninstall -y auto-gptq
143
  git clone https://github.com/PanQiWei/AutoGPTQ
144
  cd AutoGPTQ
145
  pip3 install .
146
  ```
147
 
148
- Then try the following example code:
 
 
 
 
 
 
 
 
149
 
150
  ```python
151
- from transformers import AutoTokenizer, pipeline, logging
152
- from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
153
 
154
  model_name_or_path = "TheBloke/WizardCoder-Python-34B-V1.0-GPTQ"
155
-
156
- use_triton = False
 
 
 
 
157
 
158
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
159
 
160
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
161
- use_safetensors=True,
162
- trust_remote_code=False,
163
- device="cuda:0",
164
- use_triton=use_triton,
165
- quantize_config=None)
166
-
167
- """
168
- # To download from a specific branch, use the revision parameter, as in this example:
169
- # Note that `revision` requires AutoGPTQ 0.3.1 or later!
170
-
171
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
172
- revision="gptq-4bit-32g-actorder_True",
173
- use_safetensors=True,
174
- trust_remote_code=False,
175
- device="cuda:0",
176
- quantize_config=None)
177
- """
178
-
179
  prompt = "Tell me about AI"
180
  prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
181
 
@@ -183,38 +207,43 @@ prompt_template=f'''Below is an instruction that describes a task. Write a respo
183
  {prompt}
184
 
185
  ### Response:
 
186
  '''
187
 
188
  print("\n\n*** Generate:")
189
 
190
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
191
- output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
192
  print(tokenizer.decode(output[0]))
193
 
194
  # Inference can also be done using transformers' pipeline
195
 
196
- # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
197
- logging.set_verbosity(logging.CRITICAL)
198
-
199
  print("*** Pipeline:")
200
  pipe = pipeline(
201
  "text-generation",
202
  model=model,
203
  tokenizer=tokenizer,
204
  max_new_tokens=512,
 
205
  temperature=0.7,
206
  top_p=0.95,
207
- repetition_penalty=1.15
 
208
  )
209
 
210
  print(pipe(prompt_template)[0]['generated_text'])
211
  ```
 
212
 
 
213
  ## Compatibility
214
 
215
- The files provided will work with AutoGPTQ (CUDA and Triton modes), GPTQ-for-LLaMa (only CUDA has been tested), and Occ4m's GPTQ-for-LLaMa fork.
216
 
217
- ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
 
 
218
 
219
  <!-- footer start -->
220
  <!-- 200823 -->
@@ -224,10 +253,12 @@ For further support, and discussions on these models and AI in general, join us
224
 
225
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
226
 
227
- ## Thanks, and how to contribute.
228
 
229
  Thanks to the [chirper.ai](https://chirper.ai) team!
230
 
 
 
231
  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.
232
 
233
  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.
@@ -239,7 +270,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
239
 
240
  **Special thanks to**: Aemon Algiz.
241
 
242
- **Patreon special mentions**: Kacper WikieΕ‚, knownsqashed, Leonard Tan, Asp the Wyvern, Daniel P. Andersen, Luke Pendergrass, Stanislav Ovsiannikov, RoA, Dave, Ai Maven, Kalila, Will Dee, Imad Khwaja, Nitin Borwankar, Joseph William Delisle, Tony Hughes, Cory Kujawski, Rishabh Srivastava, Russ Johnson, Stephen Murray, Lone Striker, Johann-Peter Hartmann, Elle, J, Deep Realms, SuperWojo, Raven Klaugh, Sebastain Graf, ReadyPlayerEmma, Alps Aficionado, Mano Prime, Derek Yates, Gabriel Puliatti, Mesiah Bishop, Magnesian, Sean Connelly, biorpg, Iucharbius, Olakabola, Fen Risland, Space Cruiser, theTransient, Illia Dulskyi, Thomas Belote, Spencer Kim, Pieter, John Detwiler, Fred von Graf, Michael Davis, Swaroop Kallakuri, subjectnull, Clay Pascal, Subspace Studios, Chris Smitley, Enrico Ros, usrbinkat, Steven Wood, alfie_i, David Ziegler, Willem Michiel, Matthew Berman, Andrey, Pyrater, Jeffrey Morgan, vamX, LangChain4j, Luke @flexchar, Trenton Dambrowitz, Pierre Kircher, Alex, Sam, James Bentley, Edmond Seymore, Eugene Pentland, Pedro Madruga, Rainer Wilmers, Dan Guido, Nathan LeClaire, Spiking Neurons AB, Talal Aujan, zynix, Artur Olbinski, Michael Levine, 阿明, K, John Villwock, Nikolai Manek, Femi Adebogun, senxiiz, Deo Leter, NimbleBox.ai, Viktor Bowallius, Geoffrey Montalvo, Mandus, Ajan Kanaga, ya boyyy, Jonathan Leane, webtim, Brandon Frisco, danny, Alexandros Triantafyllidis, Gabriel Tamborski, Randy H, terasurfer, Vadim, Junyu Yang, Vitor Caleffi, Chadd, transmissions 11
243
 
244
 
245
  Thank you to all my generous patrons and donaters!
@@ -252,7 +283,7 @@ And thank you again to a16z for their generous grant.
252
 
253
 
254
  <p align="center">
255
- πŸ€— <a href="https://huggingface.co/WizardLM" target="_blank">HF Repo</a> β€’ 🐦 <a href="https://twitter.com/WizardLM_AI" target="_blank">Twitter</a> β€’ πŸ“ƒ <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>
256
  </p>
257
  <p align="center">
258
  πŸ‘‹ Join our <a href="https://discord.gg/VZjjHtWrKs" target="_blank">Discord</a>
@@ -268,8 +299,11 @@ And thank you again to a16z for their generous grant.
268
 
269
  | Model | Checkpoint | Paper | HumanEval | MBPP | Demo | License |
270
  | ----- |------| ---- |------|-------| ----- | ----- |
271
- | WizardCoder-Python-34B-V1.0 | πŸ€— <a href="" target="_blank">HF Link</a> | πŸ“ƒ <a href="https://arxiv.org/abs/2306.08568" target="_blank">[WizardCoder]</a> | 73.2 | 61.2 | [Demo](http://47.103.63.15:50085/) | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
272
  | 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 |50.6 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
 
 
 
273
 
274
 
275
  - Our **WizardMath-70B-V1.0** model slightly outperforms some closed-source LLMs on the GSM8K, including **ChatGPT 3.5**, **Claude Instant 1** and **PaLM 2 540B**.
@@ -308,3 +342,25 @@ And thank you again to a16z for their generous grant.
308
  <p align="center" width="100%">
309
  <a ><img src="https://raw.githubusercontent.com/nlpxucan/WizardLM/main/WizardCoder/imgs/compare_sota.png" alt="WizardCoder" style="width: 96%; min-width: 300px; display: block; margin: auto;"></a>
310
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0
3
  inference: false
4
  library_name: transformers
5
  license: llama2
 
19
  task:
20
  type: text-generation
21
  model_creator: WizardLM
 
22
  model_name: WizardCoder Python 34B V1.0
23
  model_type: llama
24
+ prompt_template: 'Below is an instruction that describes a task. Write a response
25
+ that appropriately completes the request.
26
+
27
+
28
+ ### Instruction:
29
+
30
+ {prompt}
31
+
32
+
33
+ ### Response:
34
+
35
+ '
36
  quantized_by: TheBloke
37
  tags:
38
  - code
 
59
  - Model creator: [WizardLM](https://huggingface.co/WizardLM)
60
  - Original model: [WizardCoder Python 34B V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)
61
 
62
+ <!-- description start -->
63
  ## Description
64
 
65
  This repo contains GPTQ model files for [WizardLM's WizardCoder Python 34B V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0).
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
+ <!-- description end -->
70
+ <!-- repositories-available start -->
71
  ## Repositories available
72
 
73
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-AWQ)
74
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ)
75
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GGUF)
 
76
  * [WizardLM's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)
77
+ <!-- repositories-available end -->
78
 
79
+ <!-- prompt-template start -->
80
  ## Prompt template: Alpaca
81
 
82
  ```
 
86
  {prompt}
87
 
88
  ### Response:
89
+
90
  ```
91
 
92
+ <!-- prompt-template end -->
93
+
94
+
95
+ <!-- README_GPTQ.md-provided-files start -->
96
  ## Provided files and GPTQ parameters
97
 
98
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
99
 
100
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
101
 
102
+ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches are made with AutoGPTQ. Files in the `main` branch which were uploaded before August 2023 were made with GPTQ-for-LLaMa.
103
 
104
  <details>
105
  <summary>Explanation of GPTQ parameters</summary>
106
 
107
  - Bits: The bit size of the quantised model.
108
  - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
109
+ - 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.
110
  - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
111
  - GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ 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).
112
  - 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.
 
116
 
117
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
118
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
119
+ | [main](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 17.69 GB | Yes | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
120
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-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) | 8192 | 20.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
121
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 18.98 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
122
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-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) | 8192 | 18.33 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
123
  | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 8192 | 13.54 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
124
+ | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-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) | 8192 | 14.14 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False. |
125
 
126
+ <!-- README_GPTQ.md-provided-files end -->
127
+
128
+ <!-- README_GPTQ.md-download-from-branches start -->
129
  ## How to download from branches
130
 
131
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardCoder-Python-34B-V1.0-GPTQ:main`
132
  - With Git, you can clone a branch with:
133
  ```
134
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/WizardCoder-Python-34B-V1.0-GPTQ
135
  ```
136
  - In Python Transformers code, the branch is the `revision` parameter; see below.
137
+ <!-- README_GPTQ.md-download-from-branches end -->
138
+ <!-- README_GPTQ.md-text-generation-webui start -->
139
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
140
 
141
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
142
 
143
+ 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.
144
 
145
  1. Click the **Model tab**.
146
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardCoder-Python-34B-V1.0-GPTQ`.
147
+ - To download from a specific branch, enter for example `TheBloke/WizardCoder-Python-34B-V1.0-GPTQ:main`
148
  - see Provided Files above for the list of branches for each option.
149
  3. Click **Download**.
150
+ 4. The model will start downloading. Once it's finished it will say "Done".
151
  5. In the top left, click the refresh icon next to **Model**.
152
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardCoder-Python-34B-V1.0-GPTQ`
153
  7. The model will automatically load, and is now ready for use!
154
  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.
155
+ * 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`.
156
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
157
+ <!-- README_GPTQ.md-text-generation-webui end -->
158
 
159
+ <!-- README_GPTQ.md-use-from-python start -->
160
  ## How to use this GPTQ model from Python code
161
 
162
+ ### Install the necessary packages
163
 
164
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
 
 
165
 
166
+ ```shell
167
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
168
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
169
  ```
170
+
171
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
172
+
173
+ ```shell
174
  pip3 uninstall -y auto-gptq
175
  git clone https://github.com/PanQiWei/AutoGPTQ
176
  cd AutoGPTQ
177
  pip3 install .
178
  ```
179
 
180
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
181
+
182
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
183
+ ```shell
184
+ pip3 uninstall -y transformers
185
+ pip3 install git+https://github.com/huggingface/transformers.git
186
+ ```
187
+
188
+ ### You can then use the following code
189
 
190
  ```python
191
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
192
 
193
  model_name_or_path = "TheBloke/WizardCoder-Python-34B-V1.0-GPTQ"
194
+ # To use a different branch, change revision
195
+ # For example: revision="main"
196
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
197
+ device_map="auto",
198
+ trust_remote_code=False,
199
+ revision="main")
200
 
201
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  prompt = "Tell me about AI"
204
  prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
205
 
 
207
  {prompt}
208
 
209
  ### Response:
210
+
211
  '''
212
 
213
  print("\n\n*** Generate:")
214
 
215
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
216
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
217
  print(tokenizer.decode(output[0]))
218
 
219
  # Inference can also be done using transformers' pipeline
220
 
 
 
 
221
  print("*** Pipeline:")
222
  pipe = pipeline(
223
  "text-generation",
224
  model=model,
225
  tokenizer=tokenizer,
226
  max_new_tokens=512,
227
+ do_sample=True,
228
  temperature=0.7,
229
  top_p=0.95,
230
+ top_k=40,
231
+ repetition_penalty=1.1
232
  )
233
 
234
  print(pipe(prompt_template)[0]['generated_text'])
235
  ```
236
+ <!-- README_GPTQ.md-use-from-python end -->
237
 
238
+ <!-- README_GPTQ.md-compatibility start -->
239
  ## Compatibility
240
 
241
+ The files provided are tested to work with AutoGPTQ, both via Transformers and using AutoGPTQ directly. They should also work with [Occ4m's GPTQ-for-LLaMa fork](https://github.com/0cc4m/KoboldAI).
242
 
243
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
244
+
245
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
246
+ <!-- README_GPTQ.md-compatibility end -->
247
 
248
  <!-- footer start -->
249
  <!-- 200823 -->
 
253
 
254
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
255
 
256
+ ## Thanks, and how to contribute
257
 
258
  Thanks to the [chirper.ai](https://chirper.ai) team!
259
 
260
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
261
+
262
  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.
263
 
264
  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.
 
270
 
271
  **Special thanks to**: Aemon Algiz.
272
 
273
+ **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
274
 
275
 
276
  Thank you to all my generous patrons and donaters!
 
283
 
284
 
285
  <p align="center">
286
+ πŸ€— <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> β€’ πŸ“ƒ <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>
287
  </p>
288
  <p align="center">
289
  πŸ‘‹ Join our <a href="https://discord.gg/VZjjHtWrKs" target="_blank">Discord</a>
 
299
 
300
  | Model | Checkpoint | Paper | HumanEval | MBPP | Demo | License |
301
  | ----- |------| ---- |------|-------| ----- | ----- |
302
+ | 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 | 61.2 | [Demo](http://47.103.63.15:50085/) | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
303
  | 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 |50.6 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
304
+ | 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 | 55.6 | -- | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
305
+ | 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 |37.4 | [Demo](http://47.103.63.15:50086/) | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
306
+ | 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 |28.6 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
307
 
308
 
309
  - Our **WizardMath-70B-V1.0** model slightly outperforms some closed-source LLMs on the GSM8K, including **ChatGPT 3.5**, **Claude Instant 1** and **PaLM 2 540B**.
 
342
  <p align="center" width="100%">
343
  <a ><img src="https://raw.githubusercontent.com/nlpxucan/WizardLM/main/WizardCoder/imgs/compare_sota.png" alt="WizardCoder" style="width: 96%; min-width: 300px; display: block; margin: auto;"></a>
344
  </p>
345
+
346
+ ## Prompt Format
347
+ ```
348
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"
349
+ ```
350
+
351
+ ## Inference Demo Script
352
+
353
+ We provide the inference demo code [here](https://github.com/nlpxucan/WizardLM/tree/main/demo).
354
+
355
+ ## Citation
356
+
357
+ Please cite the repo if you use the data, method or code in this repo.
358
+
359
+ ```
360
+ @article{luo2023wizardcoder,
361
+ title={WizardCoder: Empowering Code Large Language Models with Evol-Instruct},
362
+ 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},
363
+ journal={arXiv preprint arXiv:2306.08568},
364
+ year={2023}
365
+ }
366
+ ```