论文精选73°

XFP:面向LLM推理的自适应码本量化方法

XFP: Quality-Targeted Adaptive Codebook Quantization with Sparse Outlier Separation for LLM Inference

精选理由

XFP解决了LLM量化中手动调参和校准数据依赖的痛点,做模型部署和推理优化的团队可以直接用上自动化的高质量量化方案,省去大量调参时间。

AI 摘要

XFP是一种针对大语言模型推理的动态权重量化器,它颠覆了传统工作流:用户只需指定每通道余弦相似度的重建质量阈值(注意力与共享专家用严格阈值,路由专家MoE用宽松阈值),XFP自动确定码本大小、异常值预算和每层打包方式,无需Hessian矩阵、校准数据或手动位宽选择。每个权重矩阵被分解为稀疏fp16异常值残差和密集的子字节索引张量(指向每组的可学习码本)。在Qwen3.5-122B-A10B模型上,XFP在RTX PRO 6000 Blackwell工作站上实现138 tok/s单流解码,GSM8K准确率94.49%,比Marlin INT4快49%。对于无法装入目标内存的模型,XFP提出H-Process:通过迭代两个余弦阈值找到刚好能装入模型且输出合理的操作点。在Qwen3.5-397B-A17B上,H-Process将全部专家装入2×96 GB内存(约3.4有效比特),实现100.9 tok/s长输出解码,GSM8K准确率66.72%,在内存、吞吐量和准确率上同时超越带路由专家剪枝的INT4。

原文 · arXiv cs.AI

XFP: Quality-Targeted Adaptive Codebook Quantization with Sparse Outlier Separation for LLM Inference

We introduce XFP, a dynamic weight quantizer for LLM inference that inverts the conventional workflow: the operator specifies reconstruction quality floors on per-channel cosine similarity (one strict floor for attention and shared experts, one lazy floor for routed-expert MoE); XFP determines codebook size, outlier budget, and packing per layer automatically -- no Hessian, no calibration data, no manual bit-width selection. Each weight matrix is decomposed into a sparse fp16 outlier residual and a dense sub-byte index tensor into a per-group learned codebook. Two storage modes share one auto-select frontend and one fused decode kernel: V2 (per-channel Lloyd) and V2a (shared library of L=32 codebooks per layer). On Qwen3.5-122B-A10B under V2, XFP reaches 138 tok/s single-stream decode on workstation hardware (RTX PRO 6000 Blackwell, TP=2) at 94.49% GSM8K strict-match (3 seeds, n=3957), and is 49% faster than Marlin INT4 at TP=1. For models that do not fit in the target memory envelope, we present the H-Process: a quality-driven iteration over the two cosine thresholds that finds the operating point at which the model just fits while still producing sensible output. Three constraints define its search space: the operator-set thresholds, an OOM boundary at quantize-on-load, and a garbage boundary in generation (cosine similarity steers; benches verify). On Qwen3.5-397B-A17B (512 routed experts/layer), the H-Process fits the full expert population into 2x96 GB at ~3.4 effective bits and delivers 100.9 tok/s long-output decode at 66.72% GSM8K strict-match on the full 1319-problem set (single seed at submission; multi-seed evaluation in progress), exceeding INT4 with routed-expert pruning on memory, throughput, and accuracy simultaneously.

XFP:面向LLM推理的自适应码本量化方法 · AI 热点