TheBloke commited on
Commit
ef3206a
1 Parent(s): 83404cb

Upload README.md

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