Together AI builds a continual agent loop that recompiles AI inference
Models and traffic keep changing, so can inference deployment be recompiled and optimised continuously without manual work? Together AI says yes: it built an agent loop that repeatedly measures and rewrites the inference forward computation. It is up to 1.7x faster than a hand-written Megakernel, which fuses the whole forward pass into one large kernel, on Llama 1B, and up to 2.6x the throughput of the best open-source engines on Kimi K3, GLM 5.3, MiniMax M3.1 Flash and DeepSeek v4.1 Flash. At batch size 1, M3.1 Flash reaches 1111 TPS and DeepSeek v4.1 Flash reaches 1205 TPS. The key design is a layered persistent engine that separates engine startup cost from the forward computation, so the agent can measure frequently without distortion; a cost model then picks parallel configurations as the starting point for optimisation. The evidence covers several frontier models and multiple hardware types, but the comparison baselines are open-source engines the authors chose themselves, and the paper gives no reproducible independent third-party verification. The authors say it already serves trillions of tokens on production clusters, but no public data is available to check this.
The old way to optimise inference was to hand-write kernels for each model and each hardware type, getting one round of gains for one round of effort. But new models are released more and more often, architectures are more varied, and traffic patterns shift, so hand-written optimisations have a shorter and shorter half-life. Existing agent approaches are stuck on a trade-off: optimising a single kernel is fast to measure but low in fidelity, while optimising the whole engine is faithful but too slow to start each time.
If this loop can really reproduce stably across models and hardware, the tuning cost of inference deployment would shift from one engineering effort per new model to a continuously running pipeline. Teams running their own inference stacks could use this to reassess whether hand-writing kernels is still worth it.