← All AI Engineer talks

AI Engineer Code 2025

Context Platform Engineering to Reduce Token Anxiety — Val Bercovici and Callan Fox, WEKA

Read the talk

Context Platform Engineering: Keeping Agent Context Useful Between Requests

Agent context is reusable only if the inference platform retains it and retrieves it quickly enough. WEKA’s toolkit explores how cache lifetime, memory tiers and workload shape affect that reuse.

From a talk by Val Bercovici and Callan Fox

Before you start: Familiarity with LLM context windows, tool-calling agents and the distinction between prompt processing and token generation will help.

How do you keep an agent’s context available?

How do you build an inference platform that can serve agent swarms without repeatedly processing the context they already supplied? WEKA opens with a toolkit for investigating that problem. Callan Fox’s load generator models agents and subtasks with configurable service-level objectives, deterministic or random prompt cycles, model parallelism, aggregated or disaggregated prefill and decode, and different memory tiers. These are connected choices: the workload determines what context is reused, while the platform determines whether that reuse actually happens.

Diagram showing a load generation and replay engine, coding agents, an inference API, prefill and decode compute, and two memory tiers.
WEKA’s benchmarking methodology connects load generation, coding agents, inference and memory tiers.

Val Bercovici invites developers to download, modify and contribute to the open-source toolkit. Its motivation follows Manus’s context-engineering lessons, which identify KV-cache hit rate as the most important metric for their production agents. A KV cache holds attention keys and values computed for earlier tokens; reusing that state avoids repeating the corresponding prefill work. Context platform engineering concerns the infrastructure that makes those hits possible.

0:090:26
Suggest correction

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

0:09 · section reference included

The prediction problem behind prompt-cache pricing

Token anxiety starts with hitting limits while trying to get work done. Bercovici’s ambition is to engineer platforms that remove those constraints; the immediate alternative is what he calls prompt-cache arbitrage. Developers must balance ordinary input and output prices against separate cache-write and cache-read prices. Buying retention only pays off if enough subsequent requests reuse the cached material.

The Anthropic example makes the prediction concrete: should you pay to retain context for five minutes or an hour? The answer depends on how many reads arrive before the cache expires. The pricing slide highlights Claude Sonnet 4.5 across those separate categories. Cache writes must also be distinguished from ordinary input: current Claude documentation maintains that distinction, so an ordinary-input versus cache-read comparison should not be treated as a cache-write quote. The platform-engineering goal is to make useful retention less dependent on developers guessing future request timing.

Claude Docs pricing table with the Claude Sonnet 4.5 row highlighted across input, cache-write, cache-hit and output columns.
Claude pricing separates input tokens, cache writes, cache hits and output tokens.
2:272:48
Suggest correction

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

2:27 · section reference included

Two feedback loops, one storage obligation

Human feedback and agent activity run at different speeds. A person may pause to review a result while parallel agents and subtasks keep working, generating and consuming context in the background. Much of that context could be reused, but its availability depends on what survives in the platform’s cache between requests. This turns a token-pricing question into a token-storage problem.

Subscription commitments and explicit cache-write or cache-read choices become infrastructure obligations. The platform must translate its service-level agreements into operational objectives, then provision and manage KV caches and memory tiers to meet them. Fox’s interpretation is that purchasing a token tier or paying for cache retention effectively purchases slots in token storage. This is a useful model of provider economics, rather than a disclosed specification of how every subscription is enforced. The engineering task is to optimize the infrastructure so its SLOs meet the promised service as consistently as possible.

3:514:12
Suggest correction

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

3:51 · section reference included

Inside a coding-agent conversation

Fox begins his trace walkthrough with successive requests drawn as columns. Salmon represents new tokens, gray represents tokens that could be cached, and blue represents output tokens. Blue dots beneath the columns mark actual user responses. Context accumulates until it reaches a high watermark imposed by the model or inference provider. The agent then summarizes and begins another cycle. That compression can lose details and reduce the agent’s fidelity; raising the usable watermark would let it carry more of the original context forward.

Looking inside the gray region reveals why user-message counts are a poor description of the workload. In the Claude Code example, system instructions and user text occupy a relatively small share. Tool calls and tool results dominate: the agent runs a Bash command, consumes its result, and decides what to do next. Each step adds material that can become part of the next request’s reusable context.

