<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Kvcache on Yuchen You</title>
    <link>https://www.whoami-wesleyyou.top/tags/kvcache/</link>
    <description>Recent content in Kvcache on Yuchen You</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <lastBuildDate>Thu, 16 Jul 2026 13:46:08 +0800</lastBuildDate>
    <atom:link href="https://www.whoami-wesleyyou.top/tags/kvcache/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>7.cachegen</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/16/mlsys/InferenceEngine/7.cachegen/</link>
      <pubDate>Thu, 16 Jul 2026 13:46:08 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/16/mlsys/InferenceEngine/7.cachegen/</guid>
      <description>&lt;h2 id=&#34;背景&#34;&gt;背景&lt;/h2&gt;
&lt;h3 id=&#34;tokenwise-locality&#34;&gt;Tokenwise locality&lt;/h3&gt;
&lt;h3 id=&#34;layerwise-sensitivity-to-loss&#34;&gt;Layerwise sensitivity to loss&lt;/h3&gt;
&lt;h2 id=&#34;encoding-和-decoding&#34;&gt;Encoding 和 Decoding&lt;/h2&gt;
&lt;h3 id=&#34;delta-encoding&#34;&gt;Delta Encoding&lt;/h3&gt;
&lt;p&gt;我们在构建搜索引擎的底层存储编码格式的时候用过一个 Delta Encoding/Decoding 的思路，将对应 token 坐标通过相对位置来存储，可以让大数字变成较小的相对位移来存储来减少存储量；这里用到了非常类似的思路: 对于一个 token 的值 (KV cache)，我们用相对于前面值的变化量来存储，当然在这里需要一个 microbench 来说明这个存储在 token kv 背景下确实可以减少存储量:&lt;/p&gt;</description>
    </item>
    <item>
      <title>3. PagedAttention and the vLLM Engine</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/07/mlsys/InferenceEngine/3.vllm/</link>
      <pubDate>Tue, 07 Jul 2026 23:27:49 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/07/mlsys/InferenceEngine/3.vllm/</guid>
      <description>&lt;h2 id=&#34;kv-cache-优化的讨论&#34;&gt;KV Cache 优化的讨论&lt;/h2&gt;
&lt;p&gt;对于一个 Transformer Block, 我们应该有 token tensor -&amp;gt; projection -&amp;gt; attention -&amp;gt; FFN 这几个核心步骤; 那么使用 kv cache 的话在 decode 阶段可以把 attention 计算的复杂度降低到 $O(N)$，并且这个可以同时利好 projection 和后续的 ffn 让其不再需要处理完整的 prompt 而是只有最后一个新的 token; 因此 kv cache 的 &lt;strong&gt;存在&lt;/strong&gt; 可以极大地优化一个 decode 推理流程;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
