Researchers testing an eight-pass version of the DeepSeek V4.1-Flash architecture found that four GB200 GPUs could hold 38 concurrent 128K-token decoding requests when model layers and passes shared a cache. On the same hardware, storing a separate cache for every layer and pass left too little memory for even one such request. The shared design used 1/36.8 as much global key-value (KV) cache per token as that baseline.
The result is a gain in serving capacity, not a speedup for an individual request. In a separate test with 8K input tokens and 1K output tokens, the shared-cache design reached 3.6 times the peak throughput of the eight-pass baseline. But on the 552-billion-parameter backbone, a single decoding step with eight passes still took 3.95 times as long as it did in the original model without a loop.
Why keep only the last pass?
In their research paper, researchers from UC San Diego, Tsinghua University and Nanjing University describe running the same 18 encoder layers repeatedly. Each pass takes the previous pass’s output and mixes the original input features back in through a gate. Reusing the weights adds depth without adding parameters, but each pass can produce different keys and values—the records later tokens consult when attending to earlier ones.
The DeepSeek architecture already shares some of those records across layers. A few encoder layers write the global cache for long-range attention, which decoder layers then read. Each layer also keeps a short local cache covering the most recent 128 tokens. Placing the loop in the encoder lets each pass revise what goes into the global cache. A decoder loop, by contrast, repeatedly reads what the encoder wrote without updating it.
To make sharing work across passes as well as layers, the team varied the number of passes per training sequence, averaging about eight. By the eighth pass, the researchers measured only a 1.7% change in the states they tracked. At inference, they kept only the final pass’s historical KV entries for later tokens to read. Across three model sizes trained with variable pass counts, switching from per-pass caching to final-pass caching changed prediction loss by no more than 0.0002 bits per byte (BPB).
What the comparisons showed
Loop placement mattered in a test where a passage repeated verbatim 1,024 tokens later. On a 150-million-parameter model, looping the encoder reduced prediction loss by 0.084 BPB relative to the architecture without a loop. Looping the decoder instead increased loss by 0.005 BPB. The result favors updating the global cache on this particular long-range prediction task.
The serving tests also isolated the contribution of cross-pass sharing: sharing the global cache across layers alone accommodated seven concurrent 128K requests on the four GPUs. Keeping only the last pass’s cache raised that count to 38.
Long prompts still carry a computational cost because the encoder also loops during prefill, the stage that processes the input before generation begins. The team tested four passes during prefill and eight during decoding. Compared with using eight throughout, this nearly halved prefill time while retaining more than 99% of the measured accuracy gain.