首页 > AI前沿 > Native Draft Architectures for Speculative Decoding in the Coding Era

Native Draft Architectures for Speculative Decoding in the Coding Era

arXiv机器学习 2026-12-03 13:53 10 阅读 查看原文
用户希望我作为一个专业的新闻排版工程师,将提供的一段纯文本新闻正文排版成语义化的HTML片段。 规则如下: 1. 只输出HTML片段本身,不要Markdown围栏,不要解释。 2. 每个自然段落用`

`包裹,长文用`

`/`

`划分小节。 3. 列表内容用`
  • `,引用用`
    `,代码用`
    `,重要句子可用``。
    4. 保留原文所有信息,不得增删改内容。
    5. 不要输出``/``/``等文档级标签。
    
    提供的正文:
    Modern AI increasingly relies on language model agents that solve tasks by iteratively generating and editing code. Repeatedly producing long code blocks makes token-by-token decoding a major latency bottleneck. Speculative decoding accelerates generation while preserving model outputs by combining a fast draft model with parallel target verification. Unlike natural language, executable code consists largely of predictable syntax and repeated identifiers broken by occasional branching points. However, existing speculative decoding methods fail to exploit the distinct structure of code. Learned drafters rely on stateless Transformer blocks designed for single-step text prediction, while retrieval methods stop at exact substring copies. We introduce Spancast, a native non-Transformer draft architecture with Masked Parallel Tree Decoding. Spancast replaces Transformer layers with Grouped State Channel for stateful recurrence across tokens and Null-Key Attention to skip the prefix via a zero-value key. Masked Parallel Tree Decoding drafts spans in parallel and expands likely branches in constant steps. Spancast surpasses existing learned and retrieval baselines in average acceptance length, lowers inter-token latency across target models, and transfers zero-shot to unseen target models.
    
    分析正文结构:
    这段文字是一个连续的学术/技术新闻段落,没有明显的列表、引用或代码块。
    可以将其划分为几个小节,使用`

    `或`

    `,或者直接用`

    `包裹,加上``强调重要句子。 划分小节建议: 1. 背景与问题 (Background and Problem) 2. 现有方法的局限性 (Limitations of Existing Methods) 3. 提出的方法:Spancast (Proposed Method: Spancast) 4. 实验结果与结论 (Experimental Results and Conclusion) 但是规则要求“保留原文所有信息,不得增删改内容”。如果加了小标题,是否算“增删改内容”? 规则2说:“长文用

    /

    划分小节”。如果我加了小标题,就增加了原文没有的文本。为了严格遵守“不得增删改内容”,我不应该添加原文中没有的小标题文字。我可以直接把整个段落用`

    `包裹,或者把原文的句子拆分成多个`

    `,并用``强调重要句子。 或者,不添加额外的标题文本,只使用原有的句子结构。 原文是一整段。我可以直接用一个`

    `包裹,或者按句群拆分成几个`

    `。 比如:

    Modern AI increasingly relies on language model agents that solve tasks by iteratively generating and editing code. Repeatedly producing long code blocks makes token-by-token decoding a major latency bottleneck. Speculative decoding accelerates generation while preserving model outputs by combining a fast draft model with parallel target verification.

    Unlike natural language, executable code consists largely of predictable syntax and repeated identifiers broken by occasional branching points. However, existing speculative decoding methods fail to exploit the distinct structure of code. Learned drafters rely on stateless Transformer blocks designed for single-step text prediction, while retrieval methods stop at exact substring copies.

    We introduce Spancast, a native non-Transformer draft architecture with Masked Parallel Tree Decoding. Spancast replaces Transformer layers with Grouped State Channel for stateful recurrence across tokens and Null-Key Attention to skip the prefix via a zero-value key. Masked Parallel Tree Decoding drafts spans in parallel and expands likely branches in constant steps.

    Spancast surpasses existing learned and retrieval baselines in average acceptance length, lowers inter-token latency across target models, and transfers zero-shot to unseen target models.

    检查是否满足所有规则: 1. 只输出HTML片段本身,不要Markdown围栏、不要解释。 -> 满足。 2. 每个自然段落用`

    `包裹,长文用`

    `/`

    `划分小节。 -> 这里没有加`

    `/`

    `,因为加了就会引入原文没有的文字,违反规则4“不得增删改内容”。如果必须用`

    `/`

    `,又不能加文字,这不可能。所以直接用`

    `分段即可,或者把原文中的句子作为段落。其实原文就是一段,我拆分成几个`

    `是合理的排版,不增加文字内容。 3. 列表、引用、代码、重要句子。 -> 用了``强调重要句子/术语。 4. 保留原文所有信息,不得增删改内容。 -> 满足,没有添加任何字。 5. 不要输出文档级标签。 -> 满足。 再审视一下分段,确保没有改变任何单词、标点。 原文: Modern AI increasingly relies on language model agents that solve tasks by iteratively generating and editing code. Repeatedly producing long code blocks makes token-by-token decoding a major latency bottleneck. Speculative decoding accelerates generation while preserving model outputs by combining a fast draft model with parallel target verification. Unlike natural language, executable code consists largely of predictable syntax and repeated identifiers broken by occasional branching points. However, existing speculative decoding methods fail to exploit the distinct structure of code. Learned drafters rely on stateless Transformer blocks designed for single-step text prediction, while retrieval methods stop at exact substring copies. We introduce Spancast, a native non-Transformer draft architecture with Masked Parallel Tree Decoding. Spancast replaces Transformer layers with Grouped State Channel for stateful recurrence across tokens and Null-Key Attention to skip the prefix via a zero-value key. Masked Parallel Tree Decoding drafts spans in parallel and expands likely branches in constant steps. Spancast surpasses existing learned and retrieval baselines in average acceptance length, lowers inter-token latency across target models, and transfers zero-shot to unseen target models. 拆分:

    Modern AI increasingly relies on language model agents that solve tasks by iteratively generating and editing code. Repeatedly producing long code blocks makes token-by-token decoding a major latency bottleneck. Speculative decoding accelerates generation while preserving model outputs by combining a fast draft model with parallel target verification.

    Unlike natural language, executable code consists largely of predictable syntax and repeated identifiers broken by occasional branching points. However, existing speculative decoding methods fail to exploit the distinct structure of code. Learned drafters rely on stateless Transformer blocks designed for single-step text prediction, while retrieval methods stop at exact substring copies.

    We introduce Spancast, a native non-Transformer draft architecture with Masked Parallel Tree Decoding. Spancast replaces Transformer layers with Grouped State Channel for stateful recurrence across tokens and Null-Key Attention to skip the prefix via a zero-value key. Masked Parallel Tree Decoding drafts spans in parallel and expands likely branches in constant steps.

    Spancast surpasses existing learned and retrieval baselines in average acceptance length, lowers inter-token latency across target models, and transfers zero-shot to unseen target models.

    检查文字是否完全一致: "Modern AI increasingly relies on language model agents that solve tasks by iteratively generating and editing code. Repeatedly producing long code blocks makes token-by-token decoding a major latency bottleneck. Speculative decoding accelerates generation while preserving model outputs by combining a fast draft model with parallel target verification." - 一致 "Unlike natural language, executable code consists largely of predictable syntax and repeated identifiers broken by occasional branching points. However, existing speculative decoding methods fail to