AI news

Agnes Reports 3.54× Faster 512K Cold-Input Prefill in a Two-GPU Test

By 机器之心1 viewsSource: 机器之心
Agnes reports 3.54-fold faster 512K cold-input prefill in its two-GPU test

Agnes reports 512K prefill falling from 231.71s to 65.54s for a 64-layer hybrid-attention model on two PCIe-connected Blackwell GPUs. Active-request limits rise from 8 to 16; component exclusions, quality and latency trade-offs matter, with full integrated quality checks pending.

Editor's check: The following are interim results from the Agnes team under specific Blackwell GPU, PCIe-interconnect, model and workload conditions. This site has not reproduced them. The team's materials explicitly state that the integrated performance comparison also changed resource settings, and full quality acceptance testing of the integrated configuration is not yet complete. Independent component results cannot be added together or substitute for integrated quality testing; production-pool monitoring is also affected by changing real requests. Results across chips and models require separate validation. The closing macro-level price and supply-and-demand figures do not fully identify original statistical sources, models or regions, and should not be treated as universal conditions for all GPUs or data centers.

'Usage limit reached.'

Halfway through a conversation with DeepSeek, the chat suddenly stopped at this message.

In mid-November, some users found that after spending time in the free app or web version, they began seeing this reminder. They had grown used to opening DeepSeek whenever something came up; now, even in the middle of an engaging conversation, they had to pause and wait.

Article illustration

Discussion of DeepSeek's usage limits appeared on Zhihu's trending list.

For users, a quota notice interrupts a conversation. For inference-service teams, it points to an increasingly urgent question: how many more requests can the GPUs already on hand accommodate? A user may issue just one instruction, yet computation on the server may run more than once. Long contexts, multi-turn conversations and increasingly common agent workflows keep adding to that pressure.

Adding compute takes time. Chip supply, data-center construction and supporting power infrastructure cannot be made ready instantly at the press of a button.

Could the GPUs already deployed unleash more of their potential instead?

Agnes recently demonstrated one attempt to do just that.

On a conventional PCIe server, it made targeted optimizations to the open-source SGLang inference engine for a 64-layer hybrid-attention model and released a technical-report repository alongside them.

The results were striking: in a controlled test with two GPUs connected through PCIe, prefill for the same 512K-token cold input fell from 231.71 seconds to 65.54 seconds, a 3.54-fold speedup. No GPUs were added and the inter-GPU interconnect was unchanged.

Article illustration

After optimization, the per-instance concurrency cap rose from 8 to 16. In the before-and-after production-pool monitoring supplied by Agnes, mean aggregate output throughput increased by about 73%. P90 time to first token, a delay users notice keenly, fell from 2.42 seconds to 1.26 seconds, a reduction of about 47.9%.

Article illustration

This suggests a server already equipped with GPUs may still gain service capacity through changes to its inference system. Agnes's engineering work began by tracing how a request was processed and identifying the resource costs along the way.

  • Technical report: https://github.com/AgnesAI-Labs/Inference-Framework-Specialization

'Targeted surgery' inside the inference engine

When a request reaches a server, the GPU is not always busy computing.

In a two-GPU deployment, for example, some computation must wait for intermediate results from the other card before proceeding. Even if compute units still have spare capacity, GPU memory may already be full of model weights and historical state, leaving no room for more requests.

A chip's computing capability must pass through data reads, inter-GPU communication and GPU-memory management before becoming the response speed a user experiences. If one link cannot keep up, it can slow the entire request.

Agnes followed this chain in its optimization work.

Start with the wait users most readily notice: why does an answer take so long to appear after they submit a lengthy document?

At that point, the model is performing prefill, reading and processing the input to prepare for subsequent generation. Although no words have appeared on screen, computation has already begun in the background. The longer the input, the more data this stage must process.

Computation also involves frequent data exchanges. Until intermediate results from a previous step arrive, later computations that depend on them must wait. Processing time for long inputs includes both computation and these waits.

After prefill, the model enters decode, and the rhythm of work changes.

The model begins generating tokens one by one. Each step processes relatively little data but still requires reading weights and synchronizing across GPUs. An execution strategy suited to large batches may not be efficient here. A brief wait repeated throughout generation can accumulate into pauses a user notices.

There is also a constraint throughout the process: GPU memory. It must hold both model weights and the historical information needed for inference.

The hybrid-attention model targeted by Agnes has two different types of historical state to manage: 16 full-attention layers use a KV cache, while 48 GDN layers maintain recurrent state.

