Skip to main content

2 posts tagged with "GLM-5.2"

Serving and optimization for GLM-5.2

View All Tags

Bringing First-Class SGLang Serving to llm-d

· 12 min read
Yuchen Tian
Software Engineer, Google
Sage Ahrac
Research Engineer, IBM Research
Nishtha Jain
Software Engineering Manager, Google
Bob Tian
Software Engineer, Google
Shangming Cai
Core Maintainer, SGLang
Rain Jiang
Core Maintainer, SGLang
Abdullah Gharaibeh
Senior Staff Software Engineer, Google

In Serving GLM-5.2 for Agentic Workloads on llm-d, we showed how llm-d serves long-context coding agents on NVIDIA H200 GPUs with vLLM—combining disaggregated prefill and decode pools, wide expert parallelism, prefix- and load-aware routing, and tiered KV caching. Since then, contributors from the llm-d and SGLang communities have made SGLang a first-class, Kubernetes-native inference engine in llm-d's GLM-5.2 well-lit path, the project's tested reference deployment. We also measured SGLang's multi-tier KV cache on single-replica and multi-replica clusters. This post tells that story in three parts:

  1. Engine-agnostic llm-d architecture: how llm-d decouples Kubernetes workload orchestration, prefix-affinity routing, and disaggregated serving from individual model servers so vLLM and SGLang share a common operational model.
  2. First-class SGLang integration: how the SGLang and llm-d communities adapted SGLang's Wide-EP runtime to work natively with llm-d's Kubernetes routing and disaggregated serving.
  3. Tiered KV-cache offloading: how pairing SGLang's hierarchical KV cache with llm-d's prefix-aware routing and Kubernetes failover keeps long agent sessions cached across host RAM and shared storage—surviving high concurrency, pod evictions, and cold restarts.

Serving GLM-5.2 for Agentic Workloads on llm-d

· 30 min read
Maroon Ayoub
Senior Principal Machine Learning Engineer, Red Hat
Yuchen Fama
Senior Principal Product Manager, Inference, Red Hat
Elvir Crncevic
Machine Learning Engineer (vLLM), Red Hat
Tyler Smith
Chief Architect, Inference Engineering, Red Hat
Raj Joshi
Senior Machine Learning Engineer, Red Hat
Carlos Costa
Distinguished Engineer, IBM

llm-d's well-lit paths are tested, benchmarked recipes for serving large language models in production. The agentic-serving path starts with the workload and combines the capabilities it needs into a deployment for each accelerator. This post applies that pattern to GLM-5.2-FP8 on H200, using the 219 production Claude Code sessions in SemiAnalysis's Weka trace corpus.

GLM-5.2 is a 744B-parameter (39B active) mixture-of-experts model with 78 layers. Its Multi-head Latent Attention (MLA) stores one compressed latent instead of separate KV heads, so tensor parallelism cannot shard it: TP=8 keeps eight copies of the KV cache. Tensor-parallel all-reduce is also expensive across nodes: every layer performs the column-parallel, row-parallel, and all-reduce sequence twice. llm-d's Wide-EP path avoids both costs with data-parallel attention and expert-parallel MoE, making the KV budget viable for long-context agentic serving.

At a measured output rate of roughly 37-41 tokens per second per user, a 64-GPU llm-d deployment works out to $0.05 per million input tokens and $3.55 per million output tokens at an H200 rental rate of $2.71 per GPU-hour. Z.ai's public GLM-5.2 row lists $1.40 input and $4.40 output; Claude Opus 4.8 lists $5 input and $25 output. These figures assume sustained load and assign prefill rental to input and decode rental to output.