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 strategy 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 successfully handle inputs up to two orders of magnitude beyond model context windows and, even for shorter prompts, dramatically outperform the quality of base LLMs and common long-context scaffolds across four diverse long-context tasks, while having comparable (or cheaper) cost per query.


翻译:本研究从推理时扩展的视角出发,探索使大型语言模型(LLMs)能够处理任意长提示的方法。我们提出递归语言模型(RLMs),这是一种通用的推理策略,将长提示视为外部环境的一部分,允许LLM以编程方式检查、分解提示片段,并递归调用自身处理这些片段。我们发现,RLMs能够成功处理超出模型上下文窗口两个数量级的输入,并且即使在较短的提示上,在四个不同的长上下文任务中,其性能也显著优于基础LLMs和常见的长上下文框架,同时每次查询的成本相当(或更低)。

0
下载
关闭预览

相关内容

大型语言模型的模型压缩与高效推理:综述
专知会员服务
93+阅读 · 2024年2月17日
专知会员服务
22+阅读 · 2021年10月8日
专知会员服务
12+阅读 · 2021年6月20日
专知会员服务
22+阅读 · 2021年4月15日
专知会员服务
29+阅读 · 2020年10月2日
【NeurIPS2019】图变换网络:Graph Transformer Network
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
自然语言处理(二)机器翻译 篇 (NLP: machine translation)
DeepLearning中文论坛
12+阅读 · 2015年7月1日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 1月6日
Arxiv
0+阅读 · 1月2日
VIP会员
相关VIP内容
大型语言模型的模型压缩与高效推理:综述
专知会员服务
93+阅读 · 2024年2月17日
专知会员服务
22+阅读 · 2021年10月8日
专知会员服务
12+阅读 · 2021年6月20日
专知会员服务
22+阅读 · 2021年4月15日
专知会员服务
29+阅读 · 2020年10月2日
相关资讯
【NeurIPS2019】图变换网络:Graph Transformer Network
语义分割中的深度学习方法全解:从FCN、SegNet到DeepLab
炼数成金订阅号
26+阅读 · 2017年7月10日
MNIST入门:贝叶斯方法
Python程序员
23+阅读 · 2017年7月3日
自然语言处理(二)机器翻译 篇 (NLP: machine translation)
DeepLearning中文论坛
12+阅读 · 2015年7月1日
相关基金
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员