大模型在特定领域继续预训练时,越做越大越省算力,且更少遗忘旧知识。
The interplay between domain specialization and model size
- 用法律、医疗、会计数据对不同大小模型做领域专项预训练
- 模型越大,专精训练越高效,性能越好且算力需求更低
- 适合资源有限但需垂直领域强模型的研究者与应用开发者
语言模型的缩放定律通常关注从零开始训练时最优模型规模与词元数量的平衡。然而,由于随机初始化权重训练需大量数据,这一过程消耗巨大算力。持续预训练提供了一种低成本替代方案,利用已有预训练模型的算力投资来融入新知识,无需大量新数据。近期研究发现,数据质量会影响缩放定律中的常数,从而改变最优参数-词元分配比例。基于此,我们研究了在算力受限场景下,领域专精与模型规模在持续预训练中的相互作用。目标是识别此类场景下的最优训练策略,并发现可跨模型规模和领域通用的规律。为对比通用与专精训练,我们从网络数据集中筛选出法律、医疗、会计三个领域的数据。在1.5B、3B、7B和14B参数模型上,分别在未过滤和过滤数据集上进行预训练,再评估其在领域考试中的表现。结果表明:随着模型规模增大,专精模型相比通用模型性能更优,且所需训练算力更低;同时,其算力效率提升带来更少的知识遗忘。
原文摘要 · Abstract (English)
Scaling laws for language models have often focused on finding the optimal model size and token count for training from scratch. However, achieving this optimal balance requires significant compute resources due to the extensive data demands when training models from randomly-initialized weights. Continued pretraining offers a cost-effective alternative, leveraging the compute investment from pretrained models to incorporate new knowledge without requiring extensive new data. Recent findings suggest that data quality influences constants in scaling laws, thereby altering the optimal parameter-token allocation ratio. Building on this insight, we investigate the interplay between domain specialization and model size during continued pretraining under compute-constrained scenarios. Our goal is to identify an optimal training regime for this scenario and detect patterns in this interplay that can be generalized across different model sizes and domains. To compare general and specialized training, we filtered a web-based dataset to extract data from three domains: legal, medical, and accounting. We pretrained models with 1.5B, 3B, 7B, and 14B parameters on both the unfiltered and filtered datasets, then evaluated their performance on domain-specific exams. Results show that as model size increases, specialized models outperform general models while requiring less training compute. Additionally, their growing compute efficiency leads to reduced forgetting of previously learned knowledge.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。