对比多种长文本扩展方法,发现微调更有效,但模型难泛化到更长文本。
A Controlled Study on Long Context Extension and Generalization in LLMs
- 用统一模型和数据做对比实验,确保结果可比性。
- 近似注意力方法在长文本任务中表现普遍较差。
- 微调方法在扩展范围内有效,但超出范围则失效。
广泛文本理解与上下文学习需要能利用完整文档上下文的语言模型。由于直接训练长上下文模型存在实现挑战,许多方法被提出用于扩展模型以处理长文本。然而,因数据和模型类别差异,这些方法难以比较,导致对长上下文性能评估方式的不确定性,以及其是否不同于标准评估的疑问。本文采用标准化协议,使用一致的基础模型和扩展数据,实施受控的扩展方法对比实验。研究发现:首先,困惑度(perplexity)在长上下文任务中仍是通用性能指标;其次,当前近似注意力方法在各类长上下文任务中系统性表现不佳;最后,基于精确微调的方法在其扩展范围内通常有效,但外推仍具挑战。所有代码、模型和检查点将开源,推动该关键领域的透明研究。
原文摘要 · Abstract (English)
Broad textual understanding and in-context learning require language models that utilize full document contexts. Due to the implementation challenges associated with directly training long-context models, many methods have been proposed for extending models to handle long contexts. However, owing to differences in data and model classes, it has been challenging to compare these approaches, leading to uncertainty as to how to evaluate long-context performance and whether it differs from standard evaluation. We implement a controlled protocol for extension methods with a standardized evaluation, utilizing consistent base models and extension data. Our study yields several insights into long-context behavior. First, we reaffirm the critical role of perplexity as a general-purpose performance indicator even in longer-context tasks. Second, we find that current approximate attention methods systematically underperform across long-context tasks. Finally, we confirm that exact fine-tuning based methods are generally effective within the range of their extension, whereas extrapolation remains challenging. All codebases, models, and checkpoints will be made available open-source, promoting transparency and facilitating further research in this critical area of AI development.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。