<?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>Decoding on Yuchen You</title>
    <link>https://www.whoami-wesleyyou.top/tags/decoding/</link>
    <description>Recent content in Decoding on Yuchen You</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <lastBuildDate>Thu, 23 Jul 2026 14:17:34 +0800</lastBuildDate>
    <atom:link href="https://www.whoami-wesleyyou.top/tags/decoding/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>3. Speculative Decoding</title>
      <link>https://www.whoami-wesleyyou.top/2026/07/23/mlsys/LanguageModel/3.speculativedecoding/</link>
      <pubDate>Thu, 23 Jul 2026 14:17:34 +0800</pubDate>
      <guid>https://www.whoami-wesleyyou.top/2026/07/23/mlsys/LanguageModel/3.speculativedecoding/</guid>
      <description>&lt;h2 id=&#34;speculative-decoding-的朴素思想&#34;&gt;Speculative Decoding 的朴素思想&lt;/h2&gt;
&lt;p&gt;想要加速一个 auto-regressive 模型的推理, 可以先猜测合理的上下文, 再让大模型一次验证多个位置; 比如已经有 prefix, 小模型先猜出 &lt;code&gt;I love cats&lt;/code&gt;, 大模型验证后保留 &lt;code&gt;I love&lt;/code&gt;, 在 &lt;code&gt;cats&lt;/code&gt; 这里拒绝并补出 &lt;code&gt;dogs&lt;/code&gt;, 后面基于 &lt;code&gt;cats&lt;/code&gt; 生成的内容就不能继续保留;&lt;/p&gt;
&lt;p&gt;这里有两个角色: &lt;strong&gt;Draft Model&lt;/strong&gt; 负责快速生成候选, &lt;strong&gt;Target Model&lt;/strong&gt; 负责验证和确定最终输出; 上面的例子是在说明接受前缀和截断的位置, 随机 sampling 下的接受规则还需要下面的概率推导;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
