Guardado en:
Detalles Bibliográficos
Autores principales: Zhao, Juntao, Lu, Wenhao, Wang, Sheng, Kong, Lingpeng, Wu, Chuan
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:https://arxiv.org/abs/2410.11305
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866914070915973120
author Zhao, Juntao
Lu, Wenhao
Wang, Sheng
Kong, Lingpeng
Wu, Chuan
author_facet Zhao, Juntao
Lu, Wenhao
Wang, Sheng
Kong, Lingpeng
Wu, Chuan
contents Quantization is widely adopted to accelerate inference and reduce memory consumption in large language models (LLMs). While activation-weight joint quantization enables efficient low-precision decoding, it suffers from substantial performance degradation on multi-step reasoning tasks. We propose QSpec, a novel quantization paradigm that decouples efficiency from quality by integrating two complementary schemes via speculative decoding: low-precision joint quantization for fast drafting and high-precision weight-only quantization for accurate verification. QSpec reuses both weights and KV cache across stages, enabling near-zero-cost switching without retraining or auxiliary models. Compared to high-precision baselines, QSpec achieves up to 1.64x speedup without quality degradation, and outperforms state-of-the-art speculative decoding methods by up to 1.55x in batched settings. Furthermore, QSpec supports plug-and-play deployment and generalizes well across model scales, quantization methods, and workloads. These properties make QSpec a practical and scalable solution for high-fidelity quantized LLM serving under memory-constrained scenarios. Our code is available at https://github.com/hku-netexplo-lab/QSpec.
format Preprint
id arxiv_https___arxiv_org_abs_2410_11305
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle QSpec: Speculative Decoding with Complementary Quantization Schemes
Zhao, Juntao
Lu, Wenhao
Wang, Sheng
Kong, Lingpeng
Wu, Chuan
Machine Learning
Artificial Intelligence
Quantization is widely adopted to accelerate inference and reduce memory consumption in large language models (LLMs). While activation-weight joint quantization enables efficient low-precision decoding, it suffers from substantial performance degradation on multi-step reasoning tasks. We propose QSpec, a novel quantization paradigm that decouples efficiency from quality by integrating two complementary schemes via speculative decoding: low-precision joint quantization for fast drafting and high-precision weight-only quantization for accurate verification. QSpec reuses both weights and KV cache across stages, enabling near-zero-cost switching without retraining or auxiliary models. Compared to high-precision baselines, QSpec achieves up to 1.64x speedup without quality degradation, and outperforms state-of-the-art speculative decoding methods by up to 1.55x in batched settings. Furthermore, QSpec supports plug-and-play deployment and generalizes well across model scales, quantization methods, and workloads. These properties make QSpec a practical and scalable solution for high-fidelity quantized LLM serving under memory-constrained scenarios. Our code is available at https://github.com/hku-netexplo-lab/QSpec.
title QSpec: Speculative Decoding with Complementary Quantization Schemes
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2410.11305