← All AI Engineer talks

AI Engineer World's Fair 2026

KV Cache-Aware Routing and P/D Disaggregation on Kubernetes — Yuchen Fama & Ashish Kamra, Red Hat

Read the talk

Cache Locality and Phase Separation for Agentic Inference

Yuchen Fama and Ashish Kamra explain how llm-d routes requests toward reusable KV state, separates prefill from decode, and tunes both around workload shape, streaming latency, and network capacity.

From a talk by Yuchen Fama and Ashish Kamra

At a glance

Ideas worth remembering

  • Agentic capacity planning needs distributions and cache-reuse measurements: the reported traces reach 3,000 turns, exceed 90% cache hits, and can have input-to-output ratios above 100:1.

  • Cache-aware routing balances reusable prefixes against pod load. The demo’s roughly three-second cold requests and one-second cache-reusing turns illustrate the mechanism, while the aggregated benchmark shows routing can help without separating prefill and decode.

  • Disaggregation isolates compute-intensive prefill from latency-sensitive decode, but introduces a network cache transfer. The reported P99 inter-token latency improvement from roughly 900 to 100 milliseconds is an experimental result, not a universal guarantee.

  • Choose worker separation around workload shape, concurrency, streaming targets, and network capacity. The speakers favor aggregated serving when the fabric cannot support the required KV transfers, and recommend adapting prefill/decode pool ratios as traffic changes.

  • The ongoing GLM 5.2 H200 case study applies independent prefill scaling to a prefill-heavy agentic workload. Its modular worker pools let prefill capacity grow without reconfiguring decode.

Why steady-state benchmarks miss agentic behavior

Agentic inference puts pressure on serving systems that an isolated, steady-state benchmark can conceal. Multi-turn interactions repeatedly revisit earlier context, while prompt sizes fluctuate substantially. Ashish Kamra opens by framing two techniques around that operational reality: KV cache-aware routing and prefill/decode disaggregation. The question is how a deployment behaves as conversations evolve, beyond the throughput it achieves in a sanitized run.

The presentation moves from workload characteristics to cache management, then to the mechanics and measured effects of separating prefill from decode, and finally to an ongoing GLM 5.2 case study. Red Hat places this work within a broader open-source inference effort covering distributed serving, benchmarking, model quantization, and speculative decoding. These are related layers of the serving stack: routing and orchestration must work with the model execution engine to improve the experience of an interactive workload.

0:300:32
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:12 · section reference included

Long sessions, repeated prefixes, and uneven demand

Yuchen Fama describes observed agentic sessions ranging from a few turns to 3,000. Agents repeatedly reuse system prompts and tool definitions, producing cache hit rates often well above 90%. Input-to-output token ratios can exceed 100:1. Together, these observations describe workloads that repeatedly bring substantial context to the model while asking it to generate comparatively little new text.

The variability matters as much as the large values. Fama argues that capacity planning needs distributions and P90 measurements because an average context size hides the demand imposed by longer interactions. Subagent activity further complicates scheduling. To help study these patterns, Red Hat collaborated with Google and IBM on a trace replay tool in inference-perf, allowing workload behavior to inform serving experiments.

3:253:29
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:25 · section reference included

Route toward reusable state while accounting for load

Interactive latency becomes a central objective when clients determine the structure of a changing prompt. The serving system must accommodate frequent cache evictions and rewrites, and coordinate engine behavior with higher-level scheduling. Prefix routing is one such coordination mechanism: the scheduler considers where useful context already exists when deciding where to send a request.

This also changes what operators should measure. Fama calls for cached throughput to be measured separately, illustrating the economic stakes with an Anthropic API pricing example showing a 10× difference between cached and uncached tokens. That is a pricing example presented in the talk, rather than a measured 10× reduction in the infrastructure cost of every deployment. Its practical lesson is that an aggregate token count can obscure how much work benefits from reuse.

In llm-d, endpoint picker plugins score candidate pods using both cache locality and load. The picker continually probes pod metrics such as running requests, waiting requests, KV cache utilization, and prefix cache availability. Its objective combines a low load with a high likelihood of a cache hit. Cache affinity therefore participates in a scheduling decision alongside queue pressure; a matching prefix is only part of the evidence used to select a destination.

Routing depends on the cache remaining available. Fama describes ongoing cache-management efforts spanning hot, warm, and cold state, including NVMe SSD offload, filesystem storage, and KV-oriented stores such as Mooncake. Priority-based eviction and session pinning aim to preserve important context where and when a session needs it. These mechanisms address the lifetime of cached state, complementing the router’s decision about which pod should receive the next request.

5:065:09
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:01 · section reference included

The routing demonstration: three seconds, then one

The demonstration begins with a request that populates the KV cache and takes roughly three seconds. Because it is the first turn, there is no cache hit. A second turn retains the same system prompt, reaches the same pod address, and reuses the cached state. This request takes about one second. The observed improvement illustrates the value of keeping repeated context near the worker that already processed it.

