Baseten

How we built the fastest GLM 5 API

Mar 6, 2026
How we built the fastest GLM 5 API
SummaryAI, from the source post

Introduced custom kernels for DeepSeek Sparse Attention (DSA) to optimize KV cache cost by using a lighting indexer to identify top-K tokens and perform sparse attention. Optimized the indexer code path by skipping it for sequences shorter than K and fusing operations for high-precision projections. Implemented a low-overhead MTP speculative decoding engine by running the draft and target models as one, minimizing host overhead. Optimized MoE dispatch kernels and quantized model weights to NVFP4 for Blackwell compatibility.

More from the Baseten AI Model Deployment and Serving Platform trail