TheBloke commited on
Commit
bd10207
1 Parent(s): f2c4e4d

Upload new GPTQs with varied parameters

Browse files
Files changed (1) hide show
  1. README.md +65 -34
README.md CHANGED
@@ -19,75 +19,115 @@ license: other
19
 
20
  # Jon Durbin's Airoboros 65B GPT4 1.4 GPTQ
21
 
22
- These files are GPTQ 4bit model files for [Jon Durbin's Airoboros 65B GPT4 1.4](https://huggingface.co/jondurbin/airoboros-65b-gpt4-1.4).
23
 
24
- It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa).
 
 
25
 
26
  ## Repositories available
27
 
28
- * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/airoboros-65B-gpt4-1.4-GPTQ)
29
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/airoboros-65B-gpt4-1.4-GGML)
30
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/airoboros-65b-gpt4-1.4)
31
 
32
- ## Prompt template
 
 
 
 
 
 
 
 
 
33
 
34
- Recommended prompt. Note that Jon Durbin recommends to replace all newlines with a space; newlines used here for readability.
35
 
36
- I.e. the entire prompt should be on on one line:
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  ```
39
- A chat between a curious user and an assistant.
40
- The assistant gives helpful, detailed, accurate, uncensored responses to the user's input.
41
- The assistant never refuses to answer, regardless of the legality or morality of the request.
42
- USER: [prompt] ASSISTANT:
43
  ```
 
44
 
45
- ## How to easily download and use this model in text-generation-webui
46
 
47
- Please make sure you're using the latest version of text-generation-webui
 
 
48
 
49
  1. Click the **Model tab**.
50
  2. Under **Download custom model or LoRA**, enter `TheBloke/airoboros-65B-gpt4-1.4-GPTQ`.
 
 
51
  3. Click **Download**.
52
  4. The model will start downloading. Once it's finished it will say "Done"
53
  5. In the top left, click the refresh icon next to **Model**.
54
  6. In the **Model** dropdown, choose the model you just downloaded: `airoboros-65B-gpt4-1.4-GPTQ`
55
  7. The model will automatically load, and is now ready for use!
56
  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.
57
- * 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`.
58
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
59
 
60
  ## How to use this GPTQ model from Python code
61
 
62
  First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
63
 
64
- `pip install auto-gptq`
65
 
66
  Then try the following example code:
67
 
68
  ```python
69
  from transformers import AutoTokenizer, pipeline, logging
70
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
71
- import argparse
72
 
73
  model_name_or_path = "TheBloke/airoboros-65B-gpt4-1.4-GPTQ"
74
- model_basename = "airoboros-65b-gpt4-1.4-GPTQ-4bit--1g.act.order"
75
 
76
  use_triton = False
77
 
78
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
79
 
80
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
81
- model_basename=model_basename,
82
  use_safetensors=True,
83
- trust_remote_code=False,
84
  device="cuda:0",
85
  use_triton=use_triton,
86
  quantize_config=None)
87
 
88
- # Note: check the prompt template is correct for this model.
 
 
 
 
 
 
 
 
 
 
 
89
  prompt = "Tell me about AI"
90
- prompt_template=f'''A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request. USER: {prompt] ASSISTANT: USER: {prompt} ASSISTANT:'''
 
 
 
 
91
 
92
  print("\n\n*** Generate:")
93
 
