Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,431 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: KoboldAI/LLaMA2-13B-TiefighterLR
|
3 |
+
inference: false
|
4 |
+
license: llama2
|
5 |
+
model_creator: KoboldAI
|
6 |
+
model_name: Llama2 13B TiefighterLR
|
7 |
+
model_type: llama
|
8 |
+
prompt_template: 'Below is an instruction that describes a task. Write a response
|
9 |
+
that appropriately completes the request.
|
10 |
+
|
11 |
+
|
12 |
+
### Instruction:
|
13 |
+
|
14 |
+
{prompt}
|
15 |
+
|
16 |
+
|
17 |
+
### Response:
|
18 |
+
|
19 |
+
'
|
20 |
+
quantized_by: TheBloke
|
21 |
+
---
|
22 |
+
<!-- markdownlint-disable MD041 -->
|
23 |
+
|
24 |
+
<!-- header start -->
|
25 |
+
<!-- 200823 -->
|
26 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
27 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
28 |
+
</div>
|
29 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
30 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
31 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
32 |
+
</div>
|
33 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
34 |
+
<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>
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
<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>
|
38 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
39 |
+
<!-- header end -->
|
40 |
+
|
41 |
+
# Llama2 13B TiefighterLR - AWQ
|
42 |
+
- Model creator: [KoboldAI](https://huggingface.co/KoboldAI)
|
43 |
+
- Original model: [Llama2 13B TiefighterLR](https://huggingface.co/KoboldAI/LLaMA2-13B-TiefighterLR)
|
44 |
+
|
45 |
+
<!-- description start -->
|
46 |
+
## Description
|
47 |
+
|
48 |
+
This repo contains AWQ model files for [KoboldAI's Llama2 13B TiefighterLR](https://huggingface.co/KoboldAI/LLaMA2-13B-TiefighterLR).
|
49 |
+
|
50 |
+
These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
|
51 |
+
|
52 |
+
|
53 |
+
### About AWQ
|
54 |
+
|
55 |
+
AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
|
56 |
+
|
57 |
+
It is supported by:
|
58 |
+
|
59 |
+
- [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
|
60 |
+
- [vLLM](https://github.com/vllm-project/vllm) - Llama and Mistral models only
|
61 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
62 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
|
63 |
+
|
64 |
+
<!-- description end -->
|
65 |
+
<!-- repositories-available start -->
|
66 |
+
## Repositories available
|
67 |
+
|
68 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/LLaMA2-13B-TiefighterLR-AWQ)
|
69 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/LLaMA2-13B-TiefighterLR-GPTQ)
|
70 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/LLaMA2-13B-TiefighterLR-GGUF)
|
71 |
+
* [KoboldAI's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/KoboldAI/LLaMA2-13B-TiefighterLR)
|
72 |
+
<!-- repositories-available end -->
|
73 |
+
|
74 |
+
<!-- prompt-template start -->
|
75 |
+
## Prompt template: Alpaca
|
76 |
+
|
77 |
+
```
|
78 |
+
Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
79 |
+
|
80 |
+
### Instruction:
|
81 |
+
{prompt}
|
82 |
+
|
83 |
+
### Response:
|
84 |
+
|
85 |
+
```
|
86 |
+
|
87 |
+
<!-- prompt-template end -->
|
88 |
+
|
89 |
+
|
90 |
+
<!-- README_AWQ.md-provided-files start -->
|
91 |
+
## Provided files, and AWQ parameters
|
92 |
+
|
93 |
+
For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM.
|
94 |
+
|
95 |
+
Models are released as sharded safetensors files.
|
96 |
+
|
97 |
+
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|
98 |
+
| ------ | ---- | -- | ----------- | ------- | ---- |
|
99 |
+
| [main](https://huggingface.co/TheBloke/LLaMA2-13B-TiefighterLR-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.25 GB
|
100 |
+
|
101 |
+
<!-- README_AWQ.md-provided-files end -->
|
102 |
+
|
103 |
+
<!-- README_AWQ.md-text-generation-webui start -->
|
104 |
+
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
105 |
+
|
106 |
+
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
107 |
+
|
108 |
+
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.
|
109 |
+
|
110 |
+
1. Click the **Model tab**.
|
111 |
+
2. Under **Download custom model or LoRA**, enter `TheBloke/LLaMA2-13B-TiefighterLR-AWQ`.
|
112 |
+
3. Click **Download**.
|
113 |
+
4. The model will start downloading. Once it's finished it will say "Done".
|
114 |
+
5. In the top left, click the refresh icon next to **Model**.
|
115 |
+
6. In the **Model** dropdown, choose the model you just downloaded: `LLaMA2-13B-TiefighterLR-AWQ`
|
116 |
+
7. Select **Loader: AutoAWQ**.
|
117 |
+
8. Click Load, and the model will load and is now ready for use.
|
118 |
+
9. 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.
|
119 |
+
10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
|
120 |
+
<!-- README_AWQ.md-text-generation-webui end -->
|
121 |
+
|
122 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
123 |
+
## Multi-user inference server: vLLM
|
124 |
+
|
125 |
+
Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
|
126 |
+
|
127 |
+
- Please ensure you are using vLLM version 0.2 or later.
|
128 |
+
- When using vLLM as a server, pass the `--quantization awq` parameter.
|
129 |
+
|
130 |
+
For example:
|
131 |
+
|
132 |
+
```shell
|
133 |
+
python3 -m vllm.entrypoints.api_server --model TheBloke/LLaMA2-13B-TiefighterLR-AWQ --quantization awq
|
134 |
+
```
|
135 |
+
|
136 |
+
- When using vLLM from Python code, again set `quantization=awq`.
|
137 |
+
|
138 |
+
For example:
|
139 |
+
|
140 |
+
```python
|
141 |
+
from vllm import LLM, SamplingParams
|
142 |
+
|
143 |
+
prompts = [
|
144 |
+
"Tell me about AI",
|
145 |
+
"Write a story about llamas",
|
146 |
+
"What is 291 - 150?",
|
147 |
+
"How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
|
148 |
+
]
|
149 |
+
prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
150 |
+
|
151 |
+
### Instruction:
|
152 |
+
{prompt}
|
153 |
+
|
154 |
+
### Response:
|
155 |
+
'''
|
156 |
+
|
157 |
+
prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
|
158 |
+
|
159 |
+
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
|
160 |
+
|
161 |
+
llm = LLM(model="TheBloke/LLaMA2-13B-TiefighterLR-AWQ", quantization="awq", dtype="auto")
|
162 |
+
|
163 |
+
outputs = llm.generate(prompts, sampling_params)
|
164 |
+
|
165 |
+
# Print the outputs.
|
166 |
+
for output in outputs:
|
167 |
+
prompt = output.prompt
|
168 |
+
generated_text = output.outputs[0].text
|
169 |
+
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
|
170 |
+
```
|
171 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
172 |
+
|
173 |
+
<!-- README_AWQ.md-use-from-tgi start -->
|
174 |
+
## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
|
175 |
+
|
176 |
+
Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
|
177 |
+
|
178 |
+
Example Docker parameters:
|
179 |
+
|
180 |
+
```shell
|
181 |
+
--model-id TheBloke/LLaMA2-13B-TiefighterLR-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
|
182 |
+
```
|
183 |
+
|
184 |
+
Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
|
185 |
+
|
186 |
+
```shell
|
187 |
+
pip3 install huggingface-hub
|
188 |
+
```
|
189 |
+
|
190 |
+
```python
|
191 |
+
from huggingface_hub import InferenceClient
|
192 |
+
|
193 |
+
endpoint_url = "https://your-endpoint-url-here"
|
194 |
+
|
195 |
+
prompt = "Tell me about AI"
|
196 |
+
prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
197 |
+
|
198 |
+
### Instruction:
|
199 |
+
{prompt}
|
200 |
+
|
201 |
+
### Response:
|
202 |
+
'''
|
203 |
+
|
204 |
+
client = InferenceClient(endpoint_url)
|
205 |
+
response = client.text_generation(prompt,
|
206 |
+
max_new_tokens=128,
|
207 |
+
do_sample=True,
|
208 |
+
temperature=0.7,
|
209 |
+
top_p=0.95,
|
210 |
+
top_k=40,
|
211 |
+
repetition_penalty=1.1)
|
212 |
+
|
213 |
+
print(f"Model output: ", response)
|
214 |
+
```
|
215 |
+
<!-- README_AWQ.md-use-from-tgi end -->
|
216 |
+
|
217 |
+
<!-- README_AWQ.md-use-from-python start -->
|
218 |
+
## Inference from Python code using AutoAWQ
|
219 |
+
|
220 |
+
### Install the AutoAWQ package
|
221 |
+
|
222 |
+
Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.1 or later.
|
223 |
+
|
224 |
+
```shell
|
225 |
+
pip3 install autoawq
|
226 |
+
```
|
227 |
+
|
228 |
+
If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
|
229 |
+
|
230 |
+
```shell
|
231 |
+
pip3 uninstall -y autoawq
|
232 |
+
git clone https://github.com/casper-hansen/AutoAWQ
|
233 |
+
cd AutoAWQ
|
234 |
+
pip3 install .
|
235 |
+
```
|
236 |
+
|
237 |
+
### AutoAWQ example code
|
238 |
+
|
239 |
+
```python
|
240 |
+
from awq import AutoAWQForCausalLM
|
241 |
+
from transformers import AutoTokenizer
|
242 |
+
|
243 |
+
model_name_or_path = "TheBloke/LLaMA2-13B-TiefighterLR-AWQ"
|
244 |
+
|
245 |
+
# Load tokenizer
|
246 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
|
247 |
+
# Load model
|
248 |
+
model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
|
249 |
+
trust_remote_code=False, safetensors=True)
|
250 |
+
|
251 |
+
prompt = "Tell me about AI"
|
252 |
+
prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
253 |
+
|
254 |
+
### Instruction:
|
255 |
+
{prompt}
|
256 |
+
|
257 |
+
### Response:
|
258 |
+
'''
|
259 |
+
|
260 |
+
print("*** Running model.generate:")
|
261 |
+
|
262 |
+
token_input = tokenizer(
|
263 |
+
prompt_template,
|
264 |
+
return_tensors='pt'
|
265 |
+
).input_ids.cuda()
|
266 |
+
|
267 |
+
# Generate output
|
268 |
+
generation_output = model.generate(
|
269 |
+
token_input,
|
270 |
+
do_sample=True,
|
271 |
+
temperature=0.7,
|
272 |
+
top_p=0.95,
|
273 |
+
top_k=40,
|
274 |
+
max_new_tokens=512
|
275 |
+
)
|
276 |
+
|
277 |
+
# Get the tokens from the output, decode them, print them
|
278 |
+
token_output = generation_output[0]
|
279 |
+
text_output = tokenizer.decode(token_output)
|
280 |
+
print("LLM output: ", text_output)
|
281 |
+
|
282 |
+
"""
|
283 |
+
# Inference should be possible with transformers pipeline as well in future
|
284 |
+
# But currently this is not yet supported by AutoAWQ (correct as of September 25th 2023)
|
285 |
+
from transformers import pipeline
|
286 |
+
|
287 |
+
print("*** Pipeline:")
|
288 |
+
pipe = pipeline(
|
289 |
+
"text-generation",
|
290 |
+
model=model,
|
291 |
+
tokenizer=tokenizer,
|
292 |
+
max_new_tokens=512,
|
293 |
+
do_sample=True,
|
294 |
+
temperature=0.7,
|
295 |
+
top_p=0.95,
|
296 |
+
top_k=40,
|
297 |
+
repetition_penalty=1.1
|
298 |
+
)
|
299 |
+
|
300 |
+
print(pipe(prompt_template)[0]['generated_text'])
|
301 |
+
"""
|
302 |
+
```
|
303 |
+
<!-- README_AWQ.md-use-from-python end -->
|
304 |
+
|
305 |
+
<!-- README_AWQ.md-compatibility start -->
|
306 |
+
## Compatibility
|
307 |
+
|
308 |
+
The files provided are tested to work with:
|
309 |
+
|
310 |
+
- [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
|
311 |
+
- [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
|
312 |
+
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
|
313 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
|
314 |
+
|
315 |
+
<!-- README_AWQ.md-compatibility end -->
|
316 |
+
|
317 |
+
<!-- footer start -->
|
318 |
+
<!-- 200823 -->
|
319 |
+
## Discord
|
320 |
+
|
321 |
+
For further support, and discussions on these models and AI in general, join us at:
|
322 |
+
|
323 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
324 |
+
|
325 |
+
## Thanks, and how to contribute
|
326 |
+
|
327 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
328 |
+
|
329 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
330 |
+
|
331 |
+
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.
|
332 |
+
|
333 |
+
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.
|
334 |
+
|
335 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
336 |
+
|
337 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
338 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
339 |
+
|
340 |
+
**Special thanks to**: Aemon Algiz.
|
341 |
+
|
342 |
+
**Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
|
343 |
+
|
344 |
+
|
345 |
+
Thank you to all my generous patrons and donaters!
|
346 |
+
|
347 |
+
And thank you again to a16z for their generous grant.
|
348 |
+
|
349 |
+
<!-- footer end -->
|
350 |
+
|
351 |
+
# Original model card: KoboldAI's Llama2 13B TiefighterLR
|
352 |
+
|
353 |
+
# LLaMA2-13B-TiefighterLR
|
354 |
+
TiefighterLR is a merged model achieved trough merging two different lora's on top of a well established existing merge.
|
355 |
+
This LR version contains Less Rodeo, merged at 3% from the original 5% reducing its second person adventure bias.
|
356 |
+
Testers found this model to understand your own character and instruction prompts better, at the sacrifice of lowering its own writing bias/style.
|
357 |
+
|
358 |
+
To achieve this the following recipe was used:
|
359 |
+
|
360 |
+
* We begin with the base model Undi95/Xwin-MLewd-13B-V0.2 which is a well established merge, contrary to the name this model does not have a strong NSFW bias.
|
361 |
+
* Then we applied the PocketDoc/Dans-RetroRodeo-13b lora which is a finetune on the Choose your own Adventure datasets from our Skein model.
|
362 |
+
* After applying this lora we merged the original model with the newly created PocketDoc/Dans-RetroRodeo-13b merge at 3% to weaken the newly introduced adventure bias.
|
363 |
+
* The resulting merge was used as a new base model to which we applied Blackroot/Llama-2-13B-Storywriter-LORA and repeated the same trick, this time at 10%.
|
364 |
+
|
365 |
+
This means this model contains the following ingredients from their upstream models for as far as we can track them:
|
366 |
+
- Undi95/Xwin-MLewd-13B-V0.2
|
367 |
+
- - Undi95/ReMM-S-Light (base/private)
|
368 |
+
- Undi95/CreativeEngine
|
369 |
+
- Brouz/Slerpeno
|
370 |
+
- - elinas/chronos-13b-v2
|
371 |
+
- jondurbin/airoboros-l2-13b-2.1
|
372 |
+
- NousResearch/Nous-Hermes-Llama2-13b+nRuaif/Kimiko-v2 LORA
|
373 |
+
- CalderaAI/13B-Legerdemain-L2+lemonilia/limarp-llama2-v2 LORA
|
374 |
+
- - KoboldAI/LLAMA2-13B-Holodeck-1
|
375 |
+
- NousResearch/Nous-Hermes-13b
|
376 |
+
- OpenAssistant/llama2-13b-orca-8k-3319
|
377 |
+
- ehartford/WizardLM-1.0-Uncensored-Llama2-13b
|
378 |
+
- Henk717/spring-dragon
|
379 |
+
- The-Face-Of-Goonery/Huginn-v3-13b
|
380 |
+
- zattio770/120-Days-of-LORA-v2-13B
|
381 |
+
- PygmalionAI/pygmalion-2-13b
|
382 |
+
- Undi95/StoryTelling
|
383 |
+
- TokenBender/sakhi_13B_roleplayer_NSFW_chat_adapter
|
384 |
+
- nRuaif/Kimiko-v2-13B
|
385 |
+
- The-Face-Of-Goonery/Huginn-13b-FP16
|
386 |
+
- lemonilia/LimaRP-Llama2-13B-v3-EXPERIMENT
|
387 |
+
- Xwin-LM/Xwin-LM-13B-V0.2
|
388 |
+
- PocketDoc/Dans-RetroRodeo-13b
|
389 |
+
- Blackroot/Llama-2-13B-Storywriter-LORA
|
390 |
+
|
391 |
+
|
392 |
+
# Usage
|
393 |
+
This model is meant to be creative, If you let it improvise you get better results than if you drown it in details.
|
394 |
+
|
395 |
+
## Story Writing
|
396 |
+
Regular story writing in the traditional way is supported, simply copy paste your story and continue writing. Optionally use an instruction in memory or an authors note to guide the direction of your story.
|
397 |
+
|
398 |
+
### Generate a story on demand
|
399 |
+
To generate stories on demand you can use an instruction (tested in the Alpaca format) such as "Write a novel about X, use chapters and dialogue" this will generate a story. The format can vary between generations depending on how the model chooses to begin, either write what you want as shown in the earlier example or write the beginning of the story yourself so the model can follow your style. A few retries can also help if the model gets it wrong.
|
400 |
+
|
401 |
+
## Chatbots and persona's
|
402 |
+
Unlike the original Tiefighter this model is better at handling existing Character Cards as long as they do not contain a lot of second person writing or second person introductions (You), setting > as a custom stop sequence can help fix potential mistakes, as well as turning multi-line replies off.
|
403 |
+
You can also use instructions to create your characters.
|
404 |
+
|
405 |
+
For example, you can put this in memory in regular chat mode:
|
406 |
+
```
|
407 |
+
### Instruction:
|
408 |
+
Generate a conversation between Alice and Henk where they discuss language models.
|
409 |
+
In this conversation Henk is excited to teach Alice about Tiefighter.
|
410 |
+
### Response:
|
411 |
+
```
|
412 |
+
|
413 |
+
Because the model is a merge of a variety of models, it should support a broad range of instruct formats, or plain chat mode. If you have a particular favourite try it, otherwise we recommend to either use the regular chat mode or Alpaca's format.
|
414 |
+
|
415 |
+
## Instruct Prompting
|
416 |
+
This model features various instruct models on a variety of instruction styles, when testing the model we have used Alpaca for our own tests. If you prefer a different format chances are it can work.
|
417 |
+
|
418 |
+
During instructions we have observed that in some cases the adventure data can leak, it may also be worth experimenting using > as the prefix for a user command to remedy this. But this may result in a stronger fiction bias.
|
419 |
+
|
420 |
+
Keep in mind that while this model can be used as a factual instruct model, the focus was on fiction. Information provided by the model can be made up.
|
421 |
+
|
422 |
+
## Adventuring and Adventure Games
|
423 |
+
This model contains a lora that was trained on the same adventure dataset as the KoboldAI Skein model. Adventuring is best done using an small introduction to the world and your objective while using the > prefix for a user command (KoboldAI's adventure mode).
|
424 |
+
|
425 |
+
It is possible that the model does not immediately pick up on what you wish to do and does not engage in its Adventure mode behaviour right away. Simply manually correct the output to trim excess dialogue or other undesirable behaviour and continue to submit your actions using the appropriate mode. The model should pick up on this style quickly and will correctly follow this format within 3 turns.
|
426 |
+
|
427 |
+
## Discovered something cool and want to engage with us?
|
428 |
+
Join our community at https://koboldai.org/discord !
|
429 |
+
|
430 |
+
### This model would not be possible without the awesome work from:
|
431 |
+
Undi95, PocketDoc, Blackroot, Brouz, The Face of Goonery, zattio770, PygmalionAI, TokenBender, nRuaif, lemonilia and Xwin-LM.
|