# EngineTailor: Minimal Complete Inference Engines for Agent-Driven Optimization

> EngineTailor gives agents a minimal but complete engine for one target; protected correctness and end-to-end checks govern admission. In a matched Qwen3-4B/SM100 BF16 audit, its post-parity window delivered 3.10–4.05× short-prefill gains vs its prior path; decode was preserved.

- arXiv: https://arxiv.org/abs/2611.37129
- Authors: Haiyan Qin, Rui Wan, Jinchen Han, Shulin Zeng, Guohao Dai, Yu Wang, Wang Kang
- Published: 2026-12-01
- Topic: Inference & systems
- Visual carousel: https://instaxiv.com/p/2611.37129
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## After decode parity, can a target engine speed Qwen's short prefill?

**3.10–4.05×** Qwen3-4B/SM100 BF16 short-prefill vs prior path

## One target, one complete engine

![Figure 1](https://cdn.instaxiv.com/figures/2611.37129/figure1.webp)

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. (Figure 1)

## A much smaller Python surface

| Method | Files | Python lines |
| --- | --- | --- |
| SGLang / runtime | 1.0K | 416K |
| vLLM / package | 1.8K | 684K |
| **EngineTailor / initial Qwen** | **28** | **3.3K** |

_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

![Figure 2](https://cdn.instaxiv.com/figures/2611.37129/figure2.webp)

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. (Figure 2)

## Local speed does not tell the whole story

**Local evidence:** A Pi0.5/Orin attention swap measured 1.497× locally, yet added 56.7 ms end to end.

**Full-board outcomes:** 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

| Method | Approx. spend | Short-prefill result |
| --- | --- | --- |
| SGLang, five attempts | ≈$81.39 | No admitted gain |
| **EngineTailor, post-parity** | **≈$81** | **3.10–4.05×** |

_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

| Method | c16 throughput, tok/s |
| --- | --- |
| Pre-admission | 3078.559 |
| **EngineTailor current (+51.2%)** | **4654.812** |

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

Best used when: Useful for a registered target with protected correctness checks and a benchmark covering its complete workload.

## Key takeaways

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

## Links

- arXiv: https://arxiv.org/abs/2611.37129
- PDF: https://arxiv.org/pdf/2611.37129
- Code: https://github.com/qhy991/EngineTailor

## Citation

```bibtex
@article{qin2026enginetailor,
  title   = {EngineTailor: Minimal Complete Inference Engines for Agent-Driven Optimization},
  author  = {Qin, Haiyan and Wan, Rui and Han, Jinchen and Zeng, Shulin and Dai, Guohao and Wang, Yu and Kang, Wang},
  journal = {arXiv preprint arXiv:2611.37129},
  year    = {2026},
  url     = {https://arxiv.org/abs/2611.37129}
}
```