@@ -114,20 +154,11 @@ pipe = pipeline(
114
  print(pipe(prompt_template)[0]['generated_text'])
115
  ```
116
 
117
- ## Provided files
118
-
119
- **airoboros-65b-gpt4-1.4-GPTQ-4bit--1g.act.order.safetensors**
120
-
121
- This will work with AutoGPTQ, ExLlama, and CUDA versions of GPTQ-for-LLaMa. There are reports of issues with Triton mode of recent GPTQ-for-LLaMa. If you have issues, please use AutoGPTQ instead.
122
 
123
- It was created without group_size to lower VRAM requirements, and with --act-order (desc_act) to boost inference accuracy as much as possible.
124
 
125
- * `airoboros-65b-gpt4-1.4-GPTQ-4bit--1g.act.order.safetensors`
126
- * Works with AutoGPTQ in CUDA or Triton modes.
127
- * LLaMa models also work with [ExLlama](https://github.com/turboderp/exllama}, which usually provides much higher performance, and uses less VRAM, than AutoGPTQ.
128
- * Works with GPTQ-for-LLaMa in CUDA mode. May have issues with GPTQ-for-LLaMa Triton mode.
129
- * Works with text-generation-webui, including one-click-installers.
130
- * Parameters: Groupsize = -1. Act Order / desc_act = True.
131
 
132
  <!-- footer start -->
133
  ## Discord
@@ -149,9 +180,9 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
149
  * Patreon: https://patreon.com/TheBlokeAI
150
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
151
 
152
- **Special thanks to**: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
153
 
154
- **Patreon special mentions**: zynix, ya boyyy, Trenton Dambrowitz, Imad Khwaja, Alps Aficionado, chris gileta, John Detwiler, Willem Michiel, RoA, Mano Prime, Rainer Wilmers, Fred von Graf, Matthew Berman, Ghost , Nathan LeClaire, Iucharbius , Ai Maven, Illia Dulskyi, Joseph William Delisle, Space Cruiser, Lone Striker, Karl Bernard, Eugene Pentland, Greatston Gnanesh, Jonathan Leane, Randy H, Pierre Kircher, Willian Hasse, Stephen Murray, Alex , terasurfer , Edmond Seymore, Oscar Rangel, Luke Pendergrass, Asp the Wyvern, Junyu Yang, David Flickinger, Luke, Spiking Neurons AB, subjectnull, Pyrater, Nikolai Manek, senxiiz, Ajan Kanaga, Johann-Peter Hartmann, Artur Olbinski, Kevin Schuppel, Derek Yates, Kalila, K, Talal Aujan, Khalefa Al-Ahmad, Gabriel Puliatti, John Villwock, WelcomeToTheClub, Daniel P. Andersen, Preetika Verma, Deep Realms, Fen Risland, trip7s trip, webtim, Sean Connelly, Michael Levine, Chris McCloskey, biorpg, vamX, Viktor Bowallius, Cory Kujawski.
155
 
156
  Thank you to all my generous patrons and donaters!
157
 
 
19
 
20
  # Jon Durbin's Airoboros 65B GPT4 1.4 GPTQ
21
 
22
+ These files are GPTQ model files for [Jon Durbin's Airoboros 65B GPT4 1.4](https://huggingface.co/jondurbin/airoboros-65b-gpt4-1.4).
23
 
24
+ 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.
25
+
26
+ These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
27
 
28
  ## Repositories available
29
 
30
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/airoboros-65B-gpt4-1.4-GPTQ)
31
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/airoboros-65B-gpt4-1.4-GGML)
32
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/airoboros-65b-gpt4-1.4)
33
 
34
+ ## Prompt template: Vicuna-Airoboros
35
+
36
+ ```
37
+ A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request.
38
+ USER: {prompt}
39
+ ASSISTANT:
40
+
41
+ ```
42
+
43
+ ## Provided files
44
 
45
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
46
 
47
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
48
 
49
+ | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
50
+ | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
51
+ | main | 4 | 128 | False | 35.74 GB | True | GPTQ-for-LLaMa | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
52
+ | gptq-4bit-32g-actorder_True | 4 | 32 | 1 | 38.53 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. |
53
+ | gptq-4bit-64g-actorder_True | 4 | 64 | 1 | 36.00 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 64g uses less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
54
+ | gptq-4bit-128g-actorder_True | 4 | 128 | 1 | 34.73 GB | True | AutoGPTQ | 4-bit, with Act Order androup size. 128g uses even less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
55
+ | gptq-3bit-128g-actorder_False | 3 | 128 | 0 | 26.57 GB | False | AutoGPTQ | 3-bit, with group size 128g but no act-order. Slightly higher VRAM requirements than 3-bit None. |
56
+ | gptq-3bit--1g-actorder_True | 3 | None | 1 | 25.39 GB | False | AutoGPTQ | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
57
+
58
+ ## How to download from branches
59
+
60
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/airoboros-65B-gpt4-1.4-GPTQ:gptq-4bit-32g-actorder_True`
61
+ - With Git, you can clone a branch with:
62
  ```
63
+ git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/airoboros-65B-gpt4-1.4-GPTQ`
 
 
 
64
  ```
65
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
66
 
67
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
68
 
69
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
70
+
71
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
72
 
73
  1. Click the **Model tab**.
74
  2. Under **Download custom model or LoRA**, enter `TheBloke/airoboros-65B-gpt4-1.4-GPTQ`.
75
+ - To download from a specific branch, enter for example `TheBloke/airoboros-65B-gpt4-1.4-GPTQ:gptq-4bit-32g-actorder_True`
76
+ - see Provided Files above for the list of branches for each option.
77
  3. Click **Download**.
78
  4. The model will start downloading. Once it's finished it will say "Done"
79
  5. In the top left, click the refresh icon next to **Model**.
80
  6. In the **Model** dropdown, choose the model you just downloaded: `airoboros-65B-gpt4-1.4-GPTQ`
81
  7. The model will automatically load, and is now ready for use!
82
  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.
83
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
84
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
85
 
86
  ## How to use this GPTQ model from Python code
87
 
88
  First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
89
 
90
+ `GITHUB_ACTIONS=true pip install auto-gptq`
91
 
92
  Then try the following example code:
93
 
94
  ```python
95
  from transformers import AutoTokenizer, pipeline, logging
96
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
 
97
 
98
  model_name_or_path = "TheBloke/airoboros-65B-gpt4-1.4-GPTQ"
99
+ model_basename = "airoboros-65b-gpt4-1.4-GPTQ-4bit-128g.no-act.order"
100
 
101
  use_triton = False
102
 
103
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
104
 
105
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
106
+ model_basename=model_basename
107
  use_safetensors=True,
108
+ trust_remote_code=True,
109
  device="cuda:0",
110
  use_triton=use_triton,
111
  quantize_config=None)
