TheBloke commited on
Commit
4d6973e
1 Parent(s): da07770

Upload new GPTQs with varied parameters

Browse files
Files changed (1) hide show
  1. README.md +83 -26
README.md CHANGED
@@ -1,6 +1,16 @@
1
  ---
2
  inference: false
 
 
3
  license: other
 
 
 
 
 
 
 
 
4
  ---
5
 
6
  <!-- header start -->
@@ -19,43 +29,84 @@ license: other
19
 
20
  # Lilloukas' Platypus 30B GPTQ
21
 
22
- These files are GPTQ 4bit model files for [Lilloukas' Platypus 30B](https://huggingface.co/lilloukas/Platypus-30B).
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/Platypus-30B-GPTQ)
29
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Platypus-30B-GGML)
30
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/lilloukas/Platypus-30B)
31
 
32
- ## How to easily download and use this model in text-generation-webui
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
- Please make sure you're using the latest version of text-generation-webui
 
 
35
 
36
  1. Click the **Model tab**.
37
  2. Under **Download custom model or LoRA**, enter `TheBloke/Platypus-30B-GPTQ`.
 
 
38
  3. Click **Download**.
39
  4. The model will start downloading. Once it's finished it will say "Done"
40
  5. In the top left, click the refresh icon next to **Model**.
41
  6. In the **Model** dropdown, choose the model you just downloaded: `Platypus-30B-GPTQ`
42
  7. The model will automatically load, and is now ready for use!
43
  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.
44
- * 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`.
45
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
46
 
47
  ## How to use this GPTQ model from Python code
48
 
49
  First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
50
 
51
- `pip install auto-gptq`
52
 
53
  Then try the following example code:
54
 
55
  ```python
56
  from transformers import AutoTokenizer, pipeline, logging
57
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
58
- import argparse
59
 
60
  model_name_or_path = "TheBloke/Platypus-30B-GPTQ"
61
  model_basename = "platypus-30b-GPTQ-4bit--1g.act.order"
@@ -65,17 +116,32 @@ use_triton = False
65
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
66
 
67
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
68
- model_basename=model_basename,
69
  use_safetensors=True,
70
  trust_remote_code=False,
71
  device="cuda:0",
72
  use_triton=use_triton,
73
  quantize_config=None)
74
 
75
- # Note: check the prompt template is correct for this model.
 
 
 
 
 
 
 
 
 
 
 
76
  prompt = "Tell me about AI"
77
- prompt_template=f'''USER: {prompt}
78
- ASSISTANT:'''
 
 
 
 
79
 
80
  print("\n\n*** Generate:")
81
 
