Files
myWiki/concepts/autoregressive-drafting.md

39 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Autoregressive Drafting"
created: 2026-06-28
updated: 2026-06-28
type: concept
tags: [speculative-decoding, llm-inference, sequential-generation]
sources: [DSpark]
---
# Autoregressive Drafting
自回归草稿Autoregressive Drafting是[[speculative-decoding|投机解码Speculative Decoding]]的传统草稿架构:草稿模型逐 token 顺序生成候选序列,每个位置条件化于先前采样的 token。这种显式依赖关系提供了强大的建模能力但草稿延迟随块大小线性增长$T_{draft} \propto \gamma$。
## 结构约束
$O(\gamma)$ 的延迟迫使自回归草稿器使用**小块大小**$\gamma$ 通常为 3-5和**浅层网络**(通常仅 1 层以避免草稿延迟主导总延迟。为补偿块大小不足常配合树验证tree-based verification展开多条候选路径但大量验证 token 会降低整体服务吞吐量。
## 与并行草稿的对比
DSpark 论文的逐位置条件接受率分析揭示了关键洞察:
- **自回归草稿器**在位置 1 起步较低(浅网络容量劣势,如 Chat: ~0.53 vs 并行 ~0.72),但后续位置**维持或上升**——得益于条件化于已采样 token 的语义路径锁定
- **并行草稿器**[[parallel-drafting]])在位置 1 起步较高(深网络容量优势),但后续位置**快速衰减**
这种结构性差异解释了为何初始 token 的高杠杆使得某些场景下并行草稿器在总体接受长度上反超自回归草稿器。
## 代表方法
| 方法 | 关键机制 |
|------|---------|
| [[Eagle3]] | TTTTraining-Time Testhorizon=7 |
| [[MTP]] | Multi-Token PredictionDeepSeek 生产基线 |
| Medusa (tree) | 多草稿头 + 树验证 |
## 参考
- [[DSpark]] — 半自回归架构融合两者优势
- [[parallel-drafting|Parallel Drafting]]
- [[position-wise-conditional-acceptance|位置条件接受率Position-wise Conditional Acceptance]]