ResearchPublication
Scaling open-weight inference for long-context agents
A post of August 2026 on moving toqan toward open-weight models: how to size, measure and buy inference for a long-context agent from its real traffic, with GLM-5.2 as the example.

Where this comes from
This is a post on the Prosus AI Tech Blog, written by Asad Ismail and published on 11 August 2026. It sets out how a long-context agent was evaluated and deployed on open-weight models, from the work of moving toqan, which the post calls Prosus’s AI workspace, toward open-weight inference, with GLM-5.2 as its example. What follows is from the post.
What the post asks
Open-weight models have improved quickly, the post says, and self-hosting them is now a viable alternative to proprietary model APIs for many production deployments. Its question is how to size, benchmark and run such a model efficiently under real production traffic, from what can be measured and controlled on the client side.
The workload is a long-running agent that people use directly: they come back after days or weeks, and conversations regularly run past 100 turns. Two measures carry the post. Time to first token (TTFT) is how long a request waits before its answer starts. Goodput is the traffic a system can serve while still meeting its latency targets, and the post sizes a deployment by it.
The method, in order
Define the workload
From the telemetry of real production calls: input and output tokens, how unevenly requests arrive, cache hits and misses, and the latency targets the business needs. Requests are benchmarked as they are, with full tool definitions and the whole conversation in every turn.
Measure TTFT with a cold cache
How TTFT grows with the context when nothing is cached, as for a new session or a turn sent to a replica that does not hold it. Past a crossover point each further 100k tokens costs disproportionately more time.
Measure what the cache saves
How TTFT changes as more of a request is served from the cache. A full hit still has a floor, since reading and attending over cached keys and values takes time.
Replay the workload under load
The production traffic, sustained for 15 minutes and run three times, to find what one replica serves within the targets. The post publishes the code as InferBench.
Optimize from the measurements
Context, cache, routing and capacity.
What it found
- the peak to plan for, with an average of roughly 1 query per second
- 5.8 QPS
- what one replica served within the targets, at a cache hit rate of about 0.59
- About 0.15 QPS
- replicas, the first estimate of the fleet for that peak
- About 39
- per replica once the mean context fell from about 115k to about 60k tokens and the longest requests were capped
- About 0.29 QPS
Capping only the longest requests, with the mean context held where it was, barely moved what a replica could serve. Lowering the mean as well, by condensing or summarizing the conversation, is the change the post says alters the size of the fleet, so its advice is to try condensing context before adding GPUs.
Keeping the cache
The cache is the second lever, and the post gives two rules for the client. Keep the start of every request byte for byte the same across turns, and put values that change, such as timestamps, after it. And measure how long the cache lasts against the gaps in the workload, since a long-running agent waits on tool calls, approvals and people.
- the floor of TTFT with the context served from cache, at 200k tokens
- About 2.9 s
- the same floor at 400k tokens
- About 5.2 s
- idle was enough to lose more than half the cache; 15 minutes was close to a cold start
- 5 minutes
When each replica keeps its own cache, routing decides the rest: session affinity sends follow-up turns back to the replica that holds their cache, and a few busy sessions can then crowd a few replicas. The post puts it in one line: “Cache-hit rate is a function of prefix stability, idle-gap behavior, and routing.”
Memory, and buying capacity
A replica’s memory sets how much cache it holds before it evicts any: in the post’s example, a replica of eight B200 GPUs at FP8 has much more room for cache than one of four at NVFP4. Serverless inference suits traffic that is bursty, uncertain or still being optimized, and dedicated capacity pays when utilization is high enough. A common failure, the post says, is to buy dedicated capacity against the utilization one expects before measuring it. Its advice is to reserve the predictable base load, send bursts to elastic capacity, and buy against the utilization the fleet reaches while still meeting its targets.
What comes after
The post names further work for the long tail: a router that knows each replica’s queue, prefill and decode on separate GPUs, and HiCache, which keeps cache in host memory and storage below the GPU. A provider is also checked on region, retention and contract terms, on how it behaves under load, and on its economics, and any of these not measured is marked unknown. The post concludes that operational efficiency is now the main barrier to moving long-context agents from proprietary APIs to open-weight models, and that the way through is to optimize context first, protect the cache and size the fleet for goodput.
The post
Scaling Open-Weight Inference for Long-Context AgentsAsad Ismail. Prosus AI Tech Blog, 2026Author
Asad Ismail
References
- Scaling Open-Weight Inference for Long-Context AgentsAsad Ismail. Prosus AI Tech Blog, Medium, 11 August 2026
- InferBenchGitHub: the post’s load test, to run on one’s own traffic
- GLM-5.2-NVFP4NVIDIA, Hugging Face: the model card the post cites