TheBloke commited on
Commit
a7296dd
β€’
1 Parent(s): 9df807a

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +155 -67
README.md CHANGED
@@ -1,6 +1,16 @@
1
  ---
 
2
  inference: false
3
  license: other
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
  <!-- header start -->
@@ -20,150 +30,185 @@ license: other
20
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
21
  <!-- header end -->
22
 
23
- # WizardLM's WizardLM 13B V1.1 GPTQ
 
 
24
 
25
- These files are GPTQ model files for [WizardLM's WizardLM 13B V1.1](https://huggingface.co/WizardLM/WizardLM-13B-V1.1).
 
26
 
27
- 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.
28
 
29
- These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
30
 
 
 
31
  ## Repositories available
32
 
 
33
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ)
34
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GGML)
35
- * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/WizardLM/WizardLM-13B-V1.1)
 
36
 
 
37
  ## Prompt template: Vicuna
38
 
39
  ```
40
- A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
41
-
42
- USER: {prompt}
43
- ASSISTANT:
44
 
45
  ```
46
 
47
- ## Provided files
 
 
 
 
48
 
49
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
50
 
51
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
52
 
53
- | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
54
- | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
55
- | main | 4 | 128 | False | 7.45 GB | True | GPTQ-for-LLaMa | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
56
- | gptq-4bit-32g-actorder_True | 4 | 32 | True | 8.00 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 32g gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
57
- | gptq-4bit-64g-actorder_True | 4 | 64 | True | 7.51 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 64g uses less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
58
- | gptq-4bit-128g-actorder_True | 4 | 128 | True | 7.26 GB | True | AutoGPTQ | 4-bit, with Act Order androup size. 128g uses even less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
59
- | gptq-8bit--1g-actorder_True | 8 | None | True | 13.36 GB | False | AutoGPTQ | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
60
- | gptq-8bit-128g-actorder_False | 8 | 128 | False | 13.65 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
 
 
 
62
  ## How to download from branches
63
 
64
- - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardLM-13B-V1.1-GPTQ:gptq-4bit-32g-actorder_True`
65
  - With Git, you can clone a branch with:
66
  ```
67
- git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ`
68
  ```
69
  - In Python Transformers code, the branch is the `revision` parameter; see below.
70
-
 
71
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
72
 
73
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
74
 
75
- It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
76
 
77
  1. Click the **Model tab**.
78
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardLM-13B-V1.1-GPTQ`.
79
- - To download from a specific branch, enter for example `TheBloke/WizardLM-13B-V1.1-GPTQ:gptq-4bit-32g-actorder_True`
80
  - see Provided Files above for the list of branches for each option.
81
  3. Click **Download**.
82
- 4. The model will start downloading. Once it's finished it will say "Done"
83
  5. In the top left, click the refresh icon next to **Model**.
84
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardLM-13B-V1.1-GPTQ`
85
  7. The model will automatically load, and is now ready for use!
86
  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.
87
- * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
88
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
 
89
 
 
90
  ## How to use this GPTQ model from Python code
91
 
92
- First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
- `GITHUB_ACTIONS=true pip install auto-gptq`
 
 
 
 
95
 
96
- Then try the following example code:
97
 
98
  ```python
99
- from transformers import AutoTokenizer, pipeline, logging
100
- from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
101
 
102
  model_name_or_path = "TheBloke/WizardLM-13B-V1.1-GPTQ"
103
- model_basename = "wizardlm-13b-v1.1-GPTQ-4bit-128g.no-act.order"
104
-
105
- use_triton = False
 
 
 
106
 
107
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
108
 
109
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
110
- model_basename=model_basename
111
- use_safetensors=True,
112
- trust_remote_code=True,
113
- device="cuda:0",
114
- use_triton=use_triton,
115
- quantize_config=None)
116
-
117
- """
118
- To download from a specific branch, use the revision parameter, as in this example:
119
-
120
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
121
- revision="gptq-4bit-32g-actorder_True",
122
- model_basename=model_basename,
123
- use_safetensors=True,
124
- trust_remote_code=True,
125
- device="cuda:0",
126
- quantize_config=None)
127
- """
128
-
129
  prompt = "Tell me about AI"
130
- prompt_template=f'''A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
131
-
132
- USER: {prompt}
133
- ASSISTANT:
134
 
135
  '''
136
 
137
  print("\n\n*** Generate:")
138
 
139
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
140
- output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
141
  print(tokenizer.decode(output[0]))
142
 
143
  # Inference can also be done using transformers' pipeline
144
 
145
- # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
146
- logging.set_verbosity(logging.CRITICAL)
147
-
148
  print("*** Pipeline:")
149
  pipe = pipeline(
150
  "text-generation",
151
  model=model,
152
  tokenizer=tokenizer,
153
  max_new_tokens=512,
 
154
  temperature=0.7,
155
  top_p=0.95,
156
- repetition_penalty=1.15
 
157
  )
158
 
159
  print(pipe(prompt_template)[0]['generated_text'])
160
  ```
 
