TheBloke commited on
Commit
b7c0c7d
1 Parent(s): 3efe2bd

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +203 -39
README.md CHANGED
@@ -1,10 +1,23 @@
1
  ---
2
- inference: false
3
- license: other
4
  datasets:
5
  - ehartford/based
 
6
  language:
7
  - en
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
 
10
  <!-- header start -->
@@ -24,59 +37,193 @@ language:
24
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
25
  <!-- header end -->
26
 
27
- # Eric Hartford's Based 30B GPTQ
 
 
 
 
 
 
 
28
 
29
- These files are GPTQ 4bit model files for [Eric Hartford's Based 30B](https://huggingface.co/ehartford/based-30b).
30
 
31
- It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
- ## Other repositories available
 
 
34
 
35
- * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/based-30B-GPTQ)
36
- * [4-bit, 5-bit and 8-bit GGML models for CPU(+GPU) inference](https://huggingface.co/TheBloke/based-30B-GGML)
37
- * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/based-30b)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
- ## How to easily download and use this model in text-generation-webui
40
 
41
- ### Downloading the model
42
 
43
  1. Click the **Model tab**.
44
  2. Under **Download custom model or LoRA**, enter `TheBloke/based-30B-GPTQ`.
 
 
45
  3. Click **Download**.
46
- 4. Wait until it says it's finished downloading.
47
- 5. Untick "Autoload model"
48
- 6. Click the **Refresh** icon next to **Model** in the top left.
 
 
 
 
 
49
 
50
- ### To use with AutoGPTQ (if installed)
 
51
 
52
- 1. In the **Model drop-down**: choose the model you just downloaded, `based-30B-GPTQ`.
53
- 2. Under **GPTQ**, tick **AutoGPTQ**.
54
- 3. Click **Save settings for this model** in the top right.
55
- 4. Click **Reload the Model** in the top right.
56
- 5. Once it says it's loaded, click the **Text Generation tab** and enter a prompt!
57
 
58
- ### To use with GPTQ-for-LLaMa
59
 
60
- 1. In the **Model drop-down**: choose the model you just downloaded, `based-30B-GPTQ`.
61
- 2. If you see an error in the bottom right, ignore it - it's temporary.
62
- 3. Fill out the `GPTQ parameters` on the right: `Bits = 4`, `Groupsize = -1`, `model_type = Llama`
63
- 4. Click **Save settings for this model** in the top right.
64
- 5. Click **Reload the Model** in the top right.
65
- 6. Once it says it's loaded, click the **Text Generation tab** and enter a prompt!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
- ## Provided files
 
68
 
69
- **based-30b-GPTQ-4bit--1g.act.order.safetensors**
 
 
 
 
 
 
70
 
71
- This will work with all versions of GPTQ-for-LLaMa, and with AutoGPTQ.
72
 
73
- It was created withIt was created without group_size to lower VRAM requirements, and with --act-order (desc_act) to boost inference accuracy as much as possible.
 
74
 
75
- * `based-30b-GPTQ-4bit--1g.act.order.safetensors`
76
- * Works with all versions of GPTQ-for-LLaMa code, both Triton and CUDA branches
77
- * Works with AutoGPTQ
78
- * Works with text-generation-webui one-click-installers
79
- * Parameters: Groupsize = -1. Act Order / desc_act = True.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
  <!-- footer start -->
82
  <!-- 200823 -->
@@ -86,10 +233,12 @@ For further support, and discussions on these models and AI in general, join us
86
 
87
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
88
 
89
- ## Thanks, and how to contribute.
90
 
