AngelSpec: Towards Real-World High Performance Inference with Speculative Decoding
作者: Hong Liu, Rui Cen, Junhan Shi, Guangshuo Qin, Jiebin Zhang, Tianyu Liu, Runzhi Fan, Guoliang Zhao, Ruobing Xie, Kai Zhang, Song Liu, Guanghua Yu, Jianchen Zhu
分类: cs.CL
发布日期: 2026-07-28
💡 一句话要点
提出AngelSpec以解决大语言模型推理性能问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 投机解码 大语言模型 自回归预测 块并行扩散 高性能推理 联合训练 自然语言处理 实时应用
📋 核心要点
- 现有的投机解码方法在不同工作负载下表现不均,缺乏统一的最佳草拟结构。
- AngelSpec通过联合训练MTP和块并行扩散解码,针对不同数据类型进行专门化设计,提高了推理性能。
- 在Hy3系列实验中,AngelSpec在接受长度上提升约30%,并在所有测试并发下实现了最高吞吐量,较自回归解码提升了1.98-2.40倍。
📝 摘要(中文)
论文提出了AngelSpec,一个统一的训练框架,旨在通过投机解码加速大语言模型的推理,而不改变目标分布。现有的单一草拟结构在实际工作负载中表现不佳,因此AngelSpec结合了自回归多标记预测(MTP)和块并行扩散解码,针对不同数据类型进行专门训练。通过在训练、架构和推理三个层面解决异质性问题,AngelSpec在Hy3系列中显著提高了接受长度和吞吐量,展示了其在真实场景中的高效性。
🔬 方法详解
问题定义:论文旨在解决现有投机解码方法在不同实际工作负载下性能不均的问题,单一草拟结构无法满足多样化需求。
核心思路:AngelSpec通过联合训练MTP和块并行扩散解码,针对不同类型的数据进行专门化训练,以提高推理效率和准确性。
技术框架:AngelSpec的整体架构包括三个层面:训练层面通过数据和结构的共同专门化,架构层面采用DFly框架结合混合目标条件和自回归头,推理层面则通过动态资源分配优化验证过程。
关键创新:最重要的创新在于DFly框架的提出,它结合了混合目标条件的主干网络与前驱条件的自回归头,显著提升了目标特征利用率和块内依赖建模能力。
关键设计:在训练过程中,MTP草拟器专注于多样化对话数据,而块扩散草拟器则针对代码和数学数据进行训练,确保在不同场景下的最佳性能。
🖼️ 关键图片
📊 实验亮点
在Hy3系列实验中,AngelSpec在Hy3-A21B上将平均接受长度提升约30%,并在4到64的并发测试中实现了最高吞吐量,较自回归解码提升了1.98-2.40倍,显示出其在实际应用中的显著优势。
🎯 应用场景
AngelSpec的研究成果可广泛应用于自然语言处理、代码生成和数学推理等领域,尤其是在需要高效推理的实时应用场景中。其高性能的推理能力将推动智能助手、编程辅助工具等技术的发展,提升用户体验。
📄 摘要(原文)
Speculative decoding accelerates large language model inference without changing the target distribution, but no single drafting structure performs best across real-world workloads. Autoregressive multi-token prediction (MTP) is a lightweight, stable proposal mechanism, whereas block-parallel diffusion amortizes drafting latency over much longer candidate sequences; the better choice depends strongly on the output distribution. We present AngelSpec, a unified training framework for MTP and block-parallel speculative decoding that addresses this heterogeneity at three levels. At the training level, rather than fitting one universal drafter to a uniform data mixture, we co-specialize structure and data: the MTP drafter is trained on diverse conversational data for high-entropy open-ended chat, and the block-diffusion drafter on code and mathematics data for longer predictable continuations. At the architecture level, we propose DFly, a block-diffusion framework combining a hybrid target-conditioning backbone with a predecessor-conditioned autoregressive head, improving target-feature utilization and intra-block dependency modeling while keeping generation parallel. At the inference level, both acceptance length and verification cost vary with domain, request, online load, and hardware, so DFly treats verification as a shared batch-level resource: it reallocates compute toward high-confidence prefixes across requests and combines expected utility with a profiled cost model to adapt verification depth online. Across the Hy3 series, DFly raises the average accepted length on Hy3-A21B by roughly 30% and attains the highest average throughput at every tested concurrency from 4 to 64, a 1.98-2.40x speedup over autoregressive decoding and 10.5-11.8% higher throughput than DFlash. We release AngelSpec to support training and extending these methods.