Skip to content

OpenCnid/recursive-language-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

recursive-language-models: a REPL box holding the prompt as a variable, with recursive calls looping back into smaller copies of itself

The prompt is not input. The prompt is terrain.

arXiv license papers hosted numbers from memory tiers recursion depth

A notes repo, not a mirror. This repo is OpenCnid's study of one paper — Zhang, Kraska & Khattab, Recursive Language Models (arXiv:2512.24601, MIT CSAIL) — and it is not a neutral one: this is the paper our current project implements. Trellis is a Recursive Language Model runtime; this formulation is the root of its architecture record. We are, at minimum, fans. The note is an original synthesis — our words, their findings, a locator on every claim.

Important

The one-way rule. When our note and the paper disagree, the paper wins and the note gets fixed. No exceptions, no negotiation. That rule is the entire reason we can call the note ground truth with a straight face.

🔗 The note

density-chain.md is a five-tier chain-of-density study of the paper, written to the house methodology: five rewrites at a held ~150-word budget, every claim carrying a locator (§ section, Table N, Alg. N, Obs. N), exact numbers only.

tier what it is
T1 — sparse context rot, the prompt-as-environment inversion, the headline medians
T2–T4 same length each, folding in 2–3 more salient entities per round — the two algorithms, the complexity-scaled tasks, the training recipe
T5 — dense maximally fused, still readable, every claim traceable
key results exact values — 0.1→76.0 F1, 91.3 at $0.99 on 10M-token inputs, +69.5% on long reasoning
our take the only opinionated section, clearly ours, quarantined (and, in this repo, openly partisan)

The one-breath version: context windows are finite and quality rots before they fill, so stop feeding the prompt to the transformer. Put it in a Python REPL as a variable, hand the model the keyboard, and let it peek, slice, and recursively call itself over the pieces — while the whole contraption still looks like an ordinary string-in, string-out language model from outside. The REPL alone gets you past the context limit; the recursion gets you through tasks where every line (or every pair of lines) matters; and a small model fine-tuned on just 1,000 trajectories learns the whole dance well enough to approach a frontier model on long-context work.

🏔️ Standing on the shoulders of giants

The actual science was done by Alex L. Zhang, Tim Kraska, and Omar Khattab, all at MIT CSAIL, affiliations as printed on the paper. They formulated the paradigm, built the REPL scaffold, ran it against every scaffold that deserved a fair fight, trained the first native RLM, and released the code (alexzhang13/rlm). Cite them, not us — BibTeX below.

📥 Want the PDF? One command, straight from the source

We don't keep a copy here (see: entire ethos, above). arXiv hosts it beautifully, for free, forever — no middlemen, no photocopier smell:

curl -L -o recursive-language-models.pdf https://arxiv.org/pdf/2512.24601v3

Drop the v3 to always get the current version; keep it to get the exact bytes our note studied. (This paper has revved twice already — v1 New Year's Eve 2025, v3 May 2026 — so the pin matters.)

📚 Cite the humans, not us

This repo is not a citable source; it's a signpost pointing at one. The arXiv BibTeX export:

@misc{zhang2026recursivelanguagemodels,
      title={Recursive Language Models},
      author={Alex L. Zhang and Tim Kraska and Omar Khattab},
      year={2026},
      eprint={2512.24601},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2512.24601},
}

Kept honest by machine

index.json is the machine-readable face of this repo: the source pin, the verification date, the tags. Trellis, our current project, consumes those indexes and owns freshness — when arXiv revs a v4, the note gets flagged before we get embarrassed. (Given this paper's revision tempo, that bot will earn its keep here first.)

Honest notes

  • We are not affiliated with the authors or MIT CSAIL, and they have no idea our runtime exists. Admiration is unilateral and unendorsed.
  • We are not neutral either. Trellis implements this formulation, our glossary defines "RLM" by pointing at this paper, and our inspirations entry for it carries the receipts. The note stays bone-dry anyway — partisanship lives here and in our take, never in the tiers.
  • No papers are hosted here. The paper stays at arXiv under its authors' CC BY 4.0 license; we point, we don't photocopy.
  • The note is lossy by construction. The locators are the refund policy: any claim can be walked back into the paper in one hop.
  • We will get things wrong. When we do, the fix lands source-first and the correction is public history. If we've mangled this paper, open an issue — correcting the record is the project.

License

The paper: CC BY 4.0 per the arXiv record, © its authors. Our prose: CC BY 4.0 © OpenCnid Labs.

Layout

density-chain.md    the five-tier note (the artifact)
index.json          machine-readable pin + verification metadata
AGENTS.md           the agents' front door
LICENSE.md          CC BY 4.0 for our prose; the paper keeps its own
assets/             banner art (the self-loop is load-bearing)

The methodology — METHOD.md, the synthesis prompt, the density-chain skill — lives canonically in chain-of-density and is linked, not copied.


This README fit comfortably in your context window. The paper explains what to do when it doesn't.

About

Chain-of-density study of 'Recursive Language Models' (Zhang, Kraska & Khattab 2025, MIT CSAIL, arXiv:2512.24601) - five-tier note, locator-verified. The prompt-as-environment paradigm Trellis implements: REPL offloading, recursive sub-calls, 10M+ token inputs.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors