TheBloke commited on
Commit
3ccf454
1 Parent(s): ff32e8f

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +397 -0
README.md ADDED
@@ -0,0 +1,397 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Nondzu/Mistral-7B-code-16k-qlora
3
+ inference: false
4
+ license: apache-2.0
5
+ model_creator: Kamil
6
+ model_name: Mistral 7B Code 16K qLoRA
7
+ model_type: mistral
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
+
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
+ # Mistral 7B Code 16K qLoRA - GGUF
41
+ - Model creator: [Kamil](https://huggingface.co/Nondzu)
42
+ - Original model: [Mistral 7B Code 16K qLoRA](https://huggingface.co/Nondzu/Mistral-7B-code-16k-qlora)
43
+
44
+ <!-- description start -->
45
+ ## Description
46
+
47
+ This repo contains GGUF format model files for [Kamil's Mistral 7B Code 16K qLoRA](https://huggingface.co/Nondzu/Mistral-7B-code-16k-qlora).
48
+
49
+ <!-- description end -->
50
+ <!-- README_GGUF.md-about-gguf start -->
51
+ ### About GGUF
52
+
53
+ 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.
54
+
55
+ Here is an incomplate list of clients and libraries that are known to support GGUF:
56
+
57
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
58
+ * [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.
59
+ * [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.
60
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
61
+ * [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.
62
+ * [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.
63
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
64
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
65
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
66
+
67
+ <!-- README_GGUF.md-about-gguf end -->
68
+ <!-- repositories-available start -->
69
+ ## Repositories available
70
+
71
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-AWQ)
72
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GPTQ)
73
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF)
74
+ * [Kamil's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Nondzu/Mistral-7B-code-16k-qlora)
75
+ <!-- repositories-available end -->
76
+
77
+ <!-- prompt-template start -->
78
+ ## Prompt template: Alpaca
79
+
80
+ ```
81
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
82
+
83
+ ### Instruction:
84
+ {prompt}
85
+
86
+ ### Response:
87
+
88
+ ```
89
+
90
+ <!-- prompt-template end -->
91
+
92
+
93
+ <!-- compatibility_gguf start -->
94
+ ## Compatibility
95
+
96
+ 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)
97
+
98
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
99
+
100
+ ## Explanation of quantisation methods
101
+ <details>
102
+ <summary>Click to see details</summary>
103
+
104
+ The new methods available are:
105
+ * 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)
106
+ * 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.
107
+ * 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.
108
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
109
+ * 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
110
+
111
+ Refer to the Provided Files table below to see what files use which methods, and how.
112
+ </details>
113
+ <!-- compatibility_gguf end -->
114
+
115
+ <!-- README_GGUF.md-provided-files start -->
116
+ ## Provided files
117
+
118
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
119
+ | ---- | ---- | ---- | ---- | ---- | ----- |
120
+ | [mistral-7b-code-16k-qlora.Q2_K.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q2_K.gguf) | Q2_K | 2 | 3.08 GB| 5.58 GB | smallest, significant quality loss - not recommended for most purposes |
121
+ | [mistral-7b-code-16k-qlora.Q3_K_S.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q3_K_S.gguf) | Q3_K_S | 3 | 3.16 GB| 5.66 GB | very small, high quality loss |
122
+ | [mistral-7b-code-16k-qlora.Q3_K_M.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q3_K_M.gguf) | Q3_K_M | 3 | 3.52 GB| 6.02 GB | very small, high quality loss |
123
+ | [mistral-7b-code-16k-qlora.Q3_K_L.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q3_K_L.gguf) | Q3_K_L | 3 | 3.82 GB| 6.32 GB | small, substantial quality loss |
124
+ | [mistral-7b-code-16k-qlora.Q4_0.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q4_0.gguf) | Q4_0 | 4 | 4.11 GB| 6.61 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
125
+ | [mistral-7b-code-16k-qlora.Q4_K_S.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q4_K_S.gguf) | Q4_K_S | 4 | 4.14 GB| 6.64 GB | small, greater quality loss |
126
+ | [mistral-7b-code-16k-qlora.Q4_K_M.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q4_K_M.gguf) | Q4_K_M | 4 | 4.37 GB| 6.87 GB | medium, balanced quality - recommended |
127
+ | [mistral-7b-code-16k-qlora.Q5_0.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q5_0.gguf) | Q5_0 | 5 | 5.00 GB| 7.50 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
128
+ | [mistral-7b-code-16k-qlora.Q5_K_S.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q5_K_S.gguf) | Q5_K_S | 5 | 5.00 GB| 7.50 GB | large, low quality loss - recommended |
129
+ | [mistral-7b-code-16k-qlora.Q5_K_M.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q5_K_M.gguf) | Q5_K_M | 5 | 5.13 GB| 7.63 GB | large, very low quality loss - recommended |
130
+ | [mistral-7b-code-16k-qlora.Q6_K.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q6_K.gguf) | Q6_K | 6 | 5.94 GB| 8.44 GB | very large, extremely low quality loss |
131
+ | [mistral-7b-code-16k-qlora.Q8_0.gguf](https://huggingface.co/TheBloke/Mistral-7B-Code-16K-qlora-GGUF/blob/main/mistral-7b-code-16k-qlora.Q8_0.gguf) | Q8_0 | 8 | 7.70 GB| 10.20 GB | very large, extremely low quality loss - not recommended |
132
+
133
+ **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.
134
+
135
+
136
+
137
+ <!-- README_GGUF.md-provided-files end -->
138
+
139
+ <!-- README_GGUF.md-how-to-download start -->
140
+ ## How to download GGUF files
141
+
142
+ **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.
143
+
144
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
145
+ - LM Studio
146
+ - LoLLMS Web UI
147
+ - Faraday.dev
148
+
149
+ ### In `text-generation-webui`
150
+
151
+ Under Download Model, you can enter the model repo: TheBloke/Mistral-7B-Code-16K-qlora-GGUF and below it, a specific filename to download, such as: mistral-7b-code-16k-qlora.Q4_K_M.gguf.
152
+
153
+ Then click Download.
154
+
155
+ ### On the command line, including multiple files at once
156
+
157
+ I recommend using the `huggingface-hub` Python library:
158
+
159
+ ```shell
160
+ pip3 install huggingface-hub
161
+ ```
162
+
163
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
164
+
165
+ ```shell
166
+ huggingface-cli download TheBloke/Mistral-7B-Code-16K-qlora-GGUF mistral-7b-code-16k-qlora.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
167
+ ```
168
+
169
+ <details>
170
+ <summary>More advanced huggingface-cli download usage</summary>
171
+
172
+ You can also download multiple files at once with a pattern:
173
+
174
+ ```shell
175
+ huggingface-cli download TheBloke/Mistral-7B-Code-16K-qlora-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
176
+ ```
177
+
178
+ 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).
179
+
180
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
181
+
182
+ ```shell
183
+ pip3 install hf_transfer
184
+ ```
185
+
186
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
187
+
188
+ ```shell
189
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Mistral-7B-Code-16K-qlora-GGUF mistral-7b-code-16k-qlora.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
190
+ ```
191
+
192
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
193
+ </details>
194
+ <!-- README_GGUF.md-how-to-download end -->
195
+
196
+ <!-- README_GGUF.md-how-to-run start -->
197
+ ## Example `llama.cpp` command
198
+
199
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
200
+
201
+ ```shell
202
+ ./main -ngl 32 -m mistral-7b-code-16k-qlora.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:"
203
+ ```
204
+
205
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
206
+
207
+ 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.
208
+
209
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
210
+
211
+ 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)
212
+
213
+ ## How to run in `text-generation-webui`
214
+
215
+ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
216
+
217
+ ## How to run from Python code
218
+
219
+ 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.
220
+
221
+ ### How to load this model in Python code, using ctransformers
222
+
223
+ #### First install the package
224
+
225
+ Run one of the following commands, according to your system:
226
+
227
+ ```shell
228
+ # Base ctransformers with no GPU acceleration
229
+ pip install ctransformers
230
+ # Or with CUDA GPU acceleration
231
+ pip install ctransformers[cuda]
232
+ # Or with AMD ROCm GPU acceleration (Linux only)
233
+ CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
234
+ # Or with Metal GPU acceleration for macOS systems only
235
+ CT_METAL=1 pip install ctransformers --no-binary ctransformers
236
+ ```
237
+
238
+ #### Simple ctransformers example code
239
+
240
+ ```python
241
+ from ctransformers import AutoModelForCausalLM
242
+
243
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
244
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-Code-16K-qlora-GGUF", model_file="mistral-7b-code-16k-qlora.Q4_K_M.gguf", model_type="mistral", gpu_layers=50)
245
+
246
+ print(llm("AI is going to"))
247
+ ```
248
+
249
+ ## How to use with LangChain
250
+
251
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
252
+
253
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
254
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
255
+
256
+ <!-- README_GGUF.md-how-to-run end -->
257
+
258
+ <!-- footer start -->
259
+ <!-- 200823 -->
260
+ ## Discord
261
+
262
+ For further support, and discussions on these models and AI in general, join us at:
263
+
264
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
265
+
266
+ ## Thanks, and how to contribute
267
+
268
+ Thanks to the [chirper.ai](https://chirper.ai) team!
269
+
270
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
271
+
272
+ 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.
273
+
274
+ 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.
275
+
276
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
277
+
278
+ * Patreon: https://patreon.com/TheBlokeAI
279
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
280
+
281
+ **Special thanks to**: Aemon Algiz.
282
+
283
+ **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
284
+
285
+
286
+ Thank you to all my generous patrons and donaters!
287
+
288
+ And thank you again to a16z for their generous grant.
289
+
290
+ <!-- footer end -->
291
+
292
+ <!-- original-model-card start -->
293
+ # Original model card: Kamil's Mistral 7B Code 16K qLoRA
294
+
295
+ # Mistral-7B-code-16k-qlora
296
+
297
+ I'm excited to announce the release of a new model called Mistral-7B-code-16k-qlora. This small and fast model shows a lot of promise for supporting coding or acting as a copilot. I'm currently looking for people to help me test it out!
298
+
299
+ ## Additional Information
300
+
301
+ This model was trained on 3x RTX 3090 in my homelab, using around 65kWh for approximately 23 cents, which is equivalent to around $15 for electricity.
302
+
303
+ ## Dataset:
304
+ nickrosh/Evol-Instruct-Code-80k-v1
305
+ https://huggingface.co/datasets/nickrosh/Evol-Instruct-Code-80k-v1
306
+ ## Prompt template: Alpaca
307
+ ```
308
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
309
+
310
+ ### Instruction:
311
+ {prompt}
312
+
313
+ ### Response:
314
+ ```
315
+
316
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
317
+ ## Settings:
318
+ ```
319
+ base_model: mistralai/Mistral-7B-Instruct-v0.1
320
+ base_model_config: mistralai/Mistral-7B-Instruct-v0.1
321
+ model_type: MistralForCausalLM
322
+ tokenizer_type: LlamaTokenizer
323
+ is_mistral_derived_model: true
324
+
325
+ load_in_8bit: false
326
+ load_in_4bit: true
327
+ strict: false
328
+
329
+ datasets:
330
+ - path: nickrosh/Evol-Instruct-Code-80k-v1
331
+ type: oasst
332
+ dataset_prepared_path:
333
+ val_set_size: 0.01
334
+ output_dir: ./Mistral-7B-Evol-Instruct-16k-test11
335
+ adapter: qlora
336
+ lora_model_dir:
337
+ # 16384 8192 4096 2048
338
+ sequence_len: 16384
339
+ sample_packing: true
340
+ pad_to_sequence_len: true
341
+ lora_r: 32
342
+ lora_alpha: 16
343
+ lora_dropout: 0.05
344
+ lora_target_modules:
345
+ lora_target_linear: true
346
+ lora_fan_in_fan_out:
347
+
348
+ wandb_project: mistral-code
349
+ wandb_entity:
350
+ wandb_watch:
351
+ wandb_run_id:
352
+ wandb_log_model:
353
+
354
+ gradient_accumulation_steps: 2
355
+ micro_batch_size: 1
356
+ num_epochs: 8
357
+ optimizer: paged_adamw_32bit
358
+ lr_scheduler: cosine
359
+ learning_rate: 0.0002
360
+
361
+ train_on_inputs: false
362
+ group_by_length: false
363
+ bf16: true
364
+ fp16: false
365
+ tf32: false
366
+ gradient_checkpointing: true
367
+ early_stopping_patience:
368
+ resume_from_checkpoint:
369
+ local_rank:
370
+ logging_steps: 1
371
+ xformers_attention:
372
+ flash_attention: true
373
+
374
+ warmup_steps: 10
375
+ eval_steps: 20
376
+ save_steps:
377
+ debug:
378
+ # deepspeed:
379
+ deepspeed: deepspeed/zero2.json
380
+ weight_decay: 0.0
381
+ fsdp:
382
+ fsdp_config:
383
+ special_tokens:
384
+ bos_token: "<s>"
385
+ eos_token: "</s>"
386
+ unk_token: "<unk>"
387
+
388
+ ```
389
+
390
+
391
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63729f35acef705233c87909/NyuqJFDkH00KGvuOwHIuG.png)
392
+
393
+ Check my other projects:
394
+
395
+ https://github.com/Nondzu/LlamaTor
396
+
397
+ <!-- original-model-card end -->