How to serve trillions of tokens for trillion-parameter coding agents
Modal describes how it serves Moonshot AI's trillion-parameter Kimi K2.6 model for coding-agent traffic at trillions of tokens. In that workload, requests average about 100k input to 500 output tokens with heavy prefix overlap across session turns. Their approach was to optimize a single replica first, raising interactivity and then throughput, and to scale out afterward. The changes included NVFP4 quantization on B200/B300 GPUs, tensor parallelism within 8-GPU NVLink domains, DFlash speculative decoding, freeing and quantizing HBM intermediates, and extending the KV cache into CPU RAM with SGLang HiCache. Together they improved per-replica performance 2.8x per user and 5.6x across users, and the post argues that small 8-GPU replicas match larger NVL72 deployments on per-GPU throughput while being far easier to schedule.
Related posts
- Benchmarking inference at scale: coding agents
Together AI hardMasterOn 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. It holds p50 TTFT at 0.71s, versus 1.1s for TensorRT-LLM and 5.1s for SGLang, which needed 8 GPUs instead of 4 due to EAGLE memory overhead. The gains are attributed to ThunderMLA, a fused megakernel for Multi-head Latent Attention reported as 20–35% faster than FlashMLA, plus custom kernels found through end-to-end profiling. The post argues that prefill-heavy, concurrent long-context load and TTFT under saturation matter more than single-user benchmarks, and closes with vendor cost comparisons against Claude Opus.
- How a global fintech scaled coding agent traffic with Dedicated Model Inference
Together AI mediumAdeptA global fintech serves its internal coding-agent traffic on GLM 5.2 via Together's Dedicated Model Inference, where spiky, engineering-hours load with long prompts (ISL p50/p95 of roughly 81K/178K tokens) at low RPS made concurrency, not throughput, the design priority. The production endpoint runs 14 replicas of 4 B200s at 256K context. The team turned down a 1M-context configuration because it would have cut concurrency headroom. When a reshape toward fewer, larger replicas saturated prefill and caused 1–3 minute queuing, metrics tracing showed a request stuck behind a 2.3M-token prefill backlog. It was fixed same day, with no downtime, by restoring cache-session-aware routing and raising max-inflight-per-worker. Self-serve scaling, custom-weight rollouts and blue/green testing removed the ticket-based capacity process.
- Launching a trillion-parameter model at Sakana AI
Modal hardMaster
Modal served Sakana Namazu, a ~1T-parameter Japanese-focused MoE model, by quantizing only the routed experts to NVFP4. Attention, the router and shared experts stayed in BF16, and calibration data was weighted toward Japanese, which kept instruction-following quality within benchmark noise. A custom DFlash speculative draft model trained on raw production token IDs rather than re-tokenized text raised acceptance 25%, cut per-token decode latency ~35%, and a second DFlash2 drafter trained on 1M real requests lifted average acceptance length from 3.51 to 5.01. Further gains came from removing a CPU–GPU sync stall in the speculative loop, faster NVFP4 MoE kernels, making token acceptance a single shared decision across tensor-parallel ranks, grammar-constrained speculation for JSON output, and a KV-aware prefix-caching router that eliminated multi-minute TTFT spikes.
- Kimi K3 by Moonshot now available on Modal
Modal easyNovice
Moonshot's Kimi K3, a 2.8T-parameter mixture-of-experts multimodal model with a 1M token context window, is available on Modal from release day via an OpenAI-compatible Shared API and dedicated Auto Endpoints. K3 activates 16 of 896 experts per token, uses Kimi Delta Attention and Attention Residuals, and was quantization-aware trained with MXFP4 weights and MXFP8 activations. Moonshot also contributed a new prefix-caching implementation to vLLM because KDA broke conventional prefix caching. Modal trained a custom DFlash speculator for K3 on 32 B300 nodes, raising decode speed from 100 to 460 tokens per second and per-GPU throughput from 800k to 1.5M TPM on agentic workloads.
- Key research and product announcements at the AI Native Conf
Together AI hardMasterTogether AI announced seven research and product releases spanning GPU kernels, reinforcement learning infrastructure and inference optimization. FlashAttention-4 targets NVIDIA Blackwell and is reported 2.7x faster than Triton and 1.3x faster than cuDNN 9.13. A single-kernel Megakernel cut a voice agent's time-to-first-64-tokens from 281ms to 77ms, and together.compile beats torch.compile by 41% on a Flux Kontext benchmark. ThunderAgent schedules whole agentic workflows to avoid KV cache thrashing and leaked tool sandboxes, ATLAS-2 retrains speculative decoders online from live traffic, and cache-aware prefill-decode disaggregation sends warm and cold requests to separate tiers over an RDMA KV cache for 35-40% higher QPS.