One Change Makes a Small AI 3.4x Faster and Cuts Its Error From 320% to 7%
- Get link
- X
- Other Apps
AI Agents · Analysis
Same 4B local model, same 1,200 support tickets: splitting the workload into 20-ticket calls made inference 3.4x faster and cut counting error from 317.5% to 7%.
By The Benchmarque Staff · · Updated Dec 6, 2026 · 8 min read
Paper: Zhang, Chakraborty, and Khattab, "Language Model Harnesses can be Compositional Generalizers," MIT CSAIL, arXiv 2611.28298 (November 20, 2026). Local runs measured December 4, 2026 on a 16GB M4 Mac mini running Qwen3-4B-Instruct-2507 in llama.cpp. As an Amazon Associate we earn from qualifying purchases; retail links marked (paid link) earn a commission at no extra cost.

The harness test in 4 cards
Counting error cut
317.5% to 7%
Fixed 20-ticket chunks eliminated the single-prompt hallucination blowup on 52K tokens.
End-to-end speedup
3.4x faster
144 seconds across 60 small calls versus 489 seconds in one 64K-context prompt.
RLM-27B gain
+12.4 pts
MIT's trained harness raised 8-benchmark accuracy from 46.1 to 58.5 (+26.9% relative).
Untrained 4B planner
85% error
Letting an untrained 4B model plan its own split returned 14 against a true count of 95.
Without changing weights or buying faster hardware, splitting a 1,200-ticket support inbox into fixed 20-ticket calls made Qwen3-4B-Instruct 3.4 times faster (144 seconds instead of 489) and cut its counting error from 317.5% to 7.0% on a 16GB M4 Mac mini. The advantage widens steeply with input size: at 100 tickets the two approaches sit close, at 400 tickets error drops from 35.3% to 10.7%, and at 1,200 tickets a single prompt collapses completely, reporting counts above 1,100 for fewer than 300 real billing tickets. The single configuration that failed was letting an untrained 4B model plan its own decomposition under MIT's Recursive Language Model (RLM) harness.
- Model
- Qwen3-4B-Instruct-2507, Q4_K_M GGUF (2.5 GB)
- Runtime
- llama.cpp llama-server, Metal backend, flash attention, q8_0 KV cache, temperature 0
- Machine
- Mac mini, Apple M4, 16GB unified memory
- Benchmark task
- Count billing tickets in synthetic support inboxes containing planted money-word look-alikes
- Input scale
- 100 / 400 / 1,200 tickets (~4.3K / 17K / 52K tokens), 3 random seeds each
- Harnesses compared
- One big prompt; fixed 20-ticket chunks; RLM (rlms 0.1.3) planning its own split
- Test date
- December 4, 2026
What is a model harness, and what does the MIT paper claim?
A harness is the surrounding software that decides what enters each prompt, which tools are exposed, and when the model is called again. Coding agents such as Claude Code and Codex are harnesses. Most follow a ReAct loop that appends the full history back into every turn, a pattern the MIT CSAIL authors label "trajectory as a prompt."
As a long job grows, the prompt stretches past the lengths the model handled cleanly during training and accuracy degrades. The MIT authors define a target property called locally in-distribution execution: even when an overall task is long or unfamiliar, every individual model call receives a short, familiar input. Their Recursive Language Model (RLM) harness keeps the long document in a Python variable and lets a root orchestrator write code that delegates slices to fresh sub-calls.
Verified headline figures from the paper's tables:
- Length generalization: trained only on short inputs, the RLM generalized to contexts 2x to 64x longer. The 64x result occurs in one of six environments (MRCRv2, trained at 32K to 64K tokens and evaluated at 2M to 4M).
- Root-only supervision: loss was computed solely on the orchestrator's trajectory while frozen sub-calls handled reading.
- RLM-27B score jump: supervised fine-tuning (SFT, not RL) on synthetic surrogate tasks lifted Qwen3.8-27B's average across eight long-context benchmarks from 46.1 to 58.5 (+12.4 absolute points, reported in the abstract as 26.9% relative).
- Token efficiency: root turns fell from 18.4 to 6.5, root input tokens dropped from 263K to 44K, total tokens roughly halved, and trajectories issuing at least one sub-call rose from 43% to 97%.
- Weak-model warning: on Qwen3-30B-A3B, an untrained RLM averaged 15.3 against 22.6 for the plain model. Self-directed harnesses only win once the orchestrator is strong enough or trained to plan.
How was the local 4B benchmark designed?
To test both halves of the paper locally, the benchmark requires an exact numerical answer where semantic reading matters and naive keyword matching fails: synthetic support inboxes where every line covers billing, delivery, login trouble, or a broken product. Non-billing tickets deliberately include payment vocabulary such as "The courier left a delivery card," "The phone will not charge so the 2FA code fails," and "The driver requested a customs payment at the door." The prompt asks for the exact count of billing tickets.
$ python3 gen.py 400 1 # build one inbox, print the true counts
{"n": 400, "seed": 1, "chars": 46079, "counts": {"billing": 95, "delivery": 101, "login": 88, "defect": 116}}
Three inbox sizes (100 / 400 / 1,200 tickets) across three seeds were evaluated under three harnesses:
- One big prompt: send the full inbox and question in one call (the trajectory-as-a-prompt baseline).
- Fixed 20-ticket chunks: a five-line Python loop sends 20 lines per call, reads the partial count, and sums them. Every call stays identical in size regardless of inbox length, enforcing locally in-distribution inputs directly in code.
- RLM self-planning: the authors' open-source
rlms0.1.3 package running the same 4B model as both root orchestrator and sub-model.
Does 20-ticket chunking beat one big prompt on speed and accuracy?
Yes, and the margin widens sharply once the prompt crosses 15K tokens. At 1,200 tickets (~52K tokens), chunking cuts counting error from 317.5% to 7.0% while finishing 3.4x faster.
| Tickets | Prompt size | Big prompt error | Chunks error | Big prompt time | Chunks time |
|---|---|---|---|---|---|
| 100 | 4.3K tokens | 27.4% | 23.0% | 9 s | 7 s |
| 400 | 17K tokens | 35.3% | 10.7% | 69 s | 40 s |
| 1,200 | 52K tokens | 317.5% | 7.0% | 489 s | 144 s |
Measured on M4 Mac mini 16GB with Qwen3-4B-Instruct-2507 (Q4_K_M), December 4, 2026; mean of 3 seeds per inbox size.
At 100 tickets, both methods stay close. Starting at 400 tickets, they diverge cleanly: the single prompt overcounted on every seed (124 / 128 / 128 versus true counts of 95 / 93 / 93) because reading 17K tokens at once caused the 4B model to conflate look-alike words like "card" and "charge" with billing. Seeing the exact same traps 20 lines at a time kept error at 10.7%.
Latency flips in the same direction. Prompt processing on the M4 Mac mini fell from roughly 527 tokens per second at the start of a prompt to 108 tokens per second at 51,000 tokens as quadratic attention cost compounded. Sixty short calls bypassed that slowdown completely.
At 1,200 tickets (~52K tokens), the single-prompt run required expanding the context window to 64K and collapsed completely, answering 1,247 / 1,124 / 1,147 against true counts of 284 / 294 / 266 in roughly 489 seconds per run. Fixed 20-ticket chunks processed the exact same inbox in 144 seconds with 7.0% mean error.
What happened when the 4B model planned its own split?
MIT's weak-model warning reproduced immediately. Inside the RLM harness on the 400-ticket inbox (46,079 characters), the untrained 4B orchestrator checked the string length, decided it fit in one sub-call, wrote brittle keyword-matching code that returned empty hits, and finally guessed 14 against a true count of 95 (85% off). On 100 tickets it reported 20 against a true 27 after nine calls and ~25,000 tokens.
The model had every Python tool needed to slice, delegate, and sum, but lacked the planning skill to use them. That mirrors MIT's finding on Qwen3-30B-A3B, where an untrained RLM trailed the plain model until the root model was trained on synthetic decomposition tasks.
What should agent builders change based on these runs?
- Keep large inputs out of the prompt: store documents in files or variables and pass bounded slices. This paid off with zero model fine-tuning.
- Hard-code decomposition for small models: a five-line Python loop beat autonomous planning by a wide margin. Delegate only bounded reading to small local checkpoints.
- Include look-alike traps in evaluation sets: almost every error came from tickets sharing money words without being billing issues. Clean synthetic inputs hide degradation.
- Guard against small upward chunk drift: even fixed chunks slightly overcounted across 60 sub-calls; for high-stakes counts, add a verification pass on borderline rows.
Which numbers from the MIT paper are commonly misquoted?
- "26.9% better" is a relative gain: the absolute average rose 12.4 points, from 46.1 to 58.5 across eight long-context benchmarks.
- Training methods differ by experiment: length-generalization runs used reinforcement learning, while RLM-27B used supervised fine-tuning on synthetic surrogate tasks.
- "64x longer" applies to one environment of six (MRCRv2); the other five spanned 2x to 16x.
- Tail-recursion chaining: on four chained tasks, RLM-27B solved all four 55.2% of the time and reached 77.5% after extra tail-recursion training, whereas base Qwen3.8-27B started at 19.3% and dropped to 9.9% under the same extra training.
Limits of this local verification: it evaluated one 4B checkpoint on one synthetic counting task across three seeds (and one RLM run per size), without any fine-tuning. The paper evaluated 27B to 30B checkpoints on real benchmarks up to 456M tokens, and messier real-world support tickets generally penalize single long prompts even harder.
What did the raw 18-run log show?
| Method | Tickets | Seed | True count | Model count | Seconds |
|---|---|---|---|---|---|
| chunked | 100 | 2 | 24 | 35 | 10.5 |
| chunked | 100 | 3 | 19 | 22 | 10.6 |
| chunked | 400 | 1 | 95 | 96 | 39.8 |
| chunked | 400 | 2 | 93 | 113 | 40.1 |
| chunked | 400 | 3 | 93 | 102 | 40.6 |
| chunked | 1,200 | 1 | 284 | 303 | 112.3 |
| chunked | 1,200 | 2 | 294 | 324 | 158.1 |
| chunked | 1,200 | 3 | 266 | 277 | 161.5 |
| direct | 100 | 2 | 24 | 38 | 12.7 |
| direct | 100 | 3 | 19 | 18 | 13.2 |
| direct | 400 | 1 | 95 | 124 | 67.9 |
| direct | 400 | 2 | 93 | 128 | 67.7 |
| direct | 400 | 3 | 93 | 128 | 70.6 |
| direct | 1,200 | 1 | 284 | 1,247 | 494.3 |
| direct | 1,200 | 2 | 294 | 1,124 | 498.3 |
| direct | 1,200 | 3 | 266 | 1,147 | 475.8 |
| rlm | 100 | 1 | 27 | 20 | 80.0 |
| rlm | 400 | 1 | 95 | 14 | 16.6 |
Raw log from M4 Mac mini 16GB running Qwen3-4B-Instruct-2507 (Q4_K_M), llama.cpp, temperature 0, December 4, 2026.
The verdict
Local 4B to 14B deployments: write fixed-size chunking in application code immediately. Keeping every prompt small beat a single 52K prompt by 3.4x on speed and dropped error from 317.5% to 7.0%.
Autonomous agent harnesses like RLM: delegate planning to the model only after adopting a checkpoint explicitly trained to orchestrate sub-calls (such as MIT's RLM-27B) or a frontier model verified on decomposition.
Hardware sizing: RLM-27B at 4-bit needs roughly 16GB for weights alone, pushing comfortable local orchestration onto 32GB+ systems.
The catch: this local test measured inference only on one synthetic counting task, and chunked aggregation still introduces mild upward counting drift across 60 sub-calls.
Quick answers
What is a language model harness?
A harness is the wrapper code around an LLM that assembles prompts, exposes tools, and schedules sub-calls. Coding agents like Claude Code and Codex are harnesses.
What does locally in-distribution mean in MIT's paper?
It means every individual model call receives a short, familiar prompt the model handles reliably, even when the full task spans hundreds of thousands or millions of tokens.
Can the RLM harness run locally with llama.cpp?
Yes. Install rlms via pip and point its OpenAI-compatible client at a local llama.cpp server. In this benchmark, an untrained 4B model could not drive it effectively; MIT's experiments used 27B to 30B checkpoints.
Can MIT's RLM-27B weights fit on a 16GB machine?
The authors released code, training data, and RLM-27B weights, but a 4-bit 27B checkpoint takes roughly 16GB before context buffers, so comfortable local execution calls for 24GB to 32GB or more of unified or GPU memory.
Next steps and tools
Compare local model throughput on the Benchmarks Leaderboard
In the app: Benchmarks Leaderboard · PC and Local AI Builder · Hardware Market
Where to buy (paid link): Mac mini M6 16GB on Amazon
Read next: A 16GB Mac mini runs a 27B model and gets 20 of 20 tasks right · How to make Gemini 4 finish long coding jobs · Running a 120B AI model at home
Comments
Post a Comment