TheBloke commited on
Commit
d8ec469
1 Parent(s): 5d74bdc

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +452 -0
README.md ADDED
@@ -0,0 +1,452 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: lemonilia/AshhLimaRP-Mistral-7B
3
+ inference: false
4
+ license: apache-2.0
5
+ model_creator: Suikamelon
6
+ model_name: AshhLimaRP Mistral 7B
7
+ model_type: mistral
8
+ prompt_template: "### Instruction:\nCharacter's Persona: bot character description\n\
9
+ \nUser's persona: user character description\n \nScenario: what happens in the\
10
+ \ story\n\nPlay the role of Character. You must engage in a roleplaying chat with\
11
+ \ User below this line. Do not write dialogues and narration for User. Character\
12
+ \ should respond with messages of medium length.\n\n### Input:\nUser: {prompt}\n\
13
+ \n### Response:\nCharacter: \n"
14
+ quantized_by: TheBloke
15
+ ---
16
+ <!-- markdownlint-disable MD041 -->
17
+
18
+ <!-- header start -->
19
+ <!-- 200823 -->
20
+ <div style="width: auto; margin-left: auto; margin-right: auto">
21
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
22
+ </div>
23
+ <div style="display: flex; justify-content: space-between; width: 100%;">
24
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
25
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
26
+ </div>
27
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
28
+ <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>
29
+ </div>
30
+ </div>
31
+ <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>
32
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
33
+ <!-- header end -->
34
+
35
+ # AshhLimaRP Mistral 7B - GGUF
36
+ - Model creator: [Suikamelon](https://huggingface.co/lemonilia)
37
+ - Original model: [AshhLimaRP Mistral 7B](https://huggingface.co/lemonilia/AshhLimaRP-Mistral-7B)
38
+
39
+ <!-- description start -->
40
+ ## Description
41
+
42
+ This repo contains GGUF format model files for [Suikamelon's AshhLimaRP Mistral 7B](https://huggingface.co/lemonilia/AshhLimaRP-Mistral-7B).
43
+
44
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
45
+
46
+ <!-- description end -->
47
+ <!-- README_GGUF.md-about-gguf start -->
48
+ ### About GGUF
49
+
50
+ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
51
+
52
+ Here is an incomplate list of clients and libraries that are known to support GGUF:
53
+
54
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
55
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
56
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
57
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
58
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
59
+ * [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
60
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
61
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
62
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
63
+
64
+ <!-- README_GGUF.md-about-gguf end -->
65
+ <!-- repositories-available start -->
66
+ ## Repositories available
67
+
68
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-AWQ)
69
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GPTQ)
70
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF)
71
+ * [Suikamelon's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/lemonilia/AshhLimaRP-Mistral-7B)
72
+ <!-- repositories-available end -->
73
+
74
+ <!-- prompt-template start -->
75
+ ## Prompt template: LimaRP-Alpaca
76
+
77
+ ```
78
+ ### Instruction:
79
+ Character's Persona: bot character description
80
+
81
+ User's persona: user character description
82
+
83
+ Scenario: what happens in the story
84
+
85
+ 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.
86
+
87
+ ### Input:
88
+ User: {prompt}
89
+
90
+ ### Response:
91
+ Character:
92
+
93
+ ```
94
+
95
+ <!-- prompt-template end -->
96
+
97
+
98
+ <!-- compatibility_gguf start -->
99
+ ## Compatibility
100
+
101
+ These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
102
+
103
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
104
+
105
+ ## Explanation of quantisation methods
106
+
107
+ <details>
108
+ <summary>Click to see details</summary>
109
+
110
+ The new methods available are:
111
+
112
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
113
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
114
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
115
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
116
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
117
+
118
+ Refer to the Provided Files table below to see what files use which methods, and how.
119
+ </details>
120
+ <!-- compatibility_gguf end -->
121
+
122
+ <!-- README_GGUF.md-provided-files start -->
123
+ ## Provided files
124
+
125
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
126
+ | ---- | ---- | ---- | ---- | ---- | ----- |
127
+ | [ashhlimarp-mistral-7b.Q2_K.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q2_K.gguf) | Q2_K | 2 | 3.08 GB| 5.58 GB | smallest, significant quality loss - not recommended for most purposes |
128
+ | [ashhlimarp-mistral-7b.Q3_K_S.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q3_K_S.gguf) | Q3_K_S | 3 | 3.16 GB| 5.66 GB | very small, high quality loss |
129
+ | [ashhlimarp-mistral-7b.Q3_K_M.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q3_K_M.gguf) | Q3_K_M | 3 | 3.52 GB| 6.02 GB | very small, high quality loss |
130
+ | [ashhlimarp-mistral-7b.Q3_K_L.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q3_K_L.gguf) | Q3_K_L | 3 | 3.82 GB| 6.32 GB | small, substantial quality loss |
131
+ | [ashhlimarp-mistral-7b.Q4_0.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q4_0.gguf) | Q4_0 | 4 | 4.11 GB| 6.61 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
132
+ | [ashhlimarp-mistral-7b.Q4_K_S.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q4_K_S.gguf) | Q4_K_S | 4 | 4.14 GB| 6.64 GB | small, greater quality loss |
133
+ | [ashhlimarp-mistral-7b.Q4_K_M.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q4_K_M.gguf) | Q4_K_M | 4 | 4.37 GB| 6.87 GB | medium, balanced quality - recommended |
134
+ | [ashhlimarp-mistral-7b.Q5_0.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q5_0.gguf) | Q5_0 | 5 | 5.00 GB| 7.50 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
135
+ | [ashhlimarp-mistral-7b.Q5_K_S.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q5_K_S.gguf) | Q5_K_S | 5 | 5.00 GB| 7.50 GB | large, low quality loss - recommended |
136
+ | [ashhlimarp-mistral-7b.Q5_K_M.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q5_K_M.gguf) | Q5_K_M | 5 | 5.13 GB| 7.63 GB | large, very low quality loss - recommended |
137
+ | [ashhlimarp-mistral-7b.Q6_K.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q6_K.gguf) | Q6_K | 6 | 5.94 GB| 8.44 GB | very large, extremely low quality loss |
138
+ | [ashhlimarp-mistral-7b.Q8_0.gguf](https://huggingface.co/TheBloke/AshhLimaRP-Mistral-7B-GGUF/blob/main/ashhlimarp-mistral-7b.Q8_0.gguf) | Q8_0 | 8 | 7.70 GB| 10.20 GB | very large, extremely low quality loss - not recommended |
139
+
140
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
141
+
142
+
143
+
144
+ <!-- README_GGUF.md-provided-files end -->
145
+
146
+ <!-- README_GGUF.md-how-to-download start -->
147
+ ## How to download GGUF files
148
+
149
+ **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file.
150
+
151
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
152
+
153
+ * LM Studio
154
+ * LoLLMS Web UI
155
+ * Faraday.dev
156
+
157
+ ### In `text-generation-webui`
158
+
159
+ Under Download Model, you can enter the model repo: TheBloke/AshhLimaRP-Mistral-7B-GGUF and below it, a specific filename to download, such as: ashhlimarp-mistral-7b.Q4_K_M.gguf.
160
+
161
+ Then click Download.
162
+
163
+ ### On the command line, including multiple files at once
164
+
165
+ I recommend using the `huggingface-hub` Python library:
166
+
167
+ ```shell
168
+ pip3 install huggingface-hub
169
+ ```
170
+
171
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
172
+
173
+ ```shell
174
+ huggingface-cli download TheBloke/AshhLimaRP-Mistral-7B-GGUF ashhlimarp-mistral-7b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
175
+ ```
176
+
177
+ <details>
178
+ <summary>More advanced huggingface-cli download usage</summary>
179
+
180
+ You can also download multiple files at once with a pattern:
181
+
182
+ ```shell
183
+ huggingface-cli download TheBloke/AshhLimaRP-Mistral-7B-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
184
+ ```
185
+
186
+ 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).
187
+
188
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
189
+
190
+ ```shell
191
+ pip3 install hf_transfer
192
+ ```
193
+
194
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
195
+
196
+ ```shell
197
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/AshhLimaRP-Mistral-7B-GGUF ashhlimarp-mistral-7b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
198
+ ```
199
+
200
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
201
+ </details>
202
+ <!-- README_GGUF.md-how-to-download end -->
203
+
204
+ <!-- README_GGUF.md-how-to-run start -->
205
+ ## Example `llama.cpp` command
206
+
207
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
208
+
209
+ ```shell
210
+ ./main -ngl 32 -m ashhlimarp-mistral-7b.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### Instruction:\nCharacter's Persona: bot character description\n\nUser's persona: user character description\n \nScenario: what happens in the story\n\nPlay 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.\n\n### Input:\nUser: {prompt}\n\n### Response:\nCharacter:"
211
+ ```
212
+
213
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
214
+
215
+ Change `-c 2048` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically.
216
+
217
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
218
+
219
+ For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
220
+
221
+ ## How to run in `text-generation-webui`
222
+
223
+ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
224
+
225
+ ## How to run from Python code
226
+
227
+ You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries.
228
+
229
+ ### How to load this model in Python code, using ctransformers
230
+
231
+ #### First install the package
232
+
233
+ Run one of the following commands, according to your system:
234
+
235
+ ```shell
236
+ # Base ctransformers with no GPU acceleration
237
+ pip install ctransformers
238
+ # Or with CUDA GPU acceleration
239
+ pip install ctransformers[cuda]
240
+ # Or with AMD ROCm GPU acceleration (Linux only)
241
+ CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
242
+ # Or with Metal GPU acceleration for macOS systems only
243
+ CT_METAL=1 pip install ctransformers --no-binary ctransformers
244
+ ```
245
+
246
+ #### Simple ctransformers example code
247
+
248
+ ```python
249
+ from ctransformers import AutoModelForCausalLM
250
+
251
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
252
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/AshhLimaRP-Mistral-7B-GGUF", model_file="ashhlimarp-mistral-7b.Q4_K_M.gguf", model_type="mistral", gpu_layers=50)
253
+
254
+ print(llm("AI is going to"))
255
+ ```
256
+
257
+ ## How to use with LangChain
258
+
259
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
260
+
261
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
262
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
263
+
264
+ <!-- README_GGUF.md-how-to-run end -->
265
+
266
+ <!-- footer start -->
267
+ <!-- 200823 -->
268
+ ## Discord
269
+
270
+ For further support, and discussions on these models and AI in general, join us at:
271
+
272
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
273
+
274
+ ## Thanks, and how to contribute
275
+
276
+ Thanks to the [chirper.ai](https://chirper.ai) team!
277
+
278
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
279
+
280
+ 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.
281
+
282
+ 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.
283
+
284
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
285
+
286
+ * Patreon: https://patreon.com/TheBlokeAI
287
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
288
+
289
+ **Special thanks to**: Aemon Algiz.
290
+
291
+ **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
292
+
293
+
294
+ Thank you to all my generous patrons and donaters!
295
+
296
+ And thank you again to a16z for their generous grant.
297
+
298
+ <!-- footer end -->
299
+
300
+ <!-- original-model-card start -->
301
+ # Original model card: Suikamelon's AshhLimaRP Mistral 7B
302
+
303
+
304
+ # AshhLimaRP-Mistral-7B (Alpaca, v1)
305
+
306
+ This is a version of LimaRP with 2000 training samples _up to_ about 9k tokens length
307
+ finetuned on [Ashhwriter-Mistral-7B](https://huggingface.co/lemonilia/Ashhwriter-Mistral-7B).
308
+
309
+ LimaRP is a longform-oriented, novel-style roleplaying chat model intended to replicate the experience
310
+ of 1-on-1 roleplay on Internet forums. Short-form, IRC/Discord-style RP (aka "Markdown format")
311
+ is not supported. The model does not include instruction tuning, only manually picked and
312
+ slightly edited RP conversations with persona and scenario data.
313
+
314
+ Ashhwriter, the base, is a model entirely finetuned on human-written lewd stories.
315
+
316
+ ## Available versions
317
+ - Float16 HF weights
318
+ - LoRA Adapter ([adapter_config.json](https://huggingface.co/lemonilia/AshhLimaRP-Mistral-7B/resolve/main/adapter_config.json) and [adapter_model.bin](https://huggingface.co/lemonilia/AshhLimaRP-Mistral-7B/resolve/main/adapter_model.bin))
319
+ - [4bit AWQ](https://huggingface.co/lemonilia/AshhLimaRP-Mistral-7B/tree/main/AWQ)
320
+ - [Q4_K_M GGUF](https://huggingface.co/lemonilia/AshhLimaRP-Mistral-7B/resolve/main/AshhLimaRP-Mistral-7B.Q4_K_M.gguf)
321
+ - [Q6_K GGUF](https://huggingface.co/lemonilia/AshhLimaRP-Mistral-7B/resolve/main/AshhLimaRP-Mistral-7B.Q6_K.gguf)
322
+
323
+ ## Prompt format
324
+ [Extended Alpaca format](https://github.com/tatsu-lab/stanford_alpaca),
325
+ with `### Instruction:`, `### Input:` immediately preceding user inputs and `### Response:`
326
+ immediately preceding model outputs. While Alpaca wasn't originally intended for multi-turn
327
+ responses, in practice this is not a problem; the format follows a pattern already used by
328
+ other models.
329
+
330
+ ```
331
+ ### Instruction:
332
+ Character's Persona: {bot character description}
333
+
334
+ User's Persona: {user character description}
335
+
336
+ Scenario: {what happens in the story}
337
+
338
+ 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.
339
+
340
+ ### Input:
341
+ User: {utterance}
342
+
343
+ ### Response:
344
+ Character: {utterance}
345
+
346
+ ### Input
347
+ User: {utterance}
348
+
349
+ ### Response:
350
+ Character: {utterance}
351
+
352
+ (etc.)
353
+ ```
354
+
355
+ You should:
356
+ - Replace all text in curly braces (curly braces included) with your own text.
357
+ - Replace `User` and `Character` with appropriate names.
358
+
359
+
360
+ ### Message length control
361
+ Inspired by the previously named "Roleplay" preset in SillyTavern, with this
362
+ version of LimaRP it is possible to append a length modifier to the response instruction
363
+ sequence, like this:
364
+
365
+ ```
366
+ ### Input
367
+ User: {utterance}
368
+
369
+ ### Response: (length = medium)
370
+ Character: {utterance}
371
+ ```
372
+
373
+ This has an immediately noticeable effect on bot responses. The lengths using during training are:
374
+ `micro`, `tiny`, `short`, `medium`, `long`, `massive`, `huge`, `enormous`, `humongous`, `unlimited`.
375
+ **The recommended starting length is medium**. Keep in mind that the AI can ramble or impersonate
376
+ the user with very long messages.
377
+
378
+ The length control effect is reproducible, but the messages will not necessarily follow
379
+ lengths very precisely, rather follow certain ranges on average, as seen in this table
380
+ with data from tests made with one reply at the beginning of the conversation:
381
+
382
+ ![lengths](https://i.imgur.com/2WXGgaV.png)
383
+
384
+ Response length control appears to work well also deep into the conversation. **By omitting
385
+ the modifier, the model will choose the most appropriate response length** (although it might
386
+ not necessarily be what the user desires).
387
+
388
+ ## Suggested settings
389
+ You can follow these instruction format settings in SillyTavern. Replace `medium` with
390
+ your desired response length:
391
+
392
+ ![settings](https://files.catbox.moe/fpieug.png)
393
+
394
+ ## Text generation settings
395
+ These settings could be a good general starting point:
396
+
397
+ - TFS = 0.90
398
+ - Temperature = 0.70
399
+ - Repetition penalty = ~1.11
400
+ - Repetition penalty range = ~2048
401
+ - top-k = 0 (disabled)
402
+ - top-p = 1 (disabled)
403
+
404
+ ## Training procedure
405
+ [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl) was used for training
406
+ on 2x NVidia A40 GPUs.
407
+
408
+ The A40 GPUs have been graciously provided by [Arc Compute](https://www.arccompute.io/).
409
+
410
+ ### Training hyperparameters
411
+ A lower learning rate than usual was employed. Due to an unforeseen issue the training
412
+ was cut short and as a result 3 epochs were trained instead of the planned 4. Using 2 GPUs,
413
+ the effective global batch size would have been 16.
414
+
415
+ Training was continued from the most recent LoRA adapter from Ashhwriter, using the same
416
+ LoRA R and LoRA alpha.
417
+
418
+ - lora_model_dir: /home/anon/bin/axolotl/OUT_mistral-stories/checkpoint-6000/
419
+ - learning_rate: 0.00005
420
+ - lr_scheduler: cosine
421
+ - noisy_embedding_alpha: 3.5
422
+ - num_epochs: 4
423
+ - sequence_len: 8750
424
+ - lora_r: 256
425
+ - lora_alpha: 16
426
+ - lora_dropout: 0.05
427
+ - lora_target_linear: True
428
+ - bf16: True
429
+ - fp16: false
430
+ - tf32: True
431
+ - load_in_8bit: True
432
+ - adapter: lora
433
+ - micro_batch_size: 2
434
+ - optimizer: adamw_bnb_8bit
435
+ - warmup_steps: 10
436
+ - optimizer: adamw_torch
437
+ - flash_attention: true
438
+ - sample_packing: true
439
+ - pad_to_sequence_len: true
440
+
441
+
442
+ ### Loss graphs
443
+ Values are higher than typical because the training is performed on the entire
444
+ sample, similar to unsupervised finetuning.
445
+
446
+ #### Train loss
447
+ ![Train loss](https://files.catbox.moe/ovw8c7.png)
448
+
449
+ #### Eval loss
450
+ ![Eval loss](https://files.catbox.moe/yp7o0h.png)
451
+
452
+ <!-- original-model-card end -->