TheBloke commited on
Commit
4afe27a
1 Parent(s): f2a2991

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +120 -65
README.md CHANGED
@@ -1,11 +1,20 @@
1
  ---
 
2
  datasets:
3
  - ehartford/WizardLM_evol_instruct_V2_196k_unfiltered_merged_split
4
  inference: false
5
  language:
6
  - en
7
  license: other
 
 
8
  model_type: llama
 
 
 
 
 
 
9
  ---
10
 
11
  <!-- header start -->
@@ -25,148 +34,192 @@ model_type: llama
25
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
26
  <!-- header end -->
27
 
28
- # Eric Hartford's WizardLM-13b-V1.0-Uncensored GPTQ
 
 
29
 
30
- These files are GPTQ model files for [Eric Hartford's WizardLM-13b-V1.0-Uncensored](https://huggingface.co/ehartford/WizardLM-13b-V1.0-Uncensored).
 
31
 
32
- 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.
33
 
34
- These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
35
 
 
 
36
  ## Repositories available
37
 
 
38
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ)
39
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GGML)
40
- * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/WizardLM-13b-V1.0-Uncensored)
 
41
 
 
42
  ## Prompt template: Vicuna
43
 
44
  ```
45
- A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
46
 
47
- USER: {prompt}
48
- ASSISTANT:
49
  ```
50
 
51
- ## Provided files
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
54
 
55
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
56
 
57
- | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
58
- | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
59
- | main | 4 | 128 | False | 7.45 GB | True | GPTQ-for-LLaMa | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
60
- | gptq-4bit-32g-actorder_True | 4 | 32 | True | 8.00 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. |
61
- | gptq-4bit-64g-actorder_True | 4 | 64 | True | 7.51 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. |
62
- | gptq-4bit-128g-actorder_True | 4 | 128 | True | 7.26 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. |
63
- | gptq-8bit--1g-actorder_True | 8 | None | True | 13.36 GB | False | AutoGPTQ | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
64
- | gptq-8bit-128g-actorder_False | 8 | 128 | False | 13.65 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  ## How to download from branches
67
 
68
- - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ:gptq-4bit-32g-actorder_True`
69
  - With Git, you can clone a branch with:
70
  ```
71
- git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ`
72
  ```
73
  - In Python Transformers code, the branch is the `revision` parameter; see below.
74
-
 
75
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
76
 
77
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
78
 
79
- It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
80
 
81
  1. Click the **Model tab**.
82
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ`.
83
- - To download from a specific branch, enter for example `TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ:gptq-4bit-32g-actorder_True`
84
  - see Provided Files above for the list of branches for each option.
85
  3. Click **Download**.
86
- 4. The model will start downloading. Once it's finished it will say "Done"
87
  5. In the top left, click the refresh icon next to **Model**.
88
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardLM-13B-V1.0-Uncensored-GPTQ`
89
  7. The model will automatically load, and is now ready for use!
90
  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.
91
- * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
92
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
 
93
 
 
94
  ## How to use this GPTQ model from Python code
95
 
96
- First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
97
 
98
- `GITHUB_ACTIONS=true pip install auto-gptq`
99
 
100
- Then try the following example code:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
 
102
  ```python
103
- from transformers import AutoTokenizer, pipeline, logging
104
- from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
105
 
106
  model_name_or_path = "TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ"
107
- model_basename = "wizardlm-13b-v1.0-uncensored-GPTQ-4bit-128g.no-act.order"
108
-
109
- use_triton = False
 
 
 
110
 
111
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
112
 
113
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
114
- model_basename=model_basename
115
- use_safetensors=True,
116
- trust_remote_code=True,
117
- device="cuda:0",
118
- use_triton=use_triton,
119
- quantize_config=None)
120
-
121
- """
122
- To download from a specific branch, use the revision parameter, as in this example:
123
-
124
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
125
- revision="gptq-4bit-32g-actorder_True",
126
- model_basename=model_basename,
127
- use_safetensors=True,
128
- trust_remote_code=True,
129
- device="cuda:0",
130
- quantize_config=None)
131
- """
132
-
133
  prompt = "Tell me about AI"
134
- 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.
135
 
136
- USER: {prompt}
137
- ASSISTANT:
138
  '''
139
 
140
  print("\n\n*** Generate:")
141
 
142
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
143
- output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
144
  print(tokenizer.decode(output[0]))
145
 
146
  # Inference can also be done using transformers' pipeline
147
 
148
- # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
149
- logging.set_verbosity(logging.CRITICAL)
150
-
151
  print("*** Pipeline:")
152
  pipe = pipeline(
153
  "text-generation",
154
  model=model,
155
  tokenizer=tokenizer,
156
  max_new_tokens=512,
 
157
  temperature=0.7,
158
  top_p=0.95,
159
- repetition_penalty=1.15
 
160
  )
161
 
162
  print(pipe(prompt_template)[0]['generated_text'])
163
  ```
 
164
 
 
165
  ## Compatibility
166
 
167
- 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.
 
 
168
 
169
- ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
170
 
171
  <!-- footer start -->
172
  <!-- 200823 -->
@@ -176,10 +229,12 @@ For further support, and discussions on these models and AI in general, join us
176
 
177
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
178
 
179
- ## Thanks, and how to contribute.
180
 
