AIAny
AI Client2025
Icon for item

Recursive Language Models (RLMs)

Provides a plug-and-play inference engine that lets language models programmatically inspect, decompose, and recursively call themselves to handle very long contexts; supports local and cloud REPL sandboxes, multiple LLM backends, and trajectory logging/visualization.

Introduction

Recursive Language Models (RLMs) change where contextual reasoning happens: instead of forcing a single flat prompt into a model, RLMs let the model treat the context as a manipulable environment and spawn recursive sub-calls to examine or transform parts of that context. This makes it possible to work with effectively unbounded inputs (documents, codebases, chat histories) while keeping each LM call short and focused — at the cost of added orchestration and sandboxing complexity.

What Sets It Apart
  • REPL-based inference model: the library exposes a REPL-like environment where the LM can read and mutate a context variable and launch sub-LM calls; this moves control flow into the inference layer rather than the client.
  • Multi-environment sandboxing: supports non-isolated local execution and several isolated sandboxes (Docker, Modal, Prime, Daytona, e2b) so you can trade off convenience and security depending on the task.
  • Backend-agnostic integration: works with API providers (OpenAI, Anthropic, router platforms) and local runtimes (vLLM), so experiments can run across hosted and on-prem setups.
  • Run metadata & visualizer: optional trajectory logging captures full run configs and sub-call trees, and a simple visualizer helps inspect generated code, sub-calls, and the overall recursion graph for debugging and analysis.
Who it's for — trade-offs and caveats

Great fit if you want to prototype new inference paradigms that break the single-prompt assumption (e.g., long-document QA, multi-step code synthesis, programmatic reasoning) and need tooling to record and inspect recursion traces. It’s also useful for researchers reproducing the RLM paper experiments or integrating RLM-style control flow into research stacks.

Look elsewhere if you need a drop-in production LLM client for untrusted user input without strong isolation: the default non-isolated REPL runs in-process and can expose host resources; for production with untrusted inputs you must use the isolated sandboxes. This repo focuses on inference and orchestration rather than model training or large-scale serving optimizations; expect engineering work to harden, scale, and monitor RLM runs in production.

Where it fits

Positioned between single-call LLM clients and heavier orchestration frameworks: RLMs provide a lightweight programmatic layer for recursive decomposition and are complementary to RAG, tool-augmented agents, and workflow platforms — especially when the task benefits from explicit recursive inspection and sub-calls rather than a single large context.

Information

  • Websitegithub.com
  • AuthorsAlex L. Zhang, Tim Kraska, Omar Khattab
  • Published date2025/12/20

More Items

GitHub
AI Infra2025

Measures generative AI inference performance with token-level metrics (TTFT, inter-token latency), latency, and throughput under realistic traffic patterns. Provides a multiprocess engine, real-time TUI dashboard, extensible plugins, and integrations for telemetry and result uploads, aimed at inference benchmarking and capacity planning.

GitHub
AI Train2019

Train and experiment with multi-billion to trillion-parameter transformer models on large GPU clusters using GPU-optimized building blocks and reference training scripts; offers advanced parallelism and mixed-precision support for research teams and ML engineers.

GitHub

Indexes full text of visited web pages and local files on a self‑hosted server so you can search your personal knowledge from a web UI, terminal, CLI, or an AI assistant. Runs without mandatory telemetry, offers a browser extension for automatic capture, and supports optional semantic search via a configurable embeddings endpoint.