재귀 언어 모델
Recursive Language Models
December 31, 2025
저자: Alex L. Zhang, Tim Kraska, Omar Khattab
cs.AI
초록
우리는 추론 시간 스케일링 관점에서 대규모 언어 모델(LLM)이 임의의 길이를 가진 프롬프트를 처리할 수 있도록 하는 방법을 연구합니다. 우리는 긴 프롬프트를 외부 환경의 일부로 간주하고, LLM이 프롬프트의 일부를 프로그래밍 방식으로 검사, 분해 및 재귀적으로 호출할 수 있게 하는 일반적인 추론 전략인 재귀 언어 모델(RLM)을 제안합니다. RLM은 모델 컨텍스트 윈도우를 두 배 이상 초과하는 긴 입력을 성공적으로 처리하며, 더 짧은 프롬프트의 경우에도 네 가지 다양한 장문 컨텍스트 작업에서 기본 LLM과 일반적인 장문 컨텍스트 스캐폴드의 품질을 크게 능가하는 동시에 쿼리당 비용이 유사하거나 더 저렴한 것으로 나타났습니다.
English
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.