@@ -102,20 +168,11 @@ pipe = pipeline(
102
  print(pipe(prompt_template)[0]['generated_text'])
103
  ```
104
 
105
- ## Provided files
106
-
107
- **platypus-30b-GPTQ-4bit--1g.act.order.safetensors**
108
-
109
- 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.
110
 
111
- It was created without group_size to lower VRAM requirements, and with --act-order (desc_act) to boost inference accuracy as much as possible.
112
 
113
- * `platypus-30b-GPTQ-4bit--1g.act.order.safetensors`
114
- * Works with AutoGPTQ in CUDA or Triton modes.
115
- * LLaMa models also work with [ExLlama](https://github.com/turboderp/exllama}, which usually provides much higher performance, and uses less VRAM, than AutoGPTQ.
116
- * Works with GPTQ-for-LLaMa in CUDA mode. May have issues with GPTQ-for-LLaMa Triton mode.
117
- * Works with text-generation-webui, including one-click-installers.
118
- * Parameters: Groupsize = -1. Act Order / desc_act = True.
119
 
120
  <!-- footer start -->
121
  ## Discord
@@ -137,9 +194,9 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
137
  * Patreon: https://patreon.com/TheBlokeAI
138
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
139
 
140
- **Special thanks to**: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
141
 
142
- **Patreon special mentions**: Pyrater, WelcomeToTheClub, Kalila, Mano Prime, Trenton Dambrowitz, Spiking Neurons AB, Pierre Kircher, Fen Risland, Kevin Schuppel, Luke, Rainer Wilmers, vamX, Gabriel Puliatti, Alex , Karl Bernard, Ajan Kanaga, Talal Aujan, Space Cruiser, ya boyyy, biorpg, Johann-Peter Hartmann, Asp the Wyvern, Ai Maven, Ghost , Preetika Verma, Nikolai Manek, trip7s trip, John Detwiler, Fred von Graf, Artur Olbinski, subjectnull, John Villwock, Junyu Yang, Rod A, Lone Striker, Chris McCloskey, Iucharbius , Matthew Berman, Illia Dulskyi, Khalefa Al-Ahmad, Imad Khwaja, chris gileta, Willem Michiel, Greatston Gnanesh, Derek Yates, K, Alps Aficionado, Oscar Rangel, David Flickinger, Luke Pendergrass, Deep Realms, Eugene Pentland, Cory Kujawski, terasurfer , Jonathan Leane, senxiiz, Joseph William Delisle, Sean Connelly, webtim, zynix , Nathan LeClaire.
143
 
144
  Thank you to all my generous patrons and donaters!
145
 
 
1
  ---
2
  inference: false
3
+ language:
4
+ - en
5
  license: other
6
+ metrics:
7
+ - MMLU
8
+ - ARC
9
+ - HellaSwag
10
+ - TruthfulQA
11
+ model_type: llama
12
+ tags:
13
+ - llama
14
  ---
15
 
16
  <!-- header start -->
 
29
 
30
  # Lilloukas' Platypus 30B GPTQ
31
 
32
+ These files are GPTQ model files for [Lilloukas' Platypus 30B](https://huggingface.co/lilloukas/Platypus-30B).
33
 
34
+ 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.
35
+
36
+ These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
37
 
38
  ## Repositories available
39
 
40
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Platypus-30B-GPTQ)
41
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Platypus-30B-GGML)
42
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/lilloukas/Platypus-30B)
43
 
44
+ ## Prompt template: Alpaca
45
+
46
+ ```
47
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
48
+
49
+ ### Instruction: {prompt}
50
+
51
+ ### Response:
52
+ ```
53
+
54
+ ## Provided files
55
+
56
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
57
+
58
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
59
+
60
+ | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
61
+ | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
62
+ | 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. |
63
+ | 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. |
64
+ | 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. |
65
+ | gptq-4bit-128g-actorder_True | 4 | 128 | True | 17.55 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 128g uses even less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
66
+ | 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. |
67
+ | gptq-8bit-128g-actorder_False | 8 | 128 | False | 33.73 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
68
+ | 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. |
69
+ | 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. |
70
+
71
+ ## How to download from branches
72
+
73
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Platypus-30B-GPTQ:gptq-4bit-32g-actorder_True`
74
+ - With Git, you can clone a branch with:
75
+ ```
76
+ git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Platypus-30B-GPTQ`
77
+ ```
78
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
79
+
80
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
81
 
82
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
83
+
84
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
85
 
86
  1. Click the **Model tab**.
87
  2. Under **Download custom model or LoRA**, enter `TheBloke/Platypus-30B-GPTQ`.
88
+ - To download from a specific branch, enter for example `TheBloke/Platypus-30B-GPTQ:gptq-4bit-32g-actorder_True`
89
+ - see Provided Files above for the list of branches for each option.
90
  3. Click **Download**.
91
  4. The model will start downloading. Once it's finished it will say "Done"
92
  5. In the top left, click the refresh icon next to **Model**.
93
  6. In the **Model** dropdown, choose the model you just downloaded: `Platypus-30B-GPTQ`
94
  7. The model will automatically load, and is now ready for use!
95
  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.
96
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
97
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
98
 
99
  ## How to use this GPTQ model from Python code
100
 
101
  First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
102
 
103
+ `GITHUB_ACTIONS=true pip install auto-gptq`
104
 
105
  Then try the following example code:
106
 
107
  ```python
108
  from transformers import AutoTokenizer, pipeline, logging
109
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
 
110
 
111
  model_name_or_path = "TheBloke/Platypus-30B-GPTQ"
112
  model_basename = "platypus-30b-GPTQ-4bit--1g.act.order"
 
116
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
117
 
118
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
119
+ model_basename=model_basename
120
  use_safetensors=True,
121
  trust_remote_code=False,
122
  device="cuda:0",
123
  use_triton=use_triton,
124
  quantize_config=None)
125
 
126
+ """
127
+ To download from a specific branch, use the revision parameter, as in this example:
128
+
129
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
130
+ revision="gptq-4bit-32g-actorder_True",
131
+ model_basename=model_basename,
132
+ use_safetensors=True,
133
+ trust_remote_code=False,
134
+ device="cuda:0",
135
+ quantize_config=None)
136
+ """
137
+
138
  prompt = "Tell me about AI"
139
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
140
+
141
+ ### Instruction: {prompt}
142
+
143
+ ### Response:
144
+ '''
145
 
146
  print("\n\n*** Generate:")
147
 
 
168
  print(pipe(prompt_template)[0]['generated_text'])
169
  ```
170
 
171
+ ## Compatibility
 
 
 
 
172
 
173
+ 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.
174
 
175
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
 
 
 
 
176
 
177
  <!-- footer start -->
178
  ## Discord
 
194
  * Patreon: https://patreon.com/TheBlokeAI
195
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
196
 
197
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
198
 
199
+ **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.
200
 
201
  Thank you to all my generous patrons and donaters!
202