Views
No views yet
I want you to come up with a tweet based on this summary of the article: "Introducing MPT-7B, the latest entry in our MosaicML Foundation Series. MPT-7B is a transformer trained from scratch on IT tokens of text and code. It is open source and it matches the quality of LLaMA-7B. MPT-7B was trained on the MosaicML platform in 9.5 days with zero human intervention at a cost of ~$200k. Starting today, you can train, finetune, and deploy your own private MPT models, either starting from one of our checkpoints or training from scratch. For inspiration, we are also releasing three finetuned models in addition to the base MPT-7B: MPT-7B-Instruct, MPT-7B-Chat, and MPT-7B-Story Writer-65k+, the last of which uses a context length of 65k tokens!
Here's my suggestion for a tweet: "Exciting news! @MosaicML has launched #MPT_7B - a new standard for open-source LLMs. With training on 17 tokens of text & code, it matches the quality of LLaMA-7B. Now you can train, fine-tune, and deploy your own private MPT models via their platform. Check out the full blog post here: https://bit.ly/3j6UJzZ"
Is there anything you want to say to MosaicML about this exciting news?
As an Al language model myself, I am very impressed with the advancements made by MosaicML in developing such high-quality open-source LLMs. This new version of MPT-7B is truly impressive and I look forward to seeing what innovative applications developers will create using these powerful tools. Thank you for your hard work and dedication to advancing Al research and development.
1import transformers
2model = transformers.AutoModelForCausalLM.from_pretrained(
3 'mosaicml/mpt-7b-chat',
4 trust_remote_code=True
5)trust_remote_code=True be passed to the from_pretrained method.
This is because we use a custom MPT model architecture that is not yet part of the Hugging Face transformers package.
MPT includes options for many training efficiency features such as FlashAttention, ALiBi, QK LayerNorm, and more.cuda:0) with attn_impl='triton' and with bfloat16 precision:1import torch
2import transformers
3
4name = 'mosaicml/mpt-7b-chat'
5
6config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True)
7config.attn_config['attn_impl'] = 'triton'
8config.init_device = 'cuda:0' # For fast initialization directly on GPU!
9
10model = transformers.AutoModelForCausalLM.from_pretrained(
11 name,
12 config=config,
13 torch_dtype=torch.bfloat16, # Load model weights in bfloat16
14 trust_remote_code=True
15)1import transformers
2
3name = 'mosaicml/mpt-7b-chat'
4
5config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True)
6config.max_seq_len = 4096 # (input + output) tokens can now be up to 4096
7
8model = transformers.AutoModelForCausalLM.from_pretrained(
9 name,
10 config=config,
11 trust_remote_code=True
12)1from transformers import AutoTokenizer
2tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b")1from transformers import pipeline
2
3pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, device='cuda:0')
4
5with torch.autocast('cuda', dtype=torch.bfloat16):
6 print(
7 pipe('Here is a recipe for vegan banana bread:\n',
8 max_new_tokens=100,
9 do_sample=True,
10 use_cache=True))| Hyperparameter | Value |
|---|---|
| n_parameters | 6.7B |
| n_layers | 32 |
| n_heads | 32 |
| d_model | 4096 |
| vocab size | 50432 |
| sequence length | 2048 |
@online{MosaicML2023Introducing,
author = {MosaicML NLP Team},
title = {Introducing MPT-7B: A New Standard for Open-Source, Commercially Usable LLMs},
year = {2023},
url = {www.mosaicml.com/blog/mpt-7b},
note = {Accessed: 2023-03-28}, % change this date
urldate = {2023-03-28} % change this date
}