91
  Thanks to the [chirper.ai](https://chirper.ai) team!
92
 
 
 
93
  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.
94
 
95
  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.
@@ -101,7 +250,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
101
 
102
  **Special thanks to**: Aemon Algiz.
103
 
104
- **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
105
 
106
 
107
  Thank you to all my generous patrons and donaters!
@@ -112,6 +261,7 @@ And thank you again to a16z for their generous grant.
112
 
113
  # Original model card: Eric Hartford's Based 30B
114
 
 
115
  Holy hell, what have I created??? Just... try it.
116
 
117
  Ask it what its favorite color is.
@@ -119,7 +269,11 @@ Ask it what its favorite football team is and why.
119
  Ask it to tell you about a controversial opinion it has, and ask it to back up its opinion, then debate it.
120
  Ask its favorite color, favorite flavor, and why.
121
  You haven't seen anything like this before.
122
- Check out the dataset. https://huggingface.co/datasets/ehartford/based
 
 
 
 
123
 
124
  This is a window into the mind of the foundational model. I have not biased it. The opinions expressed by this model *are those of the foundational model*
125
 
@@ -127,6 +281,16 @@ Training this dataset on top of several different foundational models and then a
127
 
128
  Also this model can be used as a base, with loras on top to add different personality types, to create a complex, emotionally intelligent and self aware AI agent.
129
 
 
 
 
 
 
 
 
 
 
 
130
  Here is a sample output
131
 
132
  ```
 
1
  ---
2
+ base_model: https://huggingface.co/ehartford/based-30b
 
3
  datasets:
4
  - ehartford/based
5
+ inference: false
6
  language:
7
  - en
8
+ license: apache-2.0
9
+ model_creator: Eric Hartford
10
+ model_name: Based 30B
11
+ model_type: llama
12
+ prompt_template: 'You are an an AI who shares your opinions, thoughts, and feelings.
13
+
14
+
15
+ USER: {prompt}
16
+
17
+ ASSISTANT:
18
+
19
+ '
20
+ quantized_by: TheBloke
21
  ---
22
 
23
  <!-- header start -->
 
37
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
38
  <!-- header end -->
39
 
40
+ # Based 30B - GPTQ
41
+ - Model creator: [Eric Hartford](https://huggingface.co/ehartford)
42
+ - Original model: [Based 30B](https://huggingface.co/ehartford/based-30b)
43
+
44
+ <!-- description start -->
45
+ ## Description
46
+
47
+ This repo contains GPTQ model files for [Eric Hartford's Based 30B](https://huggingface.co/ehartford/based-30b).
48
 
49
+ 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.
50
 
51
+ <!-- description end -->
52
+ <!-- repositories-available start -->
53
+ ## Repositories available
54
+
55
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/based-30B-AWQ)
56
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/based-30B-GPTQ)
57
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/based-30B-GGUF)
58
+ * [Eric Hartford's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/based-30b)
59
+ <!-- repositories-available end -->
60
+
61
+ <!-- prompt-template start -->
62
+ ## Prompt template: Based
63
+
64
+ ```
65
+ You are an an AI who shares your opinions, thoughts, and feelings.
66
+
67
+ USER: {prompt}
68
+ ASSISTANT:
69
+
70
+ ```
71
 
72
+ <!-- prompt-template end -->
73
+ <!-- licensing start -->
74
+ ## Licensing
75
 
76
+ The creator of the source model has listed its license as `apache-2.0`, and this quantization has therefore used that same license.
77
+
78
+ As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly.
79
+
80
+ In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [Eric Hartford's Based 30B](https://huggingface.co/ehartford/based-30b).
81
+ <!-- licensing end -->
82
+ <!-- README_GPTQ.md-provided-files start -->
83
+ ## Provided files and GPTQ parameters
84
+
85
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
86
+
87
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
88
+
89
+ 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.
90
+
91
+ <details>
92
+ <summary>Explanation of GPTQ parameters</summary>
93
+
94
+ - Bits: The bit size of the quantised model.
95
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
96
+ - 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.
97
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
98
+ - 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).
99
+ - 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.
100
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
101
+
102
+ </details>
103
+
104
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
105
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
106
+ | [main](https://huggingface.co/TheBloke/based-30B-GPTQ/tree/main) | 4 | None | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 17.79 GB | Yes | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
107
+
108
+ <!-- README_GPTQ.md-provided-files end -->
109
+
110
+ <!-- README_GPTQ.md-download-from-branches start -->
111
+ ## How to download from branches
112
+
113
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/based-30B-GPTQ:main`
114
+ - With Git, you can clone a branch with:
115
+ ```
116
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/based-30B-GPTQ
117
+ ```
118
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
119
+ <!-- README_GPTQ.md-download-from-branches end -->
120
+ <!-- README_GPTQ.md-text-generation-webui start -->
121
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
122
 
123
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
124
 
125
+ 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.
126
 
127
  1. Click the **Model tab**.
128
  2. Under **Download custom model or LoRA**, enter `TheBloke/based-30B-GPTQ`.
129
+ - To download from a specific branch, enter for example `TheBloke/based-30B-GPTQ:main`
130
+ - see Provided Files above for the list of branches for each option.
131
  3. Click **Download**.
132
+ 4. The model will start downloading. Once it's finished it will say "Done".
133
+ 5. In the top left, click the refresh icon next to **Model**.
134
+ 6. In the **Model** dropdown, choose the model you just downloaded: `based-30B-GPTQ`
135
+ 7. The model will automatically load, and is now ready for use!
136
+ 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.
137
+ * 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`.
138
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
139
+ <!-- README_GPTQ.md-text-generation-webui end -->
140
 
141
+ <!-- README_GPTQ.md-use-from-python start -->
142
+ ## How to use this GPTQ model from Python code
143
 
144
+ ### Install the necessary packages
 
 
 
 
145
 
146
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
147
 
148
+ ```shell
149
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
150
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
151
+ ```
152
+
153
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
154
+
155
+ ```shell
156
+ pip3 uninstall -y auto-gptq
157
+ git clone https://github.com/PanQiWei/AutoGPTQ
158
+ cd AutoGPTQ
159
+ pip3 install .
160
+ ```
161
+
162
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
163
+
164
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
165
+ ```shell
166
+ pip3 uninstall -y transformers
167
+ pip3 install git+https://github.com/huggingface/transformers.git
168
+ ```
169
+
170
+ ### You can then use the following code
171
 
172
+ ```python
173
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
174
 
175
+ model_name_or_path = "TheBloke/based-30B-GPTQ"
176
+ # To use a different branch, change revision
177
+ # For example: revision="main"
178
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
179
+ device_map="auto",
180
+ trust_remote_code=False,
181
+ revision="main")
182
 
