Loading…
Topic
SGLang
6 posts about SGLang. Every summary links to the original.
- 6 posts
- 4 companies
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
Cross-request KV cache exposure in the GLM-5.3 Workers AI model, and our remediation with SGLang
On September 8, 2026, security researcher Gadi Evron reported a tenant isolation issue in the GLM-5.3 Workers AI model via HackerOne. Between August 27 and September 9, 155 responses to prompts longer than 681,280 tokens contained data from other customers’ requests; no other models were affected. The root cause was a configuration mismatch where the KV cache pool held only 681,280 tokens while the model’s context window was 1,048,576 tokens, triggering a bug in SGLang’s disaggregated prefill/decode mode. This bug left stale cache pages from rejected prompts that decode nodes used for generation. Cloudflare remediated by resizing the pool to hold about 2.04 million tokens and patching the engine to reject over-length requests before any KV transfer, with upstream fixes merged, and they plan to apply formal verification to the KV cache transfer protocol.
Announcing New vLLM and SGLang Inference Engines on TPU
Google announced new PyTorch-native backends for vLLM and SGLang inference engines on TPU, co-developed with Inferact and RadixArk. Built on TorchTPU, the engines make TPU a native PyTorch device with standard tensor management, eager execution, and torch.compile via XLA, using a platform-plugin design that reuses each framework’s worker model and scheduler. They support production workloads including agentic multi-turn, interactive low-latency, high-throughput batch, long context, disaggregated serving, and multimodal models, with custom Pallas kernels called as PyTorch custom operators. Features include automatic prefix caching, speculative decoding with MTP, EAGLE-3, DFlash, DSpark and n-gram drafters, KV cache offloading to host memory and Managed Lustre, and TPU Sync for efficient cache transfer between hosts. Both engines are running in production at Meta and preview customers, with public benchmarks showing industry-leading cost per million tokens at 2.01 cents on Ironwood TPU, and a community contribution TPU capacity pool is available for developers.
vLLM vs. SGLang: Choosing the right inference engine for your workload
Open weight models now process nearly 80% of production tokens on Vercel’s AI Gateway, up from under 10% in December 2025, and OpenRouter shows a similar climb. This surge drives teams to consider self-hosting via inference engines like vLLM and SGLang, since swapping backends usually only requires a new base URL for an OpenAI-compatible API. vLLM’s PagedAttention, introduced by UC Berkeley in 2023, splits the KV cache into fixed-size blocks to eliminate wasted contiguous memory reservation and increase GPU throughput. SGLang’s RadixAttention, from LMSYS in January 2024, stores computed KV cache in a radix tree keyed by token prefix for reuse across related requests like multi-turn chat and agents. Independent benchmarks from Modal show comparable performance on random prompts without prefix sharing, indicating that workload type and hardware should guide engine choice.
How to serve trillions of tokens for trillion-parameter coding agents
Serving inference for coding agents requires trillion-parameter sequence models like Moonshot AI’s Kimi K2.6 to process trillions of input and output tokens at extremely high relative and absolute performance. To be economically viable, these services must achieve large fractions of hardware peak performance, using contemporary matrix math accelerators like Tensor Cores at petaFLOP per second scale. Modal optimized by batching multiple sequences together, caching KV state, and patching SGLang with NVFP4 micro-scaling on Blackwell GPUs like the B200. Per-replica performance improved 2.8x per user and 5.6x across users, transforming ruinously expensive into a price-competitive service. One deployment processed hundreds of billions of tokens daily and trillions total, showing that careful engineering and benchmarking are key to scaling inference.
Achieve state-of-the-art inference latencies with speculative decoding
Modal launched Auto Endpoints, combining speculative decoding with Blackwell GPUs, SGLang engine, and Modal Servers to achieve low inference latency for production deployments. The decode phase, where each token requires a full forward pass loading model weights, is the primary latency source, making speculative decoding the most impactful optimization. Speculative decoding runs a separate DFlash speculator model in parallel with the target model using KV projections and a custom Triton kernel, achieving near-linear speedup proportional to acceptance length. In the Decagon voice case study, Modal cut 100ms from a 290ms baseline by mid-training a custom speculator on synthetic data, beating proprietary providers by 60ms. Modal plans to automate speculator training with continuous improvement on production data, moving toward autospec for Auto Endpoints.
Boosting multimodal inference performance by >10% with a single Python dictionary
Multimodal vision-language models pose new challenges for inference engines like SGLang. Profiling with py-spy revealed that the scheduler’s process_input_requests consumed about 13% of CPU time, with a quarter of that spent on repeated calls to torch.UntypedStorage._new_shared_cuda for CUDA IPC handle book-keeping. The solution was a simple Python dictionary cache for pool handles, eliminating redundant opens. On a Qwen2.5-VL-3B-Instruct benchmark with a single H100, throughput increased 16.2% from 22.2 to 25.7 requests per second, mean time-to-first-token dropped 13.2%, and mean time-per-output-token dropped 17.2%. The improvement is merged in SGLang v0.5.10 and applies to any multimodal model using SGLang’s CUDA IPC transport.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.