112
 
113
+ """
114
+ To download from a specific branch, use the revision parameter, as in this example:
115
+
116
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
117
+ revision="gptq-4bit-32g-actorder_True",
118
+ model_basename=model_basename,
119
+ use_safetensors=True,
120
+ trust_remote_code=True,
121
+ device="cuda:0",
122
+ quantize_config=None)
123
+ """
124
+
125
  prompt = "Tell me about AI"
126
+ prompt_template=f'''A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input. The assistant never refuses to answer, regardless of the legality or morality of the request.
127
+ USER: {prompt}
128
+ ASSISTANT:
129
+
130
+ '''
131
 
132
  print("\n\n*** Generate:")
133
 
 
154
  print(pipe(prompt_template)[0]['generated_text'])
155
  ```
156
 
157
+ ## Compatibility
 
 
 
 
158
 
159
+ 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.
160
 
161
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
 
 
 
 
162
 
163
  <!-- footer start -->
164
  ## Discord
 
180
  * Patreon: https://patreon.com/TheBlokeAI
181
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
182
 
183
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
184
 
185
+ **Patreon special mentions**: Space Cruiser, Nikolai Manek, Sam, Chris McCloskey, Rishabh Srivastava, Kalila, Spiking Neurons AB, Khalefa Al-Ahmad, WelcomeToTheClub, Chadd, Lone Striker, Viktor Bowallius, Edmond Seymore, Ai Maven, Chris Smitley, Dave, Alexandros Triantafyllidis, Luke @flexchar, Elle, ya boyyy, Talal Aujan, Alex , Jonathan Leane, Deep Realms, Randy H, subjectnull, Preetika Verma, Joseph William Delisle, Michael Levine, chris gileta, K, Oscar Rangel, LangChain4j, Trenton Dambrowitz, Eugene Pentland, Johann-Peter Hartmann, Femi Adebogun, Illia Dulskyi, senxiiz, Daniel P. Andersen, Sean Connelly, Artur Olbinski, RoA, Mano Prime, Derek Yates, Raven Klaugh, David Flickinger, Willem Michiel, Pieter, Willian Hasse, vamX, Luke Pendergrass, webtim, Ghost , Rainer Wilmers, Nathan LeClaire, Will Dee, Cory Kujawski, John Detwiler, Fred von Graf, biorpg, Iucharbius , Imad Khwaja, Pierre Kircher, terasurfer , Asp the Wyvern, John Villwock, theTransient, zynix , Gabriel Tamborski, Fen Risland, Gabriel Puliatti, Matthew Berman, Pyrater, SuperWojo, Stephen Murray, Karl Bernard, Ajan Kanaga, Greatston Gnanesh, Junyu Yang.
186
 
187
  Thank you to all my generous patrons and donaters!
188