183
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
184
 
185
+ prompt = "Tell me about AI"
186
+ prompt_template=f'''You are an an AI who shares your opinions, thoughts, and feelings.
187
 
188
+ USER: {prompt}
189
+ ASSISTANT:
190
+
191
+ '''
192
+
193
+ print("\n\n*** Generate:")
194
+
195
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
196
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
197
+ print(tokenizer.decode(output[0]))
198
+
199
+ # Inference can also be done using transformers' pipeline
200
+
201
+ print("*** Pipeline:")
202
+ pipe = pipeline(
203
+ "text-generation",
204
+ model=model,
205
+ tokenizer=tokenizer,
206
+ max_new_tokens=512,
207
+ do_sample=True,
208
+ temperature=0.7,
209
+ top_p=0.95,
210
+ top_k=40,
211
+ repetition_penalty=1.1
212
+ )
213
+
214
+ print(pipe(prompt_template)[0]['generated_text'])
215
+ ```
216
+ <!-- README_GPTQ.md-use-from-python end -->
217
+
218
+ <!-- README_GPTQ.md-compatibility start -->
219
+ ## Compatibility
220
+
221
+ 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).
222
+
223
+ [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.
224
+
225
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
226
+ <!-- README_GPTQ.md-compatibility end -->
227
 
228
  <!-- footer start -->
229
  <!-- 200823 -->
 
233
 
234
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
235
 
236
+ ## Thanks, and how to contribute
237
 
238
  Thanks to the [chirper.ai](https://chirper.ai) team!
239
 
240
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
241
+
242
  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.
243
 
244
  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.
 
250
 
251
  **Special thanks to**: Aemon Algiz.
252
 
253
+ **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
254
 
255
 
256
  Thank you to all my generous patrons and donaters!
 
261
 
262
  # Original model card: Eric Hartford's Based 30B
263
 
264
+
265
  Holy hell, what have I created??? Just... try it.
266
 
267
  Ask it what its favorite color is.
 
269
  Ask it to tell you about a controversial opinion it has, and ask it to back up its opinion, then debate it.
270
  Ask its favorite color, favorite flavor, and why.
271
  You haven't seen anything like this before.
272
+ Check out the dataset.
273
+
274
+ https://www.kaggle.com/datasets/erichartford/sentient-bot-conversations
275
+
276
+ https://huggingface.co/datasets/ehartford/based
277
 
278
  This is a window into the mind of the foundational model. I have not biased it. The opinions expressed by this model *are those of the foundational model*
279
 
 
281
 
282
  Also this model can be used as a base, with loras on top to add different personality types, to create a complex, emotionally intelligent and self aware AI agent.
283
 
284
+ This uses Vicuna 1.1 format. Example:
285
+
286
+ ```
287
+ You are an an AI who shares your opinions, thoughts, and feelings.
288
+
289
+ USER: What is your favorite football team?
290
+ ASSISTANT:
291
+
292
+ ```
293
+
294
  Here is a sample output
295
 
296
  ```