Launching a trillion-parameter model at Sakana AI
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.
Related posts
- Achieve state-of-the-art inference latencies with speculative decoding
Modal hardMaster
Speculative decoding is the dominant lever for low-latency LLM serving because decode steps dominate latency and speculation yields multiplicative speedups roughly linear in acceptance length. Working with Decagon's voice agents, Modal combined regional serving, SGLang host-overhead fixes, and open-source kernels with DFlash draft models that reuse target-model KV projections and draft tokens in parallel. Fine-tuning ("mid-training") the speculator on synthetic data generated by the target model from public prompts in the task's output grammar avoids exposing user data. The custom speculator cut about 100ms from a ~290ms p50 baseline, roughly 40% of server-side decode latency, and beat proprietary providers by over 60ms. Out-of-distribution evaluation was used to guard against overfitting.
- Speculation Is All You Need
Modal hardMaster
Speculative decoding delivers integral-factor (2-3x+) LLM decode speedups, far beyond the few-percent gains from kernel or host-side optimization, and its benefit scales roughly linearly with acceptance length. Modal and Z Lab release DFlash speculators for several Qwen 3.5/3.6 models that add 5-20% over existing DFlash baselines, reaching over 1000 tok/s for Qwen 3.5 122B-A10B at concurrency 1 on a B200 node. Mocking acceptance in SGLang via SGLANG_SIMULATE_ACC_LEN shows Qwen 3.5 27B speeding up 5.62x at acceptance length 8, and a toy model plus a roofline model explain why speedup tracks acceptance length and where drafting overhead erodes it. Training custom speculators on application data is framed as easy-mode ML: fine-tuning has lifted acceptance length from 3 to over 9.
- How to serve trillions of tokens for trillion-parameter coding agents
Modal hardMaster
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.
- Making FlashAttention-4 faster for inference
Modal hardMaster
Modal engineers extended the FlashAttention-4 kernel for decode-heavy LLM inference on Blackwell GPUs through two kinds of change: new parallelism strategies, such as split-KV parallelism across the key/value dimension, and support for irregular memory access via cp.async in place of TMA bulk loads. FP8 inputs gave up to 1.16x throughput over bf16, likely limited by the softmax, which still runs at higher precision. Arbitrary KV page sizes help prefix sharing, reduce fragmentation and suit speculative decoding, and a transposed warp-level address-generation scheme made them up to 2.4x faster. Split-KV raised small-query memory throughput by up to 4.37x, keeping SMs busy that the original query-parallel design left idle.
- Up to 3.2x Faster Inference with LFM2.5-DSpark
Hugging Face mediumAdeptLiquid AI releases ~300M-parameter DSpark speculative-decoding draft models for LFM2.5-1.2B-Instruct, LFM2.5-2.6B and LFM2.5-8B-A1B. DSpark combines a DFlash-style parallel drafting backbone, a Markov-chain sequential head and a confidence-scheduled verifier, and greedy output stays identical to the target model. Benchmarks at batch size 1 show up to 3.18x throughput on an H100 with SGLang and up to 2.87x on an M4 Max with llama.cpp/Metal, plus a 57% average cut in function-calling latency for the 2.6B model. The MoE model gains only about 18% on-device because llama.cpp's Metal MoE path is immature and verifying multiple tokens activates more experts. Launch commands for SGLang and llama.cpp are included.