TheBloke commited on
Commit
e4fb593
1 Parent(s): 6da909d

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +441 -0
README.md ADDED
@@ -0,0 +1,441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: royallab/ZephRP-m7b
3
+ inference: false
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ license: cc-by-nc-4.0
8
+ model_creator: The Royal Lab
9
+ model_name: Zephrp m7b
10
+ model_type: mistral
11
+ pipeline_tag: text-generation
12
+ prompt_template: "### Instruction:\nCharacter's Persona: bot character description\n\
13
+ \nUser's persona: user character description\n \nScenario: what happens in the\
14
+ \ story\n\nPlay the role of Character. You must engage in a roleplaying chat with\
15
+ \ User below this line. Do not write dialogues and narration for User. Character\
16
+ \ should respond with messages of medium length.\n\n### Input:\nUser: {prompt}\n\
17
+ \n### Response:\nCharacter: \n"
18
+ quantized_by: TheBloke
19
+ tags:
20
+ - mistral
21
+ ---
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
+ # Zephrp m7b - GPTQ
41
+ - Model creator: [The Royal Lab](https://huggingface.co/royallab)
42
+ - Original model: [Zephrp m7b](https://huggingface.co/royallab/ZephRP-m7b)
43
+
44
+ <!-- description start -->
45
+ ## Description
46
+
47
+ This repo contains GPTQ model files for [The Royal Lab's Zephrp m7b](https://huggingface.co/royallab/ZephRP-m7b).
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/ZephRP-m7b-AWQ)
56
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/ZephRP-m7b-GPTQ)
57
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/ZephRP-m7b-GGUF)
58
+ * [The Royal Lab's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/royallab/ZephRP-m7b)
59
+ <!-- repositories-available end -->
60
+
61
+ <!-- prompt-template start -->
62
+ ## Prompt template: LimaRP-Alpaca
63
+
64
+ ```
65
+ ### Instruction:
66
+ Character's Persona: bot character description
67
+
68
+ User's persona: user character description
69
+
70
+ Scenario: what happens in the story
71
+
72
+ Play the role of Character. You must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User. Character should respond with messages of medium length.
73
+
74
+ ### Input:
75
+ User: {prompt}
76
+
77
+ ### Response:
78
+ Character:
79
+
80
+ ```
81
+
82
+ <!-- prompt-template end -->
83
+
84
+
85
+ <!-- README_GPTQ.md-provided-files start -->
86
+ ## Provided files, and GPTQ parameters
87
+
88
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
89
+
90
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
91
+
92
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
93
+
94
+ <details>
95
+ <summary>Explanation of GPTQ parameters</summary>
96
+
97
+ - Bits: The bit size of the quantised model.
98
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
99
+ - 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.
100
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
101
+ - 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).
102
+ - 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.
103
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
104
+
105
+ </details>
106
+
107
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
108
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
109
+ | [main](https://huggingface.co/TheBloke/ZephRP-m7b-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.16 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
110
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/ZephRP-m7b-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.57 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
111
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/ZephRP-m7b-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.52 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
112
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/ZephRP-m7b-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.68 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
113
+ | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/ZephRP-m7b-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 8.17 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
114
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/ZephRP-m7b-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.29 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
115
+
116
+ <!-- README_GPTQ.md-provided-files end -->
117
+
118
+ <!-- README_GPTQ.md-download-from-branches start -->
119
+ ## How to download, including from branches
120
+
121
+ ### In text-generation-webui
122
+
123
+ To download from the `main` branch, enter `TheBloke/ZephRP-m7b-GPTQ` in the "Download model" box.
124
+
125
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/ZephRP-m7b-GPTQ:gptq-4bit-32g-actorder_True`
126
+
127
+ ### From the command line
128
+
129
+ I recommend using the `huggingface-hub` Python library:
130
+
131
+ ```shell
132
+ pip3 install huggingface-hub
133
+ ```
134
+
135
+ To download the `main` branch to a folder called `ZephRP-m7b-GPTQ`:
136
+
137
+ ```shell
138
+ mkdir ZephRP-m7b-GPTQ
139
+ huggingface-cli download TheBloke/ZephRP-m7b-GPTQ --local-dir ZephRP-m7b-GPTQ --local-dir-use-symlinks False
140
+ ```
141
+
142
+ To download from a different branch, add the `--revision` parameter:
143
+
144
+ ```shell
145
+ mkdir ZephRP-m7b-GPTQ
146
+ huggingface-cli download TheBloke/ZephRP-m7b-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir ZephRP-m7b-GPTQ --local-dir-use-symlinks False
147
+ ```
148
+
149
+ <details>
150
+ <summary>More advanced huggingface-cli download usage</summary>
151
+
152
+ 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.
153
+
154
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
155
+
156
+ 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).
157
+
158
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
159
+
160
+ ```shell
161
+ pip3 install hf_transfer
162
+ ```
163
+
164
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
165
+
166
+ ```shell
167
+ mkdir ZephRP-m7b-GPTQ
168
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/ZephRP-m7b-GPTQ --local-dir ZephRP-m7b-GPTQ --local-dir-use-symlinks False
169
+ ```
170
+
171
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
172
+ </details>
173
+
174
+ ### With `git` (**not** recommended)
175
+
176
+ To clone a specific branch with `git`, use a command like this:
177
+
178
+ ```shell
179
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/ZephRP-m7b-GPTQ
180
+ ```
181
+
182
+ 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.)
183
+
184
+ <!-- README_GPTQ.md-download-from-branches end -->
185
+ <!-- README_GPTQ.md-text-generation-webui start -->
186
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
187
+
188
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
189
+
190
+ 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.
191
+
192
+ 1. Click the **Model tab**.
193
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/ZephRP-m7b-GPTQ`.
194
+ - To download from a specific branch, enter for example `TheBloke/ZephRP-m7b-GPTQ:gptq-4bit-32g-actorder_True`
195
+ - see Provided Files above for the list of branches for each option.
196
+ 3. Click **Download**.
197
+ 4. The model will start downloading. Once it's finished it will say "Done".
198
+ 5. In the top left, click the refresh icon next to **Model**.
199
+ 6. In the **Model** dropdown, choose the model you just downloaded: `ZephRP-m7b-GPTQ`
200
+ 7. The model will automatically load, and is now ready for use!
201
+ 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.
202
+ * 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`.
203
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
204
+
205
+ <!-- README_GPTQ.md-text-generation-webui end -->
206
+
207
+ <!-- README_GPTQ.md-use-from-tgi start -->
208
+ ## Serving this model from Text Generation Inference (TGI)
209
+
210
+ 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`
211
+
212
+ Example Docker parameters:
213
+
214
+ ```shell
215
+ --model-id TheBloke/ZephRP-m7b-GPTQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
216
+ ```
217
+
218
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
219
+
220
+ ```shell
221
+ pip3 install huggingface-hub
222
+ ```
223
+
224
+ ```python
225
+ from huggingface_hub import InferenceClient
226
+
227
+ endpoint_url = "https://your-endpoint-url-here"
228
+
229
+ prompt = "Tell me about AI"
230
+ prompt_template=f'''### Instruction:
231
+ Character's Persona: bot character description
232
+
233
+ User's persona: user character description
234
+
235
+ Scenario: what happens in the story
236
+
237
+ Play the role of Character. You must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User. Character should respond with messages of medium length.
238
+
239
+ ### Input:
240
+ User: {prompt}
241
+
242
+ ### Response:
243
+ Character:
244
+ '''
245
+
246
+ client = InferenceClient(endpoint_url)
247
+ response = client.text_generation(prompt,
248
+ max_new_tokens=128,
249
+ do_sample=True,
250
+ temperature=0.7,
251
+ top_p=0.95,
252
+ top_k=40,
253
+ repetition_penalty=1.1)
254
+
255
+ print(f"Model output: {response}")
256
+ ```
257
+ <!-- README_GPTQ.md-use-from-tgi end -->
258
+ <!-- README_GPTQ.md-use-from-python start -->
259
+ ## How to use this GPTQ model from Python code
260
+
261
+ ### Install the necessary packages
262
+
263
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
264
+
265
+ ```shell
266
+ pip3 install transformers optimum
267
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
268
+ ```
269
+
270
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
271
+
272
+ ```shell
273
+ pip3 uninstall -y auto-gptq
274
+ git clone https://github.com/PanQiWei/AutoGPTQ
275
+ cd AutoGPTQ
276
+ git checkout v0.4.2
277
+ pip3 install .
278
+ ```
279
+
280
+ ### You can then use the following code
281
+
282
+ ```python
283
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
284
+
285
+ model_name_or_path = "TheBloke/ZephRP-m7b-GPTQ"
286
+ # To use a different branch, change revision
287
+ # For example: revision="gptq-4bit-32g-actorder_True"
288
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
289
+ device_map="auto",
290
+ trust_remote_code=False,
291
+ revision="main")
292
+
293
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
294
+
295
+ prompt = "Tell me about AI"
296
+ prompt_template=f'''### Instruction:
297
+ Character's Persona: bot character description
298
+
299
+ User's persona: user character description
300
+
301
+ Scenario: what happens in the story
302
+
303
+ Play the role of Character. You must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User. Character should respond with messages of medium length.
304
+
305
+ ### Input:
306
+ User: {prompt}
307
+
308
+ ### Response:
309
+ Character:
310
+ '''
311
+
312
+ print("\n\n*** Generate:")
313
+
314
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
315
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
316
+ print(tokenizer.decode(output[0]))
317
+
318
+ # Inference can also be done using transformers' pipeline
319
+
320
+ print("*** Pipeline:")
321
+ pipe = pipeline(
322
+ "text-generation",
323
+ model=model,
324
+ tokenizer=tokenizer,
325
+ max_new_tokens=512,
326
+ do_sample=True,
327
+ temperature=0.7,
328
+ top_p=0.95,
329
+ top_k=40,
330
+ repetition_penalty=1.1
331
+ )
332
+
333
+ print(pipe(prompt_template)[0]['generated_text'])
334
+ ```
335
+ <!-- README_GPTQ.md-use-from-python end -->
336
+
337
+ <!-- README_GPTQ.md-compatibility start -->
338
+ ## Compatibility
339
+
340
+ 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).
341
+
342
+ [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.
343
+
344
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
345
+ <!-- README_GPTQ.md-compatibility end -->
346
+
347
+ <!-- footer start -->
348
+ <!-- 200823 -->
349
+ ## Discord
350
+
351
+ For further support, and discussions on these models and AI in general, join us at:
352
+
353
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
354
+
355
+ ## Thanks, and how to contribute
356
+
357
+ Thanks to the [chirper.ai](https://chirper.ai) team!
358
+
359
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
360
+
361
+ 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.
362
+
363
+ 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.
364
+
365
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
366
+
367
+ * Patreon: https://patreon.com/TheBlokeAI
368
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
369
+
370
+ **Special thanks to**: Aemon Algiz.
371
+
372
+ **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
373
+
374
+
375
+ Thank you to all my generous patrons and donaters!
376
+
377
+ And thank you again to a16z for their generous grant.
378
+
379
+ <!-- footer end -->
380
+
381
+ # Original model card: The Royal Lab's Zephrp m7b
382
+
383
+ # ZephRP-m7b
384
+
385
+ This is a [Mistral](https://huggingface.co/mistralai/Mistral-7B-v0.1)-based model consisting of a merge between [HuggingFaceH4/zephyr-7b-alpha](https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha) and PEFT adapter trained using the LimaRP dataset.
386
+
387
+ The goal was to combine the message length instruction training of LimaRPv3 and additional stylistic elements with the superior knowledge and instruction-following capabilities of the Zephyr model.
388
+
389
+ ## Usage:
390
+ The intended prompt format is the Alpaca instruction format of LimaRP v3:
391
+ ```
392
+ ### Instruction:
393
+ Character's Persona: {bot character description}
394
+
395
+ User's Persona: {user character description}
396
+
397
+ Scenario: {what happens in the story}
398
+
399
+ Play the role of Character. You must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User.
400
+
401
+ ### Input:
402
+ User: {utterance}
403
+
404
+ ### Response:
405
+ Character: {utterance}
406
+
407
+ ### Input
408
+ User: {utterance}
409
+
410
+ ### Response:
411
+ Character: {utterance}
412
+
413
+ (etc.)
414
+ ```
415
+
416
+ ## Message length control
417
+ Due to the inclusion of LimaRP v3, it is possible to append a length modifier to the response instruction sequence, like this:
418
+ ```
419
+ ### Input
420
+ User: {utterance}
421
+
422
+ ### Response: (length = medium)
423
+ Character: {utterance}
424
+ ```
425
+ This has an immediately noticeable effect on bot responses. The available lengths are: `micro, tiny, short, medium, long, massive, huge, enormous, humongous, unlimited`. The recommended starting length is `medium`. Keep in mind that the AI may ramble or impersonate the user with very long messages.
426
+ ## Bias, Risks, and Limitations
427
+ The model will show biases similar to those observed in niche roleplaying forums on the Internet, besides those exhibited by the base model. It is not intended for supplying factual information or advice in any form.
428
+ ## Training Details
429
+ The LimaRP PEFT adapter was trained as an 8-bit lora using [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl).
430
+
431
+ The following hyperparameters were used during training of the adapter on the original [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) model using a single L40 GPU:
432
+ - learning_rate: 0.00015
433
+ - train_batch_size: 2
434
+ - eval_batch_size: 2
435
+ - seed: 42
436
+ - gradient_accumulation_steps: 4
437
+ - total_train_batch_size: 8
438
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
439
+ - lr_scheduler_type: cosine
440
+ - lr_scheduler_warmup_steps: 10
441
+ - num_epochs: 2