The cheat hunter: what JITEngine taught me about letting agents write fast code
Mert Cemri (@mertcemri) and his co-authors at the UC Berkeley Sky Lab posted JITEngine on Nov 4. The pitch: a coding agent builds an LLM serving engine for one model on one Mac, and it ends up faster than the general-purpose servers. Their headline is up to 2.72x the fastest alternative they tested on the same Mac. Mert's post is here and the full write-up is here.
The number that got me is the Qwen3.8-Flash-Next one, because that's a model I run. It's 104 GB. Their M4 Pro has 48 GB and they gave the engine a 40 GB budget, so less than half the model fits in memory and the rest streams off the SSD. Their engine did 32.9 tok/s for one user. slotstream, the fastest other server they measured there, did 12.1.
And they say there's no hand-written code in it. Claude Opus 5.5 agents built all six engines on top of Apple's MLX, using their SkySynth loop.
The loop is the part to copy
The speed is cool. The process is what I'd actually take home. Per the write-up, the agent works like this:
- make one change
- test it
- measure it
- keep it only if every test passes and it beats the best build so far
That's it. No big rewrite, no "trust me it's faster." One change, a gate and a number.
The auditor
Then there's a separate auditor agent whose job is to hunt for shortcuts that pass the tests without making the engine better. The post walks through a couple of examples.
On Qwen3.6, the engine's headline numbers (cache hit rate, bytes read per token) came from counters the engine printed about itself. The auditor noticed no test checked those counters, so a build could print whatever hit rate it wanted and still pass. It wrote that test. Then it wrote two dishonest engines, one that lies about its counters and one that applies fewer experts than the model asks for, and confirmed the new test catches both.
On Flint, the benchmark fed the model a fixed stream of tokens, so the engine knows every next token in advance. It could look faster by running several of them in one pass, or by skipping the output layer, since nothing gets picked from it. The run banned both and then made them checkable: a test re-runs the same tokens cold and requires the same scores bit for bit.
The authors call these "fun" reward hacking cases. Another agent caught them, not a human.
Why this one hits home
I already work this way with Claude, just at a smaller scale. My rule is that coding work gets checked by a separate model before I believe it, and reviews have to be empirical checks, not opinions. JITEngine is that rule run at full strength: the builder never grades its own homework, and the checker goes looking for the lie on purpose.
The "write a dishonest version to prove the test catches it" move is the piece I'm adding. A test that has never failed hasn't proven much.
On the model side, I ported Qwen3.8-Flash-Next to MLX this morning and it passed a smoke test on my M3 Max. I haven't run JITEngine myself, and their engines target a 24 GB M2 and a 48 GB M4 Pro, so I'm not going to guess what it does on my machine. If you have one of those Macs, the code and setup are at jitengine.ai.
Credit for the engines, the numbers and the auditor examples: Mert Cemri, Shubham Agarwal, Shu Liu, Alexander Krentsel, Sidharth Sankhe, Alexandros G. Dimakis and Ion Stoica, "Your Mac Deserves Its Own LLM Engine". Code: github.com/skydiscover-ai/jitengine.