Files
myWiki/concepts/cross-mode-collision.md

42 lines
1.8 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: "Cross-Mode Collision"
created: 2026-06-28
updated: 2026-06-28
type: concept
tags: [speculative-decoding, parallel-generation, quality-degradation]
sources: [DSpark]
---
# Cross-Mode Collision
跨模态碰撞是[[parallel-drafting|并行草稿Parallel Drafting]]的固有缺陷:当并行草稿器独立预测块内每个位置的 token 时,各位置边缘化所有可能的前驱分布,而非条件化于实际采样的 token导致产生不一致的 token 序列。
## 典型示例
上下文 "Let's..." 允许多种延续:
- 路径 A: "Let's go to the"
- 路径 B: "Let me think about"
并行草稿器可能产生:
- "Let's me to the"(混合了路径 A 和 B
- "Let go think about"(同样不连贯)
## 根本原因
每个位置 $k$ 的边缘分布 $p_k^d(x_k)$ 在所有可能的 $x_{k-1}$ 上求期望,但草稿阶段没有已确定的 $x_{k-1}$。一旦某些 token 采样了特定语义路径,后续 token 却无法利用这一已确定的方向。
## 后果
导致**后缀接受率衰减suffix decay**DSpark 论文的逐位置分析显示并行草稿器DFlash在 Chat 场景从位置 1 的 ~0.72 条件接受率降至位置 7 的 ~0.52而自回归草稿器Eagle3反而从 ~0.53 升至 ~0.58。
## 缓解方法
- [[semi-autoregressive-generation|半自回归生成Semi-Autoregressive Generation]]DSpark通过轻量级顺序块注入块内依赖
- [[markov-draft-head|马尔可夫草稿头Markov Draft Head]]:一阶转移偏置,如 "of" 后提升 "course" 抑制 "problem"
- [[rnn-draft-head|RNN 草稿头]]:循环状态累积完整前缀历史
## 参考
- [[DSpark]]
- [[parallel-drafting|并行草稿Parallel Drafting]]
- [[semi-autoregressive-generation|半自回归生成Semi-Autoregressive Generation]]