TheBloke commited on
Commit
611d5a6
1 Parent(s): 08ea13b

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +169 -72
README.md CHANGED
@@ -1,6 +1,16 @@
1
  ---
 
2
  inference: false
3
  license: other
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
  <!-- header start -->
@@ -20,150 +30,235 @@ license: other
20
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
21
  <!-- header end -->
22
 
23
- # LmSys' Vicuna 33B 1.3 GPTQ
 
 
24
 
25
- These files are GPTQ model files for [LmSys' Vicuna 33B 1.3](https://huggingface.co/lmsys/vicuna-33b-v1.3).
 
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/vicuna-33B-GPTQ)
34
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/vicuna-33B-GGML)
35
- * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/lmsys/vicuna-33b-v1.3)
 
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 | None | True | 16.94 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 | 19.44 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 | 18.18 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 | 17.55 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 | 32.99 GB | False | AutoGPTQ | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
60
- | gptq-3bit--1g-actorder_True | 3 | None | True | 12.92 GB | False | AutoGPTQ | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
61
- | gptq-3bit-128g-actorder_False | 3 | 128 | False | 13.51 GB | False | AutoGPTQ | 3-bit, with group size 128g but no act-order. Slightly higher VRAM requirements than 3-bit None. |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
- ## How to download from branches
64
 
65
- - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/vicuna-33B-GPTQ:gptq-4bit-32g-actorder_True`
66
- - With Git, you can clone a branch with:
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  ```
68
- git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/vicuna-33B-GPTQ`
 
 
 
 
 
69
  ```
70
- - In Python Transformers code, the branch is the `revision` parameter; see below.
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
73
 
74
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
75
 
76
- It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
77
 
78
  1. Click the **Model tab**.
79
  2. Under **Download custom model or LoRA**, enter `TheBloke/vicuna-33B-GPTQ`.
80
  - To download from a specific branch, enter for example `TheBloke/vicuna-33B-GPTQ:gptq-4bit-32g-actorder_True`
81
  - see Provided Files above for the list of branches for each option.
82
  3. Click **Download**.
83
- 4. The model will start downloading. Once it's finished it will say "Done"
84
  5. In the top left, click the refresh icon next to **Model**.
85
  6. In the **Model** dropdown, choose the model you just downloaded: `vicuna-33B-GPTQ`
86
  7. The model will automatically load, and is now ready for use!
87
  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.
88
- * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
89
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
 
90
 
 
91
  ## How to use this GPTQ model from Python code
92
 
93
- First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
94
 
95
- `GITHUB_ACTIONS=true pip install auto-gptq`
96
 
