Upload README.md
Browse files
README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
---
|
|
|
2 |
datasets:
|
3 |
- PygmalionAI/PIPPA
|
4 |
- Open-Orca/OpenOrca
|
@@ -10,10 +11,37 @@ language:
|
|
10 |
- en
|
11 |
license: llama2
|
12 |
model_creator: PygmalionAI
|
13 |
-
model_link: https://huggingface.co/PygmalionAI/pygmalion-2-7b
|
14 |
model_name: Pygmalion 2 7B
|
15 |
model_type: llama
|
16 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
quantized_by: TheBloke
|
18 |
tags:
|
19 |
- text generation
|
@@ -53,6 +81,7 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
|
|
53 |
<!-- repositories-available start -->
|
54 |
## Repositories available
|
55 |
|
|
|
56 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ)
|
57 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Pygmalion-2-7B-GGUF)
|
58 |
* [PygmalionAI's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/PygmalionAI/pygmalion-2-7b)
|
@@ -78,6 +107,7 @@ You shall reply to the user while staying in character, and generate long respon
|
|
78 |
|
79 |
<!-- prompt-template end -->
|
80 |
|
|
|
81 |
<!-- README_GPTQ.md-provided-files start -->
|
82 |
## Provided files and GPTQ parameters
|
83 |
|
@@ -102,22 +132,22 @@ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches
|
|
102 |
|
103 |
| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|
104 |
| ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
|
105 |
-
| [main](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 3.90 GB | Yes |
|
106 |
-
| [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage.
|
107 |
-
| [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.02 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy.
|
108 |
-
| [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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.
|
109 |
-
| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.01 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements
|
110 |
-
| [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.16 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy.
|
111 |
|
112 |
<!-- README_GPTQ.md-provided-files end -->
|
113 |
|
114 |
<!-- README_GPTQ.md-download-from-branches start -->
|
115 |
## How to download from branches
|
116 |
|
117 |
-
- In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Pygmalion-2-7B-GPTQ:
|
118 |
- With Git, you can clone a branch with:
|
119 |
```
|
120 |
-
git clone --single-branch --branch
|
121 |
```
|
122 |
- In Python Transformers code, the branch is the `revision` parameter; see below.
|
123 |
<!-- README_GPTQ.md-download-from-branches end -->
|
@@ -130,7 +160,7 @@ It is strongly recommended to use the text-generation-webui one-click-installers
|
|
130 |
|
131 |
1. Click the **Model tab**.
|
132 |
2. Under **Download custom model or LoRA**, enter `TheBloke/Pygmalion-2-7B-GPTQ`.
|
133 |
-
- To download from a specific branch, enter for example `TheBloke/Pygmalion-2-7B-GPTQ:
|
134 |
- see Provided Files above for the list of branches for each option.
|
135 |
3. Click **Download**.
|
136 |
4. The model will start downloading. Once it's finished it will say "Done".
|
@@ -178,10 +208,10 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
|
178 |
|
179 |
model_name_or_path = "TheBloke/Pygmalion-2-7B-GPTQ"
|
180 |
# To use a different branch, change revision
|
181 |
-
# For example: revision="
|
182 |
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
|
183 |
-
torch_dtype=torch.float16,
|
184 |
device_map="auto",
|
|
|
185 |
revision="main")
|
186 |
|
187 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
@@ -197,7 +227,7 @@ You shall reply to the user while staying in character, and generate long respon
|
|
197 |
print("\n\n*** Generate:")
|
198 |
|
199 |
input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
|
200 |
-
output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
|
201 |
print(tokenizer.decode(output[0]))
|
202 |
|
203 |
# Inference can also be done using transformers' pipeline
|
@@ -208,9 +238,11 @@ pipe = pipeline(
|
|
208 |
model=model,
|
209 |
tokenizer=tokenizer,
|
210 |
max_new_tokens=512,
|
|
|
211 |
temperature=0.7,
|
212 |
top_p=0.95,
|
213 |
-
|
|
|
214 |
)
|
215 |
|
216 |
print(pipe(prompt_template)[0]['generated_text'])
|
@@ -235,10 +267,12 @@ For further support, and discussions on these models and AI in general, join us
|
|
235 |
|
236 |
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
237 |
|
238 |
-
## Thanks, and how to contribute
|
239 |
|
240 |
Thanks to the [chirper.ai](https://chirper.ai) team!
|
241 |
|
|
|
|
|
242 |
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.
|
243 |
|
244 |
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.
|
@@ -250,7 +284,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
|
|
250 |
|
251 |
**Special thanks to**: Aemon Algiz.
|
252 |
|
253 |
-
**Patreon special mentions**:
|
254 |
|
255 |
|
256 |
Thank you to all my generous patrons and donaters!
|
@@ -309,3 +343,8 @@ The intended use-case for this model is fictional writing for entertainment purp
|
|
309 |
As such, it was **not** fine-tuned to be safe and harmless: the base model _and_ this fine-tune have been trained on data known to contain profanity and texts that
|
310 |
are lewd or otherwise offensive. It may produce socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive.
|
311 |
Outputs might often be factually wrong or misleading.
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
base_model: https://huggingface.co/PygmalionAI/pygmalion-2-7b
|
3 |
datasets:
|
4 |
- PygmalionAI/PIPPA
|
5 |
- Open-Orca/OpenOrca
|
|
|
11 |
- en
|
12 |
license: llama2
|
13 |
model_creator: PygmalionAI
|
|
|
14 |
model_name: Pygmalion 2 7B
|
15 |
model_type: llama
|
16 |
pipeline_tag: text-generation
|
17 |
+
prompt_template: 'The model has been trained on prompts using three different roles,
|
18 |
+
which are denoted by the following tokens: `<|system|>`, `<|user|>` and `<|model|>`.
|
19 |
+
|
20 |
+
|
21 |
+
The `<|system|>` prompt can be used to inject out-of-channel information behind
|
22 |
+
the scenes, while the `<|user|>` prompt should be used to indicate user input.
|
23 |
+
|
24 |
+
The `<|model|>` token should then be used to indicate that the model should generate
|
25 |
+
a response. These tokens can happen multiple times and be chained up to form a conversation
|
26 |
+
history.
|
27 |
+
|
28 |
+
|
29 |
+
The system prompt has been designed to allow the model to "enter" various modes
|
30 |
+
and dictate the reply length. Here''s an example:
|
31 |
+
|
32 |
+
|
33 |
+
```
|
34 |
+
|
35 |
+
<|system|>Enter RP mode. Pretend to be {{char}} whose persona follows:
|
36 |
+
|
37 |
+
{{persona}}
|
38 |
+
|
39 |
+
|
40 |
+
You shall reply to the user while staying in character, and generate long responses.
|
41 |
+
|
42 |
+
```
|
43 |
+
|
44 |
+
'
|
45 |
quantized_by: TheBloke
|
46 |
tags:
|
47 |
- text generation
|
|
|
81 |
<!-- repositories-available start -->
|
82 |
## Repositories available
|
83 |
|
84 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Pygmalion-2-7B-AWQ)
|
85 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ)
|
86 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Pygmalion-2-7B-GGUF)
|
87 |
* [PygmalionAI's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/PygmalionAI/pygmalion-2-7b)
|
|
|
107 |
|
108 |
<!-- prompt-template end -->
|
109 |
|
110 |
+
|
111 |
<!-- README_GPTQ.md-provided-files start -->
|
112 |
## Provided files and GPTQ parameters
|
113 |
|
|
|
132 |
|
133 |
| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|
134 |
| ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
|
135 |
+
| [main](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 3.90 GB | Yes | 4-bit, without Act Order and group size 128g. |
|
136 |
+
| [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
|
137 |
+
| [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.02 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
|
138 |
+
| [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 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. |
|
139 |
+
| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.01 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
|
140 |
+
| [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.16 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
|
141 |
|
142 |
<!-- README_GPTQ.md-provided-files end -->
|
143 |
|
144 |
<!-- README_GPTQ.md-download-from-branches start -->
|
145 |
## How to download from branches
|
146 |
|
147 |
+
- In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Pygmalion-2-7B-GPTQ:main`
|
148 |
- With Git, you can clone a branch with:
|
149 |
```
|
150 |
+
git clone --single-branch --branch main https://huggingface.co/TheBloke/Pygmalion-2-7B-GPTQ
|
151 |
```
|
152 |
- In Python Transformers code, the branch is the `revision` parameter; see below.
|
153 |
<!-- README_GPTQ.md-download-from-branches end -->
|
|
|
160 |
|
161 |
1. Click the **Model tab**.
|
162 |
2. Under **Download custom model or LoRA**, enter `TheBloke/Pygmalion-2-7B-GPTQ`.
|
163 |
+
- To download from a specific branch, enter for example `TheBloke/Pygmalion-2-7B-GPTQ:main`
|
164 |
- see Provided Files above for the list of branches for each option.
|
165 |
3. Click **Download**.
|
166 |
4. The model will start downloading. Once it's finished it will say "Done".
|
|
|
208 |
|
209 |
model_name_or_path = "TheBloke/Pygmalion-2-7B-GPTQ"
|
210 |
# To use a different branch, change revision
|
211 |
+
# For example: revision="main"
|
212 |
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
|
|
|
213 |
device_map="auto",
|
214 |
+
trust_remote_code=False,
|
215 |
revision="main")
|
216 |
|
217 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
|
|
227 |
print("\n\n*** Generate:")
|
228 |
|
229 |
input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
|
230 |
+
output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
|
231 |
print(tokenizer.decode(output[0]))
|
232 |
|
233 |
# Inference can also be done using transformers' pipeline
|
|
|
238 |
model=model,
|
239 |
tokenizer=tokenizer,
|
240 |
max_new_tokens=512,
|
241 |
+
do_sample=True,
|
242 |
temperature=0.7,
|
243 |
top_p=0.95,
|
244 |
+
top_k=40,
|
245 |
+
repetition_penalty=1.1
|
246 |
)
|
247 |
|
248 |
print(pipe(prompt_template)[0]['generated_text'])
|
|
|
267 |
|
268 |
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
269 |
|
270 |
+
## Thanks, and how to contribute
|
271 |
|
272 |
Thanks to the [chirper.ai](https://chirper.ai) team!
|
273 |
|
274 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
275 |
+
|
276 |
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.
|
277 |
|
278 |
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.
|
|
|
284 |
|
285 |
**Special thanks to**: Aemon Algiz.
|
286 |
|
287 |
+
**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
|
288 |
|
289 |
|
290 |
Thank you to all my generous patrons and donaters!
|
|
|
343 |
As such, it was **not** fine-tuned to be safe and harmless: the base model _and_ this fine-tune have been trained on data known to contain profanity and texts that
|
344 |
are lewd or otherwise offensive. It may produce socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive.
|
345 |
Outputs might often be factually wrong or misleading.
|
346 |
+
|
347 |
+
## Acknowledgements
|
348 |
+
We would like to thank [SpicyChat](https://spicychat.ai/) for sponsoring the training for this model.
|
349 |
+
|
350 |
+
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|