Analysis Agents

8 min read · Dec 3, 2026

One Change Makes a Small AI 3.4x Faster and Cuts Its Error From 320% to 7%

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%.

8 min read Checked Dec 5, 2026 3 primary sources
Counting error fell from 317.5% to 7% and runtime sped up 3.4x on Qwen3-4B across 1,200 support tickets
The Benchmarque benchmark graphic (M4 Mac mini 16GB, Dec 4, 2026) PRIMARY VISUAL

The short version

VERDICT // SUMMARY

Splitting a 1,200-ticket support inbox (~52K tokens) into fixed 20-ticket calls made Qwen3-4B-Instruct 3.4x faster (144 s vs 489 s) and cut its counting error from 317.5% to 7.0% on a 16GB M4 Mac mini. Hard-coding the split in Python outperformed letting an untrained 4B model plan its own decomposition under MIT's RLM harness (85% error on 400 tickets).

KEY NUMBERS // VERIFIED READOUT 4 METRICS AUDITED
  • Counting error cut

    317.5% to 7%

    Fixed 20-ticket chunks eliminated the single-prompt hallucination blowup on 52K tokens.

    1,200 tickets, Dec 4, 2026

  • End-to-end speedup

    3.4x faster

    144 seconds across 60 small calls versus 489 seconds in one 64K-context prompt.

    M4 Mac mini 16GB

  • RLM-27B gain

    +12.4 pts

    MIT's trained harness raised 8-benchmark accuracy from 46.1 to 58.5 (+26.9% relative).

    MIT CSAIL, Nov 2026

  • Untrained 4B planner

    85% error

    Letting an untrained 4B model plan its own split returned 14 against a true count of 95.

    400 tickets, rlms 0.1.3

Test conditions

Parameter Configuration
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, and 1,200 tickets (~4.3K, 17K, and 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 exist, and when to call the model again. Coding agents such as Claude Code and Codex are harnesses. Most follow a ReAct loop that pastes the full history back into every turn, a pattern the MIT CSAIL authors call “trajectory as a prompt.”

As a long job grows, the prompt stretches past the lengths the model handled cleanly during training and accuracy drops. Zhang, Chakraborty, and Khattab define locally in-distribution execution: even when the full task is long or novel, every individual call receives a short, familiar input. Their Recursive Language Model (RLM) harness keeps the long context in a Python variable and lets a root orchestrator write code that passes small slices to fresh sub-calls.

Verified headline numbers from the paper’s tables:

  • Length generalization: trained only on short inputs, the RLM generalized to inputs 2x to 64x longer. The 64x case is 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 gain: supervised fine-tuning (SFT, not RL) on synthetic surrogate tasks lifted Qwen3.8-27B’s average across eight hard 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 caveat: 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 the local 4B benchmark was designed

The benchmark requires an exact numerical count where semantic reading matters and naive keyword search fails: synthetic support inboxes where every line covers billing, delivery, login trouble, or a broken product. Non-billing lines deliberately include money words 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, and 1,200 tickets) across three seeds ran under three harnesses:

  1. One big prompt: the entire inbox and question in one call (the trajectory-as-a-prompt baseline).
  2. Fixed 20-ticket chunks: a five-line Python loop sends 20 lines per call, parses the partial count, and sums them. Every call stays identical in size regardless of inbox length.
  3. RLM self-planning: the open-source rlms 0.1.3 package running the same 4B model as both root orchestrator and sub-model.

Results: 20-ticket chunks vs one big prompt

Tickets Prompt size One big prompt error 20-ticket chunks error One 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 size. Error = |model count - true count| / true count.

At 100 tickets the two approaches sit close. Starting at 400 tickets, they separate cleanly: the single prompt overcounted on every seed (124, 128, and 128 against true counts of 95, 93, and 93) because reading 17K tokens at once caused the 4B model to count “card” and “charge” as billing. Seeing the same traps 20 lines at a time held error to 10.7%.

Throughput flips as well. 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 curve completely.

At 1,200 tickets (~52K tokens), the single-prompt baseline required expanding the context window to 64K and collapsed, answering 1,247, 1,124, and 1,147 against true counts of 284, 294, and 266 in roughly 489 seconds per run. Fixed 20-ticket chunks handled the same inbox in 144 seconds with 7.0% mean error. Compare small-model speeds against desktop GPUs on the Benchmarks Leaderboard or size a 32GB+ local host in the PC and Local AI Builder.

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 printed the character length, decided it fit in one sub-call, wrote brittle keyword-matching code that returned empty hits, and reported 14 against a true count of 95 (85% error). On 100 tickets it reported 20 against a true 27 after nine calls and ~25,000 tokens.

