arxiv.org·2026/10/19
针对自推测解码草稿配置不随负载变化、混合精度执行低效的问题,BS-Spec把目标权重和KV cache统一为BFP9,草稿阶段靠共享指数下仅加载最高有效位来派生多档精度,省去单独草稿模型。离线校准联合选择权重与KV缓存精度并存入PLT查表;硬件采用bit-serial可变精度通路、BFP感知LUT生成和LUT-stationary SIMD数据流,草稿与目标共用同一数据通路。在Llama和Qwen系列模型上对比SPEQ与QuantSpec,作者报告相对16位自回归解码最高加速1.9×,较所评估bit-sharing自推测基线平均提升67.2%,每token能量最低0.43×,在各工作负载区域保持最高效率。
为什么重要 做推理加速的团队可省掉独立 draft 模型显存,用查表按 batch 与序列长度切换权重和 KV 精度,代价是需定制 bit-serial 硬件。适合 做 LLM 推理加速与量化-硬件协同设计的工程师
随着大型语言模型(LLMs)越来越多地部署于各种推理服务中,服务负载跨越广泛的批量大小、上下文长度和性能要求。投机解码提高了推理吞吐量,但传统方法需要一个单独的草稿模型和 KV cache,而现有的自投机方法存在对负载不敏感的草稿配置和低效的混合精度执行问题。
在本文中,我们提出 BS-Spec,一个基于块浮点(BFP)的位共享框架,它联合优化草稿构建、负载感知精度选择和硬件执行。BS-Spec 通过部分加载权重和 KV cache 的最高有效位同时保留共享指数,直接从单个 BFP 目标模型中派生出多个草稿表示,从而消除了单独的草稿模型存储。
离线校准为每种服务场景选择使估计加速比最大化的权重和 KV cache 精度对,并且一个精度查找表在运行时应用所选配置。为了支持这种自适应执行,我们设计了一种混合精度 BFP 加速器,其具有基于查找表(LUT)的可变精度数据通路,用于草稿和目标计算。
实验结果表明,BS-Spec 相比传统自回归解码实现了最高 1.9× 的加速,并且相比所评估的位共享自投机解码基线平均将加速比提高了 67.2%,展示了针对多样 LLM 服务负载联合协同设计位共享、精度自适应和专用硬件的益处。
As large language models (LLMs) are increasingly deployed across diverse inference services, serving workloads span a wide range of batch sizes, context lengths, and performance requirements.
Speculative decoding improves inference throughput, but conventional approaches require a separate draft model and KV cache, while existing self-speculative methods suffer from workload-insensitive draft configurations and inefficient mixed-precision execution.
In this paper, we present BS-Spec, a block floating point (BFP)-based bit-sharing framework that jointly optimizes draft construction, workload-aware precision selection, and hardware execution.
BS-Spec derives multiple draft representations directly from a single BFP target model by partially loading the most significant bits of weights and the KV cache while preserving shared exponents, eliminating separate draft-model storage.
Offline calibration selects the weight and KV-cache precision pair that maximizes estimated speedup for each serving regime, and a precision lookup table applies the selected configuration at runtime.
To support this adaptive execution, we design a mixed-precision BFP accelerator with a lookup table (LUT)-based variable-precision datapath for both draft and target computation.
Experimental results show that BS-Spec achieves up to 1.9× speedup over conventional autoregressive decoding and improves speedup over the evaluated bit-sharing self-speculative decoding baselines by 67.2% on average, demonstrating the benefits of jointly co-designing bit sharing, precision adaptation, and specialized hardware for diverse LLM serving workloads.



| 对比项 | 之前 / 基线 | 现在 / 本方案 | |
|---|---|---|---|
| 解码加速 | 常规自回归解码 | 最高 1.9×官方称 | |
| 对比位共享自推测 | SPEQ、QuantSpec 变体 | 平均提升 67.2%官方称 | |
| 草稿模型存储 | 独立 draft 模型 + 其 KV cache | 单份 BFP 目标模型,无额外存储靠 MSB 部分加载 | |
| 精度配置 | 固定草稿配置 | PLT 按 serving regime 选精度对离线标定 | |
| 执行方式 | 浮点中心累加 | BFP bit-serial 加 LUT 辅助累加LUT-stationary SIMD 复用条目 |
EVIDENCE / METHODS
要点
自回归解码的瓶颈已从算力转向内存搬运,算术强度随 batch 变化,线性层约为 O(Batch)。
原版排版与图表 · 手机无法内嵌时可在浏览器打开。PDF 插件内选文不能传给网页助手。