TheBloke commited on
Commit
b9c118a
1 Parent(s): f00dbce

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +128 -64
README.md CHANGED
@@ -1,4 +1,5 @@
1
  ---
 
2
  datasets:
3
  - Open-Orca/OpenOrca
4
  - anon8231489123/ShareGPT_Vicuna_unfiltered
@@ -9,8 +10,23 @@ language:
9
  license: other
10
  metrics:
11
  - accuracy
 
 
12
  model_type: llama
13
  pipeline_tag: text-generation
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  tags:
15
  - llama
16
  - alpaca
@@ -43,151 +59,197 @@ tags:
43
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
44
  <!-- header end -->
45
 
46
- # CalderaAI's 13B Ouroboros GPTQ
 
 
47
 
48
- These files are GPTQ model files for [CalderaAI's 13B Ouroboros](https://huggingface.co/CalderaAI/13B-Ouroboros).
 
49
 
50
- 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.
51
 
 
52
 
 
 
53
  ## Repositories available
54
 
 
55
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/13B-Ouroboros-GPTQ)
56
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/13B-Ouroboros-GGML)
57
- * [Original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/CalderaAI/13B-Ouroboros)
 
58
 
 
59
  ## Prompt template: Alpaca
60
 
61
  ```
62
  Below is an instruction that describes a task. Write a response that appropriately completes the request.
63
 
64
- ### Instruction: {prompt}
 
65
 
66
  ### Response:
 
67
  ```
68
 
69
- ## Provided files
 
 
 
 
70
 
71
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
72
 
73
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
74
 
75
- | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
76
- | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
77
- | main | 4 | 128 | False | 7.26 GB | True | AutoGPTQ | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
78
- | 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. |
79
- | 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. |
80
- | 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. |
81
- | gptq-8bit-128g-actorder_True | 8 | 128 | True | 13.65 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. |
82
- | gptq-8bit-64g-actorder_True | 8 | 64 | True | 13.95 GB | False | AutoGPTQ | 8-bit, with group size 64g and Act Order for maximum inference quality. Poor AutoGPTQ CUDA speed. |
83
- | 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. |
84
- | 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. |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/13B-Ouroboros-GPTQ:gptq-4bit-32g-actorder_True`
89
  - With Git, you can clone a branch with:
90
  ```
91
- git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/13B-Ouroboros-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/13B-Ouroboros-GPTQ`.
103
- - To download from a specific branch, enter for example `TheBloke/13B-Ouroboros-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: `13B-Ouroboros-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) installed:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
- `GITHUB_ACTIONS=true pip install auto-gptq`
 
 
 
 
119
 
120
- Then try the following example code:
121
 
122
  ```python
123
- from transformers import AutoTokenizer, pipeline, logging
124
- from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
125
 
126
  model_name_or_path = "TheBloke/13B-Ouroboros-GPTQ"
127
- model_basename = "model"
128
-
129
- use_triton = False
 
 
 
130
 
131
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
132
 
133
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
134
- model_basename=model_basename,
135
- use_safetensors=True,
136
- trust_remote_code=True,
137
- device="cuda:0",
138
- use_triton=use_triton,
139
- quantize_config=None)
140
-
141
- """
142
- To download from a specific branch, use the revision parameter, as in this example:
143
-
144
- model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
145
- revision="gptq-4bit-32g-actorder_True",
146
- model_basename=model_basename,
147
- use_safetensors=True,
148
- trust_remote_code=True,
149
- device="cuda:0",
150
- quantize_config=None)
151
- """
152
-
153
  prompt = "Tell me about AI"
154
  prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
155
 
156
- ### Instruction: {prompt}
 
157
 
158
  ### Response:
 
