{"id":1884,"date":"2026-12-05T16:05:24","date_gmt":"2026-12-05T16:05:24","guid":{"rendered":"https:\/\/blockoala.com\/index.php\/2026\/12\/05\/sharing-one-cache-across-eight-encoder-passes-lets-a-deepseek-variant-serve-38-long-context-requests\/"},"modified":"2026-12-05T16:05:24","modified_gmt":"2026-12-05T16:05:24","slug":"sharing-one-cache-across-eight-encoder-passes-lets-a-deepseek-variant-serve-38-long-context-requests","status":"publish","type":"post","link":"https:\/\/blockoala.com\/index.php\/2026\/12\/05\/sharing-one-cache-across-eight-encoder-passes-lets-a-deepseek-variant-serve-38-long-context-requests\/","title":{"rendered":"Sharing one cache across eight encoder passes lets a DeepSeek variant serve 38 long-context requests"},"content":{"rendered":"<p>Four GB200 GPUs could accommodate 38 concurrent 128K-token decoding requests in a test of a modified DeepSeek V4.1-Flash architecture. With the same eight-pass computation but a separate cache for every layer and pass, the hardware could not fit even one such request. Researchers from UC San Diego, Tsinghua University and Nanjing University <a href=\"https:\/\/www.alphaxiv.org\/pdf\/2611.13378\" rel=\"noopener nofollow\" target=\"_blank\">report in their paper<\/a> that sharing the cache cut <strong>global key-value (KV) memory per token to 1\/36.8 of the baseline<\/strong>. That is a saving in one part of inference memory, not a corresponding reduction in computation.<\/p>\n<h2>Why the final pass can stand in for the others<\/h2>\n<p>A KV cache stores information about earlier tokens so the model can refer to them as it generates text. In the DeepSeek architecture used for the study, a few encoder layers write the global cache, which the decoder layers share. Each layer also keeps a local cache covering the most recent 128 tokens.<\/p>\n<p>The researchers put 18 encoder layers in a loop. Each pass feeds its result back through the same weights, with a gate mixing the original input features back in. Placing the loop in the encoder lets each pass refine the information written to the global cache. A loop in the decoder, by contrast, would repeatedly read what the encoder had already written.<\/p>\n<p>Reusing weights does not automatically make the cache reusable: different passes can produce different states. The team trained with a randomly chosen number of passes for each sequence, averaging about eight. By the eighth pass, the researchers measured a state change of just 1.7%. At inference, they kept only the final pass\u2019s cache for earlier tokens. Across three model sizes, switching from separate per-pass caches to the final-pass cache changed prediction loss by no more than 0.0002 bits per byte.<\/p>\n<p>Loop placement also mattered in a test where text repeated verbatim after 1,024 tokens. On a 150-million-parameter model, looping the encoder lowered prediction loss by 0.084 bits per byte relative to the architecture without a loop. Looping the decoder instead raised loss by 0.005 bits per byte.<\/p>\n<h2>More requests at once, but slower individual decoding steps<\/h2>\n<p>The four-GPU test separated the benefits of the two kinds of sharing. Sharing the global cache across layers alone let the system fit seven 128K-token requests. Sharing it across passes as well brought capacity to 38. In a separate workload with 8K input tokens and 1K output tokens per request, the full scheme delivered 3.6 times the peak throughput of the per-layer, per-pass baseline.<\/p>\n<p>That throughput result compares two <strong>eight-pass<\/strong> configurations. Against the original model <strong>without a loop<\/strong>, an eight-pass decoding step on the 552-billion-parameter backbone still took 3.95 times as long. The researchers also tested a compromise for long prompts: use four passes to process the input, then return to eight for generation. In their experiments, that nearly halved input-processing time while retaining more than 99% of the accuracy gain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Four GB200 GPUs could accommodate 38 concurrent 128K-token decoding requests in a test of a modified DeepSeek V4.1-Flash [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1884","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/posts\/1884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/comments?post=1884"}],"version-history":[{"count":0,"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/posts\/1884\/revisions"}],"wp:attachment":[{"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/media?parent=1884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/categories?post=1884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blockoala.com\/index.php\/wp-json\/wp\/v2\/tags?post=1884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}