Fox reports median request intervals of roughly 10–15 seconds in the agent data he describes, with the timing strongly dependent on whether humans approve each tool call. He says the mean interval can reach minutes or even hours because human responses take much longer. His observations span billions of tokens. The median captures the rapid tool loop; the mean exposes the long pauses that a retention policy must also handle.

5:365:50
Suggest correction

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

5:36 · section reference included

More agents create more opportunities—and more demand

A multi-agent workflow adds an orchestrator and specialized subagents. Some subagents discard their context between activations; others retain it. Giving each subagent context tailored to its task helps concentrate attention on the relevant problem, but it also increases total context consumption. Fox recolors the previously gray regions to expose shared material across agents and show how those relationships evolve before work returns to the orchestrator and another agent wakes. The exact pattern varies across Codex, Claude Code and other systems.

Potentially reusable context is not the same as a cache hit. In the next view, yellow regions identify material that must be refreshed instead of reused. Fox says an uncached input can cost potentially ten times as much as a cached read. The historical Claude Sonnet example in Manus’s post supports that ordinary-input comparison; cache-write charges are a separate category. For flat-rate subscribers, Fox argues that missed reuse can instead appear as earlier rate limits. Reducing those misses benefits both the user and the provider doing the repeated computation.

8:188:31
Suggest correction

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

8:18 · section reference included

Longer retention trades memory for less prefill

Columns of successive requests hide elapsed time. Fox therefore switches to a temporal view: solid lines use the left axis to show the working set, the number of tokens held in cache, while dotted lines use the right axis to show cache hit rate. The red one-minute retention policy repeatedly rises and falls when requests arrive more than a minute apart. A few requests may hit, then the cached state expires and the next request has to rebuild it.

RetentionEffect in the illustrated conversationStorage consequence
One minute, redExpires across relatively short pausesRepeated cache refreshes
Five minutes, blueBridges more request gapsRetains context longer
One hourPreserves reuse across longer pausesHolds more tokens for longer

The five-minute policy improves reuse but still misses longer gaps. Extending retention to an hour increases the working set, eventually substantially. Better reuse therefore requires memory tiers with enough capacity to preserve the context across those pauses.

Time-series chart with solid working-set lines, dashed cache-hit-rate lines, and annotations identifying both axes and short-TTL inefficiencies.
Working-set usage and cache hit rates across different cache retention times.

Hit-rate percentages can be hard to internalize, so Fox offers another measure: how many times does the platform prefill the same chunk of tokens? For the illustrated conversation, Fox reports roughly 15–16 prefills of the same token chunk at a one-minute TTL, with longer retention bringing the average toward one. This makes the waste tangible: the platform repeatedly computes state it could have kept.

10:4510:53
Suggest correction

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

10:45 · section reference included

The provider needs a productive hit-rate band

Fox next asks the audience to imagine operating its own inference service, whether self-hosted or hosted on dedicated infrastructure. He forecasts that arrangement becoming more common from 2026 onward. From the operator’s perspective, the question is how much useful output a given system can produce as context length and cache reuse change.

The relationship between cache hit rate and output-token production is nonlinear. Its shape depends on context length, accelerator choice and the arrangement of prefill and decode, including disaggregation. Fox labels three operating regions A, B and C, with C representing the desirable region; he characterizes A and B as unprofitable or poor value. Providers consequently have an incentive to keep users in a productive cache-hit band. That is the economic reasoning behind his description of subscriptions as cache allotments: agent workloads that continually recompute old context can consume the GPU capacity needed to serve useful output.

13:4613:55
Suggest correction

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

13:46 · section reference included

Token storage needs capacity and transfer speed

A useful token-storage tier must satisfy three requirements together:

  • Capacity: retain enough of the working set to reach the region where additional cache begins yielding diminishing returns.
  • Store performance: accept KV state quickly enough that entries are not dropped before reaching the tier and GPUs do not stall waiting to offload them.
  • Fetch performance: return cached state quickly enough that GPUs do not stall waiting to use it.

The accelerator remains the resource the rest of the system is organized to keep productive. A large cache that cannot move data at the required rate does not solve the problem.

