用200亿高质量数据训练17亿参数模型,实现高效语言模型预训练。
Training Dynamics of a 1.7B LLaMa Model: A Data-Efficient Approach
- 基于200亿精选令牌数据,1.7B参数模型从混乱文本逐步生成连贯内容。
- 高质量数据+合理扩展策略,使少于常规量的训练词数达到竞争性性能。
- 公开训练日志与检查点,适合想优化预训练流程的研究者参考。
大规模语言模型的预训练涉及模型架构、数据质量、训练连续性和硬件限制等多重因素。本文分享了训练开源1.7亿参数的LLaMa基模型DMaS-LLaMa-Lite的经验,使用约200亿个精心筛选的令牌数据。我们记录了完整的训练过程,观察到验证损失下降和下游基准表现提升,反映出模型输出从无意义文本逐渐演变为流畅且上下文相关的表达。在预训练之外,我们还进行了指令微调阶段,使模型输出更符合用户需求与上下文。强调恢复优化器状态的重要性,以及硬件变更对训练稳定性和吞吐的影响。尽管定性评估有助于理解模型进步,我们的分析也涵盖多个性能基准,证明高质量数据与合理缩放可实现显著减少训练令牌下的竞争力结果。通过提供训练日志、检查点和样本输出,旨在指导未来研究者与实践者优化预训练策略。训练脚本可在GitHub获取(https://github.com/McGill-DMaS/DMaS-LLaMa-Lite-Training-Code),模型检查点在HuggingFace(https://huggingface.co/collections/McGill-DMaS/dmas-llama-lite-6761d97ba903f82341954ceb)。
原文摘要 · Abstract (English)
Pretraining large language models is a complex endeavor influenced by multiple factors, including model architecture, data quality, training continuity, and hardware constraints. In this paper, we share insights gained from the experience of training DMaS-LLaMa-Lite, a fully open source, 1.7-billion-parameter, LLaMa-based model, on approximately 20 billion tokens of carefully curated data. We chronicle the full training trajectory, documenting how evolving validation loss levels and downstream benchmarks reflect transitions from incoherent text to fluent, contextually grounded output. Beyond pretraining, we extend our analysis to include a post-training phase focused on instruction tuning, where the model was refined to produce more contextually appropriate, user-aligned responses. We highlight practical considerations such as the importance of restoring optimizer states when resuming from checkpoints, and the impact of hardware changes on training stability and throughput. While qualitative evaluation provides an intuitive understanding of model improvements, our analysis extends to various performance benchmarks, demonstrating how high-quality data and thoughtful scaling enable competitive results with significantly fewer training tokens. By detailing these experiences and offering training logs, checkpoints, and sample outputs, we aim to guide future researchers and practitioners in refining their pretraining strategies. The training script is available on Github at https://github.com/McGill-DMaS/DMaS-LLaMa-Lite-Training-Code. The model checkpoints are available on Huggingface at https://huggingface.co/collections/McGill-DMaS/dmas-llama-lite-6761d97ba903f82341954ceb.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。