arXiv:2410.09141cs.CLcs.AI2024-10

用检索机制自动生成长文本训练数据,让小模型学会处理长文档。

ACER: Automatic Language Model Context Extension via Retrieval

  • 用短上下文模型自动检索并合成长文本训练数据
  • 在真实任务中超越通用长文本模型和原始检索流程
  • 适合需要高效定制长文本能力的场景

长上下文建模是语言AI处理复杂信息的关键能力。当前通用长上下文模型虽已预训练,但在实际任务中仍表现不足。我们受人类处理信息方式启发:先通过检索筛选关键文档,再深度阅读少数重点内容。为此,我们构建了自动数据合成流水线,利用短上下文语言模型生成长文本训练数据,并在此基础上微调模型以获得特定任务的长上下文能力。类似预训练使用不完美数据,我们发现短上下文模型可基于合成数据自我提升,在长上下文检索增强生成等真实任务中,表现优于通用长上下文模型及原始检索读取流程。

原文摘要 · Abstract (English)

Long-context modeling is one of the critical capabilities of language AI for digesting and reasoning over complex information pieces. In practice, long-context capabilities are typically built into a pre-trained language model~(LM) through a carefully designed context extension stage, with the goal of producing generalist long-context capabilities. In our preliminary experiments, however, we discovered that the current open-weight generalist long-context models are still lacking in practical long-context processing tasks. While this means perfectly effective long-context modeling demands task-specific data, the cost can be prohibitive. In this paper, we draw inspiration from how humans process a large body of information: a lossy \textbf{retrieval} stage ranks a large set of documents while the reader ends up reading deeply only the top candidates. We build an \textbf{automatic} data synthesis pipeline that mimics this process using short-context LMs. The short-context LMs are further tuned using these self-generated data to obtain task-specific long-context capabilities. Similar to how pre-training learns from imperfect data, we hypothesize and further demonstrate that the short-context model can bootstrap over the synthetic data, outperforming not only long-context generalist models but also the retrieval and read pipeline used to synthesize the training data in real-world tasks such as long-context retrieval augmented generation.

长文本生成检索增强自监督学习

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