arXiv:2411.05000cs.CL2024-11ICLR被引 14

测试大模型在百万级文档中追踪信息线的能力,发现多数模型实际可用上下文远低于理论长度。

Needle Threading: Can LLMs Follow Threads through Near-Million-Scale Haystacks?

  • 设计实验评估17个主流大模型在长文本中追踪多条信息线的能力
  • 多数模型在上下文增长时准确率下降,有效上下文远小于支持长度
  • 提醒不同分词器的token数不可直接比较,影响真实使用效果

随着大语言模型(LLMs)上下文长度的增加,其应用范围不断扩展。在许多现实任务中,决策依赖于分散在大量异构文档中的细粒度信息,而这些文档通常包含大量无关内容。长上下文LLMs似乎非常适合此类复杂的信息检索与推理任务,而这类任务传统上成本高且耗时长。然而,尽管近年来长上下文模型发展迅速,我们对模型如何有效利用上下文的理解却未同步跟进。为此,我们开展了一组检索实验,评估17个主流LLMs在上下文窗口中追踪信息线的能力。结果令人惊讶:许多模型表现出显著的‘线程安全’特性,能同时跟踪多条信息线且性能损失较小。但仍有许多模型的有效上下文长度明显短于其支持的最大长度,准确率随上下文窗口增大而下降。研究还强调,不同分词器的标记数不应直接比较,因其对应的实际字符数差异显著。我们已公开代码与长上下文实验数据。

原文摘要 · Abstract (English)

As the context limits of Large Language Models (LLMs) increase, the range of possible applications and downstream functions broadens. In many real-world tasks, decisions depend on details scattered across collections of often disparate documents containing mostly irrelevant information. Long-context LLMs appear well-suited to this form of complex information retrieval and reasoning, which has traditionally proven costly and time-consuming. However, although the development of longer context models has seen rapid gains in recent years, our understanding of how effectively LLMs use their context has not kept pace. To address this, we conduct a set of retrieval experiments designed to evaluate the capabilities of 17 leading LLMs, such as their ability to follow threads of information through the context window. Strikingly, we find that many models are remarkably threadsafe: capable of simultaneously following multiple threads without significant loss in performance. Still, for many models, we find the effective context limit is significantly shorter than the supported context length, with accuracy decreasing as the context window grows. Our study also highlights the important point that token counts from different tokenizers should not be directly compared -- they often correspond to substantially different numbers of written characters. We release our code and long-context experimental data.

长上下文信息追踪模型评估

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