SpecQuant框架通过多父量化实现LLM自适应高效推理
SpecQuant: Speculative Decoding with Multi-Parent Quantization for Adaptive LLM Inference
这个技术很实用,能让你在本地设备上更高效地运行大语言模型,不用复杂配置,还能根据任务自动选择合适的模型精度。
SpecQuant是一种无需重新训练的框架,结合了推测解码和多父量化技术。它从共享基础模型中导出多个量化变体(INT4、FP8、FP16),并基于预测的复杂度动态路由查询。对于简单或事实性任务使用轻量级变体,对于复杂推理或长上下文输入则使用全精度模型。在Qwen2.5模型上,SpecQuant在MMLU、AlpacaEval和GSM8K基准测试中实现了35-43%的速度提升,且准确率下降不超过2%。
SpecQuant: Speculative Decoding with Multi-Parent Quantization for Adaptive LLM Inference
Running large language models (LLMs) locally continues to be limited by restrictions of compute and memory on consumer hardware. The popular acceleration technologies, such as quantization, speculative decoding, and adaptive inferencing, offer substantial speed boosts but usually necessitate retraining, per architecture tuning, or draft models. SpecQuant is a trainingfree framework, that combines speculative decoding with multiparent quantization to perform adaptive, efficient inference of LLMs. SpecQuant derives multiple quantized variants (INT4, FP8, FP16) from a shared base model, and dynamically routes queries based on predicted complexity; lightweight variants are used for simple or factual tasks, and full-precision models are used for complex reasoning tasks or long-context inputs. The shared-weight design of SpecQuant ensures sufficient token acceptance for speculative decoding without compatibility issues using separate draft parent models. We evaluate SpecQuant on Qwen2.5 based models on the MMLU, AlpacaEval, and GSM8K datasets, or benchmarks, demonstrating 35-43% speedups without degrading accuracy greater than 2%, substantial within the LLM community. SpecQuant enables practical on-device LLM deployment across diverse hardware without special infrastructure or expertise.