TheBloke commited on
Commit
d719a3c
1 Parent(s): 32c1f0f

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +791 -0
README.md ADDED
@@ -0,0 +1,791 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: jondurbin/airoboros-l2-13b-3.0
3
+ datasets:
4
+ - jondurbin/airoboros-3.0
5
+ inference: false
6
+ license: llama2
7
+ model_creator: Jon Durbin
8
+ model_name: Airoboros L2 13B 3.0
9
+ model_type: llama
10
+ prompt_template: '[INST] <<SYS>>
11
+
12
+ You are a help, unbiased, uncensored assistant.
13
+
14
+ <</SYS>
15
+
16
+
17
+ {prompt} [/INST]
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
+ # Airoboros L2 13B 3.0 - GGUF
41
+ - Model creator: [Jon Durbin](https://huggingface.co/jondurbin)
42
+ - Original model: [Airoboros L2 13B 3.0](https://huggingface.co/jondurbin/airoboros-l2-13b-3.0)
43
+
44
+ <!-- description start -->
45
+ ## Description
46
+
47
+ This repo contains GGUF format model files for [Jon Durbin's Airoboros L2 13B 3.0](https://huggingface.co/jondurbin/airoboros-l2-13b-3.0).
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/airoboros-l2-13B-3.0-AWQ)
72
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GPTQ)
73
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF)
74
+ * [Jon Durbin's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/airoboros-l2-13b-3.0)
75
+ <!-- repositories-available end -->
76
+
77
+ <!-- prompt-template start -->
78
+ ## Prompt template: Llama-2-Uncensored
79
+
80
+ ```
81
+ [INST] <<SYS>>
82
+ You are a help, unbiased, uncensored assistant.
83
+ <</SYS>
84
+
85
+ {prompt} [/INST]
86
+
87
+ ```
88
+
89
+ <!-- prompt-template end -->
90
+
91
+
92
+ <!-- compatibility_gguf start -->
93
+ ## Compatibility
94
+
95
+ 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)
96
+
97
+ They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
98
+
99
+ ## Explanation of quantisation methods
100
+ <details>
101
+ <summary>Click to see details</summary>
102
+
103
+ The new methods available are:
104
+ * 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)
105
+ * 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.
106
+ * 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.
107
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
108
+ * 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
109
+
110
+ Refer to the Provided Files table below to see what files use which methods, and how.
111
+ </details>
112
+ <!-- compatibility_gguf end -->
113
+
114
+ <!-- README_GGUF.md-provided-files start -->
115
+ ## Provided files
116
+
117
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
118
+ | ---- | ---- | ---- | ---- | ---- | ----- |
119
+ | [airoboros-l2-13b-3.0.Q2_K.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q2_K.gguf) | Q2_K | 2 | 5.43 GB| 7.93 GB | smallest, significant quality loss - not recommended for most purposes |
120
+ | [airoboros-l2-13b-3.0.Q3_K_S.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q3_K_S.gguf) | Q3_K_S | 3 | 5.66 GB| 8.16 GB | very small, high quality loss |
121
+ | [airoboros-l2-13b-3.0.Q3_K_M.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q3_K_M.gguf) | Q3_K_M | 3 | 6.34 GB| 8.84 GB | very small, high quality loss |
122
+ | [airoboros-l2-13b-3.0.Q3_K_L.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q3_K_L.gguf) | Q3_K_L | 3 | 6.93 GB| 9.43 GB | small, substantial quality loss |
123
+ | [airoboros-l2-13b-3.0.Q4_0.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q4_0.gguf) | Q4_0 | 4 | 7.37 GB| 9.87 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
124
+ | [airoboros-l2-13b-3.0.Q4_K_S.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q4_K_S.gguf) | Q4_K_S | 4 | 7.41 GB| 9.91 GB | small, greater quality loss |
125
+ | [airoboros-l2-13b-3.0.Q4_K_M.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q4_K_M.gguf) | Q4_K_M | 4 | 7.87 GB| 10.37 GB | medium, balanced quality - recommended |
126
+ | [airoboros-l2-13b-3.0.Q5_0.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q5_0.gguf) | Q5_0 | 5 | 8.97 GB| 11.47 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
127
+ | [airoboros-l2-13b-3.0.Q5_K_S.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q5_K_S.gguf) | Q5_K_S | 5 | 8.97 GB| 11.47 GB | large, low quality loss - recommended |
128
+ | [airoboros-l2-13b-3.0.Q5_K_M.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q5_K_M.gguf) | Q5_K_M | 5 | 9.23 GB| 11.73 GB | large, very low quality loss - recommended |
129
+ | [airoboros-l2-13b-3.0.Q6_K.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q6_K.gguf) | Q6_K | 6 | 10.68 GB| 13.18 GB | very large, extremely low quality loss |
130
+ | [airoboros-l2-13b-3.0.Q8_0.gguf](https://huggingface.co/TheBloke/airoboros-l2-13B-3.0-GGUF/blob/main/airoboros-l2-13b-3.0.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
131
+
132
+ **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.
133
+
134
+
135
+
136
+ <!-- README_GGUF.md-provided-files end -->
137
+
138
+ <!-- README_GGUF.md-how-to-download start -->
139
+ ## How to download GGUF files
140
+
141
+ **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.
142
+
143
+ The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
144
+ - LM Studio
145
+ - LoLLMS Web UI
146
+ - Faraday.dev
147
+
148
+ ### In `text-generation-webui`
149
+
150
+ Under Download Model, you can enter the model repo: TheBloke/airoboros-l2-13B-3.0-GGUF and below it, a specific filename to download, such as: airoboros-l2-13b-3.0.Q4_K_M.gguf.
151
+
152
+ Then click Download.
153
+
154
+ ### On the command line, including multiple files at once
155
+
156
+ I recommend using the `huggingface-hub` Python library:
157
+
158
+ ```shell
159
+ pip3 install huggingface-hub
160
+ ```
161
+
162
+ Then you can download any individual model file to the current directory, at high speed, with a command like this:
163
+
164
+ ```shell
165
+ huggingface-cli download TheBloke/airoboros-l2-13B-3.0-GGUF airoboros-l2-13b-3.0.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
166
+ ```
167
+
168
+ <details>
169
+ <summary>More advanced huggingface-cli download usage</summary>
170
+
171
+ You can also download multiple files at once with a pattern:
172
+
173
+ ```shell
174
+ huggingface-cli download TheBloke/airoboros-l2-13B-3.0-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
175
+ ```
176
+
177
+ 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).
178
+
179
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
180
+
181
+ ```shell
182
+ pip3 install hf_transfer
183
+ ```
184
+
185
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
186
+
187
+ ```shell
188
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/airoboros-l2-13B-3.0-GGUF airoboros-l2-13b-3.0.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
189
+ ```
190
+
191
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
192
+ </details>
193
+ <!-- README_GGUF.md-how-to-download end -->
194
+
195
+ <!-- README_GGUF.md-how-to-run start -->
196
+ ## Example `llama.cpp` command
197
+
198
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
199
+
200
+ ```shell
201
+ ./main -ngl 32 -m airoboros-l2-13b-3.0.Q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "[INST] <<SYS>>\nYou are a help, unbiased, uncensored assistant.\n<</SYS>\n\n{prompt} [/INST]"
202
+ ```
203
+
204
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
205
+
206
+ Change `-c 4096` 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.
207
+
208
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
209
+
210
+ 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)
211
+
212
+ ## How to run in `text-generation-webui`
213
+
214
+ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
215
+
216
+ ## How to run from Python code
217
+
218
+ 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.
219
+
220
+ ### How to load this model in Python code, using ctransformers
221
+
222
+ #### First install the package
223
+
224
+ Run one of the following commands, according to your system:
225
+
226
+ ```shell
227
+ # Base ctransformers with no GPU acceleration
228
+ pip install ctransformers
229
+ # Or with CUDA GPU acceleration
230
+ pip install ctransformers[cuda]
231
+ # Or with AMD ROCm GPU acceleration (Linux only)
232
+ CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
233
+ # Or with Metal GPU acceleration for macOS systems only
234
+ CT_METAL=1 pip install ctransformers --no-binary ctransformers
235
+ ```
236
+
237
+ #### Simple ctransformers example code
238
+
239
+ ```python
240
+ from ctransformers import AutoModelForCausalLM
241
+
242
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
243
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/airoboros-l2-13B-3.0-GGUF", model_file="airoboros-l2-13b-3.0.Q4_K_M.gguf", model_type="llama", gpu_layers=50)
244
+
245
+ print(llm("AI is going to"))
246
+ ```
247
+
248
+ ## How to use with LangChain
249
+
250
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
251
+
252
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
253
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
254
+
255
+ <!-- README_GGUF.md-how-to-run end -->
256
+
257
+ <!-- footer start -->
258
+ <!-- 200823 -->
259
+ ## Discord
260
+
261
+ For further support, and discussions on these models and AI in general, join us at:
262
+
263
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
264
+
265
+ ## Thanks, and how to contribute
266
+
267
+ Thanks to the [chirper.ai](https://chirper.ai) team!
268
+
269
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
270
+
271
+ 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.
272
+
273
+ 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.
274
+
275
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
276
+
277
+ * Patreon: https://patreon.com/TheBlokeAI
278
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
279
+
280
+ **Special thanks to**: Aemon Algiz.
281
+
282
+ **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
283
+
284
+
285
+ Thank you to all my generous patrons and donaters!
286
+
287
+ And thank you again to a16z for their generous grant.
288
+
289
+ <!-- footer end -->
290
+
291
+ <!-- original-model-card start -->
292
+ # Original model card: Jon Durbin's Airoboros L2 13B 3.0
293
+
294
+
295
+ ### Overview
296
+
297
+ Another experimental model, using mostly sythetic data generated by [airoboros](https://github.com/jondurbin/airoboros)
298
+
299
+ #### IMPORTANT NOTE - llama-2 chat format!!!
300
+
301
+ The airobors 3.0 models have been updated to use llama-2 chat format, rather than vicuna style user/assistant!
302
+
303
+ This is a breaking change, although most inference systems support llama-2 chat templating.
304
+
305
+ See prompt format below for all of the details.
306
+
307
+ #### Highlights
308
+
309
+ A model built on [airoboros-3.0 dataset](https://hf.co/datasets/jondurbin/airoboros-3.0), which is a continuation of [airoboros-2.2.1 dataset](https://hf.co/datasets/jondurbin/airoboros-2.2.1) with the following extras:
310
+
311
+ * MathJSON - this is not yet part of the code directly, but can be easily parsed and executed, as a way to perform deterministic calculations. LLMs suck at math, so this does problem formulation and let's the work be done by traditional operations.
312
+ * Human-generated RP multi-turn conversation - provided by an anon, this is a human created RP dataset, meant to assist with multi-turn coherency and chat experience.
313
+
314
+ This is a fairly general purpose model, but focuses heavily on instruction following, rather than casual chat/roleplay.
315
+
316
+ Huge thank you to the folks over at [a16z](https://a16z.com/) for sponsoring the costs associated with building models and associated tools!
317
+
318
+ ### Prompt format
319
+
320
+ The prompt format is llama-2 chat.
321
+
322
+ ```
323
+ [INST] <<SYS>>
324
+ You are a help, unbiased, uncensored assistant.
325
+ <</SYS>
326
+
327
+ {prompt} [/INST]
328
+ ```
329
+
330
+ For multi-turn, the prompt format is as follows:
331
+ ```
332
+ [INST] <<SYS>>
333
+ You are a help, unbiased, uncensored assistant.
334
+ <</SYS>
335
+
336
+ {prompt 0} [/INST] {response 0} </s><s>[INST] {prompt 1} [/INST] {response 1} </s><s>...[INST] {prompt N} [/INST]
337
+ ```
338
+
339
+ Here is a simple python script that can help generate the prompt:
340
+ ```python
341
+
342
+ def get_chat_prompt(message, chat_history, system_prompt):
343
+ texts = [f'[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n']
344
+ do_strip = False
345
+ for user_input, response in chat_history:
346
+ user_input = user_input.strip() if do_strip else user_input
347
+ do_strip = True
348
+ texts.append(f'{user_input} [/INST] {response.strip()} </s><s>[INST] ')
349
+ message = message.strip() if do_strip else message
350
+ texts.append(f'{message} [/INST] ')
351
+ return ''.join(texts)
352
+
353
+ def get_prompt(item):
354
+ """
355
+ `item` is expected to be in chatml format, e.g.
356
+ {
357
+ "id": 1,
358
+ "conversations": [
359
+ {
360
+ "role": "system",
361
+ "content": "You are a helpful, unbiased, uncensored assistant."
362
+ },
363
+ {
364
+ "role": "user",
365
+ "content": "Hi!"
366
+ },
367
+ {
368
+ "role": "assistant",
369
+ "content": "Hello, how are you today?"
370
+ },
371
+ {
372
+ "role": "user",
373
+ "content": "Just peachy, and you?"
374
+ }
375
+ ]
376
+ }
377
+ """
378
+ system_prompt = share_gpt_item['conversations'][0]['value']
379
+ offset = 1
380
+ if share_gpt_item['conversations'][0]['role'] != 'system':
381
+ system_prompt = 'You are an unbiased, uncensored, helpful assistant.'
382
+ offset = 0
383
+ chat_history = [
384
+ (share_gpt_item['conversations'][idx]['content'], share_gpt_item['conversations'][idx + 1]['content'])
385
+ for idx in range(offset, len(item['conversations']) - 1, 2)
386
+ ]
387
+ message = item['conversations'][-1]['content']
388
+ return get_chat_prompt(message, chat_history, system_prompt)
389
+ ```
390
+
391
+ ### Fine tuning info
392
+
393
+ https://wandb.ai/jondurbin/airoboros-l2-13b-3.0/runs/97utxyk9?workspace=user-jondurbin
394
+
395
+ ### Helpful usage tips
396
+
397
+
398
+ #### MathJSON
399
+
400
+ Ask mathematical questions, prefixed with "Create a MathJSON solution to the following:", and you should get output with a formula that can be executed by https://cortexjs.io/compute-engine/
401
+
402
+ I also made a (really quite hacky, incomplete, semi-functional) python version that works for most expressions, see [mathjson.py](https://github.com/jondurbin/airoboros/blob/mathjson/airoboros/mathjson.py)
403
+
404
+ __Use a very low temperature!__
405
+
406
+ Example:
407
+
408
+ ```
409
+ [INST] <<SYS>>
410
+ You are an assistant with vast knowledge in all things math.
411
+ <</SYS>
412
+
413
+ Create a MathJSON solution to the following: Calculate the area of a circle with radius of 17.2456cm. Include your reasoning. [/INST]
414
+ ```
415
+
416
+ Output:
417
+ ```
418
+ The area (A) of a circle is given by the formula A = πr², where r is the radius of the circle. Since the radius is given in centimeters, we need to convert it to meters first. We know that 1 meter equals 100 centimeters. Therefore, we can represent the radius as: r = 17.2456 cm * 100/1.
419
+
420
+ Once we have the radius in meters, we can calculate the area of the circle using the formula A = πr².
421
+
422
+ Solution as MathJSON:
423
+ <mathjson>
424
+ [
425
+ "Multiply",
426
+ "Pi",
427
+ [
428
+ "Power",
429
+ 17.2456,
430
+ 2
431
+ ]
432
+ ]
433
+ </mathjson>
434
+ ```
435
+
436
+ You can then validate the JSON between `<mathjson>` and `</mathjson>`, then pass the parsed JSON to compute-engine JS or the `evaluate` function in mathjson.py to calculate the response.
437
+
438
+ #### Context obedient question answering
439
+
440
+ By obedient, I mean the model was trained to ignore what it thinks it knows, and uses the context to answer the question. The model was also tuned to limit the values to the provided context as much as possible to reduce hallucinations.
441
+
442
+ The format for a closed-context prompt is as follows:
443
+ ```
444
+ BEGININPUT
445
+ BEGINCONTEXT
446
+ [key0: value0]
447
+ [key1: value1]
448
+ ... other metdata ...
449
+ ENDCONTEXT
450
+ [insert your text blocks here]
451
+ ENDINPUT
452
+ [add as many other blocks, in the exact same format]
453
+ BEGININSTRUCTION
454
+ [insert your instruction(s). The model was tuned with single questions, paragraph format, lists, etc.]
455
+ ENDINSTRUCTION
456
+ ```
457
+
458
+ It's also helpful to add "Don't make up answers if you don't know." to your instruction block to make sure if the context is completely unrelated it doesn't make something up.
459
+
460
+ *The __only__ prompts that need this closed context formating are closed-context instructions. Normal questions/instructions do not!*
461
+
462
+ I know it's a bit verbose and annoying, but after much trial and error, using these explicit delimiters helps the model understand where to find the responses and how to associate specific sources with it.
463
+ - `BEGININPUT` - denotes a new input block
464
+ - `BEGINCONTEXT` - denotes the block of context (metadata key/value pairs) to associate with the current input block
465
+ - `ENDCONTEXT` - denotes the end of the metadata block for the current input
466
+ - [text] - Insert whatever text you want for the input block, as many paragraphs as can fit in the context.
467
+ - `ENDINPUT` - denotes the end of the current input block
468
+ - [repeat as many input blocks in this format as you want]
469
+ - `BEGININSTRUCTION` - denotes the start of the list (or one) instruction(s) to respond to for all of the input blocks above.
470
+ - [instruction(s)]
471
+ - `ENDINSTRUCTION` - denotes the end of instruction set
472
+
473
+ It sometimes works without `ENDINSTRUCTION`, but by explicitly including that in the prompt, the model better understands that all of the instructions in the block should be responded to.
474
+
475
+ __Use a very low temperature!__
476
+
477
+ Here's a trivial, but important example to prove the point:
478
+ ```
479
+ BEGININPUT
480
+ BEGINCONTEXT
481
+ date: 2021-01-01
482
+ url: https://web.site/123
483
+ ENDCONTEXT
484
+ In a shocking turn of events, blueberries are now green, but will be sticking with the same name.
485
+ ENDINPUT
486
+ BEGININSTRUCTION
487
+ What color are bluberries? Source?
488
+ ENDINSTRUCTION
489
+ ```
490
+
491
+ And the response:
492
+ ```
493
+ Blueberries are now green.
494
+ Source:
495
+ date: 2021-01-01
496
+ url: https://web.site/123
497
+ ```
498
+
499
+ #### Summarization
500
+
501
+ 500 samples have been included from [this dataset](https://huggingface.co/datasets/mattpscott/airoboros-summarization), using the same format as contextual question answering, for example:
502
+
503
+ ```
504
+ BEGININPUT
505
+ {text to summarize}
506
+ ENDINPUT
507
+ BEGININSTRUCTION
508
+ Summarize the input in around 130 words.
509
+ ENDINSTRUCTION
510
+ ```
511
+
512
+ #### Getting longer responses
513
+
514
+ You can use a few techniques to get longer responses.
515
+
516
+ Detailed prompts, with explicit instruction for word count:
517
+ ```
518
+ Please compose a narrative set in the heart of an ancient library, steeped in the scent of old parchment and ink. The protagonist should be a young scholar who is dedicated to studying the art of storytelling and its evolution throughout history. In her pursuit of knowledge, she stumbles upon a forgotten tome that seems to possess an unusual aura. This book has the ability to bring stories to life, literally manifesting characters and scenarios from within its pages into reality.
519
+
520
+ The main character must navigate through various epochs of storytelling - from oral traditions of tribal societies, through medieval minstrels' tales, to modern-day digital narratives - as they come alive around her. Each era presents its unique challenges and lessons about the power and impact of stories on human civilization.
521
+
522
+ One such character could be a sentient quill pen, who was once used by renowned authors of yesteryears and now holds their wisdom and experiences. It becomes her mentor, guiding her through this journey with witty remarks and insightful commentary.
523
+
524
+ Ensure that your tale encapsulates the thrill of adventure, the beauty of learning, and the profound connection between humans and their stories. All characters involved should be non-human entities. Feel free to explore creative liberties but maintain the mentioned elements.
525
+
526
+ Your response should be approximately 2300 words.
527
+ ```
528
+
529
+ Or, a simpler example:
530
+ ```
531
+ Please create a long, detailed story about a dragon in an old growth forest who, for some reason, begins speaking the words of the source code of linux.
532
+ ```
533
+
534
+ There are a few examples of next chapter completion as well, e.g.:
535
+ ```
536
+ Write the next chapter of a historical fiction novel set in Paris during the 20th century.
537
+
538
+ Here's a summary of the previous chapter:
539
+ In the vibrant city of Paris, amid the tumultuous changes of the 20th century, our protagonist Margot, an aspiring fashion designer, has just secured an apprenticeship at a prestigious couture house. She meets Lucien, a charming journalist who covers the fashion industry. Together they navigate the ever-changing world of fashion and society, uncovering secrets that reveal the intricate links between style, politics, and culture. As the chapter concludes, they decide to delve deeper into the hidden corners of the fashion world to unravel its mysteries.
540
+
541
+ Requirements for the next chapter:
542
+
543
+ 1. Character Development of Margot and Lucien:
544
+ - Margot's Evolution: Unfold more about Margot's past, her dreams of revolutionizing fashion, and her struggle to establish herself in a male-dominated industry. Illustrate her growing expertise, innovative ideas, and increasing dependence on Lucien.
545
+ - Lucien's Complexity: Introduce uncertainties surrounding Lucien's background and real motives. Increase suspense by suggesting undisclosed information he possesses, while also highlighting his wit and perceptiveness.
546
+
547
+ 2. Exploration of Paris and the Couture House:
548
+ - Paris: Elaborate their journey through the bustling streets of Paris, including encounters with iconic figures, social unrest, and relics from different eras of French history.
549
+ - The Couture House: Expand on the grandeur of the couture house they work in, filled with artistic masterpieces, intense competition, and cryptic notes hinting at a scandalous past.
550
+
551
+ 3. Emergence of the Subplot: The Lost Collection:
552
+ - Discovery: Have Margot and Lucien stumble upon a secret vault containing a lost collection designed before World War II, raising new questions about the previous owner and the influence of war on fashion.
553
+ - Revelation: Capture their shock as they realize the designs were plagiarized, the potential repercussions, and the opportunities it presents for Margot's career.
554
+ - Twist: End with a twist that suggests there are other stolen collections across Paris, setting up their new mission.
555
+
556
+
557
+ Your response should be approximately 650 words.
558
+ ```
559
+
560
+ #### Coding
561
+
562
+ You can ask for fairly complex coding instructions with multiple criteria, e.g.:
563
+
564
+ ```
565
+ Create a python application with the following requirements:
566
+ - Asyncio FastAPI webserver
567
+ - ping endpoint that returns the current date in JSON format
568
+ - file upload endpoint, which calculates the file's sha256 checksum, and checks postgres to deduplicate
569
+ ```
570
+
571
+ Or inline criteria:
572
+
573
+ ```
574
+ Write a multi-threaded TCP server in C that accepts a "GET [key]" input and "SET [key] [value]" input, and uses a binary tree to get and store the input values.
575
+ ```
576
+
577
+ You can also optionally add a single space and "PLAINFORMAT" at the end of your prompt to avoid backticks, explanations, etc. and just print the code, e.g.:
578
+
579
+ ```
580
+ Write a websocket application in node.js. PLAINFORMAT
581
+ ```
582
+
583
+ #### Agent/function calling
584
+
585
+ The dataset includes many examples of function/args generation based on input criteria. This is somewhat similar to the OpenAI function calling, but the output is either JSON or YAML.
586
+
587
+ Example prompt:
588
+ ```
589
+ As an AI assistant, please select the most suitable function and parameters from the list of available functions below, based on the user's input. Provide your response in JSON format.
590
+
591
+ Input: I want to know how many times 'Python' is mentioned in my text file.
592
+
593
+ Available functions:
594
+ file_analytics:
595
+ description: This tool performs various operations on a text file.
596
+ params:
597
+ action: The operation we want to perform on the data, such as "count_occurrences", "find_line", etc.
598
+ filters:
599
+ keyword: The word or phrase we want to search for.
600
+ ```
601
+
602
+ Response:
603
+ ```json
604
+ {
605
+ "function": "file_analytics",
606
+ "params": {
607
+ "action": "count_occurrences",
608
+ "filters": {
609
+ "keyword": "Python"
610
+ }
611
+ }
612
+ }
613
+ ```
614
+
615
+ #### Chain-of-thought
616
+
617
+ You can ask for several possible responses to a given problem, with a ranking and final answer selection.
618
+
619
+ Example prompt:
620
+
621
+ ```
622
+ A group of people decide to play a round-robin tournament where every player plays every other player exactly once. If a total of 45 games were played, how many players participated in the tournament? Offer several potential answers, rank them according to mathematical logic, and pick the most feasible one.
623
+ ```
624
+
625
+ Example response:
626
+ ```
627
+ Solution 1:
628
+ In a round-robin tournament, each player plays every other player exactly once. This means that the total number of games played is equal to the combination of all players taken two at a time (since a game involves two players).
629
+
630
+ The formula for combinations is nC2 = n(n-1)/2, where n is the total number of players. We know that nC2 equals 45 (the total number of games), so we can set up the equation as follows:
631
+
632
+ n(n-1)/2 = 45
633
+
634
+ Solving this equation gives us n=10.
635
+
636
+ Final answer: There were 10 players in the tournament.
637
+
638
+ Solution 2:
639
+ Another way to approach this problem is by using the concept of triangular numbers. Triangular numbers are a sequence of numbers where each number can be represented as a triangle with dots. The nth triangular number is given by the sum of the first n natural numbers.
640
+
641
+ If we consider each game as a dot and each player as a side of the triangle, then the total number of games (45) would correspond to the 9th triangular number because 1+2+3+4+5+6+7+8+9=45. However, since each side of the triangle represents a player, and there's one more player than sides in our model (because the last player has no one left to play against), we need to add one more to get the total number of players.
642
+
643
+ Final answer: There were 10 players in the tournament.
644
+
645
+ Solution 3:
646
+ We could also use trial and error to solve this problem. Starting from a small number of players, we calculate how many games would be played in a round-robin tournament until we reach 45 games. For example, with 2 players, only 1 game is played; with 3 players, 3 games are played; with 4 players, 6 games are played, and so on. Continuing this process, we find that with 10 players, 45 games are played.
647
+
648
+ Final answer: There were 10 players in the tournament.
649
+
650
+ Ranking of solutions from best to worst:
651
+ 1. Solution 1: This solution uses direct mathematical reasoning based on the properties of a round-robin tournament and solves an equation to find the answer.
652
+ 2. Solution 2: This solution uses the concept of triangular numbers which requires additional steps and knowledge beyond the immediate problem context, but still arrives at the correct answer.
653
+ 3. Solution 3: This solution relies on trial and error, which is less efficient and reliable than the other methods, but it eventually gets to the right answer.
654
+
655
+ Best and final answer: There were 10 players in the tournament.
656
+ ```
657
+
658
+ #### reWOO style execution planning
659
+
660
+ The model now supports execution planning for complex instructions that would require making use of several tools. The output is just the plan, you must implement a mechanism to parse the output and actually call the functions!
661
+
662
+ Example prompt:
663
+ ```
664
+ Please construct a systematic plan to generate an optimal response to the user instruction, utilizing a set of provided tools. Each plan will correspond to an evidence value, which will be the output of one of the available functions given an input string
665
+ that could be the user's question, one or more prior evidence values, or a combination of both.
666
+
667
+ Here are the tools available to be called:
668
+ DuckDuckGo[input]: Tool that enables the user to search for information using the DuckDuckGo search engine. This tool is helpful in locating a suitable list of sites that may contain the answer to the user's query. It does not directly answer the question but finds a list of sites that might have the answer.
669
+ TextScraper[input]: Load one or more websites from the input string containing newline delimited links, where input is one or more links, and produces plain text output containing the content of the links.
670
+ HyperlinkExtractor[input]: Extract links from plain text and produces a plain text, newline delimited response of links.
671
+ KnowledgeModel[input]: Question answering language model, particularly useful in answering questions based on an input passage of text. The input must be a text question that references an :evidence[n]: variable, e.g. What color is the cat, given :evidence1:?
672
+
673
+ The output should be in format:
674
+ Plan: [first action to take based on input question]
675
+ :evidence0: = [function to call with input parameter]
676
+ Plan: [next action to take, based on result of :evidence0:]
677
+ :evidence1: = [next function to call and input parameter, which may include reference to previous evidence, e.g. "Given context :evidence0"]
678
+ ...
679
+ Answer: [:evidence[n]: containing the final answer.]
680
+
681
+ Question: Who won the Nobel Prize in Literature in 2020 and what is their most famous work?
682
+ ```
683
+
684
+ Response:
685
+ ```
686
+ Plan: Begin by conducting a web search to find out who won the Nobel Prize in Literature in 2020.
687
+ :evidence0: = DuckDuckGo[Nobel Prize in Literature 2020 winner]
688
+ Plan: Utilize the KnowledgeModel to interpret the search results and find the name of the laureate.
689
+ :evidence1: = KnowledgeModel[Who won the Nobel Prize in Literature in 2020, given :evidence0:?]
690
+ Plan: Conduct another web search to find the most famous work of the identified laureate.
691
+ :evidence2: = DuckDuckGo[Most famous work of :evidence1:]
692
+ Plan: Extract the relevant links from the DuckDuckGo search results for a more focused search.
693
+ :evidence3: = HyperlinkExtractor[:evidence2:]
694
+ Plan: Use the TextScraper tool to extract information from the relevant links.
695
+ :evidence4: = TextScraper[:evidence3:]
696
+ Plan: Finally, utilize the KnowledgeModel to identify and summarize the most famous work of the laureate from the extracted information.
697
+ :evidence5: = KnowledgeModel[What is the most famous work of :evidence1:, given :evidence4:?]
698
+ Answer: :evidence5:
699
+ ```
700
+
701
+ For this to be useful, you'd have to parse the output plan text, and implement/call each of the functions. This is just pseudo-code, completely untested off the top of my head, and obviously would requiring full implementation + hardening:
702
+
703
+ ```python
704
+ import re
705
+ import requests
706
+
707
+ def inject_context(input_text, **context):
708
+ for ref in set(re.findall(r"(:evidence[0-9]+:)", input_text, re.I)):
709
+ input_text = input_text.replace(ref, context.get(ref, ""))
710
+ return input_text
711
+
712
+ def duckduckgo(input_text, **context):
713
+ search_string = inject_context(input_text, **context)
714
+ ... search via duck duck go using search_string
715
+ ... return text content
716
+
717
+ def link_extractor(input_text, **context):
718
+ input_text = inject_context(input_text, **context)
719
+ return "\n".join(list(set(re.findall(r"(https?://[^\s]+?\.?)", input_text, re.I))))
720
+
721
+ def scrape(input_text, **context):
722
+ input_text = inject_context(input_text, **context)
723
+ text = []
724
+ for link in input_text.splitlines():
725
+ text.append(requests.get(link).text)
726
+ return "\n".join(text)
727
+
728
+ def infer(input_text, **context)
729
+ prompt = inject_context(input_text, **context)
730
+ ... call model with prompt, return output
731
+
732
+ def parse_plan(plan):
733
+ method_map = {
734
+ "DuckDuckGo": duckduckgo,
735
+ "HyperlinkExtractor": link_extractor,
736
+ "KnowledgeModel": infer,
737
+ "TextScraper": scrape,
738
+ }
739
+ context = {}
740
+ for line in plan.strip().splitlines():
741
+ if line.startswith("Plan:"):
742
+ print(line)
743
+ continue
744
+ parts = re.match("^(:evidence[0-9]+:)\s*=\s*([^\[]+])(\[.*\])\s$", line, re.I)
745
+ if not parts:
746
+ if line.startswith("Answer: "):
747
+ return context.get(line.split(" ")[-1].strip(), "Answer couldn't be generated...")
748
+ raise RuntimeError("bad format: " + line)
749
+ context[parts.group(1)] = method_map[parts.group(2)](parts.group(3), **context)
750
+ ```
751
+
752
+ ### Contribute
753
+
754
+ If you're interested in new functionality, particularly a new "instructor" type to generate a specific type of training data,
755
+ take a look at the dataset generation tool repo: https://github.com/jondurbin/airoboros and either make a PR or open an issue with details.
756
+
757
+ To help me with the OpenAI/compute costs:
758
+
759
+ - https://bmc.link/jondurbin
760
+ - ETH 0xce914eAFC2fe52FdceE59565Dd92c06f776fcb11
761
+ - BTC bc1qdwuth4vlg8x37ggntlxu5cjfwgmdy5zaa7pswf
762
+
763
+ ### Licence and usage restrictions
764
+
765
+ The airoboros 3.0 models are built on top of multiple base models, each with their own license/restrictions.
766
+
767
+ The models with `-l2` in the name have a custom Meta license:
768
+ - See the [meta-license/LICENSE.txt](meta-license/LICENSE.txt) file attached for the original license provided by Meta.
769
+ - See also [meta-license/USE_POLICY.md](meta-license/USE_POLICY.md) and [meta-license/Responsible-Use-Guide.pdf](meta-license/Responsible-Use-Guide.pdf), also provided by Meta.
770
+
771
+ The models with `-m-` are mistral-7b (apache 2.0)
772
+
773
+ The model with `-3b` uses Stability AI, which as a `cc-by-sa-4.0` license.
774
+
775
+ The fine-tuning data was mostly generated by OpenAI API calls to gpt-4, via [airoboros](https://github.com/jondurbin/airoboros)
776
+
777
+ The ToS for OpenAI API usage has a clause preventing the output from being used to train a model that __competes__ with OpenAI
778
+
779
+ - what does *compete* actually mean here?
780
+ - these small open source models will not produce output anywhere near the quality of gpt-4, or even gpt-3.5, so I can't imagine this could credibly be considered competing in the first place
781
+ - if someone else uses the dataset to do the same, they wouldn't necessarily be violating the ToS because they didn't call the API, so I don't know how that works
782
+ - the training data used in essentially all large language models includes a significant amount of copyrighted or otherwise non-permissive licensing in the first place
783
+ - other work using the self-instruct method, e.g. the original here: https://github.com/yizhongw/self-instruct released the data and model as apache-2
784
+
785
+ I am purposingly leaving this license ambiguous (other than the fact you must comply with the Meta original license for llama-2) because I am not a lawyer and refuse to attempt to interpret all of the terms accordingly.
786
+
787
+ Your best bet is probably to avoid using this commercially due to the OpenAI API usage.
788
+
789
+ Either way, by using this model, you agree to completely indemnify me.
790
+
791
+ <!-- original-model-card end -->