entry-slick
entry-slick
entry-slick
entry-slick
MPT-7B简介

MPT-7B 是一种解码器式转换器,在 1T 英文文本和代码标记上从头开始预训练。该模型由 MosaicML 训练,并 开源用于商业用途( Apache-2.0 )。

MPT-7B 是 MosaicPretrainedTransformer (MPT) 模型系列的一部分,该模型使用为高效训练和推理而优化的改进型变压器架构。

这些架构变化包括性能优化的层实现和通过将位置嵌入替换为具有线性偏差的注意力 ( ALiBi ) 来消除上下文长度限制。由于这些修改,MPT 模型可以以高吞吐量效率和稳定收敛的方式进行训练。 MPT 模型也可以通过标准的 HuggingFace 管道和 NVIDIA 的 FasterTransformer 高效地提供服务。

该模型使用 MosaicML LLM 代码库,可在 llm-foundry 存储库 中找到。它由 MosaicML 的 NLP 团队在 MosaicML 平台 上进行训练,用于 LLM 预训练、微调和推理。

这个模型有什么不同?

MPT-7B是

从 MPT-7B 微调的模型:

以下模型在 MPT-7B 上进行了微调:

安装

首先,克隆这个 repo 并安装要求:

git clone https://github.com/mosaicml/llm-foundry.git cd llm-foundry pip install -e ".[gpu]" # or pip install -e . if no NVIDIA GPU

快速开始

这是一个端到端的工作流程,用于准备 C4 数据集的子集、训练 10 个批次的 MPT-125M 模型、将模型转换为 HuggingFace 格式、在 Winograd 挑战中评估模型以及生成对提示的响应。

如果您有可写入的 HuggingFace 身份验证令牌,您可以选择将您的模型上传到 Hub!只需像这样导出您的令牌:

export HUGGING_FACE_HUB_TOKEN=your-auth-token

并取消注释包含 --hf_repo_for_upload ... 行。

(请记住,这是一个快速入门,只是为了演示工具——为了获得良好的质量,LLM 必须接受超过 10 个批次的训练 😄)

cd scripts # Convert C4 dataset to StreamingDataset format python data_prep/convert_dataset_hf.py \ --dataset c4 --data_subset en \ --out_root my-copy-c4 --splits train_small val_small \ --concat_tokens 2048 --tokenizer EleutherAI/gpt-neox-20b --eos_text '' # Train an MPT-125m model for 10 batches composer train/train.py \ train/yamls/mpt/125m.yaml \ data_local=my-copy-c4 \ train_loader.dataset.split=train_small \ eval_loader.dataset.split=val_small \ max_duration=10ba \ eval_interval=0 \ save_folder=mpt-125m # Convert the model to HuggingFace format python inference/convert_composer_to_hf.py \ --composer_path mpt-125m/ep0-ba10-rank0.pt \ --hf_output_path mpt-125m-hf \ --output_precision bf16 \ # --hf_repo_for_upload user-org/repo-name # Evaluate the model on Winograd python eval/eval.py \ eval/yamls/hf_eval.yaml \ icl_tasks=eval/yamls/winograd.yaml \ model_name_or_path=mpt-125m-hf # Generate responses to prompts python inference/hf_generate.py \ --name_or_path mpt-125m-hf \ --max_new_tokens 256 \ --prompts \ "The answer to life, the universe, and happiness is" \ "Here's a quick recipe for baking chocolate chip cookies: Start by"

官网

https://huggingface.co/mosaicml/mpt-7b

官方动态
查看更多
MosaicML
大家好,《我们是无名之辈》有新一集,其中外星人的转变主要集中在百慕大三角和龙三角。
#外星人 #百慕大三角 #DragonTriangle #Triangle
t.co/iRTkq6XThr
分享
MosaicML
在人工智能的帮助下每天节省一个小时

向您的 AI 助手寻求帮助,按照您想要的方式整理收件箱,并达到最高工作效率。
分享
社区动态
MosaicML
大家好,《我们是无名之辈》有新一集,其中外星人的转变主要集中在百慕大三角和龙三角。
#外星人 #百慕大三角 #DragonTriangle #Triangle
t.co/iRTkq6XThr
分享
MosaicML
在人工智能的帮助下每天节省一个小时

