# Together Compiler

> Source: https://aiwiki.ai/wiki/together_compiler
> Updated: 2026-11-30
> Categories: AI Inference
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) - attribute to "AI Wiki (aiwiki.ai)"
> Cite as: AI Wiki. "Together Compiler." aiwiki.ai, 30 Nov 2026. https://aiwiki.ai/wiki/together_compiler
> From AI Wiki (https://aiwiki.ai), the free encyclopedia of artificial intelligence. Reuse freely with attribution.

**Together Compiler** (TKCC) is a system from [Together AI](https://aiwiki.ai/wiki/together_ai) that uses coding agents to speed up model [inference](https://aiwiki.ai/wiki/inference). It optimizes the forward pass, the computation the serving engine runs on a model's inputs. The agents start with a particular engine, hardware configuration and traffic profile, change the implementation, and time it on that workload. Together announced the system on November 4, 2026. The company said it was using TKCC on some of its serverless endpoints and offering customers access in a limited beta.[1][2][3]

## How the compiler searches

The cost model narrows the set of configurations to try. For example, a deployment can divide individual tensor operations among accelerators using [tensor parallelism](https://aiwiki.ai/wiki/tensor_parallelism), or distribute the experts of a [mixture-of-experts model](https://aiwiki.ai/wiki/mixture_of_experts) using [expert parallelism](https://aiwiki.ai/wiki/expert_parallelism). The choice depends partly on how many requests the server handles at once. Coding agents can then rewrite the forward pass, combine operations into a single kernel, or remove work the engine was doing unnecessarily.[2]

A running engine can load a changed forward pass without reloading all the model weights. A fast test using a subset of layers screens candidate changes. A slower test with more layers measures promising candidates under conditions closer to the target deployment. In the authors' MiniMax M3.1 Flash experiment with [TensorRT-LLM](https://aiwiki.ai/wiki/tensorrt_llm), the two tiers had these characteristics.[2]

| Measurement | Fast tier | Slow tier |
|---|---:|---:|
| Model layers served | 12 | 60 |
| Time to reload a changed forward pass | 17 seconds | 45 seconds |
| Median time to complete a test job | 28 seconds | 64 seconds |

Input values can change which implementation wins. Together described a kernel that selected the highest attention scores by first sorting candidates into bins. It took 20 microseconds with random inputs. Real model inputs contained many exact zeros, crowding one bin and increasing the runtime to 62 milliseconds. An isolated test on random data would have favored the wrong implementation.[4]

## Benchmarks and limits

The authors evaluated NVIDIA and AMD deployments using the AgentX workload from [InferenceX](https://aiwiki.ai/wiki/inferencex), which replays multi-turn coding-agent traces. They compared each deployment with the leading configuration for the same hardware, model and request concurrency as of October 27, 2026. The [vLLM](https://aiwiki.ai/wiki/vllm) and [SGLang](https://aiwiki.ai/wiki/sglang) experiments were among these comparisons. A separate Trainium2 evaluation used synthetic multi-turn traffic with shorter contexts.[2][5]

On the NVIDIA B200 at batch size one, the authors reported 1,111 tokens per second for MiniMax M3.1 Flash, against 633 for the best published configuration they compared. TKCC chose eight-way tensor parallelism for its optimized implementation. Switching the original engine from four-way to eight-way parallelism by itself gave about the original speed. The gains could also reverse with load. On Kimi K3, one change to the experts' output projection improved performance by 2.8% to 5% at tested concurrency levels from 22 to 78, but slowed it by 6.6% at concurrency eight.[2]

## References

1. Reyna Abhyankar, Dylan Lim and Simran Arora. [Together Compiler: Continual Compilation for AI inference](https://www.together.ai/blog/together-compiler-continual-compilation-for-ai-inference). Together AI, November 4, 2026.
2. Reyna Abhyankar et al. [Together Compiler: Continual Compilation for AI Inference](https://arxiv.org/html/2611.14681v1). November 10, 2026. Sections 4 and 5, table 1 and appendix A.
3. Together AI. [Polymorphic Inference: self-tuning inference for open models](https://www.together.ai/blog/polymorphic-inference). November 4, 2026.
4. Together AI. [Last year we built megakernels. This year we deleted them: The road to Together Compiler](https://www.together.ai/blog/road-to-together-compiler). November 16, 2026.
5. SemiAnalysis. [InferenceX AgentX benchmark documentation](https://github.com/SemiAnalysisAI/agentx-harness/blob/master/docs/tutorials/agentx-mvp.md).