Keeping every session in high-bandwidth memory, or HBM, would be attractive, but Fox describes it as impractical, partly because of batching. DRAM is the common additional tier: it offers acceptable performance, but its capacity is limited and tightly coupled to compute. Expanding memory can therefore require expanding the surrounding system. Fox also criticizes available pooled-DRAM approaches for imposing performance penalties.

WEKA’s Augmented Memory Grid connects inference systems to the company’s existing storage product, previously used in AI training and HPC. Fox describes it as a supported, optimized connector backed by NVMe. He claims roughly 1,000-fold greater density, but does not specify the comparison basis. Capacity is only one side of the comparison: Fox also describes an alternative storage system delivering 50–60 GB/s, yet still too slow for the token-storage demands under discussion. The relevant test is whether a tier can preserve enough state and deliver it fast enough to benefit inference.

16:0516:25
Suggest correction

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

16:05 · section reference included

Exercise the working set, not just the server

The load generator behaves like a provider managing incoming demand. It can constrain load using optional SLOs, which Fox names as time to first token and output tokens per request. The latter is the wording used in the presentation; its time unit is not specified. Disabling the controls drives load without those constraints. A test can hold the number of coding-agent users constant or increase it over time, progressively exercising more of the memory hierarchy.

Fox points to his testing methodology and GitHub tooling for details, then distinguishes two access patterns:

PatternWorkloadWhat it exposes
SequentialTraverse an initial working set in orderA sharp performance cliff when the tier overflows
Random, growing poolIncrease the user pool and sample prompts randomlyA blend of hits across memory tiers

Sequential traversal is deliberately deterministic. Even a small overflow can produce a large performance drop. Random sampling is the fairer comparison in Fox’s account because some requests still hit HBM while others hit a second tier such as DRAM. It measures the resulting mixture rather than forcing every access through the same overflow pattern.

18:5119:02
Suggest correction

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

18:51 · section reference included

What changes when the workload outgrows DRAM?

The decode-focused results compare three configurations:

Plot colorConfiguration
PurpleHBM plus WEKA
OrangeHBM plus DRAM
Orange-pinkHBM plus DRAM plus another POSIX storage system

The dotted line tracks the growing user pool. In the initial shaded region, all three configurations benefit primarily from HBM cache hits. As the pool grows, the working set exceeds what the DRAM tier can hold, and both the orange and orange-pink configurations decline sharply.

The WEKA configuration also declines as fewer accesses benefit from HBM. The benchmarking tool automatically pulls back concurrency, and the configurations eventually settle into steadier operation. WEKA Labs reports that its configuration sustains more users and more output tokens at steady state than the two alternatives in this decode-focused comparison. The presentation does not give numerical values for that advantage.

Fox reports a larger advantage in the disaggregated prefill comparison, attributing it to GPU efficiency with large prefill batches and a single decode. Here the configurations help separate two bottlenecks. Purple versus orange demonstrates the benefit of having more cache capacity and therefore more opportunities to hit. The orange-pink configuration has enough capacity for all the possible hits, but cannot deliver the cached state into the GPUs quickly enough to realize that benefit.

A cache hit must arrive in time to be useful. Fox characterizes WEKA’s result as combining greater capacity with DRAM-speed access, allowing the benefit to persist for longer periods. The final comparison completes the earlier working-set argument: extending retention reduces repeated prefill only when the storage tier can also sustain the writes and fetches needed to keep the accelerators working.

20:2620:36
Suggest correction

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

20:26 · section reference included

Put the workload assumptions to the test

Bercovici closes by inviting developers to download, test, fork and improve the toolkit. The Inference Server Cache Performance Testing Suite provides the practical entry point for exploring these workloads. The repository and quick-start slide accompanies that invitation, followed by a QR code for more information and a promise of links to the referenced blogs. The intended outcome is less token anxiety and less prompt-cache arbitrage through platforms that preserve and serve context more effectively.

Slide showing the Inference Server Cache Performance Testing Suite quick start beside the callanfox/kv-cache-tester GitHub file listing.
The context platform engineering toolkit’s GitHub repository and quick-start instructions.
23:0723:18
Suggest correction

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

23:07 · section reference included

Resources

From the talk

