Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: KatyTheCutie/EstopianMaid-13B
|
3 |
+
inference: false
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
library_name: transformers
|
7 |
+
license: apache-2.0
|
8 |
+
model_creator: Katy Vetteriano
|
9 |
+
model_name: EstopianMaid 13B
|
10 |
+
model_type: llama
|
11 |
+
prompt_template: 'Below is an instruction that describes a task. Write a response
|
12 |
+
that appropriately completes the request.
|
13 |
+
|
14 |
+
|
15 |
+
### Instruction:
|
16 |
+
|
17 |
+
{prompt}
|
18 |
+
|
19 |
+
|
20 |
+
### Response:
|
21 |
+
|
22 |
+
'
|
23 |
+
quantized_by: TheBloke
|
24 |
+
tags:
|
25 |
+
- roleplay
|
26 |
+
- text-generation-inference
|
27 |
+
---
|
28 |
+
<!-- markdownlint-disable MD041 -->
|
29 |
+
|
30 |
+
<!-- header start -->
|
31 |
+
<!-- 200823 -->
|
32 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
33 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
34 |
+
</div>
|
35 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
36 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
37 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
38 |
+
</div>
|
39 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
40 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
<div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
|
44 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
45 |
+
<!-- header end -->
|
46 |
+
|
47 |
+
# EstopianMaid 13B - GPTQ
|
48 |
+
- Model creator: [Katy Vetteriano](https://huggingface.co/KatyTheCutie)
|
49 |
+
- Original model: [EstopianMaid 13B](https://huggingface.co/KatyTheCutie/EstopianMaid-13B)
|
50 |
+
|
51 |
+
<!-- description start -->
|
52 |
+
# Description
|
53 |
+
|
54 |
+
This repo contains GPTQ model files for [Katy Vetteriano's EstopianMaid 13B](https://huggingface.co/KatyTheCutie/EstopianMaid-13B).
|
55 |
+
|
56 |
+
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.
|
57 |
+
|
58 |
+
These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
|
59 |
+
|
60 |
+
<!-- description end -->
|
61 |
+
<!-- repositories-available start -->
|
62 |
+
## Repositories available
|
63 |
+
|
64 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/EstopianMaid-13B-AWQ)
|
65 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/EstopianMaid-13B-GPTQ)
|
66 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/EstopianMaid-13B-GGUF)
|
67 |
+
* [Katy Vetteriano's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/KatyTheCutie/EstopianMaid-13B)
|
68 |
+
<!-- repositories-available end -->
|
69 |
+
|
70 |
+
<!-- prompt-template start -->
|
71 |
+
## Prompt template: Alpaca
|
72 |
+
|
73 |
+
```
|
74 |
+
Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
75 |
+
|
76 |
+
### Instruction:
|
77 |
+
{prompt}
|
78 |
+
|
79 |
+
### Response:
|
80 |
+
|
81 |
+
```
|
82 |
+
|
83 |
+
<!-- prompt-template end -->
|
84 |
+
<!-- licensing start -->
|
85 |
+
## Licensing
|
86 |
+
|
87 |
+
The creator of the source model has listed its license as `apache-2.0`, and this quantization has therefore used that same license.
|
88 |
+
|
89 |
+
As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly.
|
90 |
+
|
91 |
+
In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [Katy Vetteriano's EstopianMaid 13B](https://huggingface.co/KatyTheCutie/EstopianMaid-13B).
|
92 |
+
<!-- licensing end -->
|
93 |
+
|
94 |
+
<!-- README_GPTQ.md-compatible clients start -->
|
95 |
+
## Known compatible clients / servers
|
96 |
+
|
97 |
+
GPTQ models are currently supported on Linux (NVidia/AMD) and Windows (NVidia only). macOS users: please use GGUF models.
|
98 |
+
|
99 |
+
These GPTQ models are known to work in the following inference servers/webuis.
|
100 |
+
|
101 |
+
- [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
102 |
+
- [KoboldAI United](https://github.com/henk717/koboldai)
|
103 |
+
- [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
|
104 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
105 |
+
|
106 |
+
This may not be a complete list; if you know of others, please let me know!
|
107 |
+
<!-- README_GPTQ.md-compatible clients end -->
|
108 |
+
|
109 |
+
<!-- README_GPTQ.md-provided-files start -->
|
110 |
+
## Provided files, and GPTQ parameters
|
111 |
+
|
112 |
+
Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
|
113 |
+
|
114 |
+
Each separate quant is in a different branch. See below for instructions on fetching from different branches.
|
115 |
+
|
116 |
+
Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
|
117 |
+
|
118 |
+
<details>
|
119 |
+
<summary>Explanation of GPTQ parameters</summary>
|
120 |
+
|
121 |
+
- Bits: The bit size of the quantised model.
|
122 |
+
- GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
|
123 |
+
- 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.
|
124 |
+
- Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
|
125 |
+
- GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration 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).
|
126 |
+
- 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.
|
127 |
+
- ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit.
|
128 |
+
|
129 |
+
</details>
|
130 |
+
|
131 |
+
| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|
132 |
+
| ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
|
133 |
+
| [main](https://huggingface.co/TheBloke/EstopianMaid-13B-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 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. |
|
134 |
+
| [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/EstopianMaid-13B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
|
135 |
+
| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/EstopianMaid-13B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
|
136 |
+
| [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/EstopianMaid-13B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
|
137 |
+
| [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/EstopianMaid-13B-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 14.54 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
|
138 |
+
| [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/EstopianMaid-13B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
|
139 |
+
|
140 |
+
<!-- README_GPTQ.md-provided-files end -->
|
141 |
+
|
142 |
+
<!-- README_GPTQ.md-download-from-branches start -->
|
143 |
+
## How to download, including from branches
|
144 |
+
|
145 |
+
### In text-generation-webui
|
146 |
+
|
147 |
+
To download from the `main` branch, enter `TheBloke/EstopianMaid-13B-GPTQ` in the "Download model" box.
|
148 |
+
|
149 |
+
To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/EstopianMaid-13B-GPTQ:gptq-4bit-32g-actorder_True`
|
150 |
+
|
151 |
+
### From the command line
|
152 |
+
|
153 |
+
I recommend using the `huggingface-hub` Python library:
|
154 |
+
|
155 |
+
```shell
|
156 |
+
pip3 install huggingface-hub
|
157 |
+
```
|
158 |
+
|
159 |
+
To download the `main` branch to a folder called `EstopianMaid-13B-GPTQ`:
|
160 |
+
|
161 |
+
```shell
|
162 |
+
mkdir EstopianMaid-13B-GPTQ
|
163 |
+
huggingface-cli download TheBloke/EstopianMaid-13B-GPTQ --local-dir EstopianMaid-13B-GPTQ --local-dir-use-symlinks False
|
164 |
+
```
|
165 |
+
|
166 |
+
To download from a different branch, add the `--revision` parameter:
|
167 |
+
|
168 |
+
```shell
|
169 |
+
mkdir EstopianMaid-13B-GPTQ
|
170 |
+
huggingface-cli download TheBloke/EstopianMaid-13B-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir EstopianMaid-13B-GPTQ --local-dir-use-symlinks False
|
171 |
+
```
|
172 |
+
|
173 |
+
<details>
|
174 |
+
<summary>More advanced huggingface-cli download usage</summary>
|
175 |
+
|
176 |
+
If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Hugging Face cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.
|
177 |
+
|
178 |
+
The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
|
179 |
+
|
180 |
+
For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
|
181 |
+
|
182 |
+
To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
|
183 |
+
|
184 |
+
```shell
|
185 |
+
pip3 install hf_transfer
|
186 |
+
```
|
187 |
+
|
188 |
+
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
189 |
+
|
190 |
+
```shell
|
191 |
+
mkdir EstopianMaid-13B-GPTQ
|
192 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/EstopianMaid-13B-GPTQ --local-dir EstopianMaid-13B-GPTQ --local-dir-use-symlinks False
|
193 |
+
```
|
194 |
+
|
195 |
+
Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
|
196 |
+
</details>
|
197 |
+
|
198 |
+
### With `git` (**not** recommended)
|
199 |
+
|
200 |
+
To clone a specific branch with `git`, use a command like this:
|
201 |
+
|
202 |
+
```shell
|
203 |
+
git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/EstopianMaid-13B-GPTQ
|
204 |
+
```
|
205 |
+
|
206 |
+
Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.)
|
207 |
+
|
208 |
+
<!-- README_GPTQ.md-download-from-branches end -->
|
209 |
+
<!-- README_GPTQ.md-text-generation-webui start -->
|
210 |
+
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
211 |
+
|
212 |
+
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
213 |
+
|
214 |
+
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.
|
215 |
+
|
216 |
+
1. Click the **Model tab**.
|
217 |
+
2. Under **Download custom model or LoRA**, enter `TheBloke/EstopianMaid-13B-GPTQ`.
|
218 |
+
|
219 |
+
- To download from a specific branch, enter for example `TheBloke/EstopianMaid-13B-GPTQ:gptq-4bit-32g-actorder_True`
|
220 |
+
- see Provided Files above for the list of branches for each option.
|
221 |
+
|
222 |
+
3. Click **Download**.
|
223 |
+
4. The model will start downloading. Once it's finished it will say "Done".
|
224 |
+
5. In the top left, click the refresh icon next to **Model**.
|
225 |
+
6. In the **Model** dropdown, choose the model you just downloaded: `EstopianMaid-13B-GPTQ`
|
226 |
+
7. The model will automatically load, and is now ready for use!
|
227 |
+
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.
|
228 |
+
|
229 |
+
- 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`.
|
230 |
+
|
231 |
+
9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
|
232 |
+
|
233 |
+
<!-- README_GPTQ.md-text-generation-webui end -->
|
234 |
+
|
235 |
+
<!-- README_GPTQ.md-use-from-tgi start -->
|
236 |
+
## Serving this model from Text Generation Inference (TGI)
|
237 |
+
|
238 |
+
It's recommended to use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
|
239 |
+
|
240 |
+
Example Docker parameters:
|
241 |
+
|
242 |
+
```shell
|
243 |
+
--model-id TheBloke/EstopianMaid-13B-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
|
244 |
+
```
|
245 |
+
|
246 |
+
Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
|
247 |
+
|
248 |
+
```shell
|
249 |
+
pip3 install huggingface-hub
|
250 |
+
```
|
251 |
+
|
252 |
+
```python
|
253 |
+
from huggingface_hub import InferenceClient
|
254 |
+
|
255 |
+
endpoint_url = "https://your-endpoint-url-here"
|
256 |
+
|
257 |
+
prompt = "Tell me about AI"
|
258 |
+
prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
259 |
+
|
260 |
+
### Instruction:
|
261 |
+
{prompt}
|
262 |
+
|
263 |
+
### Response:
|
264 |
+
'''
|
265 |
+
|
266 |
+
client = InferenceClient(endpoint_url)
|
267 |
+
response = client.text_generation(
|
268 |
+
prompt_template,
|
269 |
+
max_new_tokens=128,
|
270 |
+
do_sample=True,
|
271 |
+
temperature=0.7,
|
272 |
+
top_p=0.95,
|
273 |
+
top_k=40,
|
274 |
+
repetition_penalty=1.1
|
275 |
+
)
|
276 |
+
|
277 |
+
print(f"Model output: {response}")
|
278 |
+
```
|
279 |
+
<!-- README_GPTQ.md-use-from-tgi end -->
|
280 |
+
<!-- README_GPTQ.md-use-from-python start -->
|
281 |
+
## Python code example: inference from this GPTQ model
|
282 |
+
|
283 |
+
### Install the necessary packages
|
284 |
+
|
285 |
+
Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
|
286 |
+
|
287 |
+
```shell
|
288 |
+
pip3 install --upgrade transformers optimum
|
289 |
+
# If using PyTorch 2.1 + CUDA 12.x:
|
290 |
+
pip3 install --upgrade auto-gptq
|
291 |
+
# or, if using PyTorch 2.1 + CUDA 11.x:
|
292 |
+
pip3 install --upgrade auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
|
293 |
+
```
|
294 |
+
|
295 |
+
If you are using PyTorch 2.0, you will need to install AutoGPTQ from source. Likewise if you have problems with the pre-built wheels, you should try building from source:
|
296 |
+
|
297 |
+
```shell
|
298 |
+
pip3 uninstall -y auto-gptq
|
299 |
+
git clone https://github.com/PanQiWei/AutoGPTQ
|
300 |
+
cd AutoGPTQ
|
301 |
+
git checkout v0.5.1
|
302 |
+
pip3 install .
|
303 |
+
```
|
304 |
+
|
305 |
+
### Example Python code
|
306 |
+
|
307 |
+
```python
|
308 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
309 |
+
|
310 |
+
model_name_or_path = "TheBloke/EstopianMaid-13B-GPTQ"
|
311 |
+
# To use a different branch, change revision
|
312 |
+
# For example: revision="gptq-4bit-32g-actorder_True"
|
313 |
+
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
|
314 |
+
device_map="auto",
|
315 |
+
trust_remote_code=False,
|
316 |
+
revision="main")
|
317 |
+
|
318 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
319 |
+
|
320 |
+
prompt = "Write a story about llamas"
|
321 |
+
system_message = "You are a story writing assistant"
|
322 |
+
prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
323 |
+
|
324 |
+
### Instruction:
|
325 |
+
{prompt}
|
326 |
+
|
327 |
+
### Response:
|
328 |
+
'''
|
329 |
+
|
330 |
+
print("\n\n*** Generate:")
|
331 |
+
|
332 |
+
input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
|
333 |
+
output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
|
334 |
+
print(tokenizer.decode(output[0]))
|
335 |
+
|
336 |
+
# Inference can also be done using transformers' pipeline
|
337 |
+
|
338 |
+
print("*** Pipeline:")
|
339 |
+
pipe = pipeline(
|
340 |
+
"text-generation",
|
341 |
+
model=model,
|
342 |
+
tokenizer=tokenizer,
|
343 |
+
max_new_tokens=512,
|
344 |
+
do_sample=True,
|
345 |
+
temperature=0.7,
|
346 |
+
top_p=0.95,
|
347 |
+
top_k=40,
|
348 |
+
repetition_penalty=1.1
|
349 |
+
)
|
350 |
+
|
351 |
+
print(pipe(prompt_template)[0]['generated_text'])
|
352 |
+
```
|
353 |
+
<!-- README_GPTQ.md-use-from-python end -->
|
354 |
+
|
355 |
+
<!-- README_GPTQ.md-compatibility start -->
|
356 |
+
## Compatibility
|
357 |
+
|
358 |
+
The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly.
|
359 |
+
|
360 |
+
[ExLlama](https://github.com/turboderp/exllama) is compatible with Llama architecture models (including Mistral, Yi, DeepSeek, SOLAR, etc) in 4-bit. Please see the Provided Files table above for per-file compatibility.
|
361 |
+
|
362 |
+
For a list of clients/servers, please see "Known compatible clients / servers", above.
|
363 |
+
<!-- README_GPTQ.md-compatibility end -->
|
364 |
+
|
365 |
+
<!-- footer start -->
|
366 |
+
<!-- 200823 -->
|
367 |
+
## Discord
|
368 |
+
|
369 |
+
For further support, and discussions on these models and AI in general, join us at:
|
370 |
+
|
371 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
372 |
+
|
373 |
+
## Thanks, and how to contribute
|
374 |
+
|
375 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
376 |
+
|
377 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
378 |
+
|
379 |
+
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.
|
380 |
+
|
381 |
+
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.
|
382 |
+
|
383 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
384 |
+
|
385 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
386 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
387 |
+
|
388 |
+
**Special thanks to**: Aemon Algiz.
|
389 |
+
|
390 |
+
**Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros
|
391 |
+
|
392 |
+
|
393 |
+
Thank you to all my generous patrons and donaters!
|
394 |
+
|
395 |
+
And thank you again to a16z for their generous grant.
|
396 |
+
|
397 |
+
<!-- footer end -->
|
398 |
+
|
399 |
+
# Original model card: Katy Vetteriano's EstopianMaid 13B
|
400 |
+
|
401 |
+
|
402 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/653a2392341143f7774424d8/fyK_RtEjb9sLF_Mq0nZm2.png)
|
403 |
+
|
404 |
+
Based on feedback Estopian made can:
|
405 |
+
|
406 |
+
- EstopianMaid is good at sticking to the character card.
|
407 |
+
- maintains coherency in a setting with multiple characters.
|
408 |
+
- Able to create new scenario's
|
409 |
+
|
410 |
+
- Prompt Template: Alpaca
|
411 |
+
### Instruction:
|
412 |
+
{prompt}
|
413 |
+
|
414 |
+
### Response:
|
415 |
+
|
416 |
+
Recommended settings:
|
417 |
+
- SillyTavern Default Preset.
|
418 |
+
- Temperature: 0.7
|
419 |
+
- Min-P: 0.3
|
420 |
+
- Amount to Gen: 256
|
421 |
+
- Top P: 1
|
422 |
+
- Repetition penalty: 1.10
|
423 |
+
|
424 |
+
Models used:
|
425 |
+
|
426 |
+
BlueNipples/TimeCrystal-l2-13B
|
427 |
+
cgato/Thespis-13b-DPO-v0.7
|
428 |
+
KoboldAI/LLaMA2-13B-Estopia
|
429 |
+
NeverSleep/Noromaid-13B-0.4-DPO
|
430 |
+
Doctor-Shotgun/cat-v1.0-13b
|
431 |
+
|
432 |
+
Feedback is always appreciated!
|
433 |
+
Thank you KoboldAI for their usage of their MergeBox and Caitlyn G. for their support and feedback.
|