TheBloke commited on
Commit
2779793
1 Parent(s): 044bd8f

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -50
README.md CHANGED
@@ -31,18 +31,24 @@ quantized_by: TheBloke
31
  - Model creator: [Rombo Dawg](https://huggingface.co/rombodawg)
32
  - Original model: [LosslessMegaCoder Llama2 13B Mini](https://huggingface.co/rombodawg/LosslessMegaCoder-llama2-13b-mini)
33
 
 
34
  ## Description
35
 
36
  This repo contains GPTQ model files for [Rombo Dawg's LosslessMegaCoder Llama2 13B Mini](https://huggingface.co/rombodawg/LosslessMegaCoder-llama2-13b-mini).
37
 
38
  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.
39
 
 
 
40
  ## Repositories available
41
 
42
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ)
43
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GGML)
 
44
  * [Rombo Dawg's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/rombodawg/LosslessMegaCoder-llama2-13b-mini)
 
45
 
 
46
  ## Prompt template: ChatML
47
 
48
  ```
@@ -51,22 +57,26 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
51
  <|im_start|>user
52
  {prompt}<|im_end|>
53
  <|im_start|>assistant
 
54
  ```
55
 
 
 
 
56
  ## Provided files and GPTQ parameters
57
 
58
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
59
 
60
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
61
 
62
- All GPTQ files are made with AutoGPTQ.
63
 
64
  <details>
65
  <summary>Explanation of GPTQ parameters</summary>
66
 
67
  - Bits: The bit size of the quantised model.
68
  - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
69
- - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have issues with models that use Act Order plus Group Size.
70
  - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
71
  - 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).
72
  - 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.
@@ -76,13 +86,16 @@ All GPTQ files are made with AutoGPTQ.
76
 
77
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
78
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
79
- | [main](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
80
- | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
81
- | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
82
- | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
83
- | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
84
  | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
85
 
 
 
 
86
  ## How to download from branches
87
 
88
  - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ:gptq-4bit-32g-actorder_True`
@@ -91,79 +104,79 @@ All GPTQ files are made with AutoGPTQ.
91
  git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ
92
  ```
93
  - In Python Transformers code, the branch is the `revision` parameter; see below.
94
-
 
95
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
96
 
97
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
98
 
99
- It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
100
 
101
  1. Click the **Model tab**.
102
  2. Under **Download custom model or LoRA**, enter `TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ`.
103
  - To download from a specific branch, enter for example `TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ:gptq-4bit-32g-actorder_True`
104
  - see Provided Files above for the list of branches for each option.
105
  3. Click **Download**.
106
- 4. The model will start downloading. Once it's finished it will say "Done"
107
  5. In the top left, click the refresh icon next to **Model**.
108
  6. In the **Model** dropdown, choose the model you just downloaded: `LosslessMegaCoder-Llama2-13B-Mini-GPTQ`
109
  7. The model will automatically load, and is now ready for use!
110
  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.
111
- * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
112
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
 
113
 
 
114
  ## How to use this GPTQ model from Python code
115
 
116
- First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) 0.3.1 or later installed:
117
 
118
- ```
119
- pip3 install auto-gptq
120
- ```
121
 
122
- If you have problems installing AutoGPTQ, please build from source instead:
 
 
123
  ```
 
 
 
 
124
  pip3 uninstall -y auto-gptq
125
  git clone https://github.com/PanQiWei/AutoGPTQ
126
  cd AutoGPTQ
127
  pip3 install .
128
  ```
129
 
130
- Then try the following example code:
 
 
 
 
 
 
 
 
131
 
132
  ```python
133
- from transformers import AutoTokenizer, pipeline, logging
134
- from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
135
 
136
  model_name_or_path = "TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ"
137
-
138
- use_triton = False
 
 
 
 
139
 
140
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
141
 
142
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
143
- use_safetensors=True,
144
- trust_remote_code=False,
145
- device="cuda:0",
146
- use_triton=use_triton,
147
- quantize_config=None)
148
-
149
- """
150
- # To download from a specific branch, use the revision parameter, as in this example:
151
- # Note that `revision` requires AutoGPTQ 0.3.1 or later!
152
-
153
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
154
- revision="gptq-4bit-32g-actorder_True",
155
- use_safetensors=True,
156
- trust_remote_code=False,
157
- device="cuda:0",
158
- quantize_config=None)
159
- """
160
-
161
  prompt = "Tell me about AI"
162
  prompt_template=f'''<|im_start|>system
163
  {system_message}<|im_end|>
164
  <|im_start|>user
165
  {prompt}<|im_end|>
166
  <|im_start|>assistant
 
167
  '''
168
 
169
  print("\n\n*** Generate:")
@@ -174,9 +187,6 @@ print(tokenizer.decode(output[0]))
174
 
175
  # Inference can also be done using transformers' pipeline
176
 
177
- # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
178
- logging.set_verbosity(logging.CRITICAL)
179
-
180
  print("*** Pipeline:")
181
  pipe = pipeline(
182
  "text-generation",
@@ -190,12 +200,17 @@ pipe = pipeline(
190
 
191
  print(pipe(prompt_template)[0]['generated_text'])
192
  ```
 
193
 
 
194
  ## Compatibility
195
 
196
- 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.
197
 
198
- ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
 
 
199
 
200
  <!-- footer start -->
201
  <!-- 200823 -->
@@ -220,7 +235,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
220
 
221
  **Special thanks to**: Aemon Algiz.
222
 
223
- **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
224
 
225
 
226
  Thank you to all my generous patrons and donaters!
@@ -231,7 +246,11 @@ And thank you again to a16z for their generous grant.
231
 
232
  # Original model card: Rombo Dawg's LosslessMegaCoder Llama2 13B Mini
233
 
234
- This is one of the first models trained on the LosslessMegaCodeTrainingV2_1m_Evol_Uncensored dataset. The version of the dataset used for this model was poorly filtered on some loose parameters that arent anything to write home about but plans for much more refined filtering are in the works
 
 
 
 
235
 
236
  - This model was made as a colaboration between me and andreaskoepf who is an affiliate of Open Assistant.
237
 
@@ -257,13 +276,13 @@ Gpt4all template:
257
  - System prompt
258
  ```
259
  <|im_start|>system
260
- {system message}
261
  ```
262
  - Prompt template
263
  ```
264
  <|im_end|>
265
  <|im_start|>user
266
- %1<|im_end|>
267
  <|im_start|>assistant
268
  ```
269
 
@@ -288,6 +307,10 @@ Oobagooba Text-Generation-Webui Template
288
  Below is an instruction that describes a task. Write a response that appropriately completes the request.<|im_end|>
289
  ```
290
 
 
 
 
 
291
  Training data:
292
 
293
  - https://wandb.ai/open-assistant/epfl-mt-sft/runs/run34_megacode2_min100_13b
 
31
  - Model creator: [Rombo Dawg](https://huggingface.co/rombodawg)
32
  - Original model: [LosslessMegaCoder Llama2 13B Mini](https://huggingface.co/rombodawg/LosslessMegaCoder-llama2-13b-mini)
33
 
34
+ <!-- description start -->
35
  ## Description
36
 
37
  This repo contains GPTQ model files for [Rombo Dawg's LosslessMegaCoder Llama2 13B Mini](https://huggingface.co/rombodawg/LosslessMegaCoder-llama2-13b-mini).
38
 
39
  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.
40
 
41
+ <!-- description end -->
42
+ <!-- repositories-available start -->
43
  ## Repositories available
44
 
45
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ)
46
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GGUF)
47
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GGML)
48
  * [Rombo Dawg's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/rombodawg/LosslessMegaCoder-llama2-13b-mini)
49
+ <!-- repositories-available end -->
50
 
51
+ <!-- prompt-template start -->
52
  ## Prompt template: ChatML
53
 
54
  ```
 
57
  <|im_start|>user
58
  {prompt}<|im_end|>
59
  <|im_start|>assistant
60
+
61
  ```
62
 
63
+ <!-- prompt-template end -->
64
+
65
+ <!-- README_GPTQ.md-provided-files start -->
66
  ## Provided files and GPTQ parameters
67
 
68
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
69
 
70
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
71
 
72
+ 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.
73
 
74
  <details>
75
  <summary>Explanation of GPTQ parameters</summary>
76
 
77
  - Bits: The bit size of the quantised model.
78
  - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
79
+ - 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.
80
  - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
81
  - 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).
82
  - 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.
 
86
 
87
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
88
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
89
+ | [main](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
90
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
91
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
92
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
93
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
94
  | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [Evol Instruct Code](https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
95
 
96
+ <!-- README_GPTQ.md-provided-files end -->
97
+
98
+ <!-- README_GPTQ.md-download-from-branches start -->
99
  ## How to download from branches
100
 
101
  - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ:gptq-4bit-32g-actorder_True`
 
104
  git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ
105
  ```
106
  - In Python Transformers code, the branch is the `revision` parameter; see below.
107
+ <!-- README_GPTQ.md-download-from-branches end -->
108
+ <!-- README_GPTQ.md-text-generation-webui start -->
109
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
110
 
111
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
112
 
113
+ 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.
114
 
115
  1. Click the **Model tab**.
116
  2. Under **Download custom model or LoRA**, enter `TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ`.
117
  - To download from a specific branch, enter for example `TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ:gptq-4bit-32g-actorder_True`
118
  - see Provided Files above for the list of branches for each option.
119
  3. Click **Download**.
120
+ 4. The model will start downloading. Once it's finished it will say "Done".
121
  5. In the top left, click the refresh icon next to **Model**.
122
  6. In the **Model** dropdown, choose the model you just downloaded: `LosslessMegaCoder-Llama2-13B-Mini-GPTQ`
123
  7. The model will automatically load, and is now ready for use!
124
  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.
125
+ * 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`.
126
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
127
+ <!-- README_GPTQ.md-text-generation-webui end -->
128
 
129
+ <!-- README_GPTQ.md-use-from-python start -->
130
  ## How to use this GPTQ model from Python code
131
 
132
+ ### Install the necessary packages
133
 
134
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
 
 
135
 
136
+ ```shell
137
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
138
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
139
  ```
140
+
141
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
142
+
143
+ ```shell
144
  pip3 uninstall -y auto-gptq
145
  git clone https://github.com/PanQiWei/AutoGPTQ
146
  cd AutoGPTQ
147
  pip3 install .
148
  ```
149
 
150
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
151
+
152
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
153
+ ```shell
154
+ pip3 uninstall -y transformers
155
+ pip3 install git+https://github.com/huggingface/transformers.git
156
+ ```
157
+
158
+ ### You can then use the following code
159
 
160
  ```python
161
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
162
 
163
  model_name_or_path = "TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ"
164
+ # To use a different branch, change revision
165
+ # For example: revision="gptq-4bit-32g-actorder_True"
166
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
167
+ torch_dtype=torch.float16,
168
+ device_map="auto",
169
+ revision="main")
170
 
171
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  prompt = "Tell me about AI"
174
  prompt_template=f'''<|im_start|>system
175
  {system_message}<|im_end|>
176
  <|im_start|>user
177
  {prompt}<|im_end|>
178
  <|im_start|>assistant
179
+
180
  '''
181
 
182
  print("\n\n*** Generate:")
 
187
 
188
  # Inference can also be done using transformers' pipeline
189
 
 
 
 
190
  print("*** Pipeline:")
191
  pipe = pipeline(
192
  "text-generation",
 
200
 
201
  print(pipe(prompt_template)[0]['generated_text'])
202
  ```
203
+ <!-- README_GPTQ.md-use-from-python end -->
204
 
205
+ <!-- README_GPTQ.md-compatibility start -->
206
  ## Compatibility
207
 
208
+ 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).
209
 