181
  Thanks to the [chirper.ai](https://chirper.ai) team!
182
 
 
 
183
  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.
184
 
185
  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.
@@ -191,7 +246,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
191
 
192
  **Special thanks to**: Aemon Algiz.
193
 
194
- **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
195
 
196
 
197
  Thank you to all my generous patrons and donaters!
 
1
  ---
2
+ base_model: https://huggingface.co/ehartford/WizardLM-13b-V1.0-Uncensored
3
  datasets:
4
  - ehartford/WizardLM_evol_instruct_V2_196k_unfiltered_merged_split
5
  inference: false
6
  language:
7
  - en
8
  license: other
9
+ model_creator: Eric Hartford
10
+ model_name: WizardLM 13B V1.0 Uncensored
11
  model_type: llama
12
+ prompt_template: 'A chat between a curious user and an artificial intelligence assistant.
13
+ The assistant gives helpful, detailed, and polite answers to the user''s questions.
14
+ USER: {prompt} ASSISTANT:
15
+
16
+ '
17
+ quantized_by: TheBloke
18
  ---
19
 
20
  <!-- header start -->
 
34
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
35
  <!-- header end -->
36
 
37
+ # WizardLM 13B V1.0 Uncensored - GPTQ
38
+ - Model creator: [Eric Hartford](https://huggingface.co/ehartford)
39
+ - Original model: [WizardLM 13B V1.0 Uncensored](https://huggingface.co/ehartford/WizardLM-13b-V1.0-Uncensored)
40
 
41
+ <!-- description start -->
42
+ ## Description
43
 
44
+ This repo contains GPTQ model files for [Eric Hartford's WizardLM-13b-V1.0-Uncensored](https://huggingface.co/ehartford/WizardLM-13b-V1.0-Uncensored).
45
 
46
+ 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.
47
 
48
+ <!-- description end -->
49
+ <!-- repositories-available start -->
50
  ## Repositories available
51
 
52
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-AWQ)
53
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ)
54
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GGUF)
55
+ * [Eric Hartford's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/WizardLM-13b-V1.0-Uncensored)
56
+ <!-- repositories-available end -->
57
 
58
+ <!-- prompt-template start -->
59
  ## Prompt template: Vicuna
60
 
61
  ```
62
+ 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:
63
 
 
 
64
  ```
65
 
66
+ <!-- prompt-template end -->
67
+ <!-- licensing start -->
68
+ ## Licensing
69
+
70
+ The creator of the source model has listed its license as `other`, and this quantization has therefore used that same license.
71
+
72
+ 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.
73
+
74
+ 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 WizardLM-13b-V1.0-Uncensored](https://huggingface.co/ehartford/WizardLM-13b-V1.0-Uncensored).
75
+ <!-- licensing end -->
76
+ <!-- README_GPTQ.md-provided-files start -->
77
+ ## Provided files and GPTQ parameters
78
 
79
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
80
 
81
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
82
 
83
+ 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.
 
 
 
 
 
 
 
84
 
85
+ <details>
86
+ <summary>Explanation of GPTQ parameters</summary>
87
+
88
+ - Bits: The bit size of the quantised model.
89
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
90
+ - 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.
91
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
92
+ - 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).
93
+ - 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.
94
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
95
+
96
+ </details>
97
+
98
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
99
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
100
+ | [main](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ/tree/main) | 4 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 7.45 GB | Yes | 4-bit, without Act Order and group size 128g. |
101
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
102
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
103
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
104
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
105
+ | [gptq-8bit-128g-actorder_False](https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ/tree/gptq-8bit-128g-actorder_False) | 8 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
106
+
107
+ <!-- README_GPTQ.md-provided-files end -->
108
+
109
+ <!-- README_GPTQ.md-download-from-branches start -->
110
  ## How to download from branches
111
 
112
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ:main`
113
  - With Git, you can clone a branch with:
114
  ```
115
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ
116
  ```
117
  - In Python Transformers code, the branch is the `revision` parameter; see below.
118
+ <!-- README_GPTQ.md-download-from-branches end -->
119
+ <!-- README_GPTQ.md-text-generation-webui start -->
120
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
121
 
122
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
123
 
124
+ 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.
125
 
126
  1. Click the **Model tab**.
127
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ`.
128
+ - To download from a specific branch, enter for example `TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ:main`
129
  - see Provided Files above for the list of branches for each option.
130
  3. Click **Download**.
131
+ 4. The model will start downloading. Once it's finished it will say "Done".
132
  5. In the top left, click the refresh icon next to **Model**.
133
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardLM-13B-V1.0-Uncensored-GPTQ`
134
  7. The model will automatically load, and is now ready for use!
135
  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.
136
+ * 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`.
137
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
138
+ <!-- README_GPTQ.md-text-generation-webui end -->
139
 
140
+ <!-- README_GPTQ.md-use-from-python start -->
141
  ## How to use this GPTQ model from Python code
142
 
143
+ ### Install the necessary packages
144
 
145
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
146
 
147
+ ```shell
148
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
149
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
150
+ ```
151
+
152
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
153
+
154
+ ```shell
155
+ pip3 uninstall -y auto-gptq
156
+ git clone https://github.com/PanQiWei/AutoGPTQ
157
+ cd AutoGPTQ
158
+ pip3 install .
159
+ ```
160
+
161
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
162
+
163
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
164
+ ```shell
165
+ pip3 uninstall -y transformers
166
+ pip3 install git+https://github.com/huggingface/transformers.git
167
+ ```
168
+
169
+ ### You can then use the following code
170
 
171
  ```python
172
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
173
 
174
  model_name_or_path = "TheBloke/WizardLM-13B-V1.0-Uncensored-GPTQ"
175
+ # To use a different branch, change revision
176
+ # For example: revision="main"
177
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
178
+ device_map="auto",
179
+ trust_remote_code=True,
180
+ revision="main")
181
 
182
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  prompt = "Tell me about AI"
185
+ 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:
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!