Quantize-Sample-and-Verify: LLM Acceleration via Adaptive Edge-Cloud Speculative Decoding
Guangyi Zhang, Yunlong Cai, Guanding Yu, Petar Popovski, Osvaldo Simeone
TL;DR
This work tackles bandwidth-limited edge-cloud speculative decoding by preserving the cloud LLM output distribution while enabling on-device drafting. It introduces Quantize-Sample (Q-S), where draft tokens are sampled from a quantized distribution $ ilde{oldsymbol{Q}}^t$, ensuring $ ext{Pr}(X = x_l^t) = p_{l,x_l^t}^t$, i.e., equality with the cloud LLM outputs. A lattice-based quantization scheme is used to discretize probability vectors with controllable bits $b^t$, and a dynamic policy using a double DQN adapts the draft length $L^t$ and quantization precision $b^t$ in response to semantic uncertainty and time-varying channel conditions. The latency-aware framework, validated on CNN/DailyMail summarization with OPT-125M at the edge and OPT-13B in the cloud, demonstrates superior token throughput over static policies and S-Q baselines, with the dynamic approach approaching cloud-only SD performance as bandwidth improves.
Abstract
In edge-cloud speculative decoding (SD), edge devices equipped with small language models (SLMs) generate draft tokens that are verified by large language models (LLMs) in the cloud. A key bottleneck in such systems is the limited communication bandwidth between edge and cloud, which necessitates quantization of the information transmitted about generated tokens. In this work, we introduce a novel quantize-sample (Q-S) strategy that provably preserves the output distribution of the cloud-based model, ensuring that the verified tokens match the distribution of those that would have been generated directly by the LLM. We develop a throughput model for edge-cloud SD that explicitly accounts for communication latency. Leveraging this model, we propose an adaptive mechanism that optimizes token throughput by dynamically adjusting the draft length and quantization precision in response to both semantic uncertainty and channel conditions. Simulations demonstrate that the proposed Q-S approach significantly improves decoding efficiency in realistic edge-cloud deployment scenarios.