Updates since the talk

Read the complete timestamped transcript
  1. 0:00

    This is Val Bercovici, WEKA's Chief AI Officer, and I am joined by

  2. 0:05

    Callan Fox, head of the product management team here at WEKA.

  3. 0:09

    And we're both thrilled to present Context Platform Engineering to you at the AI.Engineering Code Summit. Now, let's kick this off with, uh, an announcement we're making. We're actually open sourcing our Context Platform Engineering toolkit.

  4. 0:26

    And this toolkit, uh, features a really cool load generator that Callan wrote that lets you configure agent swarms, uh, and agent subtasks with very specific SLOs, being able to cycle through deterministic and random prompt cycles, and engineer context platforms with all sorts of model parallelism options, disaggregated or aggregated prefill and decode options, and some really important memory

  5. 0:51

    tiering options we're gonna be discussing here. So if we advance the next slide, we'll see that this is an open source toolkit that's already available to you on GitHub.

  6. 1:02

    So Callan and I really encourage you to just get on GitHub, download this, play with it, and give us your feedback. Let us know what you need changed. Feel free to contribute and fork the project, uh, and advance the, the field of context platform engineering, which we're gonna be introducing to you later today.

  7. 1:19

    So moving on, one of the key requirements for context platform engineering really relates to the context engineering, uh, insight that our friends at Manus shared with us earlier this summer in their c-- their pretty infamous now context engineering blog.

  8. 1:36

    And they highlighted the fact that KV cache hit rate is the single most important metric for production grade AI agents. And the reason context platform engineering is so important is it dramatically simplifies reaching maximum KV cache hit rates, as we're about to show you.

  9. 1:54

    On a more personal level, if we think about token anxiety, I know that each and every one of us, you know, feel that anxiety. The reason context platform engineering is so important is shared by the context engineering blog from Manus earlier this summer, where they particularly emphasize KV cache hit rates are the single most important metrics for

  10. 2:16

    production grade AI agents. And context platform engineering quite simply maximizes KV cache hit rates in a very straightforward manner.

  11. 2:27

    On a more personal note, if you think about t-the concept of token anxiety, as we all regularly hit token rate limits, context platform engineering helps you engineer platforms that eliminate token rate limits, uh, and help us be more productive with regards to developing our software.

  12. 2:48

    Now, in the absence of context platform engineering, we often resort to context financial engineering, and that's fundamentally prompt cache arbitrage, where we balance the needs of pricing between the bookends of input and output tokens with these new token pricing categories that have appeared in the landscape over the past few months, focusing on cache writes and cache reads.

  13. 3:09

    And we've got to be somewhat clairvoyant when we're doing this arbitrage to figure out how many cache writes we want to invest in for either five-minute time to live, in some cases, with Anthropic, for example, uh, we can do one hour time to live, and that's all against, balanced against the predictions we need to make on how

  14. 3:27

    many cache reads and cache hits we think we're gonna have during those intervals. This becomes very, very tricky to be clairvoyant and predict the future, and I think it's much better to apply context prompt engineering techniques to overcome token anxiety and prompt cache arbitrage than to continue to, to do the arbitrage in context financial engineering.

  15. 3:47

    And so one of the ways we're gonna be doing that

  16. 3:51

    is looking at, and C- and Callan's gonna dive into this deeply, the cadence mismatch between the relatively slow human feedback loops for agents, and then the agent swarms and the agent subtasks themselves that iterate at much higher cadence, often in parallel, waiting on humans, but conducting a lot of really cool work in the background, consuming a lot

  17. 4:12

    of tokens in the background, many of which are cacheable, but we just never know how the platform is able to respond. And that's one thing we're gonna be diving into here, is the fact that if we go to the next slide, we're looking at fundamentally a token storage problem.

  18. 4:28

    And what we're gonna be doing is explaining how the service-level agreements we sign up to when we subscribe to our various, uh, you know, token tiers, or we actually commit in our instructions and our agentic instructions a specific token cache writes and cache reads, how those SLAs convert to service-level objectives delivered by the context platform itself.

  19. 4:51

    And more particularly, one of the insights that Callan reached from his research at WEKA Labs is that what we're doing when we actually subscribe to our token tiers or we actually pay for particular token writes, is we're really purchasing cache, KV cache slots in token storage.

  20. 5:10

    So there's definitely a whole science around the context platform engineering to how context platforms take those SLA requirements, optimize infrastructure, optimize KV caching and memory tiers, and deliver specific SLOs to try and meet those SLAs as much as possible.

  21. 5:27

    So with that, let me actually hand it over to Callan for, uh, actual research findings and lab and, and test results from WEKA Labs.

  22. 5:36

    Thanks, Val. So look, what I wanna do is just go back to one of the slides that Val showed earlier. And what I'm gonna do from now on is I'm gonna focus on that right-hand loop, and the first thing I'm gonna do is I'm gonna start by visualizing what that loop actually looks like, and then we're gonna

  23. 5:50

    go into a little bit more detail So if you, if you think about that loop as a column, and I've got a graph here that shows a very, very common, uh, pattern that happens in agents.

  24. 6:04

    So the, the salmon color is showing new tokens that the system's being exposed to. The gray is something that could be cached, again, within a limited amount of cache.

  25. 6:12

    We'll get into that shortly. The blue is the output tokens, and these blue dots down the bottom are showing when the user is actually giving responses in this particular case.

  26. 6:21

    This is a really common example you get, where basically you start off, you consume context all the way up until you hit a, um, a high, a high watermark set by either the model maximum length or by the inference provider itself.

  27. 6:35

    There's a summarization, um, phase, and then you start a new cycle. And everybody knows that summarization phase where sometimes, you know, the, the agent loses a little bit of its fidelity, a bit of its intelligence, and, uh, and that's why we're trying to, you know, uh, get more context engineering to a larger set of platforms, and we

  28. 6:53

    can, we can raise that watermark. So if we go into this in a little bit more detail, the question I often get is, "Okay, well, the... what is that?

  29. 7:01

    If that's all gray, what's, what's that made out of?" So here I'm able to, um, get the data and actually look at individual prompts and what actually makes them up.

  30. 7:11

    So when you look at agentic data, especially agentic coding, the actual user input is only a really small part of it. And you can kind of see it here just visually, that if you just scan across the, the lighter watercolors, uh, the, um, the system prompt and the user text itself, and the rest of it is tool

  31. 7:30

    use and tool responses. So, uh, this is, this one in particular is from Claude Code, where you're spending a lot of time, um, where the, the system is, you know, doing like, for example, a, a Bash command.

  32. 7:42

    It's grabbing something, it's getting a result, and then it's doing something else. So where, where, where this really shows out in the data is if you actually look at the median time between requests, it may be something for, for a conversation that looks like that.

  33. 7:54

    We have data for billions and billions and billions and billions of tokens. Um, the median time is ten seconds, fifteen seconds maybe. Um, that heavily depends on whether a human's involved in checking every single, uh, tool use.

  34. 8:08

    But the meantime is in the minutes because the human... or even hours, because the human time to respond is much, much, much higher. And that's what we were showing before of the two sides of the loop.

  35. 8:18

    So the other thing that's interesting and, and something that's very common today is, is, uh, is multi-agent. So you might have a core agent, which I've shown here as the orchestrator, and then you've got these sub-agents that are like spun up to do individual tasks.

  36. 8:31

    And depending on the type of agentic, uh, coding, um, or just any agentic software in general, these agents or these sub-agents may be short-lived, as in their context does not endure between one wake-up and the next, or there are some, some when they do endure.

  37. 8:49

    And it's really important to use our agents because it allows us to create, to effectively target more context at very particular parts of what the problem you're trying to solve.

  38. 8:59

    But as a result, you do actually end up using more context, and I'll explain that very shortly. But if you visualize this gray section a different way and I show you the colors, you can kind of see how there's this common relationship of the common context between all of them.

  39. 9:14

    Again, this is, varies a little bit depending on Codex versus Claude Code versus, versus others. But you can see how it changes over time and how the agents, um, relate to each other and have this common understanding, and then back to the orchestrator to, to wake up the next agent.

  40. 9:32

    The, the, the, the thing that we're here to talk about today, though, mainly is that like while there's a lot of gray that could be cached, the reality is very different.

  41. 9:40

    So if you send this to an inference provider, what ends up happening is you don't actually get one hundred percent of the cache hits that you could, um, that you could get.

  42. 9:50

    Now, why does this matter? Well, there's two ways to look at this. If you're paying for API tokens, uh, you're literally... it's literally costing you more money because every time you see a yellow here, and this is just a simple example, you're paying input token costs.

  43. 10:06

    So you're re, you're refreshing your cache and you're paying a full hit for that, so potentially ten times more than, than what you were if it was cached. If you're a subscription user and you're thinking, "Well, I don't care about the cost.

  44. 10:18

    I don't pay for that, I pay a flat rate," that is true, but you're still, like we said before, you're paying for a subscription and that subscription is rate limited due, due to your cache usage, and, um, you may actually hit rate limits further, uh, or quicker.

  45. 10:34

    So that's something that we want to be able to do, and we work with a lot of providers today to, to remove as much of this as possible. That's good for the user experience and it's also good for the provider.

  46. 10:45

    So why does this happen? Well, I mean, it, it... If you think about the last graph where I show the columns, they're, they're not, they don't take into account time.

  47. 10:53

    They're just one after the other after the other. But there's obviously, um, a, a, a temporal, uh, way to look at this. So this is the way that I like to think about it, and I know this is a little bit more of a complex graph to look at, but bear with me for a second.

  48. 11:07

    So on the left-hand side, I'm talking about working set. So that's the number of tokens that the cache system is holding in its memory based on different time to lives of the co- of the actual cache itself.

  49. 11:19

    And then the, the bit at the top, the dotted lines based on the right-hand secondary axis is showing the cache hit rate as a result. So the red is showing one minute time to live, and what you can see is there's prompts here at the start on the left where the, um, it's thrashing up and down.

  50. 11:38

    And the reason it's doing that is the time between requests at that period is, is longer than one minute. So you're getting a period where you might, uh, take the cache, get a hit or two, and then drop the cache, and then you get another one, you've got to refresh it.

  51. 11:53

    So it, it just, it doesn't really make sense, right? You go to five minutes, which is the blue, and you can now ride out more and more of those cache hits.

  52. 12:01

    And as a result, you get a higher cache hit rate. You can see it at that very start, um, up there, uh, comparing the two. But then you're still missing many others.

  53. 12:11

    There's still many times where the, the time between a request is even larger. So the next one up is showing one hour. And while that requires the cache system to hold, uh, you know, a little bit more tokens in cache and eventually quite a fair bit more tokens in cache, it's got to hold it for a longer

  54. 12:29

    period of time. But the result to the end user is a better, um, actual experience and to the enterpr- to the, uh, inference provider, which I'll show very shortly, it's a much better experience for them as well.

  55. 12:41

    The problem, though, is to do that, you need to be able to k- hold a lot of tokens in cache, and you need good memory tiers to support that.

  56. 12:49

    Um, so the next thing I want to go into is that a lot of people think of... cache hit rate isn't really something that a human's able to really internalize well.

  57. 13:01

    So another way that I can visualize it is by thinking about it in terms of the number of times on average that a chunk of, of tokens, which is a group of tokens, is refreshed.

  58. 13:11

    So in this particular conversation that we're looking at here, you can see that there's this, this is showing the relationship of as I increase the time to live, how that affects my cache hit rate.

  59. 13:21

    But it also shows, based on the secondary axis, that at one minute I'm literally rep- re- uh, prefilling like fifteen, sixteen times the same tokens. And over time we can get that all the way down to approaching one, um, and, um, make significant differences to, again, the experience of both the user and the inference provider.

  60. 13:46

    So with that, what I'd like to do now is go into the, the context engineering side of it, some of the lessons we learned and, um, just sort of really drive this home.

  61. 13:55

    So now I want you to think about, uh, what I think will, will be common in twenty twenty-six and onwards of people s- hosting their own or having their own dedicated systems hosting for them.

  62. 14:06

    So imagine you being an inference provider now. Okay, so now what I want you to think of is think of yourself as an inference provider. Uh, maybe you've, um, you've, you know, worked with us or one of our partners to build our own, your own self-hosted instance.

  63. 14:19

    Um, and, uh, you want to get the most out of it. What this graph is showing you is, uh, a relationship between a certain context length and the cache hit rate and how many output tokens you get as a result of that cache hit rate.

  64. 14:33

    Now, the first thing you'll see is it's not linear, and, uh, it, it... and the, the shape of this curve will change based on the context length, based on the accelerators you use.

  65. 14:43

    Ba- there's lots of things that come into it, how you do pis- uh, disagg and prefill. Uh, th- there's a lot of stuff that comes into it, but the c- the, the curve is more or less the same.

  66. 14:54

    And if I asked you as an inference provider, where do you want to be? You'd obviously say C, and if you're in A or B, you're def- you're not making money or you're not getting enough value out of the system.

  67. 15:05

    And inference providers that we work with, that they, that they have the same answer obviously. So the question is, well, how do they keep in C? And this is where it goes back to a, a slide that, um, Val showed earlier, where what they're doing is they're incentivizing users to stay within C.

  68. 15:24

    And this is where we c- we came to the realization that a lot of the times, because of how much cache hit rate imp- uh, impacts your actual output, that's why s- you're buying cache allotments in storage when you're actually buying subscription services, because it is so important to them that you stay in a certain cache hit

  69. 15:43

    rate band, especially for agentic workflows. Otherwise they literally... you'll just melt the GPU clusters that they have. Um, and I, and I think it's a really powerful thing to, to have in your head about how that works.

  70. 15:57

    So what we're going to do now is go through and think about, okay, well, what, what makes up this token storage?

  71. 16:05

    So when you think about the token storage, there's lots of aspects that, uh, the memory tiers that support the token storage need to be able to do. But to really make it really, really simple, it's literally as, as, a- as simple as you need enough capacity in these memory tiers so that you can hold a optimal amount

  72. 16:25

    of cache. Uh, if you think back to the, the slides I just showed, there's this point where having more cache helps you a little bit, but it kind of gets to a point of diminishing returns.

  73. 16:36

    Um, w- you need to get at least to that point, and you need to be able to store extremely fast into it, because if you can't, you're going to be dropping KVs before they're in the memory tier or you're going to be blocking GPUs, which is probably even worse.

  74. 16:49

    And then the other way you need to do it is you need to be able to fetch from that token storage very, very rapidly so that you can, again, not block the GPUs.

  75. 16:57

    They're the primary first-class citizen of this whole system.

  76. 17:02

    So what does it look like? So there's a few different types of memory tiers. The most common obviously is HBM and, uh, Val and I would love it if all our sessions were in HBM at all times.

  77. 17:10

    It's just not reasonable. Um, there's many reasons for this around how the batch works, but which we're not going to go into today. But the point is, is that the, the, the main common way that this is done today is DRAM.

  78. 17:22

    And there's nothing really wrong with DRAM as such. It, it, it's sort of a means to an end, but it's quite limited in size. It's, it's okay in terms of performance.

  79. 17:31

    But the other thing is, is it's tightly coupled with the compute. So if you want to expand your DRAM, there's not really many good ways to do that. There are some technologies out there that kind of do this, but the way they're implemented, they kind of just hurt your performance.

  80. 17:45

    And that's what I'm showing with pooled DRAM. You could pool more together, but it's, you know, it's kind of a, uh, uh, it, it doesn't help that much. So what we at WEKA, um, did is we took all the durable advantages of our product, which has been, you know, tried and tested in AI training and HVC environments,

  81. 18:06

    and Augmented Memory Grid is basically a, a supported, um, optimized connector between the inference systems and our, um, existing product. And because we're backed by NVMe, we- we're, we're much denser.

  82. 18:21

    We're like a thousand times, depending on how you look at it, denser. It's quite significant. And then I show another example of, uh, a storage at the top there where, you know, not, not something sluggish, something that can still get fifty, sixty gigabytes a second, but, uh, and it has the capacity, but still relative to what we're

  83. 18:39

    talking about is, is still quite slow. Okay. So then moving on to how do we test this? So again, um, we, we talked about how we're, we've open sourced this.

  84. 18:51

    Um, basically, um, Val already covered the, the main part of it and that the fact that it, it, it acts like it's an inference provider. It's trying to keep the load within two SLOs if you enable them.

  85. 19:02

    You actually don't have to enable them, and it'll just go as hard as it can regardless of, of an SLO being time to first token or output tokens per request.

  86. 19:12

    But the main thing that it can do is you can either set a static number of coding agent users, or you can, um, increase the number of those users over time so that you can slowly utilize more of the memory tiers and be able to compare different configurations.

  87. 19:30

    So there's two ways that it works. Um, I'll just be quick through these sections 'cause you can read about this. I have a blog that explains how I do with the testing that goes through all of this in detail, and there's obviously the GitHub as well.

  88. 19:43

    But basically it can do the initial working set and then sequentially go through those prompts. So this will be very, very, very deterministic 'cause as soon as you over- overflow the memory tier even the slightest bit, you'll see a massive drop-off in performance.

  89. 19:59

    But the other way that it can be done, and realistically the more fairer way that it can be done, is you can ex- increase the size over time, so the amount of concurrent users that you're accessing out of a pool, and you can randomly sample where in that sample set you'll get that, uh, prompt from.

  90. 20:16

    So sometimes you might be hitting HBM, sometimes you might be hitting your, your memory tier two, let's say it's that, let's say that's DRAM, and you get a really nice blended number.

  91. 20:26

    So with that, let's go in and tell you, show you some results and just sort of explain and, and show why we're so excited about what we're talking about today.

  92. 20:36

    So this is showing three comparisons. Comparison number one is HBM with WEKA, that's the purple. Uh, there's orange, which is HBM and DRAM. And there's the, you know, orangey pinky color with, uh, HBM plus DRAM plus that, uh, other, uh, POSIX system that I talked about earlier.

  93. 20:54

    The dotted line is showing, uh, concurrent users, so the amount, the amount of users that are in a pool, and that's increasing over time. So in the initial shaded area, you can see that all three of them get an advantage of HBM.

  94. 21:08

    The primary, uh, hit out of, uh, cache hit rate is coming out of HBM. But then over time, as we increase the users more and more and more, you're overflowing what the DRAM system, what the DRAM memory tier can do, and both orange and the pinky color start to drop off quite dramatically.

  95. 21:27

    Um, we also, from a WEKA perspective, also drop off 'cause we get less and less advantage from HBM, so we have to, uh, pull back our concurrency a little bit.

  96. 21:37

    The system does automatically, the, uh, the benchmarking tool. But then once we've sort of got down to the steady state, all three start to like, um, level out a little bit.

  97. 21:48

    But the main difference is, is that once you get down to that steady state, we can maintain that at a much higher amount of users at a much higher amount of output tokens.

  98. 22:00

    The other way that you look at this is, um, that was a decode-focused role. Um, if you look at a prefill-focused role, if you're doing disagg prefill, um, then the prefill's actually even better result for us because the systems, the GPUs are so much more efficient when you're doing large, um, batches of prefill tokens with a single

  99. 22:21

    decode. Um, then we, we can basically saturate things more fairly and, um, and it continues. Now the main difference between pink and orange is that we, uh, sorry, purple and orange, is that we have a lot more cache, so we can hit a lot more.

  100. 22:39

    The interesting thing about the orangey pinky color is that it also has the ability to hit every single thing that it's possible, but it's not fast enough to get it into the GPU for it to make a difference.

  101. 22:51

    And that's why we're sort of showing the difference between these three, 'cause with purple you're getting the advantage of capacity but at DRAM speed, so you can maintain that benefit for longer periods of time.

  102. 23:03

    And then maybe, Val, I'll hand back to you.

  103. 23:07

    Absolutely. No, that was a great walkthrough, Callan, of all of your research and benchmark results in WEKA Labs. So once again, we're thrilled to be announcing the open sourcing of this context platform engineering toolkit today.

  104. 23:18

    Please do download it, use it, give us your feedback. Again, feel free to fork it and improve it yourself. And we look forward together to just contributing to less token anxiety overall, less prompt cache arbitrage, and more context and context platform engineering in the future.

  105. 23:33

    A nice QR code for you to find out even more information. And at the end of this video in, um, in the actual transcript section and so forth, there'll be links to all the blogs we referenced here.

  106. 23:44

    So thank you for joining us today, and we look forward to carrying on the context platform engineering conversation with you in the future.