SGLang-TorchTPU加速TPU上的Muse Spark Open
PyTorch Blog介绍了在四芯片TPU v7主机上运行Meta 8160亿参数Muse Spark Open的方法,采用基于TorchTPU后端的SGLang。该方案结合覆盖全部62层的megakernel、投机解码、分层KV缓存、融合MoE内核和序列并行;作者称单个或两个并发请求的每token解码时间减半,但并发增加后收益收窄。AgentX测量来自作者自有环境,GB200基线则取自InferenceX此前公布的结果。
文章以详细测量展示了融合内核和TPU专用服务技术如何提升大型开放权重MoE模型的推理性能。
TL;DR
We serve Meta’s Muse Spark Open, an 816B-parameter mixture-of-experts model, on a single TPU v7 host of four chips, with SGLang running on the TorchTPU PyTorch backend. At the center is a megakernel: all 62 layers of a decode or verify step run as one Pallas program, and every weight load, KV read and cross-device transfer is pipelined behind compute. The rest of the work falls into three groups: faster decode steps (collective folding, a max-free attention loop that pipelines its KV chunks, an expert loop that keeps register spills off its common path, and DFlash2 speculative decoding), more KV cache per chip (sequence-on-lane KV layout in the megakernel, and L2 HiCache on TPU with session-aware eviction), and faster prefill (a fused MoE kernel and sequence parallelism).
- Decode speed. The megakernel halves the time per output token for one or two concurrent requests, where it helps the most; the gain narrows as concurrency grows. Its verify step runs within 1.5–1.7× of the time it takes just to stream its weights from HBM.
- AgentX. On the 1M-context version of SemiAnalysis’s agentic-coding benchmark, our curve runs from 433 output tokens/s per request at 6,101 tokens/s per chip to 25,906 tokens/s per chip at 95 tokens/s per request (Figure 1).
#Meta#Muse Spark Open#SGLang-TorchTPU#Google TPU v7#PyTorch#Pallas#InferenceX AgentX