A new request with a different system prompt reaches a different pod, has no cache hit, and again takes about three seconds. Keeping that system prompt while changing only the user prompt restores reuse on the following turn, which takes roughly one second. The example connects the reusable prompt prefix to routing behavior; it does not establish a universal threefold speedup for all requests.

Fama positions cache-aware routing primarily as a way to improve time to first token, or TTFT, with throughput benefits as well. Interactive generation also depends on inter-token latency: how long the user waits between successive output tokens. Improving the beginning of a response does not by itself ensure a smooth stream. That second latency problem motivates prefill/decode disaggregation.

7:417:44
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

7:41 · section reference included

Why prefill and decode interfere

Kamra introduces llm-d as a distributed inference framework with a Kubernetes-native control plane, also described as supporting non-Kubernetes environments. Beyond its router, workload APIs such as LeaderWorkerSet and DisaggregatedSet orchestrate model execution across multiple nodes. Autoscalers monitor capacity and the live traffic mix to adjust pod counts. These components provide the machinery needed to manage separate inference worker pools.

In aggregated serving, one pod handles both prompt processing and token generation, making it responsible for TTFT and inter-token latency together. Prefill creates the initial prompt’s KV cache. It is compute-intensive and bursty, benefiting from large-batch parallelism and high GPU compute throughput. Decode generates one token at a time, places greater pressure on memory bandwidth, and depends on keeping substantial cache state resident while meeting latency targets.

Putting both phases on the same GPU creates what Kamra calls phase interference. A sudden arrival of long prompts can stall ongoing decode work and introduce large gaps into a user’s token stream. Disaggregation separates prefill and decode into independently scalable inference pods, allowing each phase to be provisioned around its different resource and latency needs.

9:289:31
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:28 · section reference included

How a disaggregated request moves through llm-d

An incoming request first reaches the gateway router. The endpoint picker evaluates cluster state and selects the prefill and decode workers for the request. The router then coordinates with the designated prefill worker, which processes the prompt, constructs its initial KV cache, and produces KV transfer metadata.

The selected decode worker uses that metadata to pull the computed KV cache across the network fabric. This handoff is the key dependency introduced by separation: the prefill worker produces the state needed for generation, and the decode worker must receive it. The architecture therefore makes cache transfer an explicit part of the request path.

11:5611:58
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:56 · section reference included

Latency gains depend on the workload and concurrency

The first latency comparison reports P99 inter-token latency of roughly 900 milliseconds for aggregated serving, with substantial fluctuation, versus about 100 milliseconds for disaggregated serving. Kamra describes the latter as almost nine times better and much smoother. The result addresses both tail latency and streaming consistency. The hardware configuration for this particular comparison is not unambiguously established, so the numbers are best treated as a presented experimental result with limited configuration detail.

The next internal experiment uses 16 H100s to serve a gpt-oss model. The aggregated configuration has four replicas, each using tensor parallelism of four. The disaggregated configuration has two prefill workers and two decode workers, also with tensor parallelism of four. The workload is highly multi-turn, with a 10,000-token prefix and 128 tokens per turn. Holding the GPU count constant makes the worker allocation a central difference between the configurations.

That experiment compares three arrangements: an aggregated baseline using default Kubernetes scheduling, aggregated serving with llm-d cache-aware routing, and disaggregated serving. Cache-aware routing produces gains while keeping prefill and decode together. Disaggregation’s additional advantage is concentrated in the middle concurrency range; at low and high concurrency, its performance is similar to the aggregated configuration. The result makes concurrency an essential part of interpreting the benefit, although no numerical boundaries for that middle range are given.

A further comparison uses 64 H100s. Aggregated serving has eight replicas at tensor parallelism eight; disaggregation allocates three prefill workers and five decode workers, again at tensor parallelism eight. This workload is prefill-heavy, with an average input sequence length of 5,000 tokens and an output sequence length of 500. Kamra describes the disaggregated Pareto curve as dominating the aggregated curve across the measured interactivity spectrum. It is a separate workload and allocation from the 16-H100 experiment, illustrating why the shape of the advantage can change between experiments.

12:5712:59
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

12:57 · section reference included

Choose disaggregation around the latency target and fabric

Kamra presents disaggregation as a phase-separation tradeoff. Favorable conditions include long contexts, high input-to-output sequence-length ratios, large models that permit substantial model parallelism, and the middle concurrency regime identified in the experiments. Strict inter-token latency requirements are especially relevant: isolating decode can help produce a smoother token stream.

The network is a decisive constraint because KV state must move from prefill workers to decode workers. Kamra calls for a high-speed fabric supporting RDMA or RoCE. His guidance is to stay with aggregated serving when the infrastructure cannot support those transfers. Short or moderate contexts and low concurrency also favor considering aggregation, while strict TTFT requirements can be addressed by tuning an aggregated deployment. The decision depends on which latency objective matters and whether the system can afford the handoff required by separation.

Operating the resulting system requires more than choosing a fixed prefill-to-decode ratio. The scheduler must evaluate service-level objectives, cache locality, worker ratios, and network topology together. A static ratio can be a starting point, but changing traffic calls for dynamic rate matching and independent autoscaling of the two pools. Tensor parallelism and data parallelism remain additional controls for meeting the service target. Kamra closes this part by emphasizing that these choices form a coupled design problem.

