EngineTailor: Minimal Complete Inference Engines for Agent-Driven Optimization
Qin et al. in Inference & systems
After decode parity, can a target engine speed Qwen's short prefill?
EngineTailor: Minimal Complete Inference Engines for Agent-Driven Optimization
One target, one complete engine

EngineTailor replaces a broad serving framework with one engine per registered model, device and workload, removing unrelated features while keeping the complete target execution and verification path.
A much smaller Python surface
Rounded counts at frozen commits under the same counting rule; line counts alone do not measure agent comprehension or search efficiency.
How a small engine stays complete
- 1
Run the whole target
The model, loader, cache and runtime execute the registered workload end to end.
- 2
Expose bottlenecks
Operator and path units expose measured bottlenecks through stable contracts and quick local checks.
- 3
Keep the judge intact
A protected reference, profiler, smoke tests, target gate and full benchmark evaluate each candidate.
- 4
Bind evidence to state
Base commit, task, diff, measurements and verdict stay tied to the engine state.
Parallel proposals, serial admission

Fresh Workers propose in parallel; the protected gate tests one diff at a time. For autoregressive targets, it requires ≥98% next-token agreement under the same forced prefix, plus semantic and batched/prefix probes, before end-to-end benchmarking.
Local speed does not tell the whole story
A Pi0.5/Orin attention swap measured 1.497× locally, yet added 56.7 ms end to end.
On Qwen/SM100, RMSNorm failed a local filter but won on the full board, lowering decode from 17.96 to 13.61 ms/token.
Complete-engine admission can reject a regression and rescue a locally overlooked win.
Matched Qwen3-4B/SM100 BF16 audit: different outcomes
Same task/agent config. EngineTailor's ~$69 parity spend is excluded; post-parity short-prefill vs prior path, decode held.
Reuse the implementation, not the verdict
- 1
Advance one target
Only a protected WIN or a predeclared ENABLE that clears its contract changes the engine; STOP and REJECT do not.
- 2
Keep executable evidence
Curation stores runnable variants, verdicts, evidence and target conditions in a shared, append-only substrate.
- 3
Re-qualify elsewhere
A later target may retrieve a compatible implementation, but its own gate must admit it before adoption.
A re-qualified graph boundary lifted Qwen c16 throughput
Qwen3-4B/SM100 BF16 HTTP; c16 = 16 concurrent requests. Current A/B vs pre-admission (Appendix, Expanded per-depth deployment boards).
What this study does not establish
One matched audit
Only Qwen3-4B/SM100 compares objects under matched conditions; the audit does not isolate code-surface effects, and costs are price-indexed estimates.
Prepared starting engines
All seven starting engines were prepared with coding-agent assistance before campaigns; construction costs were not uniformly recorded.
A peer still leads
On Llama-3.1-8B/SM100's mixed/BF16 board at 16 concurrent requests, throughput was 3464.8 vs SGLang's 4171.2 tok/s.
Transfer scale is open
Seven targets span autoregressive LLM, embodied VLA and interactive world-model inference; the study does not establish how reuse scales as the substrate grows.
Why it matters
- An agent-facing engine can be small while its evidence path still covers the complete target.
- For each target, protect admission and treat reused code as a candidate, never an inherited verdict.
- Whether conditional retrieval and re-qualification remain effective as the shared substrate grows is still open.
11 slides, 3 min
1 day ago