arXiv:2410.09342cs.CL2024-10ACL被引 18

用分治法让大模型高效理解长文本,不需重新训练。

LLM$\times$MapReduce: Simplified Long-Sequence Processing using Large Language Models

  • 将长文本分块处理,再整合结果,避免信息丢失。
  • 在多个数据集上超越主流长文本模型性能。
  • 适合希望提升大模型长文本能力的开发者使用。

扩大大型语言模型(LLMs)的上下文窗口已成为关键研究方向,尤其适用于极长文本的应用场景。本文提出一种无需训练的新框架——LLM×MapReduce,采用分治策略实现对文档的全面理解。该框架将全文分割为若干段落,由大模型分别处理,再聚合中间结果生成最终输出。分治式长文本处理的主要挑战在于分块可能导致长距离信息丢失,从而引发不完整或错误的答案。此类信息断裂可分为两类:块间依赖关系和块间冲突。为此,我们设计了结构化信息协议以应对块间依赖,并引入上下文置信度校准机制解决块间冲突。实验表明,该方法在多个基准测试中优于代表性开源及商用长上下文大模型,且可适配多种不同模型。

原文摘要 · Abstract (English)

Enlarging the context window of large language models (LLMs) has become a crucial research area, particularly for applications involving extremely long texts. In this work, we propose a novel training-free framework for processing long texts, utilizing a divide-and-conquer strategy to achieve comprehensive document understanding. The proposed LLM$\times$MapReduce framework splits the entire document into several chunks for LLMs to read and then aggregates the intermediate answers to produce the final output. The main challenge for divide-and-conquer long text processing frameworks lies in the risk of losing essential long-range information when splitting the document, which can lead the model to produce incomplete or incorrect answers based on the segmented texts. Disrupted long-range information can be classified into two categories: inter-chunk dependency and inter-chunk conflict. We design a structured information protocol to better cope with inter-chunk dependency and an in-context confidence calibration mechanism to resolve inter-chunk conflicts. Experimental results demonstrate that LLM$\times$MapReduce can outperform representative open-source and commercial long-context LLMs, and is applicable to several different models.

长文本处理分治策略大模型优化

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