AI generated

Confident
Model stylome-1.2-large
stylo.me/630491b02c473346

I ran three frontier local open-weight models inside real multi-turn terminal coding agents (Pi 1.6.1, OpenCode 2.0.25, and DeepSeek Harness 0.2.2-rc.5) on a Mac Studio M5 Ultra 512 GB (oMLX 0.8.4 and llama.cpp b12774), working across eight multi-file Python & TypeScript tasks inside a network-isolated Linux sandbox - scaling from ~128K all the way up to exact 384K (393,216) and 512K (524,288) starting tokens with zero cached tokens at start.

Every clean solve had to exit cleanly and pass visible tests, held-out grading tests, and task-specific lint/type checks.

Model in Pi 384K solves / median 512K solves / median 512K cold TTFT 512K cached TTFT 512K warm decode (MTP)
DeepSeek V4.1 Flash (oMLX 0.8.4 + MTP) 8/8 · 6m 33s 8/8 · 8m 30s 5m 56s 7.5s 98.9 tok/s
GLM 5.3 Flash (llama.cpp b12774 + MTP) 7/8 · 16m 54s 6/8 · 21m 51s 19m 52s 9.6s 47.1 tok/s
Muse Spark Open 816B (oMLX 0.8.4, no MTP) 6/8 · 28m 14s 7/8 · 39m 15s 21m 27s 21.0s 12.3 tok/s

Five engineering takeaways from 64 graded long-context Pi sessions + 15 controlled ladders:

  1. Doubling decode speed with Native MTP only saved 7-16% of real agent wall time: At 512K, MTP roughly doubled warm decode on DeepSeek (45.2 -> 98.9 tok/s) and GLM (23.0 -> 47.1 tok/s). Yet total matched session wall time fell only 16.0% (original) / 7.7% (512K) on DeepSeek and 7.4% / 2.4% on GLM. Actual wall-minute breakdown explains why: reading context took 45% of DeepSeek's wall time and 76% of GLM's.
  2. One-line OpenCode config fix saved 2-4 minutes per local task: By default, OpenCode sent a background session-title request carrying the entire 100.5K-155.5K initial prompt just to generate <=15 tokens (280.4s summed prefill across 4 DeepSeek tasks, 995.7s across 4 GLM tasks). Setting {"agents": {"title": {"disabled": true}}} cut median wall time from 4.8m -> 3.0m on DeepSeek (7/8, 3.1m across all 8 tasks) and 9.1m -> 5.2m on GLM. Matched 8-task DeepSeek comparison: Pi 8/8 (2.8m), tuned OpenCode 7/8 (3.1m), DeepSeek Harness 7/8 (3.8m, zero tool errors).
  3. Cold prefill hurts once; >99% prefix caching makes follow-ups fast: Once warmed, 512K follow-ups dropped from 6-21 minutes to 7.5s-21.0s. Prompts grew up to 582,983 tokens with zero automatic compactions across all 64 Pi runs and 100% Normal macOS memory pressure (9,002 samples, zero swap growth).
  4. Two subtle failure modes to watch:
    • Manual compaction pause: Triggering Pi compaction on GLM at 301,640 estimated tokens took 10m 6s for the summary call plus 81s for the uncached 39,067-token continuation before recovering cache.
    • SSD prefix-cache chain eviction on Muse: Each serialized 2,048-token boundary page carried ~496 MiB of rotating-window state; a 64 GiB SSD cache evicted the prefix chain at ~270K tokens (473-504s cold re-prefills). Raising the SSD cache to 128 GiB (256K) and 192 GiB (384K-512K) restored 98.4-99.3% cache hits.
  5. Repeatability, effort & parallel agents (original contexts, aggressive guard): DeepSeek + Pi solved 8/8 across 3 seeds (42/43/44) and across Low (2.1m), High (3.4m), and Max (4.6m) effort. Two staggered agents solved 2/2 in 5m 9s, while 3- and 4-agent groups each missed one task (2/3, 3/4).

Open MIT codebase fixture, held-out grading suite, exact flags & 38 evidence files (CC BY 4.0):
https://github.com/l8w8/videos/tree/main/2026/003-m5-ultra-coding-agents-512k

Short engineering write-up: https://l8w8.github.io/videos/local-coding-agents-512k-prefill-trap/
9-minute video walkthrough: https://youtu.be/Mr9sj51ccoE