These states share limited GPU memory with temporary computation data. The more one request consumes, the less remains for others. A server can therefore hit its memory-capacity limit before exhausting its computing power.

Slow long-input processing, repeated waits during generation and insufficient memory for additional requests may all look like 'the service isn't fast enough,' but their underlying causes differ.

That also makes inference optimization difficult to accomplish merely by accelerating one operator. Once computation speeds up, inter-GPU communication may become the new bottleneck. After historical state is compressed, the system must still account for reading and restoring it. Time and memory saved locally must ultimately translate into gains over the entire request.

For Agnes, the model architecture, two-GPU hardware and PCIe interconnect were fixed. Optimization had to start with execution, finding time savings between computation and data transfers while reducing the GPU memory occupied by historical state.

Reducing waits and freeing GPU memory

When a long document enters the model, the two GPUs must compute together and continually exchange intermediate results. Agnes began by reducing the attention-computation burden, then sought to use the idle intervals during inter-GPU transfers.

The report discloses six optimizations. FP4 Attention, NVFP4 KV Cache, BOLE and GPU L2 weight prefetching are included in the currently confirmed integrated configuration. MBO and small-batch operator adaptation were evaluated separately in independent component tests.

Reading long inputs: less computation and less waiting for GPUs

Agnes first changed two key matrix operations inside attention: QKᵀ and PV. The former computes relationships between input elements; the latter aggregates information according to attention weights. For long inputs containing hundreds of thousands of tokens, both operations are expensive. Agnes designed an FP4 low-precision path to reduce that burden using a 4-bit format.

In an independent component test with 512K tokens, this optimization delivered a 3.09-fold prefill speedup. Format conversion also takes time, however: for short inputs of 1K–2K tokens, P50 latency instead rose by about 3%. On a 200-question subset of LongBench v2, accuracy changed from 64.50% to 63.50%, so acceleration benefits must still be weighed against task performance.

Another change targeted the gaps when GPUs wait for data.

Previously, after a batch finished its current step, it had to wait for the two cards to synchronize results over PCIe before proceeding. MBO, or microbatch overlap, seeks to use that interval: it splits eligible batches into A and B. While A transfers data, the GPU computes B; when A's data arrives, it resumes the next computation.

Communication continues while computation moves ahead.

In an independent component test with 8,192 tokens and no prefix-cache hit, the share of time waiting for communication fell from 46.7% to 13.2%, while time per step fell from 559 ms to 425 ms.

Article illustration

GPU-memory management: slimming down historical information

Next, Agnes turned to historical information held in GPU memory, first compressing the full-attention layers' KV cache from FP8 to NVFP4. Including block-scaling metadata, storage per KV token is about 62.5% of its previous size, theoretically allowing about 1.6 times as many tokens within the same cache budget.

Article illustration

Another saving came from recurrent state in the GDN layers.

During speculative decoding, the system computes several candidate tokens ahead of time, then verifies how far to accept them. Saving a full state at every step is like saving a complete new copy of a document after every edit: duplicated content quickly piles up in GPU memory.

Agnes uses BOLE to change how this information is saved: it retains the initial state and records only lightweight updates at each step. Once verification determines the accepted position, it reconstructs and commits the required state.

The complete state can still be restored without storing a separate copy for every candidate position.

Article illustration

In a component test using the same 16 state slots, BOLE reduced peak GPU-memory consumption per GPU from 29.9 GiB to 23.2 GiB, freeing about 6.7 GiB. That memory can be reallocated to the KV cache or other runtime state, making room for more requests.

Token-by-token generation: preparing weights during idle intervals

During decode, Agnes identified another waiting interval that could be put to use.

Before inter-GPU synchronization finishes, the input required for the next layer is not ready, but the model weights that layer will read are generally already known.

Agnes uses that interval to prefetch some weights from GPU memory into the GPU's internal L2 cache. Once the data arrives, subsequent computation may use those prepared weights directly, avoiding another read wait.

Another experiment was somewhat counterintuitive: making a matrix larger could make computation faster.

During decode, some matrices have only 2, 4 or 8 rows, which general-purpose kernels may not handle well. For BF16 GDN gating projection, Agnes zero-padded the matrix to 16 rows, invoked a more efficient computation path, then extracted the valid results.

In local tests with preallocated buffers, time for the individual operation fell from 19.8 microseconds to 4.21 microseconds. FP8 narrow-matrix output projection also gained an execution path better suited to its shape.