15:3715:39
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

15:37 · section reference included

GLM 5.2 on the H200s customers have

The closing case study starts with a hardware constraint. Customers have substantial H200 capacity, while many impressive GLM 5.2 results use B200s. Fama describes an ongoing effort to combine cache-aware routing, disaggregation, and parallelism so the model performs well on H200 clusters. Because the target agentic workload is heavily weighted toward prefill, the architecture allows prefill capacity to grow independently.

The described design uses up to three prefill workers optimized for throughput and one dedicated decode worker optimized for low latency, with cache transfer between the pools. Each worker uses a LeaderWorkerSet group configured with tensor parallelism one, data parallelism eight, and expert parallelism eight. The modularity has a concrete purpose: additional prefill workers can raise prefill capacity without requiring the decode pool to be reconfigured.

Fama reports a preliminary observation that BF16 KV cache was faster than another cache format for longer prefill. The alternative format is garbled in the captions, and the measurement conditions are not specified. The observation belongs to an ongoing tuning effort; it cannot establish a reliable format comparison or justify recommending BF16 over a particular alternative.

For an agentic dataset with a 45:1 input-to-output ratio, Fama identifies prefill as the constraint and reports approximately four times faster time to first token and 60% more requests. The result narration specifies two prefill workers and one decode worker, while the recording description attributes the gains to three prefill workers and one decode worker; the architecture described earlier allows up to three prefill workers. No comparison baseline is identified. These figures are attributed observations from the presentation, not a reproducible comparison: they do not establish which allocation produced the gains or how another deployment would perform. Fama describes the work as ongoing, with further TTFT reductions and additional prefill replicas among the next steps.

18:1118:13
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

18:11 · section reference included

Toward orchestration that understands agent sessions

Fama’s closing direction extends beyond individual requests to session graph orchestration, program-aware scheduling, the lifecycle of reusable state, and agentic benchmarks. These are presented as continuing areas of work. Together, they point toward serving systems that account for how an agent’s operations relate over time and how useful state persists across those operations.

The talk ends with an invitation to contribute through the upstream project and its special interest group. Fama frames distributed inference as a challenge requiring collaboration across companies, naming CoreWeave, Google, IBM, and NVIDIA among the ecosystem participants. The closing emphasis is on developing the serving system and its agentic workload support together in the open.

20:2720:30
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

20:27 · section reference included