The harness exposed every Python tool required to slice, delegate, and sum, but the 4B checkpoint lacked the planning skill to use them. That matches MIT’s Qwen3-30B-A3B baseline result, where an untrained RLM trailed the plain model until the root model was trained on synthetic decomposition tasks.

Four changes for agent builders

  • Keep long inputs out of the prompt: store documents in variables or files and pass bounded slices; this pays off with zero fine-tuning.
  • Hard-code chunking until a model proves it can plan: a five-line Python loop beat autonomous planning by a wide margin on a small local model.
  • Evaluate with look-alike traps: nearly all errors came from non-billing tickets containing money words. Clean synthetic sets mask long-context decay.
  • Account for mild upward chunk bias: fixed chunks still slightly overcounted across 60 calls; add a verification pass on borderline rows when exact totals matter.

Numbers often misquoted from the MIT paper

  • “26.9% better” is relative: the absolute gain across eight long-context benchmarks is +12.4 points (46.1 to 58.5).
  • Training method split: length-generalization runs used reinforcement learning, whereas RLM-27B used supervised fine-tuning on synthetic data.
  • “64x longer” is one environment of six: MRCRv2 hit 64x while most environments spanned 2x to 16x.
  • Tail-recursion chaining: on four chained tasks, RLM-27B solved all four 55.2% of the time and jumped to 77.5% after extra tail-recursion training, whereas base Qwen3.8-27B started at 19.3% and dropped to 9.9% with the same extra training.

Limits of this local verification: it covers one 4B model, one synthetic counting task, three seeds per cell, and inference only (no fine-tuning). MIT’s experiments evaluated 27B to 30B checkpoints on real benchmarks up to 456M tokens.

Raw 18-run log

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

Measured on M4 Mac mini 16GB with Qwen3-4B-Instruct-2507 (Q4_K_M), llama.cpp, temperature 0, December 4, 2026. Check compatible Apple Silicon hardware via Mac mini M6 16GB on Amazon (paid link).

The verdict

The locally in-distribution thesis from MIT’s paper holds up cleanly on consumer hardware: splitting long workloads into bounded 20-ticket calls made a 4B model 3.4x faster and cut counting error from 317.5% to 7.0%. At the same time, the weak-model caveat is just as real: a harness cannot make an untrained small model plan. Put decomposition in application code today, and hand orchestration to a model only when it is trained for recursion or verified at larger scale.

The catch: this local benchmark covers inference only on one synthetic counting task, and summing 60 sub-calls still introduces mild upward counting drift.

Quick answers

What is a language model harness?

A harness is the wrapper code around an LLM that builds each prompt, exposes tools, and schedules sub-calls. Coding agents such as Claude Code and Codex are harnesses.

What does locally in-distribution mean?

Every individual call receives a short, familiar input the model handles reliably, even when the overall 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. An untrained 4B model could not drive it effectively in this run; MIT’s experiments used 27B to 30B checkpoints.

Can MIT’s RLM-27B weights fit on a 16GB machine?

A 4-bit 27B checkpoint takes roughly 16GB before context buffers, so comfortable local execution requires 24GB to 32GB or more of unified or GPU memory.

LIVE DESK // BENCHMARQUE TOOLS

Track live street prices in the Hardware Market, check Hot Deals, or compare configurations in the PC and Local AI Builder and Benchmarks Leaderboard.

Sources & Primary Filings

3 cited
  1. Zhang, Chakraborty, and Khattab (MIT CSAIL): Language Model Harnesses can be Compositional Generalizers (arXiv 2611.28298, Nov 20, 2026) arxiv.org
  2. Official paper repository: alexzhang13/harness-cg github.com
  3. Recursive Language Models library: alexzhang13/rlm (rlms 0.1.3) github.com

The Monday Hardware & AI Briefing

Verified street-price drops, buy-or-wait signals, and reproducible benchmark tables every Monday morning. Zero popups, one-click unsubscribe.

Reader focus

Sponsor a benchmark series or hardware briefing on The Benchmarque. View media kit and sponsorship options.