arXiv:2501.01956cs.CL2025-01ICML被引 22

用元数据加速语言模型预训练,还能控制生成内容风格。

Metadata Conditioning Accelerates Language Model Pre-training

  • 训练时加元数据(如网址),后期去掉元数据让模型正常运行。
  • 16亿参数模型用33%更少数据就达到标准训练效果。
  • 可操控生成内容,比如用假网址提升常识问答表现。

语言模型预训练数据风格多样、质量不一,但高效学习并利用这些异构数据极具挑战。为此,我们提出元数据条件化与降温(MeCo)方法:训练时附加元数据(如www.wikipedia.org),后期仅用文本进行降温,使模型脱离元数据后仍能正常工作。MeCo在不同规模模型(6亿至80亿参数)和数据源(C4、RefinedWeb、DCLM)上显著加速预训练。例如,16亿参数模型使用MeCo仅需标准数据的67%即可达到相同下游任务性能。此外,通过在推理时添加真实或虚构元数据(如wikipedia.org或factquizmaster.com),可引导模型输出——如前者减少有害生成,后者提升常识任务表现。该方法兼容多种元数据形式(如模型生成的主题),实现简单、无额外计算开销,且有望生成更具能力与可控性的语言模型。

原文摘要 · Abstract (English)

The vast diversity of styles, domains, and quality levels present in language model pre-training corpora is essential in developing general model capabilities, but efficiently learning and deploying the correct behaviors exemplified in each of these heterogeneous data sources is challenging. To address this, we propose a new method, termed Metadata Conditioning then Cooldown (MeCo), to incorporate additional learning cues during pre-training. MeCo first provides metadata (e.g., URLs like www$.$wikipedia$.$org) alongside the text during training and later uses a cooldown phase with only the standard text, thereby enabling the model to function normally even without metadata. MeCo significantly accelerates pre-training across different model scales (600M to 8B parameters) and training sources (C4, RefinedWeb, and DCLM). For instance, a 1.6B language model trained with MeCo matches the downstream task performance of standard pre-training while using 33% less data. Additionally, MeCo enables us to steer language models by conditioning the inference prompt on either real or fabricated metadata that encodes the desired properties of the output: for example, prepending wikipedia$.$org to reduce harmful generations or factquizmaster$.$com (fabricated) to improve common knowledge task performance. We also demonstrate that MeCo is compatible with different types of metadata, such as model-generated topics. MeCo is remarkably simple, adds no computational overhead, and demonstrates promise in producing more capable and steerable language models.

语言模型预训练可控生成元数据

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。