These small-batch operator adaptations remain at the independent-component research stage, however. In GSM8K replay tests, accuracy for the relevant combination changed from 94.77% to 94.28%, failing the preset non-inferiority criterion. They were therefore excluded from the currently confirmed integrated configuration.

Throughput rises, but the user experience must keep pace

Once the four optimizations are combined, their effects must show up in individual requests: can an answer start sooner after a long document is submitted, and can the system accommodate many simultaneous users?

Agnes ran controlled tests with long-document question answering and continuous multi-turn conversations. At 12 concurrent clients, single-turn and multi-turn output throughput increased by 61.3% and 52.7%, respectively, the largest gains for each within the tested concurrency range.

Users also waited less for an answer to begin. At concurrency 8, median time to first token for single-turn conversations fell from 2.302 seconds to 0.525 seconds, while for multi-turn conversations it fell from 2.663 seconds to 0.703 seconds. Both scenarios went from more than two seconds of waiting to less than one second.

Freed GPU memory and adjusted resource settings contributed to these changes as well.

After optimization, the KV cache the GPU could accommodate increased from about 530,000 tokens to about 930,000, leaving more room for historical information. The server's maximum active-request cap in the tests also rose from 8 to 16.

Article illustration

This change also appeared in the production-pool monitoring mentioned at the start: overall output rose and time to first token fell. Changes in actual request volumes can also affect those metrics, however.

In another independent BOLE component test, a BOLE configuration with 32 state slots increased overall throughput over the baseline at concurrency 32, but P50 time per output token, or TPOT, also rose from 9.87 ms to 14.95 ms.

More requests could run together, while each individual answer might be generated more slowly.

Inference-service teams must make trade-offs for their workloads: batch tasks may prioritize total output, while real-time conversations also require close attention to waits and pauses on users' screens.

Getting more from existing compute: another response to scarcity

Returning to the 'usage limit' notices at the start, this has become a widespread problem. Today's AI users are all too familiar with queuing.

Compute underpins everything, and it will remain scarce for the foreseeable future.

According to calculations by a former RAND AI-safety researcher, if user numbers grow tenfold and usage intensity also grows tenfold, inference-compute requirements approach a hundredfold increase. This is the product of two factors—user count and usage per user. Ten times ten is approximately one hundred; that does not itself establish an exponential-growth relationship. The rise of deep-thinking modes and agent workflows is pushing up both multipliers.

GPU prices rose about 48% in 2026, and full-year production capacity for mainstream models was already booked out. Power-connection queues in key North American data-center regions reached seven years. Even with well-funded hyperscalers expected to spend $660 billion–$690 billion on AI infrastructure in 2026, nearly twice their 2025 spending, supply still trails demand.

Under this widening supply-and-demand gap, every percentage-point improvement in GPU utilization translates directly into deliverable business capacity.

With hardware-purchasing budgets constrained and delivery times long, system-level inference-framework optimization can release unused capacity in existing GPUs and support additional AI deployments without extra hardware spending. A 73% gain in mean throughput cannot be directly converted into seven fewer servers. Only under identical workloads, resource settings and service objectives could the output throughput of 10 optimized devices be compared to 17.3 baseline devices; production-pool monitoring alone does not establish that equivalence.

The technical report's final section describes an evolution path. The inference framework separates higher-level capabilities from low-level implementation. Request scheduling, state management, admission gating and dynamic path switching do not depend on a particular chip's instruction set, providing a basis for reuse across hardware.

Thus, when target hardware changes from a PCIe server to another GPU architecture, higher-level scheduling and management logic can be retained while lower-level modules are replaced according to the new chip's characteristics.

Building on this, if hardware-specific inference specialization can be turned into a systematic methodology and tools that adapt to new chips and server configurations at relatively low marginal cost, 'getting more from existing compute' could expand from a single case into a scalable infrastructure capability, potentially extending to China's growing domestic compute clusters.

Today's training and inference servers resemble internal-combustion engines at a point where every possible method of extracting more combustion efficiency deserves consideration. Before a 'new-energy vehicle' revolution in compute hardware, 'getting more from existing compute' will be a long-term, high-value engineering pursuit in AI infrastructure.

This article comes from the WeChat public account 'Machine Heart'; author: Machine Heart.

Related topics

After reading

Join the AINRK community

Read how to join the community and connect with people working in AI.

Community information (opens in a new tab)