159
  '''
160
 
161
  print("\n\n*** Generate:")
162
 
163
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
164
- output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
165
  print(tokenizer.decode(output[0]))
166
 
167
  # Inference can also be done using transformers' pipeline
168
 
169
- # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
170
- logging.set_verbosity(logging.CRITICAL)
171
-
172
  print("*** Pipeline:")
173
  pipe = pipeline(
174
  "text-generation",
175
  model=model,
176
  tokenizer=tokenizer,
177
  max_new_tokens=512,
 
178
  temperature=0.7,
179
  top_p=0.95,
180
- repetition_penalty=1.15
 
181
  )
182
 
183
  print(pipe(prompt_template)[0]['generated_text'])
184
  ```
 
185
 
 
186
  ## Compatibility
187
 
188
- 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.
189
 
190
- ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
 
 
191
 
192
  <!-- footer start -->
193
  <!-- 200823 -->
@@ -197,10 +259,12 @@ For further support, and discussions on these models and AI in general, join us
197
 
198
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
199
 
200
- ## Thanks, and how to contribute.
201
 
202
  Thanks to the [chirper.ai](https://chirper.ai) team!
203
 
 
 
204
  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.
205
 
206
  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.
@@ -212,7 +276,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
212
 
213
  **Special thanks to**: Aemon Algiz.
214
 
215
- **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
216
 
217
 
218
  Thank you to all my generous patrons and donaters!
@@ -254,7 +318,7 @@ Tier Two Merge:
254
 
255
  Result:
256
 
257
- 13B-Ouroboros, a model that seems uncensored and highly competent. So far only Alpaca instruction promting has been tested and seems to work solidly well.
258
 
259
  ## Use:
260
 
@@ -292,6 +356,6 @@ https://huggingface.co/reeducator/vicuna-13b-cocktail
292
 
293
  Also thanks to Meta for LLaMA.
294
 
295
- Each model and LoRA was hand picked and considered for what it could contribute to this ensemble.
296
  Thanks to each and every one of you for your incredible work developing some of the best things
297
  to come out of this community.
 
1
  ---
2
+ base_model: https://huggingface.co/CalderaAI/13B-Ouroboros
3
  datasets:
4
  - Open-Orca/OpenOrca
5
  - anon8231489123/ShareGPT_Vicuna_unfiltered
 
10
  license: other
11
  metrics:
12
  - accuracy
13
+ model_creator: Caldera AI
14
+ model_name: 13B Ouroboros
15
  model_type: llama
16
  pipeline_tag: text-generation
17
+ prompt_template: 'Below is an instruction that describes a task. Write a response
18
+ that appropriately completes the request.
19
+
20
+
21
+ ### Instruction:
22
+
23
+ {prompt}
24
+
25
+
26
+ ### Response:
27
+
28
+ '
29
+ quantized_by: TheBloke
30
  tags:
31
  - llama
32
  - alpaca
 
59
  <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
60
  <!-- header end -->
61
 
62
+ # 13B Ouroboros - GPTQ
63
+ - Model creator: [Caldera AI](https://huggingface.co/CalderaAI)
64
+ - Original model: [13B Ouroboros](https://huggingface.co/CalderaAI/13B-Ouroboros)
65
 
66
+ <!-- description start -->
67
+ ## Description
68
 
69
+ This repo contains GPTQ model files for [CalderaAI's 13B Ouroboros](https://huggingface.co/CalderaAI/13B-Ouroboros).
70
 
71
+ 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.
72
 
73
+ <!-- description end -->
74
+ <!-- repositories-available start -->
75
  ## Repositories available
76
 
77
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/13B-Ouroboros-AWQ)
78
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/13B-Ouroboros-GPTQ)
79
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/13B-Ouroboros-GGUF)
80
+ * [Caldera AI's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/CalderaAI/13B-Ouroboros)
81
+ <!-- repositories-available end -->
82
 
83
+ <!-- prompt-template start -->
84
  ## Prompt template: Alpaca
85
 
86
  ```
87
  Below is an instruction that describes a task. Write a response that appropriately completes the request.
88
 
89
+ ### Instruction:
90
+ {prompt}
91
 
92
  ### Response:
93
+
94
  ```
95
 
96
+ <!-- prompt-template end -->
97
+
98
+
99
+ <!-- README_GPTQ.md-provided-files start -->
100
+ ## Provided files and GPTQ parameters
101
 
102
  Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
103
 
104
  Each separate quant is in a different branch. See below for instructions on fetching from different branches.
105
 
106
+ 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.
107
+
108
+ <details>
109
+ <summary>Explanation of GPTQ parameters</summary>
110
+
111
+ - Bits: The bit size of the quantised model.
112
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
113
+ - 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.
114
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
115
+ - 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).
116
+ - 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.
117
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
118
+
119
+ </details>
120
+
121
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
122
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
123
+ | [main](https://huggingface.co/TheBloke/13B-Ouroboros-GPTQ/tree/main) | 4 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 7.26 GB | Yes | 4-bit, without Act Order and group size 128g. |
124
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/13B-Ouroboros-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. |
125
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/13B-Ouroboros-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. |
126
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/13B-Ouroboros-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. |
127
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/13B-Ouroboros-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 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 with Act Order for even higher accuracy. |
128
+ | [gptq-8bit-64g-actorder_True](https://huggingface.co/TheBloke/13B-Ouroboros-GPTQ/tree/gptq-8bit-64g-actorder_True) | 8 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 13.95 GB | No | 8-bit, with group size 64g and Act Order for even higher inference quality. Poor AutoGPTQ CUDA speed. |
129
+ | [gptq-8bit-128g-actorder_False](https://huggingface.co/TheBloke/13B-Ouroboros-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. |
130
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/13B-Ouroboros-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. |
131
+
132
+ <!-- README_GPTQ.md-provided-files end -->
133
 
134
+ <!-- README_GPTQ.md-download-from-branches start -->
135
  ## How to download from branches
136
 
137
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/13B-Ouroboros-GPTQ:main`
138
  - With Git, you can clone a branch with:
139
  ```
140
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/13B-Ouroboros-GPTQ
141
  ```
142
  - In Python Transformers code, the branch is the `revision` parameter; see below.
143
+ <!-- README_GPTQ.md-download-from-branches end -->
144
+ <!-- README_GPTQ.md-text-generation-webui start -->
145
  ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
146
 
147
  Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
148
 
149
+ 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.
150
 
151
  1. Click the **Model tab**.
152
  2. Under **Download custom model or LoRA**, enter `TheBloke/13B-Ouroboros-GPTQ`.
153
+ - To download from a specific branch, enter for example `TheBloke/13B-Ouroboros-GPTQ:main`
154
  - see Provided Files above for the list of branches for each option.
155
  3. Click **Download**.
156
+ 4. The model will start downloading. Once it's finished it will say "Done".
157
  5. In the top left, click the refresh icon next to **Model**.
158
  6. In the **Model** dropdown, choose the model you just downloaded: `13B-Ouroboros-GPTQ`
159
  7. The model will automatically load, and is now ready for use!
160
  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.
161
+ * 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`.
162
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
163
+ <!-- README_GPTQ.md-text-generation-webui end -->
164
 
165
+ <!-- README_GPTQ.md-use-from-python start -->
166
  ## How to use this GPTQ model from Python code
167
 
168
+ ### Install the necessary packages
169
+
170
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
171
+
172
+ ```shell
173
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
174
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
175
+ ```
176
+
177
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
178
+
179
+ ```shell
180
+ pip3 uninstall -y auto-gptq
181
+ git clone https://github.com/PanQiWei/AutoGPTQ
182
+ cd AutoGPTQ
183
+ pip3 install .
184
+ ```
185
+
186
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
187
 
188
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
189
+ ```shell
190
+ pip3 uninstall -y transformers
191
+ pip3 install git+https://github.com/huggingface/transformers.git
192
+ ```
193
 
194
+ ### You can then use the following code
195
 
196
  ```python
197
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
198
 
199
  model_name_or_path = "TheBloke/13B-Ouroboros-GPTQ"
200
+ # To use a different branch, change revision
201
+ # For example: revision="main"
202
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
203
+ device_map="auto",
204
+ trust_remote_code=True,
205
+ revision="main")
206
 
207
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  prompt = "Tell me about AI"
210
  prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
211
 
212
+ ### Instruction:
213
+ {prompt}
214
 
215
  ### Response:
216
+
217
  '''
