nanoLM
收藏资源简介:
nanoLM是一个为大型语言模型(LLM)研究设计的经济高效基准数据集,由北京人工智能研究院创建。该数据集包含从100亿到2万亿令牌的四个不同规模的训练数据,涵盖了WebText、专业知识、世界知识、代码和学术等多个领域,旨在提高模型的泛化能力。nanoLM通过精确预测损失,使得研究人员无需实际训练大型模型即可进行有意义的模型架构和算法比较,从而节省资源并推动学术界与工业界之间的合作。
nanoLM is a cost-effective benchmark dataset designed for large language model (LLM) research, developed by the Beijing Academy of Artificial Intelligence. This dataset includes four training corpora of varying scales ranging from 10 billion to 2 trillion tokens, covering diverse domains such as WebText, professional knowledge, world knowledge, code, and academic content, with the objective of enhancing the generalization performance of models. By leveraging accurate loss prediction, nanoLM enables researchers to conduct meaningful comparisons of model architectures and algorithms without actually training large-scale models, thus saving computational resources and fostering collaboration between academia and industry.
Mu-scaling: Loss Prediction via Maximal Update Parametrization
数据集概述
- 主题: 通过最大更新参数化(Mup)进行损失预测。
- 论文链接: Mu-scaling paper
- 实现基础: 基于Huggingface和MuTransformers,进行了稳定性改进和支持Deepspeed的修改。
快速开始
1. 环境设置
-
推荐工具: conda
-
环境配置命令: bash conda create -n mu_scaling python=3.8 conda activate mu_scaling pip install -r requirements.txt
-
中国用户加速安装: bash pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
2. 数据准备
- 数据预处理: 遵循Huggingface的因果语言模型数据预处理指南。
- 示例数据: 提供了一个处理后的数据示例在
res/final_data/test。
3. 使用Mup训练GPT-2
- 训练命令: bash sh run_grid_search_pair_wise_mup.sh
4. 绘制损失景观
- 绘制命令: python python visualize_lr_landscape.py
5. 拟合缩放定律
- 记录训练损失: 在相同数据和步骤上记录训练损失。
- 拟合命令: python python fit_scale_loss_prediction.py
6. 评估
- 评估命令: bash sh run_eval_ppl_loss_pred.sh
参考文献
- 作者: Yiqun Yao, Yequan Wang
- 标题: Research without Re-search: Maximal Update Parametrization Yields Accurate Loss Prediction across Scales
- 期刊: CoRR
- 卷: abs/2304.06875
- 年份: 2023




