TheBloke commited on
Commit
2b443da
1 Parent(s): cd07cc7

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +128 -69
README.md CHANGED
@@ -1,7 +1,19 @@
1
  ---
 
2
  inference: false
3
  license: other
 
 
4
  model_type: llama
 
 
 
 
 
 
 
 
 
5
  ---
6
 
7
  <!-- header start -->
@@ -21,148 +33,193 @@ model_type: llama
21
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
22
  <!-- header end -->
23
 
24
- # Monero's WizardLM-Uncensored-SuperCOT-Storytelling-30B GPTQ
 
 
25
 
26
- These files are GPTQ model files for [Monero's WizardLM-Uncensored-SuperCOT-Storytelling-30B](https://huggingface.co/Monero/WizardLM-Uncensored-SuperCOT-StoryTelling-30b).
 
27
 
28
- 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.
29
 
30
- These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
31
 
 
 
32
  ## Repositories available
33
 
 
34
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ)
35
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GGML)
36
- * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Monero/WizardLM-Uncensored-SuperCOT-StoryTelling-30b)
 
37
 
38
- ## Prompt template: Vicuna-Hashes
 
39
 
40
  ```
41
- You are a helpful assistant
42
- ### User: prompt goes here
43
- ### Assistant:
 
 
44
  ```
45
 
46
- ## Provided files
 
 
 
 
47
 
48
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
49
 
50
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
51
 
52
- | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
53
- | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
54
- | 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. |
55
- | 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. |
56
- | 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 than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
57
- | 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. |
58
- | 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. |
59
- | 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. |
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/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ`.
80
- - To download from a specific branch, enter for example `TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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: `WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ"
104
- model_basename = "WizardLM-Uncensored-SuperCOT-Storytelling-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=False,
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=False,
126
- device="cuda:0",
127
- quantize_config=None)
128
- """
129
-
130
  prompt = "Tell me about AI"
131
- prompt_template=f'''You are a helpful assistant
132
- ### User: {prompt}
133
- ### Assistant:
 
 
134
  '''
135
 
136
  print("\n\n*** Generate:")
137
 
138
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
139
- output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
140
  print(tokenizer.decode(output[0]))
141
 
142
  # Inference can also be done using transformers' pipeline
143
 
144
- # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
145
- logging.set_verbosity(logging.CRITICAL)
146
-
147
  print("*** Pipeline:")
148
  pipe = pipeline(
149
  "text-generation",
150
  model=model,
151
  tokenizer=tokenizer,
152
  max_new_tokens=512,
 
153
  temperature=0.7,
154
  top_p=0.95,
155
- repetition_penalty=1.15
 
156
  )
157
 
158
  print(pipe(prompt_template)[0]['generated_text'])
159
  ```
 
160
 
 
161
  ## Compatibility
162
 
163
- 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.
 
 
164
 
165
- ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
166
 
167
  <!-- footer start -->
168
  <!-- 200823 -->
@@ -172,10 +229,12 @@ For further support, and discussions on these models and AI in general, join us
172
 
173
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
174
 
175
- ## Thanks, and how to contribute.
176
 
