20260706:新增一些文章
This commit is contained in:
38
concepts/autoregressive-drafting.md
Normal file
38
concepts/autoregressive-drafting.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
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]] | TTT(Training-Time Test),horizon=7 |
|
||||
| [[MTP]] | Multi-Token Prediction,DeepSeek 生产基线 |
|
||||
| Medusa (tree) | 多草稿头 + 树验证 |
|
||||
|
||||
## 参考
|
||||
|
||||
- [[DSpark]] — 半自回归架构融合两者优势
|
||||
- [[parallel-drafting|Parallel Drafting]]
|
||||
- [[position-wise-conditional-acceptance|位置条件接受率(Position-wise Conditional Acceptance)]]
|
||||
Reference in New Issue
Block a user