首页 > AI前沿 > Tree Speculative Decoding with In-Call KV Repair on a Commercial Static-Graph NPU

Tree Speculative Decoding with In-Call KV Repair on a Commercial Static-Graph NPU

arXiv机器学习 2026-11-26 13:47 8 阅读 查看原文
用户要求作为专业的新闻排版工程师,将提供的纯文本新闻正文排版成语义化的HTML片段。 需要遵循以下规则: 1. 只输出HTML片段本身,不要Markdown围栏、不要解释。 2. 每个自然段落用`

`包裹,长文用`

`/`

`划分小节。 3. 列表内容用`
  • `,引用用`
    `,代码用`
    `,重要句子可用``。
    4. 保留原文所有信息,不得增删改内容。
    5. 不要输出``/``/``等文档级标签。
    
    提供的正文:
    Tree speculative decoding verifies many draft branches in one target call, but common implementations assume dynamic query shapes and direct control over the KV cache. Static-graph NPUs offer neither: each compiled graph fixes its query length, and the runtime owns the physical KV layout. We propose a tree verifier for this setting that packs repair rows and tree rows into one fixed 32-row call. Per-token rotary tables and an ancestor mask express the tree, and an exact-watermark rule re-scores accepted tokens whose KV is out of canonical order inside the next call, so no separate cache-movement call is needed. On the Rebellions ATOM+ NPU with the DFlash drafter, removing chunk-boundary replay first raises the linear baseline from 59.3 to 92.3 tokens/s. In a pre-specified study on 120 GSM8K questions, the tree verifier with a grouped 32-row projection head beats the fastest linear baseline by 12.2% on Qwen3-4B (95% CI 10.7-13.8%) and by 13.2% on Qwen3-8B (CI 12.1-14.4%), and it cuts board energy per token by 10.0% and 11.1%. Changing the compiled verification shape also changes floating-point outputs on 55 of 120 questions for 4B and 9 for 8B, and a matched-prefix diagnostic traces the one lost 4B answer to the query-shape change alone.
    
    分析正文:
    这是一段技术新闻/论文摘要。包含多个自然段落(在原文中实际上是一整段,但根据排版需要,可以划分为几个小节或段落,或者保持为一段/多段)。
    原文没有明显的小节标题,但可以添加合适的`

    `或`

    `来划分,或者直接按句子/逻辑块用`

    `包裹。 为了符合“长文用`

    `/`

    `划分小节”的规则,我可以将其分为几个逻辑小节,比如“背景与挑战”、“方法设计”、“实验结果”等,但规则4要求“不得增删改内容”。如果添加小节标题,算不算“增”内容? 规则4:保留原文所有信息,不得增删改内容。 如果我添加了原文没有的标题文字,这就违反了“不得增”内容的严格限制。因此,最好不要自己编造标题文字。 那怎么用`

    `/`

    `划分小节呢?或者原文本身没有标题,我就只用`

    `包裹自然段落。原文实际上是一整段。我可以把它拆成几个`

    `,或者保持一个`

    `。 为了体现排版,可以将长段落按逻辑拆分成几个`

    `。 比如: 段落1:Tree speculative decoding verifies many draft branches in one target call, but common implementations assume dynamic query shapes and direct control over the KV cache. Static-graph NPUs offer neither: each compiled graph fixes its query length, and the runtime owns the physical KV layout. 段落2:We propose a tree verifier for this setting that packs repair rows and tree rows into one fixed 32-row call. Per-token rotary tables and an ancestor mask express the tree, and an exact-watermark rule re-scores accepted tokens whose KV is out of canonical order inside the next call, so no separate cache-movement call is needed. 段落3:On the Rebellions ATOM+ NPU with the DFlash drafter, removing chunk-boundary replay first raises the linear baseline from 59.3 to 92.3 tokens/s. 段落4:In a pre-specified study on 120 GSM8K questions, the tree verifier with a grouped 32-row projection head beats the fastest linear baseline by 12.2% on Qwen3-4B (95% CI 10.7-13.8%) and by 13.2% on Qwen3-8B (CI 12.1-14.4%), and it cuts board energy per token by 10.0% and 11.1%. 段落5:Changing the compiled verification shape also changes floating-point outputs on 55 of 120 questions for 4B and 9 for 8B, and a matched-prefix diagnostic traces the one lost 4B answer to the query-shape change alone. 或者保持为一个`

    `,因为原文就是一个自然段。但规则说“每个自然段落用`

    `包裹”,原文是一整段,所以一个`

    `也是符合的。不过拆分一下更美观,且不改变文字内容(只是加HTML标签和换行)。 等等,如果我不添加标题,是否就不使用`

    `/`

    `?规则说“长文用`

    `/`

    `划分小节”,这是条件性的,如果不长或者没有明显小节,可以不用,或者用空标题?不行,空标题没意义。最好不编造标题。 或者我可以把第一句话作为小节?不,不要乱加。 让我们仔细看看原文,确实是一整段。为了排版美观,可以拆成几个`

    `。 重要句子可用``。 比如:“We propose a tree verifier for this setting that packs repair rows and tree rows into one fixed 32-row call.” 可以加粗。 “beats the fastest linear baseline by 12.2% on Qwen3-4B (95% CI 10.7-13.8%) and by 13.2% on Qwen3-8B (CI 12.1-14.4%)” 可以加粗。 拆分段落:

    Tree speculative decoding verifies many draft branches in one target call, but common implementations assume dynamic query shapes and direct control over the KV cache. Static-graph NPUs offer neither: each compiled graph fixes its query length, and the runtime owns the physical KV layout.

    We propose a tree verifier for this setting that packs repair rows and tree rows into one fixed 32-row call. Per-token rotary tables and an ancestor mask express the tree, and an exact-watermark rule re-scores accepted tokens whose KV is out of canonical order inside the next call, so no separate cache-movement call is needed.

    On the Rebellions ATOM+ NPU with the DFlash drafter, removing chunk-boundary replay first raises the linear baseline from 59.3 to 92.3 tokens/s.

    In a pre-specified study on 120 GSM8K questions, the tree verifier with a grouped 32-row projection head beats the fastest linear baseline by 12.2% on Qwen3-4B (95% CI 10.7-13.8%) and by 13.2% on Qwen3-8B (CI 12.1-14.4%), and it cuts board energy per token by 10.0% and 11.1%.

    Changing the compiled verification shape also changes floating-point outputs on 55 of 120 questions for 4B and 9 for 8B, and a matched-prefix diagnostic traces the one lost 4B answer to the query-shape change alone.

    检查是否有遗漏的信息: 原文: Tree speculative decoding verifies many draft branches in one target call, but common implementations assume dynamic query shapes and direct control over the KV cache. Static-graph NPUs offer neither: each compiled graph fixes its query length, and the runtime owns the physical KV layout. We propose a tree verifier for this setting that packs repair rows and tree rows into one fixed 32-row