Skip to main content

4 posts tagged with "Agentic Inference"

Inference serving and optimization for agentic workloads

View All Tags

MoRI in llm-d: P/D Disaggregation and Expert Parallelism for Long Context with GLM-5.3 on MI355X

· 24 min read

Serving a large mixture-of-experts (MoE) model with llm-d moves two kinds of data between GPUs. With prefill/decode disaggregation (P/D), the KV cache that prefill computes has to reach the decode GPUs. With expert parallelism, every MoE layer sends tokens to the GPUs that hold their experts and gathers the results. We wanted AMD users of llm-d to carry both through the AMD communication library MoRI (Modular RDMA Interface), straight from stock llm-d and vLLM.

We wired MoRI upstream into the llm-d routing sidecar and vLLM's KV connector and expert-parallel backend. We then ran amd/GLM-5.3-Quark-MXFP4-AttnFP8, a MoE model, at 128k–512k context on AMD Instinct™ MI355X GPUs. The first half of this post covers the stack; the second covers the case study: where P/D helped and what it cost.

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 Moonshot AI's Kimi K3.1 Pro with llm-d across TPUs and GPUs

· 9 min read
Keelin McDonell
Keelin McDonell
Product Manager, Google
Ashok Chandrasekar
Ashok Chandrasekar
Staff Software Engineer, Google
Anish Shah
Anish Shah
Software Engineer, Google
Joey Wang
Joey Wang
Software Engineer, Google
Syeda Anjum
Syeda Anjum
Cloud Solution Architect, Google
Gopala Suryanarayana
Gopala Suryanarayana
Product Manager, Google
Newton Jain
Newton Jain
Product Manager, Google
Christopher Pirillo
Christopher Pirillo
Staff Software Engineer, Google
Inferact Team
Inferact Team
RadixArk Team
RadixArk Team

Running multi-trillion-parameter Mixture-of-Experts (MoE) models in production shifts the primary engineering bottleneck from model weights to distributed systems orchestration. With Moonshot AI's Kimi K3.1 Pro (moonshotai/Kimi-K3.1-Pro), infrastructure engineers must accommodate a ~2.8-trillion-parameter footprint (~104B active parameters per token across 896 routed experts), a 1M-token context window, and a hybrid 93-layer attention stack (69 Kimi Delta Attention layers paired with 24 Gated Multi-head Latent Attention layers).

At this footprint, the model weights alone surpass the High-Bandwidth Memory (HBM) capacity of any single machine, requiring multi-node Tensor and Expert Parallelism across high-bandwidth interconnects. Compounding the hardware footprint, long-horizon agentic sessions expose the limits of stateless Kubernetes load balancing: 1M-token KV caches rapidly exhaust accelerator HBM, uncoordinated routing forces replicas to recompute identical multi-turn prefixes, and compute-heavy prefill bursts stall ongoing token generation.

To eliminate these bottlenecks at launch, we worked with Inferact (vLLM) and RadixArk (SGLang) to deliver Day-0 distributed serving recipes on llm-d. Running llm-d as a unified, Kubernetes-native inference control plane, the same stack serves Kimi K3.1 Pro across both TPUs (Ironwood TPU v7x) and NVIDIA GPUs (GB300 NVL72), here on Google Cloud (A4X-Max). Because the control plane is accelerator- and cloud-independent, platform teams gain a portable serving stack that handles state-aware KV routing, hierarchical memory offloading, and prefill/decode disaggregation out of the box.

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.