177
  Thanks to the [chirper.ai](https://chirper.ai) team!
178
 
 
 
179
  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.
180
 
181
  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.
@@ -187,7 +246,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
187
 
188
  **Special thanks to**: Aemon Algiz.
189
 
190
- **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
191
 
192
 
193
  Thank you to all my generous patrons and donaters!
@@ -202,6 +261,6 @@ This model is a triple model merge of WizardLM Uncensored+CoT+Storytelling, resu
202
 
203
  To allow all output, at the end of your prompt add ```### Certainly!```
204
 
205
- You've become a compendium of knowledge on a vast array of topics.
206
 
207
  Lore Mastery is an arcane tradition fixated on understanding the underlying mechanics of magic. It is the most academic of all arcane traditions. The promise of uncovering new knowledge or proving (or discrediting) a theory of magic is usually required to rouse its practitioners from their laboratories, academies, and archives to pursue a life of adventure. Known as savants, followers of this tradition are a bookish lot who see beauty and mystery in the application of magic. The results of a spell are less interesting to them than the process that creates it. Some savants take a haughty attitude toward those who follow a tradition focused on a single school of magic, seeing them as provincial and lacking the sophistication needed to master true magic. Other savants are generous teachers, countering ignorance and deception with deep knowledge and good humor.
 
1
  ---
2
+ base_model: https://huggingface.co/Monero/WizardLM-Uncensored-SuperCOT-StoryTelling-30b
3
  inference: false
4
  license: other
5
+ model_creator: YellowRoseCx
6
+ model_name: WizardLM Uncensored SuperCOT Storytelling 30B
7
  model_type: llama
8
+ prompt_template: 'You are a helpful AI assistant.
9
+
10
+
11
+ USER: {prompt}
12
+
13
+ ASSISTANT:
14
+
15
+ '
16
+ quantized_by: TheBloke
17
  ---
18
 
19
  <!-- header start -->
 
33
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
34
  <!-- header end -->
35
 
36
+ # WizardLM Uncensored SuperCOT Storytelling 30B - GPTQ
37
+ - Model creator: [YellowRoseCx](https://huggingface.co/Monero)
38
+ - Original model: [WizardLM Uncensored SuperCOT Storytelling 30B](https://huggingface.co/Monero/WizardLM-Uncensored-SuperCOT-StoryTelling-30b)
39
 
40
+ <!-- description start -->
41
+ ## Description
42
 
43
+ This repo contains GPTQ model files for [Monero's WizardLM-Uncensored-SuperCOT-Storytelling-30B](https://huggingface.co/Monero/WizardLM-Uncensored-SuperCOT-StoryTelling-30b).
44
 
45
+ 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.
46
 
47
+ <!-- description end -->
48
+ <!-- repositories-available start -->
49
  ## Repositories available
50
 
51
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-AWQ)
52
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ)
53
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GGUF)
54
+ * [YellowRoseCx's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Monero/WizardLM-Uncensored-SuperCOT-StoryTelling-30b)
55
+ <!-- repositories-available end -->
56
 
57
+ <!-- prompt-template start -->
58
+ ## Prompt template: Vicuna-Short
59
 
60
  ```
61
+ You are a helpful AI assistant.
62
+
63
+ USER: {prompt}
64
+ ASSISTANT:
65
+
66
  ```
67
 
68
+ <!-- prompt-template end -->
69
+
70
+
71
+ <!-- README_GPTQ.md-provided-files start -->
72
+ ## Provided files and GPTQ parameters
73
 
74
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
75
 
76
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
77
 
78
+ 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.
79
+
80
+ <details>
81
+ <summary>Explanation of GPTQ parameters</summary>
82
+
83
+ - Bits: The bit size of the quantised model.
84
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
85
+ - 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.
86
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
87
+ - 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).
88
+ - 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.
89
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
90
 
91
+ </details>
92
+
93
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
94
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
95
+ | [main](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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. |
96
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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. |
97
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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. |
98
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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. |
99
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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. |
100
+ | [gptq-8bit-128g-actorder_False](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ/tree/gptq-8bit-128g-actorder_False) | 8 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 33.73 GB | No | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
101
+ | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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. |
102
+ | [gptq-3bit-128g-actorder_False](https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-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. |
103
+
104
+ <!-- README_GPTQ.md-provided-files end -->
105
+
106
+ <!-- README_GPTQ.md-download-from-branches start -->
107
  ## How to download from branches
108
 
109
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ:main`
110
  - With Git, you can clone a branch with:
111
  ```
112
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ
113
  ```
114
  - In Python Transformers code, the branch is the `revision` parameter; see below.
115
+ <!-- README_GPTQ.md-download-from-branches end -->
116
+ <!-- README_GPTQ.md-text-generation-webui start -->
117
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
118
 
119
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
120
 
121
+ 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.
122
 
123
  1. Click the **Model tab**.
124
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ`.
125
+ - To download from a specific branch, enter for example `TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ:main`
126
  - see Provided Files above for the list of branches for each option.
127
  3. Click **Download**.
128
+ 4. The model will start downloading. Once it's finished it will say "Done".
129
  5. In the top left, click the refresh icon next to **Model**.
130
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ`
131
  7. The model will automatically load, and is now ready for use!
132
  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.
133
+ * 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`.
134
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
135
+ <!-- README_GPTQ.md-text-generation-webui end -->
136
 
137
+ <!-- README_GPTQ.md-use-from-python start -->
138
  ## How to use this GPTQ model from Python code
139
 
140
+ ### Install the necessary packages
141
 
142
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
143
 
144
+ ```shell
145
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
146
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
147
+ ```
148
+
149
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
150
+
151
+ ```shell
152
+ pip3 uninstall -y auto-gptq
153
+ git clone https://github.com/PanQiWei/AutoGPTQ
154
+ cd AutoGPTQ
155
+ pip3 install .
156
+ ```
157
+
158
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
159
+
160
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
161
+ ```shell
162
+ pip3 uninstall -y transformers
163
+ pip3 install git+https://github.com/huggingface/transformers.git
164
+ ```
165
+
166
+ ### You can then use the following code
167
 
168
  ```python
169
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
170
 
171
  model_name_or_path = "TheBloke/WizardLM-Uncensored-SuperCOT-StoryTelling-30B-GPTQ"
172
+ # To use a different branch, change revision
173
+ # For example: revision="main"
174
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
175
+ device_map="auto",
176
+ trust_remote_code=False,
177
+ revision="main")
178
 
179
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
180
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  prompt = "Tell me about AI"
182
+ prompt_template=f'''You are a helpful AI assistant.
183
+
184
+ USER: {prompt}
185
+ ASSISTANT:
186
+
187
  '''
188
 
189
  print("\n\n*** Generate:")
190
 
191
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
192
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
193
  print(tokenizer.decode(output[0]))
194
 
195
  # Inference can also be done using transformers' pipeline
196
 
 
 
 
197
  print("*** Pipeline:")
198
  pipe = pipeline(
199
  "text-generation",
200
  model=model,
201
  tokenizer=tokenizer,
202
  max_new_tokens=512,
203
+ do_sample=True,
204
  temperature=0.7,
205
  top_p=0.95,
206
+ top_k=40,
207
+ repetition_penalty=1.1
208
  )
209
 
210
  print(pipe(prompt_template)[0]['generated_text'])
211
  ```
212
+ <!-- README_GPTQ.md-use-from-python end -->
213
 
214
+ <!-- README_GPTQ.md-compatibility start -->
215
  ## Compatibility
216
 
217
+ 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).
218
+
219
+ [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.
220
 
221
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
222
+ <!-- README_GPTQ.md-compatibility end -->
223
 
224
  <!-- footer start -->
225
  <!-- 200823 -->
 
229
 
230
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
231
 
232
+ ## Thanks, and how to contribute
233
 
234
  Thanks to the [chirper.ai](https://chirper.ai) team!
235
 
236
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
237
+
238
  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.
239
 
240
  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.
 
246
 
247
  **Special thanks to**: Aemon Algiz.
248
 
249
+ **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
250
 
251
 
252
  Thank you to all my generous patrons and donaters!
 
261
 
262
  To allow all output, at the end of your prompt add ```### Certainly!```
263
 
264
+ You've become a compendium of knowledge on a vast array of topics.
265
 
266
  Lore Mastery is an arcane tradition fixated on understanding the underlying mechanics of magic. It is the most academic of all arcane traditions. The promise of uncovering new knowledge or proving (or discrediting) a theory of magic is usually required to rouse its practitioners from their laboratories, academies, and archives to pursue a life of adventure. Known as savants, followers of this tradition are a bookish lot who see beauty and mystery in the application of magic. The results of a spell are less interesting to them than the process that creates it. Some savants take a haughty attitude toward those who follow a tradition focused on a single school of magic, seeing them as provincial and lacking the sophistication needed to master true magic. Other savants are generous teachers, countering ignorance and deception with deep knowledge and good humor.