arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.26558cs.AR
收藏

Cassandra: 通过自推测解码在边缘设备上实现推理型大语言模型

Cassandra: Enabling Reasoning LLMs at Edge via Self-Speculative Decoding

KAIST(韩国科学技术院)

Soongyu Choi, Yuntae Kim, Muyoung Son, Joo-Young Kim

AI总结:

提出Cassandra算法-硬件协同设计的自推测解码框架,通过细粒度数据选择和无训练剪枝与尾数截断构建高性能草稿模型,实现低批量场景下高达2.41倍加速。

摘要:

推测解码已成为加速大语言模型(LLMs)的一种有前景的无损方法。随着推理型LLMs在解码阶段的开销日益增加,且基于近似的方法会降低准确性,无损推测解码对于高效推理变得至关重要。然而,现有方法在没有额外训练的情况下仍难以提供强大的低批量性能,限制了在消费级设备上的实际部署。为应对这一挑战,我们提出Cassandra,一种针对低批量场景优化的算法-硬件协同设计的自推测解码框架。Cassandra通过细粒度数据选择构建高性能、无需训练的草稿模型。利用优化的剪枝和尾数截断,它在模型权重和键值(KV)缓存中识别出最显著的值,从而在全精度并行验证之前实现快速的候选令牌生成。与先前基于层跳过或结构化KV压缩的自推测解码方法不同,Cassandra实现了显著更高的效率。为进一步减少Cassandra表示与标准浮点格式之间的格式转换开销,我们还引入了一个轻量级编码器-解码器硬件模块,旨在与商用GPU和NPU无缝集成。实验结果表明,与BF16基线相比,Cassandra无需额外训练即可实现高达2.41倍的加速。此外,在运行于NVIDIA GeForce RTX 4090上的Llama 3 8B模型中,与最先进的推测解码方法Eagle-3相比,Cassandra在相同内存预算下生成的令牌数多出1.81倍。

英文摘要:

Speculative decoding has emerged as a promising lossless approach for accelerating Large Language Models (LLMs). As reasoning LLMs increasingly suffer from decode-stage overhead and approximation-based methods degrade accuracy, lossless speculative decoding has become essential for efficient inference. However, existing methods still struggle to deliver strong low-batch performance without additional training, limiting practical deployment on consumer devices. To address this challenge, we propose Cassandra, an algorithm-hardware co-designed self-speculative decoding framework optimized for low-batch scenarios. Cassandra constructs a high-performance, training-free draft model through fine-grained data selection. Using optimized pruning and mantissa truncation, it identifies the most salient values in both model weights and the Key-Value (KV) cache, enabling rapid candidate token generation before full-precision parallel verification. Unlike prior self-speculative decoding methods based on layer skipping or structured KV compression, Cassandra achieves significantly higher efficiency. To further reduce the overhead of format conversion between Cassandra representations and standard floating-point formats, we also introduce a lightweight encoder-decoder hardware module designed for seamless integration with commercial GPUs and NPUs. Experimental results show that Cassandra achieves up to 2.41x speedup over the BF16 baseline without additional training. Furthermore, on Llama 3 8B running on an NVIDIA GeForce RTX 4090, Cassandra generates 1.81x more tokens under the same memory budget compared to Eagle-3, a state-of-the-art speculative decoding method.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