161
 
 
162
  ## Compatibility
163
 
164
- 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.
 
 
165
 
166
- ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
167
 
168
  <!-- footer start -->
169
  <!-- 200823 -->
@@ -173,10 +218,12 @@ For further support, and discussions on these models and AI in general, join us
173
 
174
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
175
 
176
- ## Thanks, and how to contribute.
177
 
178
  Thanks to the [chirper.ai](https://chirper.ai) team!
179
 
 
 
180
  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.
181
 
182
  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.
@@ -188,7 +235,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
188
 
189
  **Special thanks to**: Aemon Algiz.
190
 
191
- **Patreon special mentions**: Sam, theTransient, Jonathan Leane, Steven Wood, webtim, Johann-Peter Hartmann, Geoffrey Montalvo, Gabriel Tamborski, Willem Michiel, John Villwock, Derek Yates, Mesiah Bishop, Eugene Pentland, Pieter, Chadd, Stephen Murray, Daniel P. Andersen, terasurfer, Brandon Frisco, Thomas Belote, Sid, Nathan LeClaire, Magnesian, Alps Aficionado, Stanislav Ovsiannikov, Alex, Joseph William Delisle, Nikolai Manek, Michael Davis, Junyu Yang, K, J, Spencer Kim, Stefan Sabev, Olusegun Samson, transmissions 11, Michael Levine, Cory Kujawski, Rainer Wilmers, zynix, Kalila, Luke @flexchar, Ajan Kanaga, Mandus, vamX, Ai Maven, Mano Prime, Matthew Berman, subjectnull, Vitor Caleffi, Clay Pascal, biorpg, alfie_i, 阿明, Jeffrey Morgan, ya boyyy, Raymond Fosdick, knownsqashed, Olakabola, Leonard Tan, ReadyPlayerEmma, Enrico Ros, Dave, Talal Aujan, Illia Dulskyi, Sean Connelly, senxiiz, Artur Olbinski, Elle, Raven Klaugh, Fen Risland, Deep Realms, Imad Khwaja, Fred von Graf, Will Dee, usrbinkat, SuperWojo, Alexandros Triantafyllidis, Swaroop Kallakuri, Dan Guido, John Detwiler, Pedro Madruga, Iucharbius, Viktor Bowallius, Asp the Wyvern, Edmond Seymore, Trenton Dambrowitz, Space Cruiser, Spiking Neurons AB, Pyrater, LangChain4j, Tony Hughes, Kacper WikieΕ‚, Rishabh Srivastava, David Ziegler, Luke Pendergrass, Andrey, Gabriel Puliatti, Lone Striker, Sebastain Graf, Pierre Kircher, Randy H, NimbleBox.ai, Vadim, danny, Deo Leter
192
 
193
 
194
  Thank you to all my generous patrons and donaters!
@@ -203,6 +250,44 @@ And thank you again to a16z for their generous grant.
203
 
204
  This is the **Full-Weight** of WizardLM-13B V1.1 model.
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  **Repository**: https://github.com/nlpxucan/WizardLM
207
 
208
  **Twitter**: https://twitter.com/WizardLM_AI/status/1677282955490918401
@@ -212,3 +297,6 @@ This is the **Full-Weight** of WizardLM-13B V1.1 model.
212
  - πŸ”₯πŸ”₯πŸ”₯ [7/7/2023] The **WizardLM-13B-V1.1** achieves **6.74** on [MT-Bench Leaderboard](https://chat.lmsys.org/?leaderboard), **86.32%** on [AlpacaEval Leaderboard](https://tatsu-lab.github.io/alpaca_eval/), and **99.3%** on [WizardLM Eval](https://github.com/nlpxucan/WizardLM/blob/main/WizardLM/data/WizardLM_testset.jsonl). (Note: MT-Bench and AlpacaEval are all self-test, will push update and request review. All tests are completed under their official settings.)
213
 
214
 
 
 
 
 
1
  ---
2
+ base_model: https://huggingface.co/WizardLM/WizardLM-13B-V1.1
3
  inference: false
4
  license: other
5
+ model_creator: WizardLM
6
+ model_name: WizardLM 13B V1.1
7
+ model_type: llama
8
+ prompt_template: 'A chat between a curious user and an artificial intelligence assistant.
9
+ The assistant gives helpful, detailed, and polite answers to the user''s questions.
10
+ USER: {prompt} ASSISTANT:
11
+
12
+ '
13
+ quantized_by: TheBloke
14
  ---
15
 
16
  <!-- header start -->
 
30
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
31
  <!-- header end -->
32
 
33
+ # WizardLM 13B V1.1 - GPTQ
34
+ - Model creator: [WizardLM](https://huggingface.co/WizardLM)
35
+ - Original model: [WizardLM 13B V1.1](https://huggingface.co/WizardLM/WizardLM-13B-V1.1)
36
 
37
+ <!-- description start -->
38
+ ## Description
39
 
40
+ This repo contains GPTQ model files for [WizardLM's WizardLM 13B V1.1](https://huggingface.co/WizardLM/WizardLM-13B-V1.1).
41
 
42
+ 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.
43
 
44
+ <!-- description end -->
45
+ <!-- repositories-available start -->
46
  ## Repositories available
47
 
48
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-AWQ)
49
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ)
50
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GGUF)
51
+ * [WizardLM's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/WizardLM/WizardLM-13B-V1.1)
52
+ <!-- repositories-available end -->
53
 
54
+ <!-- prompt-template start -->
55
  ## Prompt template: Vicuna
56
 
57
  ```
58
+ A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {prompt} ASSISTANT:
 
 
 
59
 
60
  ```
61
 
62
+ <!-- prompt-template end -->
63
+
64
+
65
+ <!-- README_GPTQ.md-provided-files start -->
66
+ ## Provided files and GPTQ parameters
67
 
68
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
69
 
70
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
71
 
72
+ 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.
73
+
74
+ <details>
75
+ <summary>Explanation of GPTQ parameters</summary>
76
+
77
+ - Bits: The bit size of the quantised model.
78
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
79
+ - 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.
80
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
81
+ - 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).
82
+ - 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.
83
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
84
+
85
+ </details>
86
+
87
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
88
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
89
+ | [main](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ/tree/main) | 4 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 7.45 GB | Yes | 4-bit, without Act Order and group size 128g. |
90
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
91
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
92
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
93
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
94
+ | [gptq-8bit-128g-actorder_False](https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ/tree/gptq-8bit-128g-actorder_False) | 8 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
95
 
96
+ <!-- README_GPTQ.md-provided-files end -->
97
+
98
+ <!-- README_GPTQ.md-download-from-branches start -->
99
  ## How to download from branches
100
 
101
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardLM-13B-V1.1-GPTQ:main`
102
  - With Git, you can clone a branch with:
103
  ```
104
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/WizardLM-13B-V1.1-GPTQ
105
  ```
106
  - In Python Transformers code, the branch is the `revision` parameter; see below.
107
+ <!-- README_GPTQ.md-download-from-branches end -->
108
+ <!-- README_GPTQ.md-text-generation-webui start -->
109
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
110
 
111
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
112
 
113
+ 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.
114
 
115
  1. Click the **Model tab**.
116
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardLM-13B-V1.1-GPTQ`.
117
+ - To download from a specific branch, enter for example `TheBloke/WizardLM-13B-V1.1-GPTQ:main`
118
  - see Provided Files above for the list of branches for each option.
119
  3. Click **Download**.
120
+ 4. The model will start downloading. Once it's finished it will say "Done".
121
  5. In the top left, click the refresh icon next to **Model**.
122
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardLM-13B-V1.1-GPTQ`
123
  7. The model will automatically load, and is now ready for use!
124
  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.
125
+ * 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`.
126
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
127
+ <!-- README_GPTQ.md-text-generation-webui end -->
128
 
129
+ <!-- README_GPTQ.md-use-from-python start -->
130
  ## How to use this GPTQ model from Python code
131
 
132
+ ### Install the necessary packages
133
+
134
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
135
+
136
+ ```shell
137
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
138
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
139
+ ```
140
+
141
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
142
+
143
+ ```shell
144
+ pip3 uninstall -y auto-gptq
145
+ git clone https://github.com/PanQiWei/AutoGPTQ
146
+ cd AutoGPTQ
147
+ pip3 install .
148
+ ```
149
+
150
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
151
 
152
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
153
+ ```shell
154
+ pip3 uninstall -y transformers
155
+ pip3 install git+https://github.com/huggingface/transformers.git
156
+ ```
157
 
158
+ ### You can then use the following code
159
 
160
  ```python
161
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
162
 
163
  model_name_or_path = "TheBloke/WizardLM-13B-V1.1-GPTQ"
164
+ # To use a different branch, change revision
165
+ # For example: revision="main"
166
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
167
+ device_map="auto",
168
+ trust_remote_code=True,
169
+ revision="main")
170
 
171
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  prompt = "Tell me about AI"
174
+ prompt_template=f'''A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {prompt} ASSISTANT:
 
 
 
175
 
176
  '''
177
 
178
  print("\n\n*** Generate:")
179
 
180
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
181
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
182
  print(tokenizer.decode(output[0]))
183
 
184
  # Inference can also be done using transformers' pipeline
185
 
 
 
 
186
  print("*** Pipeline:")
187
  pipe = pipeline(
188
  "text-generation",
189
  model=model,
190
  tokenizer=tokenizer,
191
  max_new_tokens=512,
192
+ do_sample=True,
193
  temperature=0.7,
194
  top_p=0.95,
195
+ top_k=40,
196
+ repetition_penalty=1.1
197
  )
198
 
199
  print(pipe(prompt_template)[0]['generated_text'])
200
  ```
201
+ <!-- README_GPTQ.md-use-from-python end -->
202
 
203
+ <!-- README_GPTQ.md-compatibility start -->
204
  ## Compatibility
205
 
206
+ 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).
207
+
208
+ [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.
209
 
210
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
211
+ <!-- README_GPTQ.md-compatibility end -->
212
 
213
  <!-- footer start -->
214
  <!-- 200823 -->
 
218
 
219
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
220
 
221
+ ## Thanks, and how to contribute
222
 
223
  Thanks to the [chirper.ai](https://chirper.ai) team!
224
 
225
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
226
+
227
  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.
228
 
229
  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.
 
235
 
236
  **Special thanks to**: Aemon Algiz.
237
 
238
+ **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
239
 
240
 
241
  Thank you to all my generous patrons and donaters!
 
250
 
251
  This is the **Full-Weight** of WizardLM-13B V1.1 model.
252
 
253
+ ## WizardLM: Empowering Large Pre-Trained Language Models to Follow Complex Instructions
254
+
255
+
256
+ <p align="center">
257
+ πŸ€— <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>
258
+ </p>
259
+ <p align="center">
260
+ πŸ‘‹ Join our <a href="https://discord.gg/VZjjHtWrKs" target="_blank">Discord</a>
261
+ </p>
262
+
263
+ | Model | Checkpoint | Paper | HumanEval | MBPP | Demo | License |
264
+ | ----- |------| ---- |------|-------| ----- | ----- |
265
+ | 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> |
266
+ | 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> |
267
+ | 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> |
268
+ | 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 | 51.6 | [Demo](http://47.103.63.15:50088/) | <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama2</a> |
269
+ | 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 | -- | <a href="https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement" target="_blank">OpenRAIL-M</a> |
270
+ | 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> |
271
+
272
+ | Model | Checkpoint | Paper | GSM8k | MATH |Online Demo| License|
273
+ | ----- |------| ---- |------|-------| ----- | ----- |
274
+ | WizardMath-70B-V1.0 | πŸ€— <a href="https://huggingface.co/WizardLM/WizardMath-70B-V1.0" target="_blank">HF Link</a> | πŸ“ƒ <a href="https://arxiv.org/abs/2308.09583" target="_blank">[WizardMath]</a>| **81.6** | **22.7** |[Demo](http://47.103.63.15:50083/)| <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama 2 </a> |
275
+ | WizardMath-13B-V1.0 | πŸ€— <a href="https://huggingface.co/WizardLM/WizardMath-13B-V1.0" target="_blank">HF Link</a> | πŸ“ƒ <a href="https://arxiv.org/abs/2308.09583" target="_blank">[WizardMath]</a>| **63.9** | **14.0** |[Demo](http://47.103.63.15:50082/)| <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama 2 </a> |
276
+ | WizardMath-7B-V1.0 | πŸ€— <a href="https://huggingface.co/WizardLM/WizardMath-7B-V1.0" target="_blank">HF Link</a> | πŸ“ƒ <a href="https://arxiv.org/abs/2308.09583" target="_blank">[WizardMath]</a>| **54.9** | **10.7** | [Demo](http://47.103.63.15:50080/)| <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama 2 </a>|
277
+
278
+
279
+ <font size=4>
280
+
281
+ | <sup>Model</sup> | <sup>Checkpoint</sup> | <sup>Paper</sup> |<sup>MT-Bench</sup> | <sup>AlpacaEval</sup> | <sup>WizardEval</sup> | <sup>HumanEval</sup> | <sup>License</sup>|
282
+ | ----- |------| ---- |------|-------| ----- | ----- | ----- |
283
+ | <sup>WizardLM-13B-V1.2</sup> | <sup>πŸ€— <a href="https://huggingface.co/WizardLM/WizardLM-13B-V1.2" target="_blank">HF Link</a> </sup>| | <sup>7.06</sup> | <sup>89.17%</sup> | <sup>101.4% </sup>|<sup>36.6 pass@1</sup>|<sup> <a href="https://ai.meta.com/resources/models-and-libraries/llama-downloads/" target="_blank">Llama 2 License </a></sup> |
284
+ | <sup>WizardLM-13B-V1.1</sup> |<sup> πŸ€— <a href="https://huggingface.co/WizardLM/WizardLM-13B-V1.1" target="_blank">HF Link</a> </sup> | | <sup>6.76</sup> |<sup>86.32%</sup> | <sup>99.3% </sup> |<sup>25.0 pass@1</sup>| <sup>Non-commercial</sup>|
285
+ | <sup>WizardLM-30B-V1.0</sup> | <sup>πŸ€— <a href="https://huggingface.co/WizardLM/WizardLM-30B-V1.0" target="_blank">HF Link</a></sup> | | <sup>7.01</sup> | | <sup>97.8% </sup> | <sup>37.8 pass@1</sup>| <sup>Non-commercial</sup> |
286
+ | <sup>WizardLM-13B-V1.0</sup> | <sup>πŸ€— <a href="https://huggingface.co/WizardLM/WizardLM-13B-V1.0" target="_blank">HF Link</a> </sup> | | <sup>6.35</sup> | <sup>75.31%</sup> | <sup>89.1% </sup> |<sup> 24.0 pass@1 </sup> | <sup>Non-commercial</sup>|
287
+ | <sup>WizardLM-7B-V1.0 </sup>| <sup>πŸ€— <a href="https://huggingface.co/WizardLM/WizardLM-7B-V1.0" target="_blank">HF Link</a> </sup> |<sup> πŸ“ƒ <a href="https://arxiv.org/abs/2304.12244" target="_blank">[WizardLM]</a> </sup>| | | <sup>78.0% </sup> |<sup>19.1 pass@1 </sup>|<sup> Non-commercial</sup>|
288
+ </font>
289
+
290
+
291
  **Repository**: https://github.com/nlpxucan/WizardLM
292
 
293
  **Twitter**: https://twitter.com/WizardLM_AI/status/1677282955490918401
 
297
  - πŸ”₯πŸ”₯πŸ”₯ [7/7/2023] The **WizardLM-13B-V1.1** achieves **6.74** on [MT-Bench Leaderboard](https://chat.lmsys.org/?leaderboard), **86.32%** on [AlpacaEval Leaderboard](https://tatsu-lab.github.io/alpaca_eval/), and **99.3%** on [WizardLM Eval](https://github.com/nlpxucan/WizardLM/blob/main/WizardLM/data/WizardLM_testset.jsonl). (Note: MT-Bench and AlpacaEval are all self-test, will push update and request review. All tests are completed under their official settings.)
298
 
299
 
300
+ ## Inference WizardLM Demo Script
301
+
302
+ We provide the inference WizardLM demo code [here](https://github.com/nlpxucan/WizardLM/tree/main/demo).