TheBloke commited on
Commit
71312ef
1 Parent(s): ff9dfdf

Initial GGML model commit

Browse files
Files changed (1) hide show
  1. README.md +281 -0
README.md ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ license: other
4
+ ---
5
+
6
+ <!-- header start -->
7
+ <div style="width: 100%;">
8
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
9
+ </div>
10
+ <div style="display: flex; justify-content: space-between; width: 100%;">
11
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
12
+ <p><a href="https://discord.gg/Jq4vkcDakD">Chat & support: my new Discord server</a></p>
13
+ </div>
14
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
15
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
16
+ </div>
17
+ </div>
18
+ <!-- header end -->
19
+
20
+ # OpenAccess AI Collective's Minotaur 15B GGML
21
+
22
+ These files are GGML format model files for [OpenAccess AI Collective's Minotaur 15B](https://huggingface.co/openaccess-ai-collective/minotaur-15b).
23
+
24
+ GGML files are for CPU + GPU inference using [llama.cpp](https://github.com/ggerganov/llama.cpp) and libraries and UIs which support this format, such as:
25
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
26
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp)
27
+ * [ParisNeo/GPT4All-UI](https://github.com/ParisNeo/gpt4all-ui)
28
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
29
+ * [ctransformers](https://github.com/marella/ctransformers)
30
+
31
+ ## Repositories available
32
+
33
+ * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/minotaur-15B-GPTQ)
34
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/minotaur-15B-GGML)
35
+ * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/openaccess-ai-collective/minotaur-15b)
36
+
37
+ <!-- compatibility_ggml start -->
38
+ ## Compatibility
39
+
40
+ ### Original llama.cpp quant methods: `q4_0, q4_1, q5_0, q5_1, q8_0`
41
+
42
+ I have quantized these 'original' quantisation methods using an older version of llama.cpp so that they remain compatible with llama.cpp as of May 19th, commit `2d5db48`.
43
+
44
+ These are guaranteed to be compatbile with any UIs, tools and libraries released since late May.
45
+
46
+ ### New k-quant methods: `q2_K, q3_K_S, q3_K_M, q3_K_L, q4_K_S, q4_K_M, q5_K_S, q6_K`
47
+
48
+ These new quantisation methods are compatible with llama.cpp as of June 6th, commit `2d43387`.
49
+
50
+ They are now also compatible with recent releases of text-generation-webui, KoboldCpp, llama-cpp-python and ctransformers. Other tools and libraries may or may not be compatible - check their documentation if in doubt.
51
+
52
+ ## Explanation of the new k-quant methods
53
+
54
+ The new methods available are:
55
+ * 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)
56
+ * 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.
57
+ * 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.
58
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
59
+ * 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
60
+ * GGML_TYPE_Q8_K - "type-0" 8-bit quantization. Only used for quantizing intermediate results. The difference to the existing Q8_0 is that the block size is 256. All 2-6 bit dot products are implemented for this quantization type.
61
+
62
+ Refer to the Provided Files table below to see what files use which methods, and how.
63
+ <!-- compatibility_ggml end -->
64
+
65
+ ## Provided files
66
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
67
+ | ---- | ---- | ---- | ---- | ---- | ----- |
68
+ | minotaur-15b.ggmlv3.q4_0.bin | q4_0 | 4 | 10.75 GB | 13.25 GB | Original llama.cpp quant method, 4-bit. |
69
+ | minotaur-15b.ggmlv3.q4_1.bin | q4_1 | 4 | 11.92 GB | 14.42 GB | Original llama.cpp quant method, 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. |
70
+ | minotaur-15b.ggmlv3.q5_0.bin | q5_0 | 5 | 13.09 GB | 15.59 GB | Original llama.cpp quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. |
71
+ | minotaur-15b.ggmlv3.q5_1.bin | q5_1 | 5 | 14.26 GB | 16.76 GB | Original llama.cpp quant method, 5-bit. Even higher accuracy, resource usage and slower inference. |
72
+ | minotaur-15b.ggmlv3.q8_0.bin | q8_0 | 8 | 20.11 GB | 22.61 GB | Original llama.cpp quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
73
+
74
+
75
+ **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.
76
+
77
+ ## How to run in `llama.cpp`
78
+
79
+ I use the following command line; adjust for your tastes and needs:
80
+
81
+ ```
82
+ ./main -t 10 -ngl 32 -m minotaur-15b.ggmlv3.q5_0.bin --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### Instruction: Write a story about llamas\n### Response:"
83
+ ```
84
+ Change `-t 10` to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use `-t 8`.
85
+
86
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
87
+
88
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
89
+
90
+ ## How to run in `text-generation-webui`
91
+
92
+ Further instructions here: [text-generation-webui/docs/llama.cpp-models.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp-models.md).
93
+
94
+ <!-- footer start -->
95
+ ## Discord
96
+
97
+ For further support, and discussions on these models and AI in general, join us at:
98
+
99
+ [TheBloke AI's Discord server](https://discord.gg/Jq4vkcDakD)
100
+
101
+ ## Thanks, and how to contribute.
102
+
103
+ Thanks to the [chirper.ai](https://chirper.ai) team!
104
+
105
+ 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.
106
+
107
+ 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.
108
+
109
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
110
+
111
+ * Patreon: https://patreon.com/TheBlokeAI
112
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
113
+
114
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
115
+
116
+ **Patreon special mentions**: vamX, K, Jonathan Leane, Lone Striker, Sean Connelly, Chris McCloskey, WelcomeToTheClub, Nikolai Manek, John Detwiler, Kalila, David Flickinger, Fen Risland, subjectnull, Johann-Peter Hartmann, Talal Aujan, John Villwock, senxiiz, Khalefa Al-Ahmad, Kevin Schuppel, Alps Aficionado, Derek Yates, Mano Prime, Nathan LeClaire, biorpg, trip7s trip, Asp the Wyvern, chris gileta, Iucharbius , Artur Olbinski, Ai Maven, Joseph William Delisle, Luke Pendergrass, Illia Dulskyi, Eugene Pentland, Ajan Kanaga, Willem Michiel, Space Cruiser, Pyrater, Preetika Verma, Junyu Yang, Oscar Rangel, Spiking Neurons AB, Pierre Kircher, webtim, Cory Kujawski, terasurfer , Trenton Dambrowitz, Gabriel Puliatti, Imad Khwaja, Luke.
117
+
118
+ Thank you to all my generous patrons and donaters!
119
+
120
+ <!-- footer end -->
121
+
122
+ # Original model card: OpenAccess AI Collective's Minotaur 15B
123
+
124
+
125
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
126
+ **[💵 Donate to OpenAccess AI Collective](https://github.com/sponsors/OpenAccess-AI-Collective) to help us keep building great tools and models!**
127
+
128
+ # Minotaur 15B 8K
129
+
130
+ Minotaur 15B is an instruct fine-tuned model on top of Starcoder Plus. Minotaur 15B is fine-tuned **on only completely open datasets** making this model reproducible by anyone.
131
+ Minotaur 15B has a context length of 8K tokens, allowing for strong recall at long contexts.
132
+
133
+ Questions, comments, feedback, looking to donate, or want to help? Reach out on our [Discord](https://discord.gg/PugNNHAF5r) or email [wing@openaccessaicollective.org](mailto:wing@openaccessaicollective.org)
134
+
135
+ # Prompts
136
+ Chat only style prompts using `USER:`,`ASSISTANT:`.
137
+
138
+ <img src="https://huggingface.co/openaccess-ai-collective/minotaur-13b/resolve/main/minotaur.png" alt="minotaur" width="600" height="500"/>
139
+
140
+ # Training Datasets
141
+
142
+ Minotaur 15B model is fine-tuned on the following openly available datasets:
143
+
144
+ - [WizardLM](https://huggingface.co/datasets/ehartford/WizardLM_alpaca_evol_instruct_70k_unfiltered)
145
+ - [subset of QingyiSi/Alpaca-CoT for roleplay and CoT](https://huggingface.co/QingyiSi/Alpaca-CoT)
146
+ - [GPTeacher-General-Instruct](https://huggingface.co/datasets/teknium/GPTeacher-General-Instruct)
147
+ - [metaeval/ScienceQA_text_only](https://huggingface.co/datasets/metaeval/ScienceQA_text_only) - instruct for concise responses
148
+ - [openai/summarize_from_feedback](https://huggingface.co/datasets/openai/summarize_from_feedback) - instruct augmented tl;dr summarization
149
+ - [camel-ai/math](https://huggingface.co/datasets/camel-ai/math)
150
+ - [camel-ai/physics](https://huggingface.co/datasets/camel-ai/physics)
151
+ - [camel-ai/chemistry](https://huggingface.co/datasets/camel-ai/chemistry)
152
+ - [camel-ai/biology](https://huggingface.co/datasets/camel-ai/biology)
153
+ - [winglian/evals](https://huggingface.co/datasets/winglian/evals) - instruct augmented datasets
154
+ - custom sysnthetic datasets around misconceptions, in-context qa, jokes, N-tasks problems, and context-insensitivity
155
+ - ARC-Easy & ARC-Challenge - instruct augmented for detailed responses, derived from the `train` split
156
+ - [hellaswag](https://huggingface.co/datasets/hellaswag) - 30K+ rows of instruct augmented for detailed explanations w 30K+ rows, derived from the `train` split
157
+ - [riddle_sense](https://huggingface.co/datasets/riddle_sense) - instruct augmented, derived from the `train` split
158
+ - [gsm8k](https://huggingface.co/datasets/gsm8k) - instruct augmented, derived from the `train` split
159
+ - prose generation
160
+
161
+ # Shoutouts
162
+
163
+ Special thanks to Nanobit for helping with Axolotl and TheBloke for quantizing these models are more accessible to all.
164
+
165
+ # Demo
166
+
167
+ HF Demo in Spaces available in the [Community ChatBot Arena](https://huggingface.co/spaces/openaccess-ai-collective/rlhf-arena) under the OAAIC Chatbots tab.
168
+
169
+ ## Release Notes
170
+
171
+ - https://wandb.ai/wing-lian/minotaur-16b-8k/runs/tshgbl2k
172
+
173
+ ## Build
174
+
175
+ Minotaur was built with [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl) on 4XA100 80GB
176
+ - 1 epochs taking approximately 30 hours
177
+ - Trained using QLoRA techniques
178
+
179
+ ## Bias, Risks, and Limitations
180
+ Minotaur has not been aligned to human preferences with techniques like RLHF or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so).
181
+ Minotaur was fine-tuned from the base model StarCoder, please refer to its model card's Limitations Section for relevant information. (included below)
182
+
183
+ ## Benchmarks
184
+
185
+ TBD
186
+
187
+ ## Examples
188
+
189
+ TBD
190
+
191
+ # StarCoderPlus
192
+
193
+ Play with the instruction-tuned StarCoderPlus at [StarChat-Beta](https://huggingface.co/spaces/HuggingFaceH4/starchat-playground).
194
+
195
+ ## Table of Contents
196
+
197
+ 1. [Model Summary](##model-summary)
198
+ 2. [Use](##use)
199
+ 3. [Limitations](##limitations)
200
+ 4. [Training](##training)
201
+ 5. [License](##license)
202
+ 6. [Citation](##citation)
203
+
204
+ ## Model Summary
205
+
206
+ StarCoderPlus is a fine-tuned version of [StarCoderBase](https://huggingface.co/bigcode/starcoderbase) on 600B tokens from the English web dataset [RedefinedWeb](https://huggingface.co/datasets/tiiuae/falcon-refinedweb)
207
+ combined with [StarCoderData](https://huggingface.co/datasets/bigcode/starcoderdata) from [The Stack (v1.2)](https://huggingface.co/datasets/bigcode/the-stack) and a Wikipedia dataset.
208
+ It's a 15.5B parameter Language Model trained on English and 80+ programming languages. The model uses [Multi Query Attention](https://arxiv.org/abs/1911.02150),
209
+ [a context window of 8192 tokens](https://arxiv.org/abs/2205.14135), and was trained using the [Fill-in-the-Middle objective](https://arxiv.org/abs/2207.14255) on 1.6 trillion tokens.
210
+
211
+ - **Repository:** [bigcode/Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
212
+ - **Project Website:** [bigcode-project.org](https://www.bigcode-project.org)
213
+ - **Point of Contact:** [contact@bigcode-project.org](mailto:contact@bigcode-project.org)
214
+ - **Languages:** English & 80+ Programming languages
215
+
216
+
217
+ ## Use
218
+
219
+ ### Intended use
220
+
221
+ The model was trained on English and GitHub code. As such it is _not_ an instruction model and commands like "Write a function that computes the square root." do not work well. However, the instruction-tuned version in [StarChat](hhttps://huggingface.co/spaces/HuggingFaceH4/starchat-playground) makes a capable assistant.
222
+
223
+ **Feel free to share your generations in the Community tab!**
224
+
225
+ ### Generation
226
+ ```python
227
+ # pip install -q transformers
228
+ from transformers import AutoModelForCausalLM, AutoTokenizer
229
+
230
+ checkpoint = "bigcode/starcoderplus"
231
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
232
+
233
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
234
+ model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
235
+
236
+ inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
237
+ outputs = model.generate(inputs)
238
+ print(tokenizer.decode(outputs[0]))
239
+ ```
240
+
241
+ ### Fill-in-the-middle
242
+ Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output:
243
+
244
+ ```python
245
+ input_text = "<fim_prefix>def print_hello_world():\n <fim_suffix>\n print('Hello world!')<fim_middle>"
246
+ inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
247
+ outputs = model.generate(inputs)
248
+ print(tokenizer.decode(outputs[0]))
249
+ ```
250
+
251
+ ### Attribution & Other Requirements
252
+
253
+ The training code dataset of the model was filtered for permissive licenses only. Nevertheless, the model can generate source code verbatim from the dataset. The code's license might require attribution and/or other specific requirements that must be respected. We provide a [search index](https://huggingface.co/spaces/bigcode/starcoder-search) that let's you search through the pretraining data to identify where generated code came from and apply the proper attribution to your code.
254
+
255
+ # Limitations
256
+
257
+ The model has been trained on a mixture of English text from the web and GitHub code. Therefore it might encounter limitations when working with non-English text, and can carry the stereotypes and biases commonly encountered online.
258
+ Additionally, the generated code should be used with caution as it may contain errors, inefficiencies, or potential vulnerabilities. For a more comprehensive understanding of the base model's code limitations, please refer to See [StarCoder paper](hhttps://arxiv.org/abs/2305.06161).
259
+
260
+ # Training
261
+ StarCoderPlus is a fine-tuned version on 600B English and code tokens of StarCoderBase, which was pre-trained on 1T code tokens. Below are the fine-tuning details:
262
+
263
+ ## Model
264
+ - **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
265
+ - **Finetuning steps:** 150k
266
+ - **Finetuning tokens:** 600B
267
+ - **Precision:** bfloat16
268
+
269
+ ## Hardware
270
+
271
+ - **GPUs:** 512 Tesla A100
272
+ - **Training time:** 14 days
273
+
274
+ ## Software
275
+
276
+ - **Orchestration:** [Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
277
+ - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
278
+ - **BP16 if applicable:** [apex](https://github.com/NVIDIA/apex)
279
+
280
+ # License
281
+ The model is licensed under the BigCode OpenRAIL-M v1 license agreement. You can find the full agreement [here](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement).