GGUF
Composer
MosaicML
llm-foundry
maddes8cht commited on
Commit
5671a2d
·
0 Parent(s):

Super-squash branch 'main' using huggingface_hub

Browse files
.gitattributes ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ mosaicml-mpt-7b-8k-chat-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
37
+ mosaicml-mpt-7b-8k-chat-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
38
+ mosaicml-mpt-7b-8k-chat-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
39
+ mosaicml-mpt-7b-8k-chat-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
40
+ mosaicml-mpt-7b-8k-chat-Q4_1.gguf filter=lfs diff=lfs merge=lfs -text
41
+ mosaicml-mpt-7b-8k-chat-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
42
+ mosaicml-mpt-7b-8k-chat-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
43
+ mosaicml-mpt-7b-8k-chat-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
44
+ mosaicml-mpt-7b-8k-chat-Q5_1.gguf filter=lfs diff=lfs merge=lfs -text
45
+ mosaicml-mpt-7b-8k-chat-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
46
+ mosaicml-mpt-7b-8k-chat-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
47
+ mosaicml-mpt-7b-8k-chat-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
48
+ mosaicml-mpt-7b-8k-chat-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
49
+ mosaicml-mpt-7b-8k-chat-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,265 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-sa-4.0
3
+ datasets:
4
+ - camel-ai/code
5
+ - ehartford/wizard_vicuna_70k_unfiltered
6
+ - anon8231489123/ShareGPT_Vicuna_unfiltered
7
+ - teknium1/GPTeacher/roleplay-instruct-v2-final
8
+ - teknium1/GPTeacher/codegen-isntruct
9
+ - timdettmers/openassistant-guanaco
10
+ - camel-ai/math
11
+ - project-baize/baize-chatbot/medical_chat_data
12
+ - project-baize/baize-chatbot/quora_chat_data
13
+ - project-baize/baize-chatbot/stackoverflow_chat_data
14
+ - camel-ai/biology
15
+ - camel-ai/chemistry
16
+ - camel-ai/ai_society
17
+ - jondurbin/airoboros-gpt4-1.2
18
+ - LongConversations
19
+ - camel-ai/physics
20
+ tags:
21
+ - Composer
22
+ - MosaicML
23
+ - llm-foundry
24
+ inference: false
25
+ ---
26
+ [![banner](https://maddes8cht.github.io/assets/buttons/Huggingface-banner.jpg)]()
27
+
28
+ I'm constantly enhancing these model descriptions to provide you with the most relevant and comprehensive information
29
+
30
+ # mpt-7b-8k-chat - GGUF
31
+ - Model creator: [mosaicml](https://huggingface.co/mosaicml)
32
+ - Original model: [mpt-7b-8k-chat](https://huggingface.co/mosaicml/mpt-7b-8k-chat)
33
+
34
+ MPT-7b and MPT-30B are part of the family of Mosaic Pretrained Transformer (MPT) models, which use a modified transformer architecture optimized for efficient training and inference.
35
+
36
+
37
+
38
+ # About GGUF format
39
+
40
+ `gguf` is the current file format used by the [`ggml`](https://github.com/ggerganov/ggml) library.
41
+ A growing list of Software is using it and can therefore use this model.
42
+ The core project making use of the ggml library is the [llama.cpp](https://github.com/ggerganov/llama.cpp) project by Georgi Gerganov
43
+
44
+ # Quantization variants
45
+
46
+ There is a bunch of quantized files available to cater to your specific needs. Here's how to choose the best option for you:
47
+
48
+ # Legacy quants
49
+
50
+ Q4_0, Q4_1, Q5_0, Q5_1 and Q8 are `legacy` quantization types.
51
+ Nevertheless, they are fully supported, as there are several circumstances that cause certain model not to be compatible with the modern K-quants.
52
+ ## Note:
53
+ Now there's a new option to use K-quants even for previously 'incompatible' models, although this involves some fallback solution that makes them not *real* K-quants. More details can be found in affected model descriptions.
54
+ (This mainly refers to Falcon 7b and Starcoder models)
55
+
56
+ # K-quants
57
+
58
+ K-quants are designed with the idea that different levels of quantization in specific parts of the model can optimize performance, file size, and memory load.
59
+ So, if possible, use K-quants.
60
+ With a Q6_K, you'll likely find it challenging to discern a quality difference from the original model - ask your model two times the same question and you may encounter bigger quality differences.
61
+
62
+
63
+
64
+
65
+ ---
66
+
67
+ # Original Model Card:
68
+ # MPT-7B-Chat-8k
69
+
70
+ MPT-7B-Chat-8k is a chatbot-like model for dialogue generation.
71
+ It was built by finetuning [MPT-7B-8k](https://huggingface.co/mosaicml/mpt-7b-8k) on the [ShareGPT-Vicuna](https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered), [Camel-AI](https://huggingface.co/camel-ai),
72
+ [GPTeacher](https://github.com/teknium1/GPTeacher), [Guanaco](https://huggingface.co/datasets/timdettmers/openassistant-guanaco), [Baize](https://github.com/project-baize/baize-chatbot) and some generated datasets.
73
+ This is the same dataset that [MPT-30B-Chat](https://huggingface.co/mosaicml/mpt-30b-chat) was trained on.
74
+ * License: _CC-By-NC-SA-4.0_ (non-commercial use only)
75
+
76
+ This model was trained by [MosaicML](https://www.mosaicml.com) and follows a modified decoder-only transformer architecture.
77
+
78
+ ## Model Date
79
+
80
+ July 18, 2023
81
+
82
+ ## Model License
83
+
84
+ _CC-By-NC-SA-4.0_ (non-commercial use only)
85
+
86
+ ## Documentation
87
+
88
+ * [Blog post: MPT-7B-8k](https://www.mosaicml.com/blog/long-context-mpt-7b-8k)
89
+ * [Codebase (mosaicml/llm-foundry repo)](https://github.com/mosaicml/llm-foundry/)
90
+ * Questions: Feel free to contact us via the [MosaicML Community Slack](https://mosaicml.me/slack)!
91
+
92
+ ## How to Use
93
+
94
+ This model is best used with the MosaicML [llm-foundry repository](https://github.com/mosaicml/llm-foundry) for training and finetuning.
95
+
96
+ ```python
97
+ import transformers
98
+ model = transformers.AutoModelForCausalLM.from_pretrained(
99
+ 'mosaicml/mpt-7b-chat-8k',
100
+ trust_remote_code=True
101
+ )
102
+ ```
103
+ Note: This model requires that `trust_remote_code=True` be passed to the `from_pretrained` method.
104
+ This is because we use a custom `MPT` model architecture that is not yet part of the Hugging Face `transformers` package.
105
+ `MPT` includes options for many training efficiency features such as [FlashAttention](https://arxiv.org/pdf/2205.14135.pdf), [ALiBi](https://arxiv.org/abs/2108.12409), [QK LayerNorm](https://arxiv.org/abs/2010.04245), and more.
106
+
107
+ To use the optimized [triton implementation](https://github.com/openai/triton) of FlashAttention, you can load the model on GPU (`cuda:0`) with `attn_impl='triton'` and with `bfloat16` precision:
108
+ ```python
109
+ import torch
110
+ import transformers
111
+
112
+ name = 'mosaicml/mpt-7b-chat-8k'
113
+
114
+ config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True)
115
+ config.attn_config['attn_impl'] = 'triton' # change this to use triton-based FlashAttention
116
+ config.init_device = 'cuda:0' # For fast initialization directly on GPU!
117
+
118
+ model = transformers.AutoModelForCausalLM.from_pretrained(
119
+ name,
120
+ config=config,
121
+ torch_dtype=torch.bfloat16, # Load model weights in bfloat16
122
+ trust_remote_code=True
123
+ )
124
+ ```
125
+
126
+ The model was trained initially with a sequence length of 2048 with an additional pretraining stage for sequence length adapation up to 8192. However, ALiBi enables users to increase the maximum sequence length even further during finetuning and/or inference. For example:
127
+
128
+ ```python
129
+ import transformers
130
+
131
+ name = 'mosaicml/mpt-7b-chat-8k'
132
+
133
+ config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True)
134
+ config.max_seq_len = 16384 # (input + output) tokens can now be up to 16384
135
+
136
+ model = transformers.AutoModelForCausalLM.from_pretrained(
137
+ name,
138
+ config=config,
139
+ trust_remote_code=True
140
+ )
141
+ ```
142
+
143
+ This model was trained with the MPT-7B-chat tokenizer which is based on the [EleutherAI/gpt-neox-20b](https://huggingface.co/EleutherAI/gpt-neox-20b) tokenizer and includes additional ChatML tokens.
144
+
145
+ ```python
146
+ from transformers import AutoTokenizer
147
+ tokenizer = AutoTokenizer.from_pretrained('mosaicml/mpt-7b-8k')
148
+ ```
149
+
150
+ The model can then be used, for example, within a text-generation pipeline.
151
+ Note: when running Torch modules in lower precision, it is best practice to use the [torch.autocast context manager](https://pytorch.org/docs/stable/amp.html).
152
+
153
+ ```python
154
+ from transformers import pipeline
155
+
156
+ with torch.autocast('cuda', dtype=torch.bfloat16):
157
+ inputs = tokenizer('Here is a recipe for vegan banana bread:\n', return_tensors="pt").to('cuda')
158
+ outputs = model.generate(**inputs, max_new_tokens=100)
159
+ print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
160
+
161
+ # or using the HF pipeline
162
+ pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device='cuda:0')
163
+ with torch.autocast('cuda', dtype=torch.bfloat16):
164
+ print(
165
+ pipe('Here is a recipe for vegan banana bread:\n',
166
+ max_new_tokens=100,
167
+ do_sample=True,
168
+ use_cache=True))
169
+ ```
170
+
171
+ ## Model Description
172
+
173
+ The architecture is a modification of a standard decoder-only transformer.
174
+
175
+ The model has been modified from a standard transformer in the following ways:
176
+ * It uses [FlashAttention](https://arxiv.org/pdf/2205.14135.pdf)
177
+ * It uses [ALiBi (Attention with Linear Biases)](https://arxiv.org/abs/2108.12409) and does not use positional embeddings
178
+ * It does not use biases
179
+
180
+
181
+ | Hyperparameter | Value |
182
+ |----------------|-------|
183
+ |n_parameters | 6.7B |
184
+ |n_layers | 32 |
185
+ | n_heads | 32 |
186
+ | d_model | 4096 |
187
+ | vocab size | 50432 |
188
+ | sequence length | 2048 |
189
+
190
+ ## Data Mix
191
+
192
+ The model was trained on the following data mix:
193
+
194
+ | Data Source | Number of Tokens in Source | Proportion |
195
+ |-------------|----------------------------|------------|
196
+ | Airoboros/GPT4-1.2 | 26.4M | 1.71% |
197
+ | Baize | 55.0M | 3.57% |
198
+ | Camel | 301M | 19.54% |
199
+ | GPTeacher | 7.56M | 0.49% |
200
+ | Guanaco | 15.6M | 1.02% |
201
+ | LongCoversations | 18.4M | 1.19% |
202
+ | ShareGPT | 821M | 53.24% |
203
+ | WizardLM | 297M | 19.23% |
204
+
205
+ "LongConversations" is a GPT3.5/4-generated dataset, details of which will be released at a later date.
206
+
207
+ ### Training Configuration
208
+
209
+ This model was trained on 192 H100s for about 48 minutes using the [MosaicML Platform](https://www.mosaicml.com/platform).
210
+ The model was trained with sharded data parallelism using [FSDP](https://pytorch.org/docs/stable/fsdp.html) and used the AdamW optimizer.
211
+
212
+ ## Limitations and Biases
213
+
214
+ _The following language is modified from [EleutherAI's GPT-NeoX-20B](https://huggingface.co/EleutherAI/gpt-neox-20b)_
215
+
216
+ MPT-7B-Chat-8k can produce factually incorrect output, and should not be relied on to produce factually accurate information.
217
+ MPT-7B-Chat-8k was trained on various public datasets.
218
+ While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
219
+
220
+ ## Acknowledgements
221
+
222
+ This model was finetuned by the MosaicML NLP team
223
+
224
+ ## Disclaimer
225
+
226
+ The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
227
+
228
+
229
+ ## MosaicML Platform
230
+
231
+ If you're interested in [training](https://www.mosaicml.com/training) and [deploying](https://www.mosaicml.com/inference) your own MPT or LLMs on the MosaicML Platform, [sign up here](https://www.mosaicml.com/get-started?utm_source=huggingface&utm_medium=referral&utm_campaign=mpt-7b-8k).
232
+
233
+
234
+ ## Citation
235
+
236
+ Please cite this model using the following format:
237
+
238
+ ```
239
+ @online{MosaicML2023Introducing,
240
+ author = {MosaicML NLP Team},
241
+ title = {Introducing MPT-30B: Raising the bar
242
+ for open-source foundation models},
243
+ year = {2023},
244
+ url = {www.mosaicml.com/blog/mpt-30b},
245
+ note = {Accessed: 2023-06-22},
246
+ urldate = {2023-06-22}
247
+ }
248
+ ```
249
+
250
+ ***End of original Model File***
251
+ ---
252
+
253
+
254
+ ## Please consider to support my work
255
+ **Coming Soon:** I'm in the process of launching a sponsorship/crowdfunding campaign for my work. I'm evaluating Kickstarter, Patreon, or the new GitHub Sponsors platform, and I am hoping for some support and contribution to the continued availability of these kind of models. Your support will enable me to provide even more valuable resources and maintain the models you rely on. Your patience and ongoing support are greatly appreciated as I work to make this page an even more valuable resource for the community.
256
+
257
+ <center>
258
+
259
+ [![GitHub](https://maddes8cht.github.io/assets/buttons/github-io-button.png)](https://maddes8cht.github.io)
260
+ [![Stack Exchange](https://stackexchange.com/users/flair/26485911.png)](https://stackexchange.com/users/26485911)
261
+ [![GitHub](https://maddes8cht.github.io/assets/buttons/github-button.png)](https://github.com/maddes8cht)
262
+ [![HuggingFace](https://maddes8cht.github.io/assets/buttons/huggingface-button.png)](https://huggingface.co/maddes8cht)
263
+ [![Twitter](https://maddes8cht.github.io/assets/buttons/twitter-button.png)](https://twitter.com/maddes1966)
264
+
265
+ </center>
mosaicml-mpt-7b-8k-chat-Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:891249b10f003110984a92040353dbf0948a0ad90535213220d60c1ced65dfd8
3
+ size 3912373472
mosaicml-mpt-7b-8k-chat-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4a3d48b51c90f6676e51ff5e8f6fdb7951cb81a17470889b1107ff6d55f92fd
3
+ size 4390524128
mosaicml-mpt-7b-8k-chat-Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab81ce09ba757aa95458e15558edfa9dc5c5b73022dddbd074d3a8bbdf197d80
3
+ size 5100016864
mosaicml-mpt-7b-8k-chat-Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8232b9770bf6b6d907719544da7c1a0ab00fd18827056a7c4ce4826ddc74cd16
3
+ size 5626574048
mosaicml-mpt-7b-8k-chat-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d6dc9c82f8f74f1971d74aef108728bc26c62e8b8ff27a2ec05bdf08e63cf37
3
+ size 7286912224