TheBloke commited on
Commit
52e8ddf
1 Parent(s): ad21829

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +94 -56
README.md CHANGED
@@ -3,7 +3,7 @@ inference: false
3
  language:
4
  - fr
5
  library_name: transformers
6
- license: other
7
  model_creator: bofenghuang
8
  model_link: https://huggingface.co/bofenghuang/vigogne-2-7b-instruct
9
  model_name: Vigogne 2 7B Instruct
@@ -37,18 +37,24 @@ tags:
37
  - Model creator: [bofenghuang](https://huggingface.co/bofenghuang)
38
  - Original model: [Vigogne 2 7B Instruct](https://huggingface.co/bofenghuang/vigogne-2-7b-instruct)
39
 
 
40
  ## Description
41
 
42
  This repo contains GPTQ model files for [bofenghuang's Vigogne 2 7B Instruct](https://huggingface.co/bofenghuang/vigogne-2-7b-instruct).
43
 
44
  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.
45
 
 
 
46
  ## Repositories available
47
 
48
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ)
49
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GGML)
 
50
  * [bofenghuang's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/bofenghuang/vigogne-2-7b-instruct)
 
51
 
 
52
  ## Prompt template: Alpaca
53
 
54
  ```
@@ -58,92 +64,121 @@ Below is an instruction that describes a task. Write a response that appropriate
58
  {prompt}
59
 
60
  ### Response:
 
61
  ```
62
 
63
- ## Provided files
 
 
 
64
 
65
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
66
 
67
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
68
 
69
- | Branch | Bits | Group Size | Act Order (desc_act) | GPTQ Dataset | Size | ExLlama Compat? | Made With | Desc |
70
- | ------ | ---- | ---------- | -------------------- | ------------ | ---- | --------------- | --------- | ---- |
71
- | [main](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/main) | 4 | 128 | No | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 3.90 GB | Yes | AutoGPTQ | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
72
- | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4.28 GB | Yes | AutoGPTQ | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
73
- | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4.02 GB | Yes | AutoGPTQ | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
74
- | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 3.90 GB | Yes | AutoGPTQ | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
75
- | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 7.01 GB | No | AutoGPTQ | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
76
- | [gptq-8bit-128g-actorder_False](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-8bit-128g-actorder_False) | 8 | 128 | No | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 7.16 GB | No | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
77
- | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 7.16 GB | No | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
78
- | [gptq-8bit-64g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-8bit-64g-actorder_True) | 8 | 64 | Yes | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 7.31 GB | No | AutoGPTQ | 8-bit, with group size 64g and Act Order for maximum inference quality. Poor AutoGPTQ CUDA speed. |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
 
 
 
80
  ## How to download from branches
81
 
82
  - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Vigogne-2-7B-Instruct-GPTQ:gptq-4bit-32g-actorder_True`
83
  - With Git, you can clone a branch with:
84
  ```
85
- git clone --branch --single-branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ
86
  ```
87
  - In Python Transformers code, the branch is the `revision` parameter; see below.
88
-
 
89
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
90
 
91
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
92
 
93
- It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
94
 
95
  1. Click the **Model tab**.
96
  2. Under **Download custom model or LoRA**, enter `TheBloke/Vigogne-2-7B-Instruct-GPTQ`.
97
  - To download from a specific branch, enter for example `TheBloke/Vigogne-2-7B-Instruct-GPTQ:gptq-4bit-32g-actorder_True`
98
  - see Provided Files above for the list of branches for each option.
99
  3. Click **Download**.
100
- 4. The model will start downloading. Once it's finished it will say "Done"
101
  5. In the top left, click the refresh icon next to **Model**.
102
  6. In the **Model** dropdown, choose the model you just downloaded: `Vigogne-2-7B-Instruct-GPTQ`
103
  7. The model will automatically load, and is now ready for use!
104
  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.
105
- * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
106
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
 
107
 
 
108
  ## How to use this GPTQ model from Python code
109
 
110
- First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
 
 
 
 
 
 
 
 
 
111
 
112
- `GITHUB_ACTIONS=true pip install auto-gptq`
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
- Then try the following example code:
115
 
116
  ```python
117
- from transformers import AutoTokenizer, pipeline, logging
118
- from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
119
 
120
  model_name_or_path = "TheBloke/Vigogne-2-7B-Instruct-GPTQ"
121
- model_basename = "model"
122
-
123
- use_triton = False
 
 
 
124
 
125
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
126
 
127
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
128
- model_basename=model_basename,
129
- use_safetensors=True,
130
- trust_remote_code=False,
131
- device="cuda:0",
132
- use_triton=use_triton,
133
- quantize_config=None)
134
-
135
- """
136
- To download from a specific branch, use the revision parameter, as in this example:
137
-
138
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
139
- revision="gptq-4bit-32g-actorder_True",
140
- model_basename=model_basename,
141
- use_safetensors=True,
142
- trust_remote_code=False,
143
- device="cuda:0",
144
- quantize_config=None)
145
- """
146
-
147
  prompt = "Tell me about AI"
148
  prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
149
 
@@ -151,6 +186,7 @@ prompt_template=f'''Below is an instruction that describes a task. Write a respo
151
  {prompt}
152
 
153
  ### Response:
 
154
  '''
155
 
156
  print("\n\n*** Generate:")
@@ -161,9 +197,6 @@ print(tokenizer.decode(output[0]))
161
 
162
  # Inference can also be done using transformers' pipeline
163
 
164
- # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
165
- logging.set_verbosity(logging.CRITICAL)
166
-
167
  print("*** Pipeline:")
168
  pipe = pipeline(
169
  "text-generation",
@@ -177,12 +210,17 @@ pipe = pipeline(
177
 
178
  print(pipe(prompt_template)[0]['generated_text'])
179
  ```
 
180
 
 
181
  ## Compatibility
182
 
183
- 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.
 
 
184
 
185
- ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
186
 
187
  <!-- footer start -->
188
  <!-- 200823 -->
@@ -207,7 +245,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
207
 
208
  **Special thanks to**: Aemon Algiz.
209
 
210
- **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
211
 
212
 
213
  Thank you to all my generous patrons and donaters!
@@ -273,7 +311,7 @@ You can also infer this model by using the following Google Colab Notebook.
273
  Explique le théorème central limite à un enfant de six ans.
274
 
275
  ***Vigogne-2-7B-Instruct:***
276
-
277
  Le théorème central limite est un concept mathématique qui dit que si vous prenez beaucoup de mesures de la même chose, la moyenne de ces mesures sera proche de la moyenne de toutes les mesures. C'est comme si vous prenait des photos d'un objet et que la moyenne de toutes les photos était proche de la vraie forme de l'objet.
278
 
279
  <details><summary>Other models</summary>
@@ -300,7 +338,7 @@ Le théorème central limite est un concept mathématique qui explique comment l
300
  Je suis actuellement orienté vers l'est. Ensuite je vais tourner à droite. De quel côté serai-je orienté ?
301
 
302
  ***Vigogne-2-7B-Instruct:***
303
-
304
  Vous serez orienté vers le sud.
305
 
306
  <details><summary>Other models</summary>
@@ -324,7 +362,7 @@ Vous serez orienté vers le nord.
324
  Parmi les aliments suivants, lequel est le plus susceptible de provoquer une intoxication alimentaire ? A, poisson cru, B, poulet cuit, C, légumes cuits, D, pain grillé.
325
 
326
  ***Vigogne-2-7B-Instruct:***
327
-
328
  A, poisson cru.
329
 
330
  <details><summary>Other models</summary>
@@ -347,7 +385,7 @@ Le plus susceptible de provoquer une intoxication alimentaire est le poisson cru
347
  Écrivez une fonction qui prend une liste de chaînes de caractères et renvoie une liste sans doublons.
348
 
349
  ***Vigogne-2-7B-Instruct:***
350
-
351
  ```
352
  def remove_duplicates(lst):
353
  return list(set(lst))
 
3
  language:
4
  - fr
5
  library_name: transformers
6
+ license: llama2
7
  model_creator: bofenghuang
8
  model_link: https://huggingface.co/bofenghuang/vigogne-2-7b-instruct
9
  model_name: Vigogne 2 7B Instruct
 
37
  - Model creator: [bofenghuang](https://huggingface.co/bofenghuang)
38
  - Original model: [Vigogne 2 7B Instruct](https://huggingface.co/bofenghuang/vigogne-2-7b-instruct)
39
 
40
+ <!-- description start -->
41
  ## Description
42
 
43
  This repo contains GPTQ model files for [bofenghuang's Vigogne 2 7B Instruct](https://huggingface.co/bofenghuang/vigogne-2-7b-instruct).
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
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ)
52
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GGUF)
53
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GGML)
54
  * [bofenghuang's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/bofenghuang/vigogne-2-7b-instruct)
55
+ <!-- repositories-available end -->
56
 
57
+ <!-- prompt-template start -->
58
  ## Prompt template: Alpaca
59
 
60
  ```
 
64
  {prompt}
65
 
66
  ### Response:
67
+
68
  ```
69
 
70
+ <!-- prompt-template end -->
71
+
72
+ <!-- README_GPTQ.md-provided-files start -->
73
+ ## Provided files and GPTQ parameters
74
 
75
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
76
 
77
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
78
 
79
+ 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.
80
+
81
+ <details>
82
+ <summary>Explanation of GPTQ parameters</summary>
83
+
84
+ - Bits: The bit size of the quantised model.
85
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
86
+ - 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.
87
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
88
+ - 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).
89
+ - 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.
90
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
91
+
92
+ </details>
93
+
94
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
95
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
96
+ | [main](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4096 | 3.90 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
97
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4096 | 4.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
98
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4096 | 4.02 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. |
99
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4096 | 3.90 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. |
100
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4096 | 7.01 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
101
+ | [gptq-8bit-128g-actorder_False](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-8bit-128g-actorder_False) | 8 | 128 | No | 0.1 | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4096 | 7.16 GB | No | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
102
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4096 | 7.16 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
103
+ | [gptq-8bit-64g-actorder_True](https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ/tree/gptq-8bit-64g-actorder_True) | 8 | 64 | Yes | 0.1 | [French news](https://huggingface.co/datasets/gustavecortal/diverse_french_news) | 4096 | 7.31 GB | No | 8-bit, with group size 64g and Act Order for even higher inference quality. Poor AutoGPTQ CUDA speed. |
104
 
105
+ <!-- README_GPTQ.md-provided-files end -->
106
+
107
+ <!-- README_GPTQ.md-download-from-branches start -->
108
  ## How to download from branches
109
 
110
  - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Vigogne-2-7B-Instruct-GPTQ:gptq-4bit-32g-actorder_True`
111
  - With Git, you can clone a branch with:
112
  ```
113
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Vigogne-2-7B-Instruct-GPTQ
114
  ```
115
  - In Python Transformers code, the branch is the `revision` parameter; see below.
116
+ <!-- README_GPTQ.md-download-from-branches end -->
117
+ <!-- README_GPTQ.md-text-generation-webui start -->
118
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
119
 
120
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
121
 
122
+ 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.
123
 
124
  1. Click the **Model tab**.
125
  2. Under **Download custom model or LoRA**, enter `TheBloke/Vigogne-2-7B-Instruct-GPTQ`.
126
  - To download from a specific branch, enter for example `TheBloke/Vigogne-2-7B-Instruct-GPTQ:gptq-4bit-32g-actorder_True`
127
  - see Provided Files above for the list of branches for each option.
128
  3. Click **Download**.
129
+ 4. The model will start downloading. Once it's finished it will say "Done".
130
  5. In the top left, click the refresh icon next to **Model**.
131
  6. In the **Model** dropdown, choose the model you just downloaded: `Vigogne-2-7B-Instruct-GPTQ`
132
  7. The model will automatically load, and is now ready for use!
133
  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.
134
+ * 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`.
135
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
136
+ <!-- README_GPTQ.md-text-generation-webui end -->
137
 
138
+ <!-- README_GPTQ.md-use-from-python start -->
139
  ## How to use this GPTQ model from Python code
140
 
141
+ ### Install the necessary packages
142
+
143
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
144
+
145
+ ```shell
146
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
147
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
148
+ ```
149
+
150
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
151
 
152
+ ```shell
153
+ pip3 uninstall -y auto-gptq
154
+ git clone https://github.com/PanQiWei/AutoGPTQ
155
+ cd AutoGPTQ
156
+ pip3 install .
157
+ ```
158
+
159
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
160
+
161
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
162
+ ```shell
163
+ pip3 uninstall -y transformers
164
+ pip3 install git+https://github.com/huggingface/transformers.git
165
+ ```
166
 
167
+ ### You can then use the following code
168
 
169
  ```python
170
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
171
 
172
  model_name_or_path = "TheBloke/Vigogne-2-7B-Instruct-GPTQ"
173
+ # To use a different branch, change revision
174
+ # For example: revision="gptq-4bit-32g-actorder_True"
175
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
176
+ torch_dtype=torch.float16,
177
+ device_map="auto",
178
+ revision="main")
179
 
180
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  prompt = "Tell me about AI"
183
  prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
184
 
 
186
  {prompt}
187
 
188
  ### Response:
189
+
190
  '''
191
 
192
  print("\n\n*** Generate:")
 
197
 
198
  # Inference can also be done using transformers' pipeline
199
 
 
 
 
200
  print("*** Pipeline:")
201
  pipe = pipeline(
202
  "text-generation",
 
210
 
211
  print(pipe(prompt_template)[0]['generated_text'])
212
  ```
213
+ <!-- README_GPTQ.md-use-from-python end -->
214
 
215
+ <!-- README_GPTQ.md-compatibility start -->
216
  ## Compatibility
217
 
218
+ 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).
219
+
220
+ [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.
221
 
222
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
223
+ <!-- README_GPTQ.md-compatibility end -->
224
 
225
  <!-- footer start -->
226
  <!-- 200823 -->
 
245
 
246
  **Special thanks to**: Aemon Algiz.
247
 
248
+ **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
249
 
250
 
251
  Thank you to all my generous patrons and donaters!
 
311
  Explique le théorème central limite à un enfant de six ans.
312
 
313
  ***Vigogne-2-7B-Instruct:***
314
+
315
  Le théorème central limite est un concept mathématique qui dit que si vous prenez beaucoup de mesures de la même chose, la moyenne de ces mesures sera proche de la moyenne de toutes les mesures. C'est comme si vous prenait des photos d'un objet et que la moyenne de toutes les photos était proche de la vraie forme de l'objet.
316
 
317
  <details><summary>Other models</summary>
 
338
  Je suis actuellement orienté vers l'est. Ensuite je vais tourner à droite. De quel côté serai-je orienté ?
339
 
340
  ***Vigogne-2-7B-Instruct:***
341
+
342
  Vous serez orienté vers le sud.
343
 
344
  <details><summary>Other models</summary>
 
362
  Parmi les aliments suivants, lequel est le plus susceptible de provoquer une intoxication alimentaire ? A, poisson cru, B, poulet cuit, C, légumes cuits, D, pain grillé.
363
 
364
  ***Vigogne-2-7B-Instruct:***
365
+
366
  A, poisson cru.
367
 
368
  <details><summary>Other models</summary>
 
385
  Écrivez une fonction qui prend une liste de chaînes de caractères et renvoie une liste sans doublons.
386
 
387
  ***Vigogne-2-7B-Instruct:***
388
+
389
  ```
390
  def remove_duplicates(lst):
391
  return list(set(lst))