AI Engineer World's Fair 2026
Same Model, Different Speed: Why Your Inference Provider Matters — FriendliAI
Loading slides…
Read the talk
Same Model, Different Speed: Why Your Inference Provider Matters
Yunmo Koo explains how prefix reuse, cache placement and adaptive speculative decoding change the experience of running an open-weight model—and why agent completion depends on reliability as well as token speed.
From a talk by Yunmo Koo
At a glance
Ideas worth remembering
The same model and coding-agent workflow can have different completion times on different providers; the inference stack contributes to the user’s experience.
Prefix caching saves repeated prefill work, but distributed reuse also needs routing to the replica holding the prefix and memory management across GPU, CPU and colder storage.
Speculation trades drafting and validation overhead against accepted tokens. FriendliAI chooses between model-based and model-free methods at runtime and describes adapting its draft model to production traffic.
Evaluate providers on your own prompts and traffic, including errors and completed agent tasks: one failed model call can invalidate a longer workflow.
Two working games make cost the next question
A single prompt asks two models to build a tower defense game. Both produce working implementations: a map, turrets and enemies that the turrets shoot when they enter range. For Yunmo Koo, founding engineer at FriendliAI, this small experiment makes a practical question clearer than a leaderboard alone: once an open-weight model produces a useful result, what does it cost to keep using it?
The comparison pairs GLM 5.2 with Claude Opus 4.8. Koo describes their game structure and quality as similar. What does that similarity amount to? The maps and range-based turret behavior are the concrete features to compare in the demonstration; they establish a working game in each case, rather than a comprehensive evaluation of coding ability.
For this task, Koo reports that the GLM 5.2 implementation was more than 5.6 times cheaper than the Opus 4.8 implementation. Repeated agent iterations make that difference consequential: each additional attempt adds another inference bill, so a lower cost per attempt changes how much work a team can afford. The recording gives a task-specific comparison without a detailed billing breakdown, so the ratio should stay attached to this experiment.
The opening context is a shift in which models Koo considers usable. His audience mostly uses closed-weight frontier models, while he is moving more of his own workload toward open weights. Coding, reasoning and tool-use benchmark results motivate that move. His claim is scoped to many workloads: when model capability clears the required threshold, production speed, reliability and cost become the next decisions.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Hold the model and agent fixed; change the provider
The next demonstration changes the provider while keeping GLM 5.2 and the coding-agent workflow the same. The task is a Candy Crush-style mobile game called Model Crush. FriendliAI, shown on the left, finishes within two minutes; the other provider takes more than three. Where does the difference become visible? The useful comparison is the progress toward a completed game on each side, because completion time is what the agent’s user experiences. This is one demonstrated run, rather than an established latency distribution.
Identical weights do not imply identical service. Latency, throughput and reliability depend on the system that runs those weights. Koo points to a provider comparison snapshot to reinforce that these differences are measurable, then opens up the stack behind them: cache systems, routing policy, scheduling, quantization and GPU kernels all contribute to the result.
FriendliAI’s engineering premise is that these parts must work together. Batching and scheduling determine how requests share execution; cache management determines how much previous work can be reused; speculative decoding changes how output tokens are produced. The game comparison does not isolate the contribution of any one optimization. It motivates examining the whole inference engine rather than treating the API endpoint as interchangeable plumbing.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Reuse the long input—and route requests to where it lives
Agent requests often have an uneven shape: very long inputs and relatively short outputs. Koo describes inputs exceeding 10,000 tokens, with roughly 50% to 80–90% of tokens repeated across requests in many workloads he encounters. Under those conditions, processing the input can dominate compute cost. This input-processing stage is called prefill; it builds the key-value, or KV, cache used during generation.
A shared prefix creates an opportunity to avoid doing that work again. When a new request begins with a prefix already processed for an earlier request, the engine can reuse the corresponding cached tensors and skip that prefix computation. The immediate benefit is lower time to first token, or TTFT: less input work stands between receiving the request and starting its response.
Two separate mechanisms make that reuse practical at scale:
- Cache-aware routing. KV caches live on individual serving replicas. The router must send a request to a replica holding its relevant prefix; sending it elsewhere loses the reuse benefit.
- A memory hierarchy. KV caches consume substantial memory and, for large models with long contexts, can exceed the model weights in size. Hot cache stays in fast, limited GPU VRAM, warm cache in CPU RAM, and colder cache can move to NVMe or disk. Less-used blocks are offloaded and prefetched when needed.
Why are both mechanisms necessary? The diagram separates two placement decisions: which replica receives a request, and where cached blocks reside within the memory hierarchy. Routing makes an existing prefix reachable by the request; tiered storage preserves more cached work than scarce GPU memory alone can hold. Together, they reduce repeated prefill work for the long, repetitive inputs described here.
Request placement and cache placement solve different problems
Read the diagram as text
- Incoming request. routing — Shares a prefix with a previous request.
- Cache-aware router. routing — Selects the replica holding the relevant prefix.
- Replica with matching cache. routing — Reuses prefix tensors instead of recomputing that input.
- GPU VRAM. cache-storage — Hot cache; fastest storage, with limited capacity.
- CPU RAM. cache-storage — Warm cache.
- NVMe or disk. cache-storage — Colder cache.
- Incoming request → Cache-aware router: Route the incoming request.
- Cache-aware router → Replica with matching cache: Send to the replica with the prefix.
- GPU VRAM → CPU RAM: Offload less-used blocks.
- GPU VRAM → NVMe or disk: Offload colder blocks.
- CPU RAM → GPU VRAM: Prefetch when needed.
- NVMe or disk → GPU VRAM: Prefetch when needed.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Draft several tokens, then make verification worthwhile
After reducing the wait before generation begins, the next problem is generation itself. Standard autoregressive decoding produces one token per forward pass. That makes progress sequential, and Koo notes that the GPU is often underused during decoding. Speculative decoding proposes several candidate tokens ahead, then asks the target model to validate them in a single pass.
Accepted candidates let one target-model pass advance the output by multiple tokens, reducing time per output token. Koo calls accepted tokens “free”; the useful interpretation is that they avoid separate target-model passes, since drafting and validation still have costs. The target model remains responsible for validation, which is the basis of the talk’s claim that this acceleration preserves output quality.
The candidates can come from two sources, each with a different cost:
- Model-based speculation. A small draft model predicts future tokens. It can achieve a higher acceptance rate, but running that model requires extra compute.
- Model-free speculation. Patterns in the prompt or earlier output supply candidates. This has lower overhead and works best when the next output resembles existing context.
The fastest choice for one request may add undesirable work to the batch serving it. Validation has overhead, so speculation must earn back its cost through accepted tokens. FriendliAI uses a hybrid runtime that selects between model-based and model-free methods according to workload and request characteristics. The recording describes that decision at a high level without specifying selection thresholds.
There is also a second timescale of adaptation. Beyond choosing a method for the current request, Koo describes “self-evolving speculation”: the draft model adapts using real serving traffic so its predictions better match the workload actually running in production. This makes the speculator workload-specific over time; the talk does not detail its training or update procedure.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A fast call still has to finish
“Reliability is part of speed” becomes concrete when an agent needs several model calls to finish one task. A timeout, a server-side 5xx error or a 429 rate-limit response can interrupt the run. One failed call in the middle can invalidate the workflow, so low average response latency alone does not describe how quickly users receive completed work.
That changes the optimization target from token throughput alone to the full API experience, including error rate and uptime. Koo cites a provider snapshot for GLM 5.1 Pro reporting more than 99.9% uptime on FriendliAI. The recording does not establish the snapshot’s measurement window or workload, so that figure supports the presented model-specific service comparison rather than a general availability guarantee.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Test the prompts and traffic you actually serve
Provider speed claims are conditional. A benchmark uses particular inputs and operating conditions; an application brings its own prompt lengths, traffic patterns and latency expectations. Koo’s recommendation is to test those actual conditions and compare speed, reliability, cost and quality together. Long shared prefixes and context-like output patterns matter because they directly affect the cache reuse and speculation mechanisms described earlier.
The closing customer example is Kilo Code, which Koo describes as a coding-agent platform processing several trillion tokens each week. After testing multiple inference providers, its GLM speed tests reportedly found FriendliAI up to seven times faster, with a substantially lower error rate. This is a customer result relayed in the talk; the recording does not supply enough test detail to transfer that multiplier to another application.
The practical next step is to bring a real workload to the provider comparison. Hold the model and agent workflow steady, as in Model Crush, and judge the completed task alongside inference cost and failures. The tower defense example asks whether the model can produce useful work economically. The provider example asks how quickly and reliably that same class of work reaches the user.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Full transcript
Loading transcript…