Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: THUDM/agentlm-13b
|
3 |
+
datasets:
|
4 |
+
- THUDM/AgentInstruct
|
5 |
+
inference: false
|
6 |
+
license: llama2
|
7 |
+
model_creator: Knowledge Engineering Group (KEG
|
8 |
+
model_name: AgentLM 13B
|
9 |
+
model_type: llama
|
10 |
+
prompt_template: '[INST] <<SYS>>
|
11 |
+
|
12 |
+
You are a helpful, respectful and honest assistant.
|
13 |
+
|
14 |
+
<</SYS>>
|
15 |
+
|
16 |
+
{prompt} [/INST]
|
17 |
+
|
18 |
+
'
|
19 |
+
quantized_by: TheBloke
|
20 |
+
---
|
21 |
+
<!-- markdownlint-disable MD041 -->
|
22 |
+
|
23 |
+
<!-- header start -->
|
24 |
+
<!-- 200823 -->
|
25 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
26 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
27 |
+
</div>
|
28 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
29 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
30 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
31 |
+
</div>
|
32 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
33 |
+
<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>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
<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>
|
37 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
38 |
+
<!-- header end -->
|
39 |
+
|
40 |
+
# AgentLM 13B - GPTQ
|
41 |
+
- Model creator: [Knowledge Engineering Group (KEG](https://huggingface.co/THUDM)
|
42 |
+
- Original model: [AgentLM 13B](https://huggingface.co/THUDM/agentlm-13b)
|
43 |
+
|
44 |
+
<!-- description start -->
|
45 |
+
## Description
|
46 |
+
|
47 |
+
This repo contains GPTQ model files for [Knowledge Engineering Group (KEG's AgentLM 13B](https://huggingface.co/THUDM/agentlm-13b).
|
48 |
+
|
49 |
+
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.
|
50 |
+
|
51 |
+
<!-- description end -->
|
52 |
+
<!-- repositories-available start -->
|
53 |
+
## Repositories available
|
54 |
+
|
55 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/agentlm-13B-AWQ)
|
56 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/agentlm-13B-GPTQ)
|
57 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/agentlm-13B-GGUF)
|
58 |
+
* [Knowledge Engineering Group (KEG's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/THUDM/agentlm-13b)
|
59 |
+
<!-- repositories-available end -->
|
60 |
+
|
61 |
+
<!-- prompt-template start -->
|
62 |
+
## Prompt template: THUDM-Llama-2-Chat
|
63 |
+
|
64 |
+
```
|
65 |
+
[INST] <<SYS>>
|
66 |
+
You are a helpful, respectful and honest assistant.
|
67 |
+
<</SYS>>
|
68 |
+
{prompt} [/INST]
|
69 |
+
|
70 |
+
```
|
71 |
+
|
72 |
+
<!-- prompt-template end -->
|
73 |
+
|
74 |
+
|
75 |
+
<!-- README_GPTQ.md-provided-files start -->
|
76 |
+
## Provided files, and GPTQ parameters
|
77 |
+
|
78 |
+
Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
|
79 |
+
|
80 |
+
Each separate quant is in a different branch. See below for instructions on fetching from different branches.
|
81 |
+
|
82 |
+
Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
|
83 |
+
|
84 |
+
<details>
|
85 |
+
<summary>Explanation of GPTQ parameters</summary>
|
86 |
+
|
87 |
+
- Bits: The bit size of the quantised model.
|
88 |
+
- GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
|
89 |
+
- 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.
|
90 |
+
- Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
|
91 |
+
- 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).
|
92 |
+
- 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.
|
93 |
+
- ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
|
94 |
+
|
95 |
+
</details>
|
96 |
+
|
97 |
+
| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|
98 |
+
| ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
|
99 |
+
| [main](https://huggingface.co/TheBloke/agentlm-13B-GPTQ/tree/main) | 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. |
|
100 |
+
| [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/agentlm-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.01 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
|
101 |
+
| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/agentlm-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.37 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
|
102 |
+
| [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/agentlm-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.66 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
|
103 |
+
| [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/agentlm-13B-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 14.55 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
|
104 |
+
| [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/agentlm-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. |
|
105 |
+
|
106 |
+
<!-- README_GPTQ.md-provided-files end -->
|
107 |
+
|
108 |
+
<!-- README_GPTQ.md-download-from-branches start -->
|
109 |
+
## How to download, including from branches
|
110 |
+
|
111 |
+
### In text-generation-webui
|
112 |
+
|
113 |
+
To download from the `main` branch, enter `TheBloke/agentlm-13B-GPTQ` in the "Download model" box.
|
114 |
+
|
115 |
+
To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/agentlm-13B-GPTQ:gptq-4bit-32g-actorder_True`
|
116 |
+
|
117 |
+
### From the command line
|
118 |
+
|
119 |
+
I recommend using the `huggingface-hub` Python library:
|
120 |
+
|
121 |
+
```shell
|
122 |
+
pip3 install huggingface-hub
|
123 |
+
```
|
124 |
+
|
125 |
+
To download the `main` branch to a folder called `agentlm-13B-GPTQ`:
|
126 |
+
|
127 |
+
```shell
|
128 |
+
mkdir agentlm-13B-GPTQ
|
129 |
+
huggingface-cli download TheBloke/agentlm-13B-GPTQ --local-dir agentlm-13B-GPTQ --local-dir-use-symlinks False
|
130 |
+
```
|
131 |
+
|
132 |
+
To download from a different branch, add the `--revision` parameter:
|
133 |
+
|
134 |
+
```shell
|
135 |
+
mkdir agentlm-13B-GPTQ
|
136 |
+
huggingface-cli download TheBloke/agentlm-13B-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir agentlm-13B-GPTQ --local-dir-use-symlinks False
|
137 |
+
```
|
138 |
+
|
139 |
+
<details>
|
140 |
+
<summary>More advanced huggingface-cli download usage</summary>
|
141 |
+
|
142 |
+
If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Huggingface 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.
|
143 |
+
|
144 |
+
The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
|
145 |
+
|
146 |
+
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).
|
147 |
+
|
148 |
+
To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
|
149 |
+
|
150 |
+
```shell
|
151 |
+
pip3 install hf_transfer
|
152 |
+
```
|
153 |
+
|
154 |
+
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
155 |
+
|
156 |
+
```shell
|
157 |
+
mkdir agentlm-13B-GPTQ
|
158 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/agentlm-13B-GPTQ --local-dir agentlm-13B-GPTQ --local-dir-use-symlinks False
|
159 |
+
```
|
160 |
+
|
161 |
+
Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
|
162 |
+
</details>
|
163 |
+
|
164 |
+
### With `git` (**not** recommended)
|
165 |
+
|
166 |
+
To clone a specific branch with `git`, use a command like this:
|
167 |
+
|
168 |
+
```shell
|
169 |
+
git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/agentlm-13B-GPTQ
|
170 |
+
```
|
171 |
+
|
172 |
+
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.)
|
173 |
+
|
174 |
+
<!-- README_GPTQ.md-download-from-branches end -->
|
175 |
+
<!-- README_GPTQ.md-text-generation-webui start -->
|
176 |
+
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
177 |
+
|
178 |
+
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
179 |
+
|
180 |
+
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.
|
181 |
+
|
182 |
+
1. Click the **Model tab**.
|
183 |
+
2. Under **Download custom model or LoRA**, enter `TheBloke/agentlm-13B-GPTQ`.
|
184 |
+
|
185 |
+
- To download from a specific branch, enter for example `TheBloke/agentlm-13B-GPTQ:gptq-4bit-32g-actorder_True`
|
186 |
+
- see Provided Files above for the list of branches for each option.
|
187 |
+
|
188 |
+
3. Click **Download**.
|
189 |
+
4. The model will start downloading. Once it's finished it will say "Done".
|
190 |
+
5. In the top left, click the refresh icon next to **Model**.
|
191 |
+
6. In the **Model** dropdown, choose the model you just downloaded: `agentlm-13B-GPTQ`
|
192 |
+
7. The model will automatically load, and is now ready for use!
|
193 |
+
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.
|
194 |
+
|
195 |
+
- 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`.
|
196 |
+
|
197 |
+
9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
|
198 |
+
|
199 |
+
<!-- README_GPTQ.md-text-generation-webui end -->
|
200 |
+
|
201 |
+
<!-- README_GPTQ.md-use-from-tgi start -->
|
202 |
+
## Serving this model from Text Generation Inference (TGI)
|
203 |
+
|
204 |
+
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`
|
205 |
+
|
206 |
+
Example Docker parameters:
|
207 |
+
|
208 |
+
```shell
|
209 |
+
--model-id TheBloke/agentlm-13B-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
|
210 |
+
```
|
211 |
+
|
212 |
+
Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
|
213 |
+
|
214 |
+
```shell
|
215 |
+
pip3 install huggingface-hub
|
216 |
+
```
|
217 |
+
|
218 |
+
```python
|
219 |
+
from huggingface_hub import InferenceClient
|
220 |
+
|
221 |
+
endpoint_url = "https://your-endpoint-url-here"
|
222 |
+
|
223 |
+
prompt = "Tell me about AI"
|
224 |
+
prompt_template=f'''[INST] <<SYS>>
|
225 |
+
You are a helpful, respectful and honest assistant.
|
226 |
+
<</SYS>>
|
227 |
+
{prompt} [/INST]
|
228 |
+
'''
|
229 |
+
|
230 |
+
client = InferenceClient(endpoint_url)
|
231 |
+
response = client.text_generation(prompt,
|
232 |
+
max_new_tokens=128,
|
233 |
+
do_sample=True,
|
234 |
+
temperature=0.7,
|
235 |
+
top_p=0.95,
|
236 |
+
top_k=40,
|
237 |
+
repetition_penalty=1.1)
|
238 |
+
|
239 |
+
print(f"Model output: {response}")
|
240 |
+
```
|
241 |
+
<!-- README_GPTQ.md-use-from-tgi end -->
|
242 |
+
<!-- README_GPTQ.md-use-from-python start -->
|
243 |
+
## How to use this GPTQ model from Python code
|
244 |
+
|
245 |
+
### Install the necessary packages
|
246 |
+
|
247 |
+
Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
|
248 |
+
|
249 |
+
```shell
|
250 |
+
pip3 install transformers optimum
|
251 |
+
pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
|
252 |
+
```
|
253 |
+
|
254 |
+
If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
|
255 |
+
|
256 |
+
```shell
|
257 |
+
pip3 uninstall -y auto-gptq
|
258 |
+
git clone https://github.com/PanQiWei/AutoGPTQ
|
259 |
+
cd AutoGPTQ
|
260 |
+
git checkout v0.4.2
|
261 |
+
pip3 install .
|
262 |
+
```
|
263 |
+
|
264 |
+
### You can then use the following code
|
265 |
+
|
266 |
+
```python
|
267 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
268 |
+
|
269 |
+
model_name_or_path = "TheBloke/agentlm-13B-GPTQ"
|
270 |
+
# To use a different branch, change revision
|
271 |
+
# For example: revision="gptq-4bit-32g-actorder_True"
|
272 |
+
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
|
273 |
+
device_map="auto",
|
274 |
+
trust_remote_code=False,
|
275 |
+
revision="main")
|
276 |
+
|
277 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
278 |
+
|
279 |
+
prompt = "Tell me about AI"
|
280 |
+
prompt_template=f'''[INST] <<SYS>>
|
281 |
+
You are a helpful, respectful and honest assistant.
|
282 |
+
<</SYS>>
|
283 |
+
{prompt} [/INST]
|
284 |
+
'''
|
285 |
+
|
286 |
+
print("\n\n*** Generate:")
|
287 |
+
|
288 |
+
input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
|
289 |
+
output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
|
290 |
+
print(tokenizer.decode(output[0]))
|
291 |
+
|
292 |
+
# Inference can also be done using transformers' pipeline
|
293 |
+
|
294 |
+
print("*** Pipeline:")
|
295 |
+
pipe = pipeline(
|
296 |
+
"text-generation",
|
297 |
+
model=model,
|
298 |
+
tokenizer=tokenizer,
|
299 |
+
max_new_tokens=512,
|
300 |
+
do_sample=True,
|
301 |
+
temperature=0.7,
|
302 |
+
top_p=0.95,
|
303 |
+
top_k=40,
|
304 |
+
repetition_penalty=1.1
|
305 |
+
)
|
306 |
+
|
307 |
+
print(pipe(prompt_template)[0]['generated_text'])
|
308 |
+
```
|
309 |
+
<!-- README_GPTQ.md-use-from-python end -->
|
310 |
+
|
311 |
+
<!-- README_GPTQ.md-compatibility start -->
|
312 |
+
## Compatibility
|
313 |
+
|
314 |
+
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).
|
315 |
+
|
316 |
+
[ExLlama](https://github.com/turboderp/exllama) is compatible with Llama and Mistral models in 4-bit. Please see the Provided Files table above for per-file compatibility.
|
317 |
+
|
318 |
+
[Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
|
319 |
+
<!-- README_GPTQ.md-compatibility end -->
|
320 |
+
|
321 |
+
<!-- footer start -->
|
322 |
+
<!-- 200823 -->
|
323 |
+
## Discord
|
324 |
+
|
325 |
+
For further support, and discussions on these models and AI in general, join us at:
|
326 |
+
|
327 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
328 |
+
|
329 |
+
## Thanks, and how to contribute
|
330 |
+
|
331 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
332 |
+
|
333 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
334 |
+
|
335 |
+
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.
|
336 |
+
|
337 |
+
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.
|
338 |
+
|
339 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
340 |
+
|
341 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
342 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
343 |
+
|
344 |
+
**Special thanks to**: Aemon Algiz.
|
345 |
+
|
346 |
+
**Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski
|
347 |
+
|
348 |
+
|
349 |
+
Thank you to all my generous patrons and donaters!
|
350 |
+
|
351 |
+
And thank you again to a16z for their generous grant.
|
352 |
+
|
353 |
+
<!-- footer end -->
|
354 |
+
|
355 |
+
# Original model card: Knowledge Engineering Group (KEG's AgentLM 13B
|
356 |
+
|
357 |
+
|
358 |
+
## AgentLM-13B
|
359 |
+
|
360 |
+
<p align="center">
|
361 |
+
🤗 <a href="https://huggingface.co/datasets/THUDM/AgentInstruct" target="_blank">[Dataset] </a> • 💻 <a href="https://github.com/THUDM/AgentTuning" target="_blank">[Github Repo]</a> • 📌 <a href="https://THUDM.github.io/AgentTuning/" target="_blank">[Project Page]</a> • 📃 <a href="https://arxiv.org/abs/2310.12823" target="_blank">[Paper]</a>
|
362 |
+
</p>
|
363 |
+
|
364 |
+
**AgentTuning** represents the very first attempt to instruction-tune LLMs using interaction trajectories across multiple agent tasks. Evaluation results indicate that AgentTuning enables the agent capabilities of LLMs with robust generalization on unseen agent tasks while remaining good on general language abilities. We have open-sourced the AgentInstruct dataset and AgentLM.
|
365 |
+
|
366 |
+
## Models
|
367 |
+
|
368 |
+
**AgentLM** models are produced by mixed training on AgentInstruct dataset and ShareGPT dataset from Llama-2-chat models.
|
369 |
+
|
370 |
+
The models follow the conversation format of [Llama-2-chat](https://huggingface.co/blog/llama2#how-to-prompt-llama-2), with system prompt fixed as
|
371 |
+
|
372 |
+
```
|
373 |
+
You are a helpful, respectful and honest assistant.
|
374 |
+
```
|
375 |
+
|
376 |
+
7B, 13B, and 70B models are available on Huggingface model hub.
|
377 |
+
|
378 |
+
|Model|Huggingface Repo|
|
379 |
+
|---|---|
|
380 |
+
|AgentLM-7B| [🤗Huggingface Repo](https://huggingface.co/THUDM/agentlm-7b) |
|
381 |
+
|AgentLM-13B| [🤗Huggingface Repo](https://huggingface.co/THUDM/agentlm-13b) |
|
382 |
+
|AgentLM-70B| [🤗Huggingface Repo](https://huggingface.co/THUDM/agentlm-70b) |
|
383 |
+
|
384 |
+
## Citation
|
385 |
+
|
386 |
+
If you find our work useful, please consider citing AgentTuning:
|
387 |
+
|
388 |
+
```
|
389 |
+
@misc{zeng2023agenttuning,
|
390 |
+
title={AgentTuning: Enabling Generalized Agent Abilities for LLMs},
|
391 |
+
author={Aohan Zeng and Mingdao Liu and Rui Lu and Bowen Wang and Xiao Liu and Yuxiao Dong and Jie Tang},
|
392 |
+
year={2023},
|
393 |
+
eprint={2310.12823},
|
394 |
+
archivePrefix={arXiv},
|
395 |
+
primaryClass={cs.CL}
|
396 |
+
}
|
397 |
+
```
|