210
+ [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.
211
+
212
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
213
+ <!-- README_GPTQ.md-compatibility end -->
214
 
215
  <!-- footer start -->
216
  <!-- 200823 -->
 
235
 
236
  **Special thanks to**: Aemon Algiz.
237
 
238
+ **Patreon special mentions**: Russ Johnson, J, alfie_i, Alex, NimbleBox.ai, Chadd, Mandus, Nikolai Manek, Ken Nordquist, ya boyyy, Illia Dulskyi, Viktor Bowallius, vamX, Iucharbius, zynix, Magnesian, Clay Pascal, Pierre Kircher, Enrico Ros, Tony Hughes, Elle, Andrey, knownsqashed, Deep Realms, Jerry Meng, Lone Striker, Derek Yates, Pyrater, Mesiah Bishop, James Bentley, Femi Adebogun, Brandon Frisco, SuperWojo, Alps Aficionado, Michael Dempsey, Vitor Caleffi, Will Dee, Edmond Seymore, usrbinkat, LangChain4j, Kacper Wikieł, Luke Pendergrass, John Detwiler, theTransient, Nathan LeClaire, Tiffany J. Kim, biorpg, Eugene Pentland, Stanislav Ovsiannikov, Fred von Graf, terasurfer, Kalila, Dan Guido, Nitin Borwankar, 阿明, Ai Maven, John Villwock, Gabriel Puliatti, Stephen Murray, Asp the Wyvern, danny, Chris Smitley, ReadyPlayerEmma, S_X, Daniel P. Andersen, Olakabola, Jeffrey Morgan, Imad Khwaja, Caitlyn Gatomon, webtim, Alicia Loh, Trenton Dambrowitz, Swaroop Kallakuri, Erik Bjäreholt, Leonard Tan, Spiking Neurons AB, Luke @flexchar, Ajan Kanaga, Thomas Belote, Deo Leter, RoA, Willem Michiel, transmissions 11, subjectnull, Matthew Berman, Joseph William Delisle, David Ziegler, Michael Davis, Johann-Peter Hartmann, Talal Aujan, senxiiz, Artur Olbinski, Rainer Wilmers, Spencer Kim, Fen Risland, Cap'n Zoog, Rishabh Srivastava, Michael Levine, Geoffrey Montalvo, Sean Connelly, Alexandros Triantafyllidis, Pieter, Gabriel Tamborski, Sam, Subspace Studios, Junyu Yang, Pedro Madruga, Vadim, Cory Kujawski, K, Raven Klaugh, Randy H, Mano Prime, Sebastain Graf, Space Cruiser
239
 
240
 
241
  Thank you to all my generous patrons and donaters!
 
246
 
247
  # Original model card: Rombo Dawg's LosslessMegaCoder Llama2 13B Mini
248
 
249
+ ___________________________
250
+ - Please note this model was not trained on the rombodawg/LosslessMegaCodeTrainingV3_MINI dataset, despite the name similarity. You can find the training data at the bottom of the model card labeled (megacode2-min100)
251
+ ___________________________
252
+
253
+ This is one of the first models trained on the LosslessMegaCodeTrainingV2_1m_Evol_Uncensored dataset. The version of the dataset used for this model was filtered by removed any data with less than 100 tokens but plans for much more refined filtering are in the works
254
 
255
  - This model was made as a colaboration between me and andreaskoepf who is an affiliate of Open Assistant.
256
 
 
276
  - System prompt
277
  ```
278
  <|im_start|>system
279
+ "Below is an instruction that describes a task. Write a response that appropriately completes the request."
280
  ```
281
  - Prompt template
282
  ```
283
  <|im_end|>
284
  <|im_start|>user
285
+ "%1"<|im_end|>
286
  <|im_start|>assistant
287
  ```
288
 
 
307
  Below is an instruction that describes a task. Write a response that appropriately completes the request.<|im_end|>
308
  ```
309
 
310
+ Current quantizations available:
311
+
312
+ - https://huggingface.co/TheBloke/LosslessMegaCoder-Llama2-13B-Mini-GPTQ
313
+
314
  Training data:
315
 
316
  - https://wandb.ai/open-assistant/epfl-mt-sft/runs/run34_megacode2_min100_13b