-
The authors introduce Recursive Language Models (RLMs), a new inference-time strategy that lets a language model treat a very long prompt as an external environment and programmatically inspect and decompose it instead of trying to ingest all tokens at once.
-
RLMs run the prompt inside a programmable environment (such as a Python REPL) where the model writes code to examine, split, and recursively call itself on relevant chunks of the context, enabling effective processing of inputs far beyond the model’s fixed context window.
-
Empirically, this approach handles much larger contexts (up to tens of millions of tokens), significantly outperforms standard long-context methods on diverse tasks, and does so with similar or lower inference cost per query.
RECURSIVE LANGUAGE MODELS
LLM