LongBench:面向长上下文理解的双语多任务基准
LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding
AI总结:
该研究提出首个双语多任务长上下文理解基准LongBench,涵盖21个跨6类任务的中英数据集,评估8款大语言模型后总结出商用模型、位置嵌入优化、上下文压缩技术的相关性能规律。
摘要:
尽管大语言模型(LLMs)在众多语言任务上展现出亮眼性能,但大多数仅能处理数千token长度的文本,限制了其在书籍、报告、代码库等更长序列输入场景下的应用。近期研究提出了通过扩展上下文窗口、采用更复杂的记忆机制来提升LLMs长上下文能力的方法,但目前仍缺乏专门用于评估长上下文理解能力的综合性基准。\n本文提出LongBench——首个面向长上下文理解的双语多任务基准,可实现对长上下文理解能力更严谨的评估。LongBench包含6大任务类别的21个数据集,覆盖英文和中文两种语言,英文样本平均长度为6711词,中文样本平均长度为13386字。这些任务覆盖了单文档问答、多文档问答、摘要生成、少样本学习、合成任务、代码补全等核心长文本应用领域。LongBench中的所有数据集均被标准化为统一格式,可轻松实现对LLMs的自动评估。\n我们在LongBench上对8个LLMs开展了综合评估,发现:(1)商用模型GPT-3.5-Turbo-16k的表现优于其他开源模型,但在处理更长上下文时仍存在困难;(2)缩放位置嵌入与在长序列上进行微调,可大幅提升长上下文理解能力;(3)检索等上下文压缩技术能为长上下文能力较弱的模型带来提升,但性能仍落后于具备强长上下文理解能力的模型。代码与数据集可在https://github.com/THUDM/LongBench 获取。
英文摘要:
Although large language models (LLMs) demonstrate impressive performance for many language tasks, most of them can only handle texts a few thousand tokens long, limiting their applications on longer sequence inputs, such as books, reports, and codebases. Recent works have proposed methods to improve LLMs' long context capabilities by extending context windows and more sophisticated memory mechanisms. However, comprehensive benchmarks tailored for evaluating long context understanding are lacking. In this paper, we introduce LongBench, the first bilingual, multi-task benchmark for long context understanding, enabling a more rigorous evaluation of long context understanding. LongBench comprises 21 datasets across 6 task categories in both English and Chinese, with an average length of 6,711 words (English) and 13,386 characters (Chinese). These tasks cover key long-text application areas including single-doc QA, multi-doc QA, summarization, few-shot learning, synthetic tasks, and code completion. All datasets in LongBench are standardized into a unified format, allowing for effortless automatic evaluation of LLMs. Upon comprehensive evaluation of 8 LLMs on LongBench, we find that: (1) Commercial model (GPT-3.5-Turbo-16k) outperforms other open-sourced models, but still struggles on longer contexts. (2) Scaled position embedding and fine-tuning on longer sequences lead to substantial improvement on long context understanding. (3) Context compression technique such as retrieval brings improvement for model with weak ability on long contexts, but the performance still lags behind models that have strong long context understanding capability. The code and datasets are available at https://github.com/THUDM/LongBench.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。