目前基于 Transformer decoder 的 LLM,比如 ChatGPT、LLaMA、baichuan 等,通常都会有基于预训练的 base 模 型和在 base 模型至少使用 RLHF 微调的 Chat 模型,Chat 模型的训练一般都包括如下三个步骤:预训练,有监督微 调和对齐。 1.在预训练阶段,模型会从大量无标注文本数据集中学习通用知识; 2. 使用「有监督微调」(SFT)优化模型以更好地遵守特定指令; 3. 使用对齐技术使 LLM 可以更有用且更安全地响应用户提示。
二、预训练(Pre-training)篇 2.1 具体介绍一下预训练(Pre-training)?
预训练(Pre-training):利用数十亿到数万亿个 token 的庞大文本语料库对模型继续预训练,使模型能够根据 提供的文本来预测「下一个单词」。
Pretraining
Dataset: 100B to >5T tokens
Task: Next-token
prediction on unlabeled texts Output: base model / “foundation model”
三,有监督微调(Supervised Tinetuning)篇 3.1 具体介绍一下有监督微调(Supervised Tinetuning)?
有监督微调(Supervised Tinetuning):虽然 SFT 训练目标和预训练(Pre-training)类似,也是需要模型预测 「下一个单词」,但是需要人工标注的指令数据集,其中模型的输入是一个指令(根据任务的不同,也可能包含 一段输入文本),输出为模型的预期回复内容。
Project Gutenberg (PG)is a volunteer effort to digitize and archive cultural works, as well as to
"'encourage the creation and distribution of eBooks." It was founded in 1971 by American writer Michael S. Hart and is the oldest digital library. Most of the
items in its collection are the full texts of books or individual stories in the public domain. All files can be accessed for free under an open format layout, available on almost any computer. As of 3 October 2015, Project Gutenberg had reached 50,000 items in its collection of free dBooks: