Recursive Language Models

PDF DocumentAlex L. Zhang; Tim Kraska; Omar Khattab8,133 words
Download PDF

Content Summary

Recursive Language ModelsAlex L. Zhang; Tim Kraska; Omar Khattab

10 concepts13 actions20 keywords

TL;DR

This paper introduces Recursive Language Models (RLMs), a general inference paradigm that treats arbitrarily long prompts as external environment variables rather than feeding them directly into the neural network, enabling LLMs to programmatically examine, decompose, and recursively call themselves over snippets of the prompt. RLMs process inputs up to two orders of magnitude beyond model context windows and dramatically outperform vanilla frontier LLMs and common long-context scaffolds across four diverse tasks while maintaining comparable cost. A small-scale post-trained model (RLM-Qwen3-8B) improves over its base by 28.3% on average, demonstrating that training natively recursive language models is a promising new axis of scale.

ELI5

Imagine you have a really, really long story book — so long you can't hold it all in your hands at once. Instead of trying to read it all at the same time, you put the book on a table, look at the table of contents, then flip to just the pages you need, read those parts, write notes, and sometimes ask a friend to read other pages for you. That's what RLMs do — they put the big text on a 'table' (a computer environment) and look at just the pieces they need, asking helper copies of themselves to read other pieces!

Top Concepts

Keywords

Quick Actions

  • !Implement the RLM pattern: offload user prompts as variables in a persistent REPL environment rather than feeding them directly into the LLM context window
  • !Enable symbolic recursion by allowing REPL code to programmatically invoke the LLM on slices of the prompt inside loops
  • !Build final outputs through REPL variables (FINAL_VAR) rather than pure autoregressive generation to overcome output length limits
1m 53s51,988 tokens
Claude Opus 4.5prompts v1.2v1.0?

Want to analyze your own content?

Extract insights from YouTube videos, PDFs, and web articles. Free to start.

Try Knowmler Free