We study allowing large language models (LLMs) to process arbitrarily long prompts through the lens of inference-time scaling. We propose Recursive Language Models (RLMs), a general inference paradigm that treats long prompts as part of an external environment and allows the LLM to programmatically examine, decompose, and recursively call itself over snippets of the prompt. We find that RLMs can successfully process inputs up to two orders of magnitude beyond model context windows and, even for shorter prompts, dramatically outperform the quality of vanilla frontier LLMs and common long-context scaffolds across four diverse long-context tasks while having comparable cost. At a small scale, we post-train the first natively recursive language model. Our model, RLM-Qwen3-8B, outperforms the underlying Qwen3-8B model by $28.3\%$ on average and even approaches the quality of vanilla GPT-5 on three long-context tasks. Code is available at https://github.com/alexzhang13/rlm.


翻译:本研究从推理时扩展的视角出发,探讨如何使大型语言模型(LLMs)能够处理任意长度的提示。我们提出递归语言模型(RLMs),这是一种通用的推理范式,它将长提示视为外部环境的一部分,并允许LLM以编程方式检查、分解提示片段,并递归地调用自身处理这些片段。我们发现,RLMs能够成功处理超出模型上下文窗口两个数量级的输入;即使在处理较短提示时,在四项不同的长上下文任务中,其性能也显著优于前沿的普通LLMs及常见的长上下文框架,同时保持可比的成本。在小规模实验中,我们通过后训练得到了首个原生递归语言模型。我们的模型RLM-Qwen3-8B在三个长上下文任务上的平均性能比基础模型Qwen3-8B提升了$28.3\%$,甚至接近普通GPT-5的质量。代码发布于https://github.com/alexzhang13/rlm。

0
下载
关闭预览

相关内容

大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
大型语言模型推理增强外部知识:综述
专知会员服务
39+阅读 · 2025年6月2日
面向统计学家的大型语言模型概述
专知会员服务
32+阅读 · 2025年3月16日
扩展英语大语言模型到新语言的综述
专知会员服务
18+阅读 · 2024年8月15日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
大型语言模型增强强化学习综述:概念、分类和方法
专知会员服务
57+阅读 · 2024年4月4日
大型语言模型的高效提示方法综述
专知会员服务
75+阅读 · 2024年4月2日
【RecSys 2023教程】大型语言模型推荐,101页ppt
专知会员服务
71+阅读 · 2023年11月12日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
最新内容
面向国防作战的最佳自主与蜂群无人机技术
专知会员服务
3+阅读 · 今天8:04
《异构人类团队的协作决策过程混合建模研究》
专知会员服务
3+阅读 · 今天7:59
博士论文 | 面向大模型推理的内存高效算法
专知会员服务
3+阅读 · 7月27日
美空军新型反无人机部队初探
专知会员服务
7+阅读 · 7月27日
《防空交战流程的概率建模研究》
专知会员服务
10+阅读 · 7月27日
ICML 2026 教程 | 数值优化理论还重要吗?
专知会员服务
6+阅读 · 7月26日
ICM 2026 | 陶哲轩:人工智能时代的数学
专知会员服务
9+阅读 · 7月26日
相关VIP内容
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
大型语言模型推理增强外部知识:综述
专知会员服务
39+阅读 · 2025年6月2日
面向统计学家的大型语言模型概述
专知会员服务
32+阅读 · 2025年3月16日
扩展英语大语言模型到新语言的综述
专知会员服务
18+阅读 · 2024年8月15日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
大型语言模型增强强化学习综述:概念、分类和方法
专知会员服务
57+阅读 · 2024年4月4日
大型语言模型的高效提示方法综述
专知会员服务
75+阅读 · 2024年4月2日
【RecSys 2023教程】大型语言模型推荐,101页ppt
专知会员服务
71+阅读 · 2023年11月12日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员