97
- Then try the following example code:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  ```python
100
- from transformers import AutoTokenizer, pipeline, logging
101
- from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
102
 
103
  model_name_or_path = "TheBloke/vicuna-33B-GPTQ"
104
- model_basename = "vicuna-33b-GPTQ-4bit--1g.act.order"
105
-
106
- use_triton = False
 
 
 
107
 
108
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
109
 
110
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
111
- model_basename=model_basename
112
- use_safetensors=True,
113
- trust_remote_code=True,
114
- device="cuda:0",
115
- use_triton=use_triton,
116
- quantize_config=None)
117
-
118
- """
119
- To download from a specific branch, use the revision parameter, as in this example:
120
-
121
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
122
- revision="gptq-4bit-32g-actorder_True",
123
- model_basename=model_basename,
124
- use_safetensors=True,
125
- trust_remote_code=True,
126
- device="cuda:0",
127
- quantize_config=None)
128
- """
129
-
130
  prompt = "Tell me about AI"
131
- 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.
132
-
133
- USER: {prompt}
134
- ASSISTANT:
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 +268,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 +285,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!
@@ -225,13 +322,13 @@ The primary intended users of the model are researchers and hobbyists in natural
225
 
226
  ## How to Get Started with the Model
227
 
228
- Command line interface: https://github.com/lm-sys/FastChat#vicuna-weights.
229
- APIs (OpenAI API, Huggingface API): https://github.com/lm-sys/FastChat/tree/main#api.
230
 
231
  ## Training Details
232
 
233
  Vicuna v1.3 is fine-tuned from LLaMA with supervised instruction fine-tuning.
234
- The training data is around 140K conversations collected from ShareGPT.com.
235
  See more details in the "Training Details of Vicuna Models" section in the appendix of this [paper](https://arxiv.org/pdf/2306.05685.pdf).
236
 
237
  ## Evaluation
 
1
  ---
2
+ base_model: https://huggingface.co/lmsys/vicuna-33b-v1.3
3
  inference: false
4
  license: other
5
+ model_creator: Large Model Systems Organization
6
+ model_name: Vicuna 33B V1.3
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
+ # Vicuna 33B V1.3 - GPTQ
34
+ - Model creator: [Large Model Systems Organization](https://huggingface.co/lmsys)
35
+ - Original model: [Vicuna 33B V1.3](https://huggingface.co/lmsys/vicuna-33b-v1.3)
36
 
37
+ <!-- description start -->
38
+ ## Description
39
 
40
+ This repo contains GPTQ model files for [LmSys' Vicuna 33B 1.3](https://huggingface.co/lmsys/vicuna-33b-v1.3).
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/vicuna-33B-AWQ)
49
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/vicuna-33B-GPTQ)
50
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/vicuna-33B-GGUF)
51
+ * [Large Model Systems Organization's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/lmsys/vicuna-33b-v1.3)
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 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).
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/vicuna-33B-GPTQ/tree/main) | 4 | None | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 16.94 GB | Yes | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
90
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/vicuna-33B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 19.44 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/vicuna-33B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 18.18 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/vicuna-33B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 17.55 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/vicuna-33B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 32.99 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
94
+ | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/vicuna-33B-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 12.92 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
95
+ | [gptq-3bit-128g-actorder_False](https://huggingface.co/TheBloke/vicuna-33B-GPTQ/tree/gptq-3bit-128g-actorder_False) | 3 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 13.51 GB | No | 3-bit, with group size 128g but no act-order. Slightly higher VRAM requirements than 3-bit None. |
96
+
97
+ <!-- README_GPTQ.md-provided-files end -->
98
+
99
+ <!-- README_GPTQ.md-download-from-branches start -->
100
+ ## How to download, including from branches
101
+
102
+ ### In text-generation-webui
103
 
104
+ To download from the `main` branch, enter `TheBloke/vicuna-33B-GPTQ` in the "Download model" box.
105
 
106
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/vicuna-33B-GPTQ:gptq-4bit-32g-actorder_True`
107
+
108
+ ### From the command line
109
+
110
+ I recommend using the `huggingface-hub` Python library:
111
+
112
+ ```shell
113
+ pip3 install huggingface-hub
114
+ ```
115
+
116
+ To download the `main` branch to a folder called `vicuna-33B-GPTQ`:
117
+
118
+ ```shell
119
+ mkdir vicuna-33B-GPTQ
120
+ huggingface-cli download TheBloke/vicuna-33B-GPTQ --local-dir vicuna-33B-GPTQ --local-dir-use-symlinks False
121
  ```
122
+
123
+ To download from a different branch, add the `--revision` parameter:
124
+
125
+ ```shell
126
+ mkdir vicuna-33B-GPTQ
127
+ huggingface-cli download TheBloke/vicuna-33B-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir vicuna-33B-GPTQ --local-dir-use-symlinks False
128
  ```
 
129
 
130
+ <details>
131
+ <summary>More advanced huggingface-cli download usage</summary>
132
+
133
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Huggingface 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.
134
+
135
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
136
+
137
+ 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).
138
+
139
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
140
+
141
+ ```shell
142
+ pip3 install hf_transfer
143
+ ```
144
+
145
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
146
+
147
+ ```shell
148
+ mkdir vicuna-33B-GPTQ
149
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/vicuna-33B-GPTQ --local-dir vicuna-33B-GPTQ --local-dir-use-symlinks False
150
+ ```
151
+
152
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
153
+ </details>
154
+
155
+ ### With `git` (**not** recommended)
156
+
157
+ To clone a specific branch with `git`, use a command like this:
158
+
159
+ ```shell
160
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/vicuna-33B-GPTQ
161
+ ```
162
+
163
+ 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.)
164
+
165
+ <!-- README_GPTQ.md-download-from-branches end -->
166
+ <!-- README_GPTQ.md-text-generation-webui start -->
167
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
168
 
