arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.02068cs.CLcs.AI
收藏

领域专业化与模型规模之间的相互作用

The interplay between domain specialization and model size

University of São Paulo (USP)(圣保罗大学);State University of Campinas (UNICAMP)(坎皮纳斯州立大学);Maritaca AI(马里塔卡人工智能公司)

Roseval Malaquias Junior, Ramon Pires, Thales Sales Almeida, Kenzo Sakiyama, Roseli A. F. Romero, Rodrigo Nogueira

AI总结:

本文在计算受限场景下研究了持续预训练中领域专业化与模型规模的相互作用,发现在法律、医学和会计领域上训练1.5B至14B参数模型时,随着规模增加,专业化模型优于通用模型且计算量更少,知识遗忘更少。

摘要:

语言模型的缩放定律通常侧重于寻找从头开始训练时的最佳模型规模和token数量。然而,由于从随机初始化权重训练模型时需要大量数据,实现这种最佳平衡需要巨大的计算资源。持续预训练提供了一种高性价比的替代方案,它利用预训练模型的计算投资来融入新知识,而无需大量新数据。最近的发现表明,数据质量会影响缩放定律中的常数,从而改变最佳的参数-token分配比例。基于这一见解,我们在计算受限场景下研究了持续预训练中领域专业化与模型规模之间的相互作用。我们的目标是为该场景确定最佳训练方案,并发现这种相互作用中可推广到不同模型规模和领域的模式。为了比较通用训练和专业化训练,我们过滤了一个基于网络的数据集,以从三个领域提取数据:法律、医学和会计。我们在未过滤和已过滤的数据集上分别预训练了1.5B、3B、7B和14B参数的模型,随后评估了它们在领域特定考试中的表现。结果表明,随着模型规模的增加,专业化模型优于通用模型,同时需要更少的训练计算量。此外,它们日益增长的计算效率导致了对先前所学知识遗忘的减少。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