---
title: "Together Compiler: Continual Compilation for AI inference"
description: "Together Compiler (TKCC) is an agent-driven continual optimization loop that recompiles inference engines as model, hardware and traffic shape drift."
url: "https://swe.quest/articles/together-compiler-continual-compilation-for-ai-inference-d1283db901cce6b0"
canonical: "https://www.together.ai/blog/together-compiler-continual-compilation-for-ai-inference"
source: "Together AI"
published: "2026-11-04"
difficulty: "hard"
kind: "Research"
reading_minutes: 6
tags: ["inference","compilers","ai-agents","performance"]
---

# Together Compiler: Continual Compilation for AI inference

A post on [Together AI](https://swe.quest/sources/together.md), published 2026-11-04, 6 min read, Research. Original: [https://www.together.ai/blog/together-compiler-continual-compilation-for-ai-inference](https://www.together.ai/blog/together-compiler-continual-compilation-for-ai-inference)

## Summary

Together Compiler (TKCC) is an agent-driven continual optimization loop that recompiles inference engines as model, hardware and traffic shape drift. It avoids repeated engine restarts by using persistent engines that hot-reload candidate forward passes, cutting time-to-serving from 467s to 9s and raising experiment throughput 252x. A two-tier setup pairs fast few-layer engines for low-variance timing with slower many-layer engines that check results on real data distributions, which matters for MoE and sparse attention. A cost model combining hardware specs, microbenchmarks and measured forward passes picks the parallelism strategy, and the system reports up to 2.6x higher TPS on InferenceX AgentX, 1.7x over open-source megakernels on Llama 1B at batch size 1, and gains on non-LLM workloads.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- LLM inference serving ([easy posts on Inference & serving](https://swe.quest/tags/inference.md?difficulty=easy))
- GPU kernels and CUDA graphs ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- tensor and expert parallelism ([easy posts on Concurrency](https://swe.quest/tags/concurrency.md?difficulty=easy))
- Mixture-of-Experts models

## Keywords

Together Compiler, TKCC, InferenceX, SemiAnalysis AgentX, vLLM, SGLang, TRT-LLM, megakernels

## Related posts

- [Together AI at ICML 2026: frontier research across the full stack](https://swe.quest/articles/together-ai-at-icml-2026-frontier-research-across-the-full-stack-7ba2ab06914581c4.md): Together AI · 2026-06-30 · Hard · 10 min read · Inference & serving, Model training, LLMs, AI agents, Evaluation
  Together AI's nine ICML 2026 papers span the AI stack from agents to GPU kernels, each with a headline result.
- [Benchmarking inference at scale: coding agents](https://swe.quest/articles/benchmarking-inference-at-scale-coding-agents-f8c09180ef476b13.md): Together AI · 2026-05-19 · Hard · 6 min read · Inference & serving, Performance engineering, LLMs, AI for coding
  On a long-context, high-concurrency coding agent workload (prompts ~45k–200k tokens, ~450-token outputs, EAGLE speculative decoding) running Kimi K2.5 on B200 GPUs, Together Inference Engine delivers 31% more per-user TPS than TensorRT-LLM at 2.5M TPM.
- [Key research and product announcements at the AI Native Conf](https://swe.quest/articles/key-research-and-product-announcements-at-the-ai-native-conf-07f3b657efde83f0.md): Together AI · 2026-03-05 · Hard · 7 min read · Inference & serving, Hardware, Model training, AI agents, Performance engineering
  Together AI announced seven research and product releases spanning GPU kernels, reinforcement learning infrastructure and inference optimization.
- [The science behind TorchNeuron, Amazon’s new PyTorch backend for AWS Trainium chips](https://swe.quest/articles/the-science-behind-torchneuron-amazon-s-new-pytorch-backend-for-aws-trainium-c2048563f9b5b6ed.md): Amazon Science · 2026-10-22 · Medium · 5 min read · Compilers, Hardware, Testing, Model training, Python
  TorchNeuron is an open-source PyTorch backend that runs existing PyTorch code on AWS Trainium with little or no change.
- [Last year we built megakernels. This year we deleted them: The road to Together Compiler](https://swe.quest/articles/last-year-we-built-megakernels-this-year-we-deleted-them-the-road-to-together-8e97dcf4bda731c8.md): Together AI · 2026-11-16 · Hard · 28 min read · Compilers, Inference & serving, Performance engineering, Hardware
  Megakernels for Llama 1B hit 990 TPS on H100 but were too inflexible to productionize, supporting only one model, batch size and precision.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
