Upload README.md
Browse files
README.md
CHANGED
@@ -1,14 +1,17 @@
|
|
1 |
---
|
2 |
datasets:
|
3 |
- garage-bAInd/Open-Platypus
|
|
|
4 |
inference: false
|
5 |
language:
|
6 |
- en
|
7 |
-
|
|
|
8 |
model_creator: Open-Orca
|
9 |
model_link: https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B
|
10 |
model_name: OpenOrca Platypus2 13B
|
11 |
model_type: llama
|
|
|
12 |
quantized_by: TheBloke
|
13 |
---
|
14 |
|
@@ -33,18 +36,24 @@ quantized_by: TheBloke
|
|
33 |
- Model creator: [Open-Orca](https://huggingface.co/Open-Orca)
|
34 |
- Original model: [OpenOrca Platypus2 13B](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B)
|
35 |
|
|
|
36 |
## Description
|
37 |
|
38 |
This repo contains GPTQ model files for [Open-Orca's OpenOrca Platypus2 13B](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B).
|
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 |
## Repositories available
|
43 |
|
44 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ)
|
45 |
-
* [2, 3, 4, 5, 6 and 8-bit
|
|
|
46 |
* [Open-Orca's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B)
|
|
|
47 |
|
|
|
48 |
## Prompt template: Alpaca-InstructOnly
|
49 |
|
50 |
```
|
@@ -53,22 +62,26 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
|
|
53 |
{prompt}
|
54 |
|
55 |
### Response:
|
|
|
56 |
```
|
57 |
|
|
|
|
|
|
|
58 |
## Provided files and GPTQ parameters
|
59 |
|
60 |
Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
|
61 |
|
62 |
Each separate quant is in a different branch. See below for instructions on fetching from different branches.
|
63 |
|
64 |
-
All GPTQ files are made with AutoGPTQ.
|
65 |
|
66 |
<details>
|
67 |
<summary>Explanation of GPTQ parameters</summary>
|
68 |
|
69 |
- Bits: The bit size of the quantised model.
|
70 |
- GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
|
71 |
-
- 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.
|
72 |
- Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
|
73 |
- 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).
|
74 |
- 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.
|
@@ -78,13 +91,16 @@ All GPTQ files are made with AutoGPTQ.
|
|
78 |
|
79 |
| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|
80 |
| ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
|
81 |
-
| [main](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
|
82 |
-
| [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
83 |
-
| [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
84 |
-
| [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
85 |
-
| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
|
86 |
| [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
87 |
|
|
|
|
|
|
|
88 |
## How to download from branches
|
89 |
|
90 |
- In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/OpenOrca-Platypus2-13B-GPTQ:gptq-4bit-32g-actorder_True`
|
@@ -93,79 +109,79 @@ All GPTQ files are made with AutoGPTQ.
|
|
93 |
git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ
|
94 |
```
|
95 |
- In Python Transformers code, the branch is the `revision` parameter; see below.
|
96 |
-
|
|
|
97 |
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
98 |
|
99 |
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
100 |
|
101 |
-
It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
|
102 |
|
103 |
1. Click the **Model tab**.
|
104 |
2. Under **Download custom model or LoRA**, enter `TheBloke/OpenOrca-Platypus2-13B-GPTQ`.
|
105 |
- To download from a specific branch, enter for example `TheBloke/OpenOrca-Platypus2-13B-GPTQ:gptq-4bit-32g-actorder_True`
|
106 |
- see Provided Files above for the list of branches for each option.
|
107 |
3. Click **Download**.
|
108 |
-
4. The model will start downloading. Once it's finished it will say "Done"
|
109 |
5. In the top left, click the refresh icon next to **Model**.
|
110 |
6. In the **Model** dropdown, choose the model you just downloaded: `OpenOrca-Platypus2-13B-GPTQ`
|
111 |
7. The model will automatically load, and is now ready for use!
|
112 |
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.
|
113 |
-
* Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
|
114 |
9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
|
|
|
115 |
|
|
|
116 |
## How to use this GPTQ model from Python code
|
117 |
|
118 |
-
|
119 |
|
120 |
-
|
121 |
-
pip3 install auto-gptq
|
122 |
-
```
|
123 |
|
124 |
-
|
|
|
|
|
125 |
```
|
|
|
|
|
|
|
|
|
126 |
pip3 uninstall -y auto-gptq
|
127 |
git clone https://github.com/PanQiWei/AutoGPTQ
|
128 |
cd AutoGPTQ
|
129 |
pip3 install .
|
130 |
```
|
131 |
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
|
134 |
```python
|
135 |
-
from transformers import AutoTokenizer, pipeline
|
136 |
-
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
|
137 |
|
138 |
model_name_or_path = "TheBloke/OpenOrca-Platypus2-13B-GPTQ"
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
141 |
|
142 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
143 |
|
144 |
-
model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
|
145 |
-
use_safetensors=True,
|
146 |
-
trust_remote_code=False,
|
147 |
-
device="cuda:0",
|
148 |
-
use_triton=use_triton,
|
149 |
-
quantize_config=None)
|
150 |
-
|
151 |
-
"""
|
152 |
-
# To download from a specific branch, use the revision parameter, as in this example:
|
153 |
-
# Note that `revision` requires AutoGPTQ 0.3.1 or later!
|
154 |
-
|
155 |
-
model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
|
156 |
-
revision="gptq-4bit-32g-actorder_True",
|
157 |
-
use_safetensors=True,
|
158 |
-
trust_remote_code=False,
|
159 |
-
device="cuda:0",
|
160 |
-
quantize_config=None)
|
161 |
-
"""
|
162 |
-
|
163 |
prompt = "Tell me about AI"
|
164 |
prompt_template=f'''### Instruction:
|
165 |
|
166 |
{prompt}
|
167 |
|
168 |
### Response:
|
|
|
169 |
'''
|
170 |
|
171 |
print("\n\n*** Generate:")
|
@@ -176,9 +192,6 @@ print(tokenizer.decode(output[0]))
|
|
176 |
|
177 |
# Inference can also be done using transformers' pipeline
|
178 |
|
179 |
-
# Prevent printing spurious transformers error when using pipeline with AutoGPTQ
|
180 |
-
logging.set_verbosity(logging.CRITICAL)
|
181 |
-
|
182 |
print("*** Pipeline:")
|
183 |
pipe = pipeline(
|
184 |
"text-generation",
|
@@ -192,12 +205,17 @@ pipe = pipeline(
|
|
192 |
|
193 |
print(pipe(prompt_template)[0]['generated_text'])
|
194 |
```
|
|
|
195 |
|
|
|
196 |
## Compatibility
|
197 |
|
198 |
-
The files provided
|
|
|
|
|
199 |
|
200 |
-
|
|
|
201 |
|
202 |
<!-- footer start -->
|
203 |
<!-- 200823 -->
|
@@ -222,7 +240,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
|
|
222 |
|
223 |
**Special thanks to**: Aemon Algiz.
|
224 |
|
225 |
-
**Patreon special mentions**:
|
226 |
|
227 |
|
228 |
Thank you to all my generous patrons and donaters!
|
@@ -257,11 +275,14 @@ We will also give sneak-peak announcements on our Discord, which you can find he
|
|
257 |
|
258 |
https://AlignmentLab.ai
|
259 |
|
260 |
-
#
|
|
|
|
|
261 |
|
262 |
![HF Leaderboard](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B/resolve/main/Images/OrcaPlatypus13BHFLeaderboard.webp)
|
263 |
|
264 |
-
|
|
|
265 |
|-----------------------|-------|
|
266 |
| MMLU (5-shot) | 59.5 |
|
267 |
| ARC (25-shot) | 62.88 |
|
@@ -269,19 +290,42 @@ https://AlignmentLab.ai
|
|
269 |
| TruthfulQA (0-shot) | 52.69 |
|
270 |
| Avg. | 64.56 |
|
271 |
|
272 |
-
We use [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) to run the benchmark tests above, using the same version as the HuggingFace LLM Leaderboard.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
|
274 |
|
275 |
# Model Details
|
276 |
|
277 |
* **Trained by**: **Platypus2-13B** trained by Cole Hunter & Ariel Lee; **OpenOrcaxOpenChat-Preview2-13B** trained by Open-Orca
|
278 |
-
* **Model type:** **OpenOrca-Platypus2-13B** is an auto-regressive language model based on the
|
279 |
* **Language(s)**: English
|
280 |
* **License for Platypus2-13B base weights**: Non-Commercial Creative Commons license ([CC BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/))
|
281 |
-
* **License for OpenOrcaxOpenChat-Preview2-13B base weights**:
|
282 |
|
283 |
|
284 |
-
#
|
|
|
|
|
|
|
285 |
```
|
286 |
### Instruction:
|
287 |
|
@@ -291,26 +335,31 @@ We use [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-eval
|
|
291 |
```
|
292 |
|
293 |
|
294 |
-
|
295 |
|
296 |
-
OpenChat Llama2 V1: see [OpenOrcaxOpenChat-Preview2-13B](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B) for additional information.
|
297 |
|
298 |
|
299 |
-
# Training
|
|
|
|
|
300 |
|
301 |
`garage-bAInd/Platypus2-13B` trained using STEM and logic based dataset [`garage-bAInd/Open-Platypus`](https://huggingface.co/datasets/garage-bAInd/Open-Platypus).
|
302 |
|
303 |
-
Please see our [paper](https://
|
|
|
|
|
304 |
|
305 |
-
[`Open-Orca/OpenOrcaxOpenChat-Preview2-13B`] trained using a refined subset of most of the GPT-4 data from the [OpenOrca dataset](https://huggingface.co/datasets/Open-Orca/OpenOrca).
|
306 |
|
|
|
307 |
|
308 |
-
|
|
|
309 |
|
310 |
-
`Open-Orca/Platypus2-13B` was instruction fine-tuned using LoRA on 1 A100 80GB. For training details and inference instructions please see the [Platypus](https://github.com/arielnlee/Platypus) GitHub repo.
|
311 |
|
|
|
312 |
|
313 |
-
|
314 |
|
315 |
Install LM Evaluation Harness:
|
316 |
```
|
@@ -323,7 +372,7 @@ git checkout b281b0921b636bc36ad05c0b0b0763bd6dd43463
|
|
323 |
# install
|
324 |
pip install -e .
|
325 |
```
|
326 |
-
Each task was evaluated on a single A100
|
327 |
|
328 |
ARC:
|
329 |
```
|
@@ -346,7 +395,7 @@ python main.py --model hf-causal-experimental --model_args pretrained=Open-Orca/
|
|
346 |
```
|
347 |
|
348 |
|
349 |
-
|
350 |
|
351 |
Llama 2 and fine-tuned variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2 and any fine-tuned varient's potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2 variants, developers should perform safety testing and tuning tailored to their specific applications of the model.
|
352 |
|
@@ -356,22 +405,20 @@ Please see the Responsible Use Guide available at https://ai.meta.com/llama/resp
|
|
356 |
# Citations
|
357 |
|
358 |
```bibtex
|
359 |
-
@
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
|
|
|
|
364 |
}
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
journal={CoRR},
|
371 |
-
year={2021}
|
372 |
}
|
373 |
-
```
|
374 |
-
```bibtex
|
375 |
@software{OpenOrcaxOpenChatPreview2,
|
376 |
title = {OpenOrcaxOpenChatPreview2: Llama2-13B Model Instruct-tuned on Filtered OpenOrcaV1 GPT-4 Dataset},
|
377 |
author = {Guan Wang and Bleys Goodson and Wing Lian and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
|
@@ -380,8 +427,6 @@ Please see the Responsible Use Guide available at https://ai.meta.com/llama/resp
|
|
380 |
journal = {HuggingFace repository},
|
381 |
howpublished = {\url{https://https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B},
|
382 |
}
|
383 |
-
```
|
384 |
-
```bibtex
|
385 |
@software{openchat,
|
386 |
title = {{OpenChat: Advancing Open-source Language Models with Imperfect Data}},
|
387 |
author = {Wang, Guan and Cheng, Sijie and Yu, Qiying and Liu, Changling},
|
@@ -391,4 +436,32 @@ Please see the Responsible Use Guide available at https://ai.meta.com/llama/resp
|
|
391 |
year = {2023},
|
392 |
month = {7},
|
393 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
```
|
|
|
1 |
---
|
2 |
datasets:
|
3 |
- garage-bAInd/Open-Platypus
|
4 |
+
- Open-Orca/OpenOrca
|
5 |
inference: false
|
6 |
language:
|
7 |
- en
|
8 |
+
library_name: transformers
|
9 |
+
license: llama2
|
10 |
model_creator: Open-Orca
|
11 |
model_link: https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B
|
12 |
model_name: OpenOrca Platypus2 13B
|
13 |
model_type: llama
|
14 |
+
pipeline_tag: text-generation
|
15 |
quantized_by: TheBloke
|
16 |
---
|
17 |
|
|
|
36 |
- Model creator: [Open-Orca](https://huggingface.co/Open-Orca)
|
37 |
- Original model: [OpenOrca Platypus2 13B](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B)
|
38 |
|
39 |
+
<!-- description start -->
|
40 |
## Description
|
41 |
|
42 |
This repo contains GPTQ model files for [Open-Orca's OpenOrca Platypus2 13B](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B).
|
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 |
+
<!-- description end -->
|
47 |
+
<!-- repositories-available start -->
|
48 |
## Repositories available
|
49 |
|
50 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ)
|
51 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GGUF)
|
52 |
+
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GGML)
|
53 |
* [Open-Orca's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B)
|
54 |
+
<!-- repositories-available end -->
|
55 |
|
56 |
+
<!-- prompt-template start -->
|
57 |
## Prompt template: Alpaca-InstructOnly
|
58 |
|
59 |
```
|
|
|
62 |
{prompt}
|
63 |
|
64 |
### Response:
|
65 |
+
|
66 |
```
|
67 |
|
68 |
+
<!-- prompt-template end -->
|
69 |
+
|
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.
|
|
|
91 |
|
92 |
| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|
93 |
| ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
|
94 |
+
| [main](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
|
95 |
+
| [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
96 |
+
| [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
97 |
+
| [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
98 |
+
| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
|
99 |
| [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
100 |
|
101 |
+
<!-- README_GPTQ.md-provided-files end -->
|
102 |
+
|
103 |
+
<!-- README_GPTQ.md-download-from-branches start -->
|
104 |
## How to download from branches
|
105 |
|
106 |
- In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/OpenOrca-Platypus2-13B-GPTQ:gptq-4bit-32g-actorder_True`
|
|
|
109 |
git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/OpenOrca-Platypus2-13B-GPTQ
|
110 |
```
|
111 |
- In Python Transformers code, the branch is the `revision` parameter; see below.
|
112 |
+
<!-- README_GPTQ.md-download-from-branches end -->
|
113 |
+
<!-- README_GPTQ.md-text-generation-webui start -->
|
114 |
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
115 |
|
116 |
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
117 |
|
118 |
+
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.
|
119 |
|
120 |
1. Click the **Model tab**.
|
121 |
2. Under **Download custom model or LoRA**, enter `TheBloke/OpenOrca-Platypus2-13B-GPTQ`.
|
122 |
- To download from a specific branch, enter for example `TheBloke/OpenOrca-Platypus2-13B-GPTQ:gptq-4bit-32g-actorder_True`
|
123 |
- see Provided Files above for the list of branches for each option.
|
124 |
3. Click **Download**.
|
125 |
+
4. The model will start downloading. Once it's finished it will say "Done".
|
126 |
5. In the top left, click the refresh icon next to **Model**.
|
127 |
6. In the **Model** dropdown, choose the model you just downloaded: `OpenOrca-Platypus2-13B-GPTQ`
|
128 |
7. The model will automatically load, and is now ready for use!
|
129 |
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.
|
130 |
+
* 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`.
|
131 |
9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
|
132 |
+
<!-- README_GPTQ.md-text-generation-webui end -->
|
133 |
|
134 |
+
<!-- README_GPTQ.md-use-from-python start -->
|
135 |
## How to use this GPTQ model from Python code
|
136 |
|
137 |
+
### Install the necessary packages
|
138 |
|
139 |
+
Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
|
|
|
|
|
140 |
|
141 |
+
```shell
|
142 |
+
pip3 install transformers>=4.32.0 optimum>=1.12.0
|
143 |
+
pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
|
144 |
```
|
145 |
+
|
146 |
+
If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
|
147 |
+
|
148 |
+
```shell
|
149 |
pip3 uninstall -y auto-gptq
|
150 |
git clone https://github.com/PanQiWei/AutoGPTQ
|
151 |
cd AutoGPTQ
|
152 |
pip3 install .
|
153 |
```
|
154 |
|
155 |
+
### For CodeLlama models only: you must use Transformers 4.33.0 or later.
|
156 |
+
|
157 |
+
If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
|
158 |
+
```shell
|
159 |
+
pip3 uninstall -y transformers
|
160 |
+
pip3 install git+https://github.com/huggingface/transformers.git
|
161 |
+
```
|
162 |
+
|
163 |
+
### You can then use the following code
|
164 |
|
165 |
```python
|
166 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
|
|
167 |
|
168 |
model_name_or_path = "TheBloke/OpenOrca-Platypus2-13B-GPTQ"
|
169 |
+
# To use a different branch, change revision
|
170 |
+
# For example: revision="gptq-4bit-32g-actorder_True"
|
171 |
+
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
|
172 |
+
torch_dtype=torch.float16,
|
173 |
+
device_map="auto",
|
174 |
+
revision="main")
|
175 |
|
176 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
prompt = "Tell me about AI"
|
179 |
prompt_template=f'''### Instruction:
|
180 |
|
181 |
{prompt}
|
182 |
|
183 |
### Response:
|
184 |
+
|
185 |
'''
|
186 |
|
187 |
print("\n\n*** Generate:")
|
|
|
192 |
|
193 |
# Inference can also be done using transformers' pipeline
|
194 |
|
|
|
|
|
|
|
195 |
print("*** Pipeline:")
|
196 |
pipe = pipeline(
|
197 |
"text-generation",
|
|
|
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 -->
|
|
|
240 |
|
241 |
**Special thanks to**: Aemon Algiz.
|
242 |
|
243 |
+
**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
|
244 |
|
245 |
|
246 |
Thank you to all my generous patrons and donaters!
|
|
|
275 |
|
276 |
https://AlignmentLab.ai
|
277 |
|
278 |
+
# Evaluation
|
279 |
+
|
280 |
+
## HuggingFace Leaderboard Performance
|
281 |
|
282 |
![HF Leaderboard](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B/resolve/main/Images/OrcaPlatypus13BHFLeaderboard.webp)
|
283 |
|
284 |
+
|
285 |
+
| Metric | Value |
|
286 |
|-----------------------|-------|
|
287 |
| MMLU (5-shot) | 59.5 |
|
288 |
| ARC (25-shot) | 62.88 |
|
|
|
290 |
| TruthfulQA (0-shot) | 52.69 |
|
291 |
| Avg. | 64.56 |
|
292 |
|
293 |
+
We use [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) to run the benchmark tests above, using the same version as the HuggingFace LLM Leaderboard.
|
294 |
+
|
295 |
+
Please see below for detailed instructions on reproducing benchmark results.
|
296 |
+
|
297 |
+
|
298 |
+
## AGIEval Performance
|
299 |
+
|
300 |
+
We compare our results to our base Preview2 model (using LM Evaluation Harness).
|
301 |
+
|
302 |
+
We find **112%** of the base model's performance on AGI Eval, averaging **0.463**.
|
303 |
+
A large part of this boost is the substantial improvement to LSAT Logical Reasoning performance.
|
304 |
+
|
305 |
+
![OpenOrca-Platypus2-13B AGIEval Performance](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B/resolve/main/Images/OrcaPlatypus13BAGIEval.webp "AGIEval Performance")
|
306 |
+
|
307 |
+
## BigBench-Hard Performance
|
308 |
+
|
309 |
+
We compare our results to our base Preview2 model (using LM Evaluation Harness).
|
310 |
+
|
311 |
+
We find **105%** of the base model's performance on BigBench-Hard, averaging **0.442**.
|
312 |
+
|
313 |
+
![OpenOrca-Platypus2-13B BigBench-Hard Performance](https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B/resolve/main/Images/OrcaPlatypus13BBigBenchHard.webp "BigBench-Hard Performance")
|
314 |
|
315 |
|
316 |
# Model Details
|
317 |
|
318 |
* **Trained by**: **Platypus2-13B** trained by Cole Hunter & Ariel Lee; **OpenOrcaxOpenChat-Preview2-13B** trained by Open-Orca
|
319 |
+
* **Model type:** **OpenOrca-Platypus2-13B** is an auto-regressive language model based on the Lllama 2 transformer architecture.
|
320 |
* **Language(s)**: English
|
321 |
* **License for Platypus2-13B base weights**: Non-Commercial Creative Commons license ([CC BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/))
|
322 |
+
* **License for OpenOrcaxOpenChat-Preview2-13B base weights**: Llama 2 Commercial
|
323 |
|
324 |
|
325 |
+
# Prompting
|
326 |
+
|
327 |
+
## Prompt Template for base Platypus2-13B
|
328 |
+
|
329 |
```
|
330 |
### Instruction:
|
331 |
|
|
|
335 |
```
|
336 |
|
337 |
|
338 |
+
## Prompt Template for base OpenOrcaxOpenChat-Preview2-13B
|
339 |
|
340 |
+
OpenChat Llama2 V1: see [OpenOrcaxOpenChat-Preview2-13B](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B) for additional information.
|
341 |
|
342 |
|
343 |
+
# Training
|
344 |
+
|
345 |
+
## Training Datasets
|
346 |
|
347 |
`garage-bAInd/Platypus2-13B` trained using STEM and logic based dataset [`garage-bAInd/Open-Platypus`](https://huggingface.co/datasets/garage-bAInd/Open-Platypus).
|
348 |
|
349 |
+
Please see our [paper](https://arxiv.org/abs/2308.07317) and [project webpage](https://platypus-llm.github.io) for additional information.
|
350 |
+
|
351 |
+
`Open-Orca/OpenOrcaxOpenChat-Preview2-13B` trained using a refined subset of most of the GPT-4 data from the [OpenOrca dataset](https://huggingface.co/datasets/Open-Orca/OpenOrca).
|
352 |
|
|
|
353 |
|
354 |
+
## Training Procedure
|
355 |
|
356 |
+
`Open-Orca/Platypus2-13B` was instruction fine-tuned using LoRA on 1x A100-80GB.
|
357 |
+
For training details and inference instructions please see the [Platypus](https://github.com/arielnlee/Platypus) GitHub repo.
|
358 |
|
|
|
359 |
|
360 |
+
# Supplemental
|
361 |
|
362 |
+
## Reproducing Evaluation Results (for HuggingFace Leaderboard Eval)
|
363 |
|
364 |
Install LM Evaluation Harness:
|
365 |
```
|
|
|
372 |
# install
|
373 |
pip install -e .
|
374 |
```
|
375 |
+
Each task was evaluated on a single A100-80GB GPU.
|
376 |
|
377 |
ARC:
|
378 |
```
|
|
|
395 |
```
|
396 |
|
397 |
|
398 |
+
## Limitations and bias
|
399 |
|
400 |
Llama 2 and fine-tuned variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2 and any fine-tuned varient's potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2 variants, developers should perform safety testing and tuning tailored to their specific applications of the model.
|
401 |
|
|
|
405 |
# Citations
|
406 |
|
407 |
```bibtex
|
408 |
+
@software{hunterlee2023orcaplaty1
|
409 |
+
title = {OpenOrcaPlatypus: Llama2-13B Model Instruct-tuned on Filtered OpenOrcaV1 GPT-4 Dataset and Merged with divergent STEM and Logic Dataset Model},
|
410 |
+
author = {Ariel N. Lee and Cole J. Hunter and Nataniel Ruiz and Bleys Goodson and Wing Lian and Guan Wang and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
|
411 |
+
year = {2023},
|
412 |
+
publisher = {HuggingFace},
|
413 |
+
journal = {HuggingFace repository},
|
414 |
+
howpublished = {\url{https://huggingface.co/Open-Orca/OpenOrca-Platypus2-13B},
|
415 |
}
|
416 |
+
@article{platypus2023,
|
417 |
+
title={Platypus: Quick, Cheap, and Powerful Refinement of LLMs},
|
418 |
+
author={Ariel N. Lee and Cole J. Hunter and Nataniel Ruiz},
|
419 |
+
booktitle={arXiv preprint arxiv:2308.07317},
|
420 |
+
year={2023}
|
|
|
|
|
421 |
}
|
|
|
|
|
422 |
@software{OpenOrcaxOpenChatPreview2,
|
423 |
title = {OpenOrcaxOpenChatPreview2: Llama2-13B Model Instruct-tuned on Filtered OpenOrcaV1 GPT-4 Dataset},
|
424 |
author = {Guan Wang and Bleys Goodson and Wing Lian and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
|
|
|
427 |
journal = {HuggingFace repository},
|
428 |
howpublished = {\url{https://https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B},
|
429 |
}
|
|
|
|
|
430 |
@software{openchat,
|
431 |
title = {{OpenChat: Advancing Open-source Language Models with Imperfect Data}},
|
432 |
author = {Wang, Guan and Cheng, Sijie and Yu, Qiying and Liu, Changling},
|
|
|
436 |
year = {2023},
|
437 |
month = {7},
|
438 |
}
|
439 |
+
@misc{mukherjee2023orca,
|
440 |
+
title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
|
441 |
+
author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
|
442 |
+
year={2023},
|
443 |
+
eprint={2306.02707},
|
444 |
+
archivePrefix={arXiv},
|
445 |
+
primaryClass={cs.CL}
|
446 |
+
}
|
447 |
+
@misc{touvron2023llama,
|
448 |
+
title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
|
449 |
+
author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom},
|
450 |
+
year={2023},
|
451 |
+
eprint= arXiv 2307.09288
|
452 |
+
}
|
453 |
+
@misc{longpre2023flan,
|
454 |
+
title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning},
|
455 |
+
author={Shayne Longpre and Le Hou and Tu Vu and Albert Webson and Hyung Won Chung and Yi Tay and Denny Zhou and Quoc V. Le and Barret Zoph and Jason Wei and Adam Roberts},
|
456 |
+
year={2023},
|
457 |
+
eprint={2301.13688},
|
458 |
+
archivePrefix={arXiv},
|
459 |
+
primaryClass={cs.AI}
|
460 |
+
}
|
461 |
+
@article{hu2021lora,
|
462 |
+
title={LoRA: Low-Rank Adaptation of Large Language Models},
|
463 |
+
author={Hu, Edward J. and Shen, Yelong and Wallis, Phillip and Allen-Zhu, Zeyuan and Li, Yuanzhi and Wang, Shean and Chen, Weizhu},
|
464 |
+
journal={CoRR},
|
465 |
+
year={2021}
|
466 |
+
}
|
467 |
```
|