218
 
219
  print("\n\n*** Generate:")
220
 
221
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
222
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
223
  print(tokenizer.decode(output[0]))
224
 
225
  # Inference can also be done using transformers' pipeline
226
 
 
 
 
227
  print("*** Pipeline:")
228
  pipe = pipeline(
229
  "text-generation",
230
  model=model,
231
  tokenizer=tokenizer,
232
  max_new_tokens=512,
233
+ do_sample=True,
234
  temperature=0.7,
235
  top_p=0.95,
236
+ top_k=40,
237
+ repetition_penalty=1.1
238
  )
239
 
240
  print(pipe(prompt_template)[0]['generated_text'])
241
  ```
242
+ <!-- README_GPTQ.md-use-from-python end -->
243
 
244
+ <!-- README_GPTQ.md-compatibility start -->
245
  ## Compatibility
246
 
247
+ 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).
248
 
249
+ [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.
250
+
251
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
252
+ <!-- README_GPTQ.md-compatibility end -->
253
 
254
  <!-- footer start -->
255
  <!-- 200823 -->
 
259
 
260
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
261
 
262
+ ## Thanks, and how to contribute
263
 
264
  Thanks to the [chirper.ai](https://chirper.ai) team!
265
 
266
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
267
+
268
  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.
269
 
270
  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.
 
276
 
277
  **Special thanks to**: Aemon Algiz.
278
 
279
+ **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
280
 
281
 
282
  Thank you to all my generous patrons and donaters!
 
318
 
319
  Result:
320
 
321
+ 13B-Ouroboros, a model that seems uncensored and highly competent. So far only Alpaca instruction prompting has been tested and seems to work solidly well.
322
 
323
  ## Use:
324
 
 
356
 
357
  Also thanks to Meta for LLaMA.
358
 
359
+ Each model was hand picked and considered for what it could contribute to this ensemble.
360
  Thanks to each and every one of you for your incredible work developing some of the best things
361
  to come out of this community.