169
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
170
 
171
+ 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.
172
 
173
  1. Click the **Model tab**.
174
  2. Under **Download custom model or LoRA**, enter `TheBloke/vicuna-33B-GPTQ`.
175
  - To download from a specific branch, enter for example `TheBloke/vicuna-33B-GPTQ:gptq-4bit-32g-actorder_True`
176
  - see Provided Files above for the list of branches for each option.
177
  3. Click **Download**.
178
+ 4. The model will start downloading. Once it's finished it will say "Done".
179
  5. In the top left, click the refresh icon next to **Model**.
180
  6. In the **Model** dropdown, choose the model you just downloaded: `vicuna-33B-GPTQ`
181
  7. The model will automatically load, and is now ready for use!
182
  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.
183
+ * 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`.
184
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
185
+ <!-- README_GPTQ.md-text-generation-webui end -->
186
 
187
+ <!-- README_GPTQ.md-use-from-python start -->
188
  ## How to use this GPTQ model from Python code
189
 
190
+ ### Install the necessary packages
191
 
192
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
193
 
194
+ ```shell
195
+ pip3 install transformers optimum
196
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
197
+ ```
198
+
199
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
200
+
201
+ ```shell
202
+ pip3 uninstall -y auto-gptq
203
+ git clone https://github.com/PanQiWei/AutoGPTQ
204
+ cd AutoGPTQ
205
+ git checkout v0.4.2
206
+ pip3 install .
207
+ ```
208
+
209
+ ### You can then use the following code
210
 
211
  ```python
212
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
213
 
214
  model_name_or_path = "TheBloke/vicuna-33B-GPTQ"
215
+ # To use a different branch, change revision
216
+ # For example: revision="gptq-4bit-32g-actorder_True"
217
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
218
+ device_map="auto",
219
+ trust_remote_code=True,
220
+ revision="main")
221
 
222
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
223
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
  prompt = "Tell me about AI"
225
+ 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:
 
 
 
226
  '''
227
 
228
  print("\n\n*** Generate:")
229
 
230
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
231
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
232
  print(tokenizer.decode(output[0]))
233
 
234
  # Inference can also be done using transformers' pipeline
235
 
 
 
 
236
  print("*** Pipeline:")
237
  pipe = pipeline(
238
  "text-generation",
239
  model=model,
240
  tokenizer=tokenizer,
241
  max_new_tokens=512,
242
+ do_sample=True,
243
  temperature=0.7,
244
  top_p=0.95,
245
+ top_k=40,
246
+ repetition_penalty=1.1
247
  )
248
 
249
  print(pipe(prompt_template)[0]['generated_text'])
250
  ```
251
+ <!-- README_GPTQ.md-use-from-python end -->
252
 
253
+ <!-- README_GPTQ.md-compatibility start -->
254
  ## Compatibility
255
 
256
+ 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).
257
 
258
+ [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.
259
+
260
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
261
+ <!-- README_GPTQ.md-compatibility end -->
262
 
263
  <!-- footer start -->
264
  <!-- 200823 -->
 
268
 
269
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
270
 
271
+ ## Thanks, and how to contribute
272
 
273
  Thanks to the [chirper.ai](https://chirper.ai) team!
274
 
275
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
276
+
277
  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.
278
 
279
  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.
 
285
 
286
  **Special thanks to**: Aemon Algiz.
287
 
288
+ **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
289
 
290
 
291
  Thank you to all my generous patrons and donaters!
 
322
 
323
  ## How to Get Started with the Model
324
 
325
+ - Command line interface: https://github.com/lm-sys/FastChat#vicuna-weights.
326
+ - APIs (OpenAI API, Huggingface API): https://github.com/lm-sys/FastChat/tree/main#api.
327
 
328
  ## Training Details
329
 
330
  Vicuna v1.3 is fine-tuned from LLaMA with supervised instruction fine-tuning.
331
+ The training data is around 125K conversations collected from ShareGPT.com.
332
  See more details in the "Training Details of Vicuna Models" section in the appendix of this [paper](https://arxiv.org/pdf/2306.05685.pdf).
333
 
334
  ## Evaluation