Read the complete timestamped transcript
  1. 0:12

    All right. Um, welcome everyone to yet

  2. 0:15

    another inference talk. I hope you have

  3. 0:18

    had a good conference so far. And u, so

  4. 0:22

    in this session, I mean I'm sure you

  5. 0:24

    people who have been in the room uh must

  6. 0:26

    have heard these terms many times by

  7. 0:28

    now. So we're going to do a little bit

  8. 0:30

    more deep dive into the challenges of

  9. 0:32

    LLM deployments for agentic workloads

  10. 0:35

    and uh in this session we'll focus

  11. 0:37

    specifically on KV cache away routing

  12. 0:39

    and uh PD disagregation

  13. 0:43

    um and also you know when you when you

  14. 0:45

    look at public inference uh benchmark

  15. 0:48

    results you are typically looking at

  16. 0:49

    very steady state isolated highly

  17. 0:51

    sanitized numbers and what those

  18. 0:53

    benchmarks actually don't show you u is

  19. 0:56

    the chaotic reality of multi-turn

  20. 0:59

    interactions, massive context

  21. 1:00

    fluctuations which are very typical of

  22. 1:03

    agentic workloads. So we'll also try to

  23. 1:06

    pull the curtain back on some of those

  24. 1:08

    complexities. Um by by way of

  25. 1:10

    introduction uh my name is Ashish Kamra.

  26. 1:13

    I'm a senior manager of performance

  27. 1:15

    engineering at Red Hat. And with me

  28. 1:18

    >> hi I'm Yuch Chen. I'm the product

  29. 1:20

    manager at Red Hat Inference working

  30. 1:21

    closely with VLM and AMD core

  31. 1:24

    maintainers. also a contributor myself.

  32. 1:28

    >> So here is the agenda for the next 20

  33. 1:30

    minutes or so. Um Euchen will start with

  34. 1:33

    an analysis of inference behavior in the

  35. 1:36

    agentic era and some of the core

  36. 1:38

    characteristics and challenges. Uh next

  37. 1:41

    we next you will walk us through the KV

  38. 1:44

    cache um utilization and management

  39. 1:47

    strategies.

  40. 1:48

    I will break down the mechanics of

  41. 1:50

    pre-fill decode disagregation and walk

  42. 1:52

    you through some some results and then

  43. 1:55

    Euchen will again bring it all back

  44. 1:57

    together with our ongoing case study on

  45. 1:59

    our favorite open coding model GLM 5.2.

  46. 2:03

    Um and just a couple of uh sources from

  47. 2:06

    our side if you are more interested in

  48. 2:08

    learning more about open source

  49. 2:10

    inference we have a free course free

  50. 2:12

    course on deep learning.ai AI uh by

  51. 2:15

    Cedric and with Andrew Ning. Um and the

  52. 2:17

    other is a series of blogs on the Red

  53. 2:19

    Hat developer portal on distributed

  54. 2:22

    inference concepts uh troubleshooting

  55. 2:24

    and deployment patterns.

  56. 2:27

    Uh and for those who may not be aware

  57. 2:30

    since Red Hat is better known as the

  58. 2:32

    Linux company for enterprise Linux and

  59. 2:36

    uh the Kubernetes company for Open Shift

  60. 2:39

    uh but more recently we are also a major

  61. 2:41

    player in open source AI inference with

  62. 2:45

    uh us being the top contributor in VLM

  63. 2:47

    LLMD and the case of projects and also

  64. 2:51

    uh having incubated guide LLM for

  65. 2:54

    benchmarking LLM compressor for model

  66. 2:56

    quantization and speculators for uh

  67. 3:00

    speculative uh decoding models and we

  68. 3:04

    also bring it bring all of that together

  69. 3:05

    in a optimized model hub on hugging

  70. 3:09

    phase under the Red Hat AI arc.

  71. 3:12

    Um and we are also building the platform

  72. 3:14

    for the next wave of agentic inference

  73. 3:16

    workloads and with that I will hand over

  74. 3:18

    to you to uh walk you through more of

  75. 3:21

    it.

  76. 3:25

    So we are currently um at this

  77. 3:27

    inflection point moving from the era of

  78. 3:29

    classic inference to the agentic era. So

  79. 3:33

    when we look at the real world agentic

  80. 3:36

    work workloads such as uh sweet bench

  81. 3:38

    and also watrices from real world cloud

  82. 3:41

    code sessions they fundamentally break

  83. 3:44

    many assumptions we made with classic LM

  84. 3:46

    serving. uh as you heard actually many

  85. 3:48

    times in previous sessions for example

  86. 3:50

    multi-turns and new standard we found

  87. 3:52

    from a few turns all the way to 3,000

  88. 3:55

    turns and also because agent frequently

  89. 3:57

    reuse the uh system prompt and the total

  90. 4:00

    definitions we usually see super high

  91. 4:02

    cash hit rate um oftentimes well

  92. 4:05

    exceeding 90%. Uh another thing is input

  93. 4:08

    output ratio is uh is massive oftentimes

  94. 4:12

    over a 100 ratio and even higher and in

  95. 4:15

    many cases and on top of that the

  96. 4:17

    context management is is incredibly

  97. 4:20

    complex due to this high variance

  98. 4:22

    because we can't just simply take the

  99. 4:24

    average and oftentimes we need to look

  100. 4:27

    at the distributions and the P90 numbers

  101. 4:29

    especially when you do uh capacity

  102. 4:31

    planning and also we observe really

  103. 4:34

    interesting patterns like sub Asian

  104. 4:36

    panel which is which further complex uh

  105. 4:39

    complicates scheduling. So to help

  106. 4:41

    communities study um this patterns we

  107. 4:44

    collaborate with Google thank you and

  108. 4:46

    also IBM our parent company to add uh a

  109. 4:49

    a trace replay tool in the inference

  110. 4:51

    perf you heard from earlier sessions u

  111. 4:54

    from Ashoken and Jason. Um so yeah feel

  112. 4:56

    free to check it out and the link is

  113. 4:58

    here.

  114. 5:01

    Uh next slide. Oh, so transition from

  115. 5:04

    the class uh the characteristics um we

  116. 5:06

    just saw for agentic workloads. We're no

  117. 5:09

    longer chasing this um this this raw

  118. 5:12

    throughput in a steady state. We often

  119. 5:14

    need to optimize uh for example

  120. 5:16

    interactive latency and they're very um

  121. 5:19

    highly volatile and client-driven

  122. 5:21

    context because user and you know client

  123. 5:24

    define the prompt structure. So this

  124. 5:26

    introduced several critical challenges.

  125. 5:28

    First of all, KV cache management

  126. 5:30

    becomes super volatile because the

  127. 5:32

    context is client determined as I said.

  128. 5:34

    So oftentimes we face this like you know

  129. 5:37

    frequent evictions and rewrites and

  130. 5:40

    secondly we also need to tune um the

  131. 5:43

    engine like VM with upper layer uh

  132. 5:45

    scheduling and routing.

  133. 5:47

    It needs that coordination such as

  134. 5:49

    prefix routing especially when latency

  135. 5:52

    becomes a primary uh scheduling matrix

  136. 5:54

    rather than like a secondary or

  137. 5:56

    afterthought. And thirdly, we also need

  138. 5:58

    to rethink our metrics. For example, we

  139. 6:00

    need to measure cats throughput

  140. 6:02

    separately. Why? Because on the right,

  141. 6:04

    it's really clear that economic stakes

  142. 6:07

    is very high. So, this is the uh

  143. 6:09

    anthropic API pricing. You also heard

  144. 6:11

    from earlier sessions. There's 10x cost

  145. 6:13

    difference between cash and non-cash

  146. 6:15

    tokens. So, 10x difference on your um

  147. 6:18

    token balance sheet is is pretty serious

  148. 6:20

    impact on your business.

  149. 6:23

    So next let's let's look at how the KV

  150. 6:25

    cache is um both utilized and managed in

  151. 6:28

    LMD. So LMD router has this really

  152. 6:31

    flexible um endpoint picker plugins we

  153. 6:34

    call the EP that can route the request

  154. 6:36

    to the optimal pods and that meet the KV

  155. 6:38

    cache locality and also the load

  156. 6:41

    criteria. So the EP continue probe each

  157. 6:44

    pods like VM pod matrix to score each

  158. 6:47

    pod on like the running for example

  159. 6:49

    running and waiting request and then the

  160. 6:51

    KV cache utilization also prefix uh

  161. 6:54

    cache availability and so we can

  162. 6:56

    schedule requests to the optimal pod

  163. 6:58

    with the lowest load and also highest

  164. 7:00

    possibility to um to of a cache hit. So

  165. 7:03

    um going down from to the KV cache

  166. 7:06

    management layer actually you also heard

  167. 7:07

    from earlier session right before this.

  168. 7:10

    So for agentic sessions when you have u

  169. 7:12

    hot warm and cold cache our current

  170. 7:15

    effort focus on for example um more

  171. 7:17

    offloading tiers like NVME SSD and also

  172. 7:20

    uh file system XF along with KV ccentric

  173. 7:23

    store um like uh moon cake and also

  174. 7:26

    implementing smarter and session a wire

  175. 7:28

    eviction policies such as priority and

  176. 7:30

    also session pinning to uh ensure this

  177. 7:33

    uh really important you know the the

  178. 7:35

    context persists exactly when and where

  179. 7:38

    it's needed.

  180. 7:41

    So, I'm gonna play this um video really

  181. 7:44

    quick. Uh it's a it's a short demo.

  182. 7:46

    >> Stand here so you can look at it.

  183. 7:48

    >> Okay.

  184. 7:52

    So,

  185. 7:54

    okay. So, this is a example of a KV

  186. 7:56

    cache bar routing. As you see, when we

  187. 7:58

    send the very first request and it

  188. 8:00

    populate the KV cache, it takes roughly

  189. 8:02

    3 seconds. And when we actually look at

  190. 8:06

    where it's you know the KV cache uh is

  191. 8:08

    going there's no KV cache hit because

  192. 8:10

    it's the very first turn. And then when

  193. 8:12

    we have the second turn the request

  194. 8:13

    actually reuse a KV cache because as you

  195. 8:16

    see the system prompt is the same and

  196. 8:18

    this time takes about one seconds. And

  197. 8:20

    then when you actually look at the uh

  198. 8:21

    pod address exactly the same because we

  199. 8:24

    define the KV cache. Now going to the

  200. 8:26

    third turn a new request with different

  201. 8:28

    system prompt. Now it takes about three

  202. 8:30

    uh seconds and as you see you know right

  203. 8:34

    now and we don't find any KV cache here

  204. 8:36

    because you can tell it's different pod

  205. 8:38

    address and then if you just change the

  206. 8:41

    user prompt and keep the same system

  207. 8:43

    prompt and the next turn you you reuse

  208. 8:46

    the KB cache and in this in this time it

  209. 8:48

    takes roughly about uh one second. Yeah.

  210. 8:51

    So it's a pretty intuitive demo and um

  211. 8:53

    I'll turn it to Ashish to talk about the

  212. 8:56

    next side but before that what does

  213. 8:57

    problem does it solve? So often times

  214. 8:59

    the prefix routing KB cache routing

  215. 9:02

    helps you solve the TTFD problem and of

  216. 9:04

    course you'll improve your lat uh your

  217. 9:06

    your throughput but oftentimes for

  218. 9:08

    agentic workload is not just a TTFT your

  219. 9:10

    throughput is about your inter token

  220. 9:12

    latency how do we solve that so preview

  221. 9:15

    decode disagregation is a really uh

  222. 9:17

    powerful technique but there are times

  223. 9:19

    there work at times it doesn't work so

  224. 9:21

    I'll turn it to Ashish to give you a

  225. 9:23

    preview of um of the PD uh disregation

  226. 9:28

    So before we dive into PD, let's just uh

  227. 9:31

    look at what LLMD is. So LLMD is a high

  228. 9:34

    performance Kubernetes native and

  229. 9:36

    actually now works on non-cubernetes

  230. 9:38

    environments as well. Distributed LM LLM

  231. 9:41

    inference framework hosted under the

  232. 9:43

    CNCF umbrella. LLMD provides a unified

  233. 9:47

    intelligent control plane designed

  234. 9:49

    specifically for agentic era of

  235. 9:50

    inference workloads. Well, Euchin

  236. 9:52

    already talked about the router and the

  237. 9:54

    EP at the top of the slide. Um, the

  238. 9:58

    other aspects are workload APIs such as

  239. 10:00

    leader worker set and disagregated set

  240. 10:02

    that orchestrates complex multi-

  241. 10:05

    multi-node model execution and then

  242. 10:08

    autoscalers that monitors capacity

  243. 10:10

    bounds and real-time traffic mixes to

  244. 10:13

    independently scale up and scale down uh

  245. 10:16

    your pods depending on the system load.

  246. 10:19

    So now look now let's look at uh prefill

  247. 10:21

    decode disagregation in detail. Um uh

  248. 10:25

    okay so why does PD exist in the first

  249. 10:29

    place? So one of the most powerful

  250. 10:30

    patterns implemented by LLMD is prefill

  251. 10:33

    decode disagregation and you must have

  252. 10:35

    heard from some of the previous talks as

  253. 10:37

    well. So what happens is in in a nonPD

  254. 10:40

    situation in aggregated serving one pod

  255. 10:43

    is responsible for optimizing both your

  256. 10:46

    time to first token and your inter token

  257. 10:48

    latencies. Uh but in PD prefill and

  258. 10:51

    decode become independently scalable

  259. 10:53

    inference pods. But to understand why we

  260. 10:55

    actually need this we have to look at

  261. 10:58

    the physics of LLM execution.

  262. 11:00

    colloccating uh both prefill and decode

  263. 11:03

    tasks on the same GPU creates something

  264. 11:05

    called as phase interference. Prefill

  265. 11:08

    phase is the phase that creates the KV

  266. 11:10

    caches for your initial prompt. It wants

  267. 11:13

    high compute. It's highly bursty uh

  268. 11:17

    utilizes GPUs at uh high flops and and

  269. 11:21

    thrives on large batch parallelism to

  270. 11:24

    process the prompts and builds the

  271. 11:25

    initial KV cache. The decode phase on

  272. 11:28

    the other hand is generating one token

  273. 11:30

    at a time and it's more me memory

  274. 11:32

    bandwidth hungry. It's highly latency

  275. 11:34

    sensitive and requires high heavy cache

  276. 11:37

    residency. So in a in a in a traditional

  277. 11:40

    aggregated pod if you if there's a

  278. 11:43

    sudden influx of a long prefilled palm,

  279. 11:46

    it will completely stall the ongoing

  280. 11:48

    decode token generation process causing

  281. 11:50

    massive problems and jitter in user

  282. 11:53

    streaming latency.

  283. 11:56

    So, so how does PD actually work in

  284. 11:58

    practice in LMD? So, LNMD uses um uh you

  285. 12:03

    know like okay, we'll start with step

  286. 12:05

    one. A incoming request hits the gateway

  287. 12:07

    router which dynamically evaluates

  288. 12:10

    cluster states using something known as

  289. 12:12

    the endpoint picker you talked about and

  290. 12:15

    schedules the request to use PD

  291. 12:17

    disagregation selecting the optimal

  292. 12:19

    prefill and decode workers. The router

  293. 12:22

    then coordinates the transaction

  294. 12:23

    directly with the designated pre-fill

  295. 12:25

    worker. The pre-fill worker processes

  296. 12:27

    the prompt, construct the initial KV

  297. 12:29

    cache of the prompt and outputs the

  298. 12:32

    standard KV transfer metadata. Um, and

  299. 12:35

    the target decode worker actually pulls

  300. 12:37

    the computed KV caches um, uh, across

  301. 12:41

    the network fab fabric utilizing uh, the

  302. 12:44

    KV transfer metadata that the uh, uh,

  303. 12:47

    prefill pod had generated. Um okay so

  304. 12:52

    with that yes that's kind of how uh PD

  305. 12:55

    is implemented in practice in LMD and

  306. 12:57

    next I would like to show you some uh

  307. 12:59

    experimental results on where PD

  308. 13:01

    actually shines. So in this graph you

  309. 13:03

    can see that um

  310. 13:06

    uh in in in the standard aggregated

  311. 13:08

    deployment which is the top red line uh

  312. 13:11

    the P99 ITL uh hovers roughly around 900

  313. 13:15

    milliseconds and you can you can see

  314. 13:17

    some fluctuations um up and down and but

  315. 13:22

    the the bottom blue line is the P99 uh

  316. 13:26

    inter token latency on a PD deployment

  317. 13:28

    and you can see that it's drastically

  318. 13:30

    almost nine times better at 100

  319. 13:32

    millconds and it's also much smoother uh

  320. 13:35

    than the aggregated serving

  321. 13:40

    and uh this is some of our own internal

  322. 13:43

    results at Red Hat. So for a GPOSS 12B

  323. 13:46

    model uh 16 H100s

  324. 13:49

    uh the aggregated config is four

  325. 13:52

    replicas tensor parallelism 4 and the

  326. 13:54

    disagregated is two prefilled 2D code

  327. 13:56

    all with tensor parallelism 4. It's a

  328. 13:58

    highly multi-turn workload with a 10,000

  329. 14:01

    token prefix and 128 tokens for every

  330. 14:05

    turn every turn. So, so this is a great

  331. 14:08

    chart like you can see at the bottom

  332. 14:09

    most line is a standard aggregated

  333. 14:11

    config that's uh is doing the default

  334. 14:14

    Kubernetes scheduling and uh and it's

  335. 14:17

    aggregated. So that's kind of our

  336. 14:18

    baseline and then the middle blue line

  337. 14:21

    is still aggregated but with the LLMD uh

  338. 14:25

    KV cache aware routing and you can

  339. 14:27

    almost see the gains just just based on

  340. 14:29

    the routing and the red line is actually

  341. 14:31

    the PD uh the pre-fill decode config

  342. 14:35

    with two pre-fill and two decode workers

  343. 14:37

    and you can actually see that like it's

  344. 14:39

    very similar to the aggregated config at

  345. 14:41

    the lower concurrency regimes and uh

  346. 14:44

    even and and very similar at the higher

  347. 14:45

    concurrency regimes but it's actually

  348. 14:47

    the middle part of the concurrency

  349. 14:49

    regime that PD actually shines

  350. 14:53

    and and these are some of the the

  351. 14:56

    classic parita curves that we see when

  352. 14:58

    you actually do PD and uh aggregated

  353. 15:01

    side by side. So these results are again

  354. 15:03

    from the GPTOSS 12B model 64 H100s

  355. 15:07

    aggregated is eight replicas TP8 and

  356. 15:10

    this a is uh three prefilled 5D code

  357. 15:13

    again TP8 and a pre-filled heavy

  358. 15:15

    workload with like 5,000 average input

  359. 15:18

    sequence length and 500 output sequence

  360. 15:20

    length and you can actually see the blue

  361. 15:22

    line is the the PD curve and the red

  362. 15:24

    line is the aggregated curve and the PD

  363. 15:26

    curve kind of dominates um uh the

  364. 15:30

    aggregate curve across the entire

  365. 15:32

    interactivity spectrum.

  366. 15:37

    Okay, but I don't want to leave you guys

  367. 15:39

    that PD is the answer to everything and

  368. 15:40

    it's a magic bullet. But um it's uh it's

  369. 15:43

    essentially a separation phase

  370. 15:45

    separation trade-off and not a magic

  371. 15:46

    bullet. So we created this uh matrix to

  372. 15:49

    help you decide when PD might be uh good

  373. 15:53

    for you. So if you're managing long

  374. 15:55

    context uh with high ISL OSL ratios and

  375. 16:00

    you if you have a large model that

  376. 16:01

    you're serving that can that you can

  377. 16:04

    apply rich model parallelism techniques

  378. 16:07

    um you're facing that middle concurrency

  379. 16:09

    regime uh that I I showed you in the

  380. 16:11

    previous graphs and and the very

  381. 16:14

    important part is that if you want uh

  382. 16:16

    strict ITL streaming requirements like

  383. 16:18

    you want the you want the token

  384. 16:19

    generation to be uh much more smooth um

  385. 16:22

    then you want to consider PD but we also

  386. 16:25

    saw that it requires transfer of KV

  387. 16:27

    caches from your pre-filled workers to

  388. 16:29

    your decode workers. So you must pro

  389. 16:31

    process an advanced uh high-sp speeded

  390. 16:33

    network fabric like uh RDMMA or rocky to

  391. 16:37

    support that KV cache transfer. And if

  392. 16:39

    you do not have such requirements, short

  393. 16:41

    moderate context, any model size, low

  394. 16:46

    concurrency regimes or uh if you have

  395. 16:48

    strict TTF requirements because you can

  396. 16:50

    actually tune them on an aggregate

  397. 16:52

    serving um and you the biggest point is

  398. 16:55

    like if you don't have the network

  399. 16:56

    fabric to support those KV cache

  400. 16:57

    transfers. So you might actually just

  401. 16:59

    want to stick with aggregated.

  402. 17:02

    So here is my key takeaway from all of

  403. 17:04

    this. So architecting this complex

  404. 17:06

    platform requires balancing a lot of u

  405. 17:09

    knobs and a highly multi-dimensional

  406. 17:11

    design space all of which is supported

  407. 17:13

    in LLMD. As you saw the scheduler must

  408. 17:16

    support or constantly evaluate SLO

  409. 17:18

    targets uh QEPs KV cache locality

  410. 17:21

    metrics PD ratios and network topologies

  411. 17:24

    to be able to route the request to the

  412. 17:26

    optimal FOD. While in while the PD

  413. 17:29

    design space you you need dynamic PD

  414. 17:32

    rate matching to adapt to PD ratios

  415. 17:35

    because you know you can start with a

  416. 17:36

    static PD ratio but it needs to evolve

  417. 17:38

    with the autoscaler as the traffic

  418. 17:40

    changes um and you need uh yeah

  419. 17:44

    autoscaling to scale PD pools

  420. 17:46

    independently

  421. 17:47

    um and constantly tweaking model

  422. 17:50

    parallelism techniques like tensor

  423. 17:51

    parallelism data parallelism uh to meet

  424. 17:54

    your SLOs's.

  425. 17:56

    So um I think with these uh I will hand

  426. 17:59

    it over to Euchen to anchor some of the

  427. 18:01

    concepts that we showed with the real

  428. 18:04

    world case study of serving the GLM 5.2

  429. 18:07

    model uh which is uh still ongoing as we

  430. 18:10

    speak.

  431. 18:11

    >> Yeah, still ongoing. You probably have

  432. 18:13

    seen tons of uh impressive numbers of

  433. 18:16

    GLM 5.2 on B200 when we talk to our

  434. 18:19

    customers and they usually don't have

  435. 18:21

    you know the luxury of B200. They have a

  436. 18:23

    lot of H200. So we have to figure out

  437. 18:25

    how to like put all the knobs together

  438. 18:27

    and make GM 5.2 work really well for

  439. 18:30

    cluster of of H200. So uh we let's

  440. 18:33

    anchor all the concept together. Um we

  441. 18:35

    went through for example the uh KV cache

  442. 18:38

    routing PD disagregation. We kind of

  443. 18:40

    call them a wildl path in LMD and also

  444. 18:43

    we combine with different parallelism

  445. 18:45

    strategies to so we can uh independently

  446. 18:48

    uh scale prefuel paths because for

  447. 18:50

    agentic workload is super uh long you

  448. 18:52

    know like heavy prefill. So uh in this

  449. 18:55

    case we designed the prefuel pool using

  450. 18:57

    up to three workers optimized for uh

  451. 18:59

    high throughput uh with deep and then

  452. 19:02

    for decoup we use uh one dedicated

  453. 19:04

    worker and um that's optimized for for

  454. 19:06

    low latency. So we use Nixo for

  455. 19:08

    efficient KV transfer between the pools

  456. 19:11

    and also with the each worker we have

  457. 19:13

    the leader worker set group uh with TP1

  458. 19:15

    DP8 and also uh EP8 uh expert

  459. 19:18

    parallelism 8. So the architecture is

  460. 19:21

    just highly modular because you can uh

  461. 19:23

    actually scale the throughput by simply

  462. 19:24

    adding uh preview workers without

  463. 19:26

    reconfiguring and um the decoup. So uh

  464. 19:30

    this highlights how AMD effectly

  465. 19:32

    effectively managed the complexity of

  466. 19:34

    combining like PB and DB and EPI scale.

  467. 19:38

    And also we found some interesting fun

  468. 19:39

    fact actually a couple days ago. Um B B

  469. 19:42

    B B B B B B B B B B B B B B B B B B B B

  470. 19:42

    B B B B B B B B B B B B B B B B B B Bf6

  471. 19:43

    uh BF16 KV cache actually is faster than

  472. 19:46

    using like FPA uh KV cache for longer

  473. 19:49

    preview. Um this is also like we

  474. 19:51

    continue to explore and found like more

  475. 19:53

    interesting patterns, but more

  476. 19:55

    importantly uh we want to kind of just

  477. 19:57

    show the result really quick. So um for

  478. 19:59

    this uh data set agentic workload data

  479. 20:01

    set the ISO OSL ratio is pretty high 45

  480. 20:04

    to1 ratio preview is uh is really the

  481. 20:07

    constraint you can tell um with 2P even

  482. 20:09

    1D we have um 4x passer TDFT and also 60

  483. 20:14

    uh% more requests and this is continuous

  484. 20:17

    like work in progress so the next step

  485. 20:19

    is we need to also put the upper layer

  486. 20:22

    lower TTFT and also adding more more

  487. 20:24

    preview replicas so um I know we're

  488. 20:27

    running out of time really quick. Uh we

  489. 20:30

    um the fundamental shift for agentic

  490. 20:31

    workload we're continuing to uh have

  491. 20:34

    this um uh agentic north uh northstar uh

  492. 20:37

    with session graph orchestration program

  493. 20:39

    award scheduling uh state reuse life

  494. 20:42

    cycle and also the uh agentic benchmark

  495. 20:45

    um we're working on. So you can find

  496. 20:47

    them uh in AMD upstream AMD and also you

  497. 20:51

    know feel free to join the SIG group and

  498. 20:54

    uh and contribute and um this is the

  499. 20:57

    very last slide. So distri distributed

  500. 20:59

    inference is not challenge uh every

  501. 21:00

    single comp a single company can solve

  502. 21:02

    along. We're proud to be uh building

  503. 21:05

    this uh future in the open alongside our

  504. 21:07

    incredible ecosystem collaborators uh

  505. 21:10

    core wave Google IBM Nvidia growing list

  506. 21:13

    of launch partners and industry

  507. 21:15

    adopters. So if you're passionate about

  508. 21:17

    the future of opensource inference, we

  509. 21:19

    invite you to join us. We do have a

  510. 21:21

    booth downstairs. Feel free to stop by,

  511. 21:23

    ask us any questions. And uh thank you

  512. 21:25

    so much for your time.

  513. 21:27

    [applause]

  514. 21:44

    >> [music]