向您的 AI 助手寻求帮助,按照您想要的方式整理收件箱,并达到最高工作效率。
分享
MosaicML
t.co/4W968CzGyU 💪📚 Join Alliance Training and Testing to get licensed as an Unarmed Guard in Tennessee, gain Dallas Law Certification, or renew your Unarmed License with our 2-hour course. Join us @GuardTrainingTN today! 👮‍♂️💼 #SecurityTraining #JobTraining #Tennessee
image
分享
MosaicML
In a JTA profile interview about his first year as @AJCCEO, Ted Deutch details the importance of AJC's work as the global advocacy for the Jewish people - from standing up for Israel around the world to combating rising antisemitism and more.
分享
MosaicML
Fall Special - 20% OFF for one year!

Join thousands of subscribers for an objective take on the science of climate change from earth science professor-in-exile, Dr. Matthew Wielicki. Irrational Fear is an independent, reader-supported publication.

t.co/zXYgrYkluM
image
分享
MosaicML
#Peloton and #Lululemon are joining forces 🚴‍♀️ signing a 5 year content deal. Get the full story in today's #MoneyLion Markets Daily Newsletter! Sign up now for exclusive insights here👉 t.co/eMEgkedjWz.
#InvestmentTrends #StockMarketNews
image
分享
MosaicML
与《Carnivore》的作者、医学博士肖恩·贝克 (Shawn Baker) 的餐盘之战 t.co/qTmpxVvoNf
分享
MosaicML
Do you want to unlock passive income with your crypto bag!?

Learn how to use @phiatcrypto & @PHUXGiven to take advantage of Yield Arbitrage!

With Yield Arbitrage you can produce income from your HODL crypto bag!

t.co/ltKXkahwfX
分享
MosaicML
Read my new book. It is for sale at Amazon and wherever fine books are sold.
t.co/3jU9ad0pPm
分享
MosaicML
克里斯·克里斯蒂 (Chris Christie) 需要 7 万捐款才能留在 11 月的共和党辩论舞台上。

帮助缩小差距 - 立即捐赠 1 美元! t.co/KfKeDzMag9
分享
MosaicML
📢我们很高兴与大家分享,我们已经成功完成了@Staging_Labs对@safe_root的智能合约#安全评估🔒

📎 完整报告:t.co/wM0n6xIbxk
image
分享
MosaicML
We've heard of "lost in translation" but "thrown out in translation" is a new one. This is how different Marvel and DC's most popular heroes would look - if they were comic-accurate.
分享
MosaicML
The stage is set, the hunt is near!

The @coinage_media Scavenger Hunt landing page is LIVE 👀 take a sneak peek now, but remember—the first clue drops on Monday, September 25th.

🕵️‍♀️🔒 👉 t.co/mUwNDOUFf7 #CoinageScavengerHunt
分享
MosaicML
[Beginner Level Korean]
Get some of TTMIK’s best sellers in one package to improve your Korean vocabulary, reading skills and writing skills!

t.co/NjA5aiPJsq
image
分享
MosaicML
Spooky season is almost here! Are you ready to get your scare on for #Halloween? Jump on over to the blog today to find some "HAIR RAISING" spots to enjoy some Halloween fun! See you at "The Root Word"!
t.co/IZm4te3Wwz
image
分享
MosaicML
注册经过验证的组织后,您的帖子的覆盖范围和覆盖范围将扩大 2 倍使您能够通过 X Hiring 聘用优秀人才。
分享
MosaicML
How about a cloud storage that cares? Cares for your data, your pocket, and the environment. No, it's not a dream. It's hiveDisk.
分享
MosaicML
🌟 Exciting news from Mood Gear! 🌟
Introducing TWO fabulous new feeling shirts that'll express your emotions like never before! Explore these mood-boosting shirts now at t.co/WTR9mpr8cj and wear your emotions with pride! 🛍️💃 #MoodGear #ExpressYourself #NewArrivals
分享
MosaicML
Chinese tech companies are racing to create and monetize the type of artificial intelligence known as “generative AI,” which ChatGPT recently made famous.
t.co/tGy0RPwZIo
分享
MosaicML
🚨 Episode #11 Meeting of The GoldMinds

🎬 We're talking the 🐐 of sports films w/ @MsPeacherino of @wwwfilmtv. @Chasingnumba18, @kbbrwn22 & @retrod3x talk 🏈 & Vando's 💰

📺+🎙️Full Episode now on YouTube & all Podcast Platforms Follow & Subscribe

t.co/AeGqxDXF9l
分享