arXiv:2603.17891cs.LGcs.AI2026-03被引 1

RAMP通过强化学习动态分配每层比特数,让大模型在设备端运行更高效。

RAMP: Reinforcement Adaptive Mixed Precision Quantization for Efficient On Device LLM Inference

  • 用强化学习根据层特征自动分配不同精度比特数
  • 在3.68GB内存下达到5.54困惑度,比统一4比特快6%、好1%-3%
  • 训练一次可零样本适配不同模型,适合资源受限设备部署

后训练量化对在资源受限硬件上部署大语言模型至关重要,但现有方法对各层强制使用统一比特数,导致精度与效率权衡不佳。我们提出RAMP(强化自适应混合精度量化),一种离策略软演员-评论家框架,通过学习每层的比特分配,在全局比特预算下最小化困惑度。策略基于激活统计、权重特性及结构描述的11维嵌入,支持跨模型家族和规模的零样本迁移。为实现稳定低于4比特的量化,我们引入尺度折叠技术,通过通道级缩放和归一化层补偿将激活异常值迁移到权重中。采用质量优先的奖励机制,含非对称惩罚与预算突变,推动快速收敛。在Llama 2 7B上,RAMP以3.68GB(有效3.65比特)达到5.54困惑度,优于统一4比特的AWQ(5.60,3.90GB)和GPTQ,尺寸缩小6%,性能提升1%至3%。关键的是,仅在Llama 2 7B上训练的策略可零样本推广至Llama 2 13B和Mistral 7B,常优于针对目标模型的训练,支持量化敏感性主要由架构决定的假设。HALO流水线将分配导出为GGUF格式,可在CPU、GPU及边缘设备上无核推理,保留FP16常识推理性能的99.5%。

原文摘要 · Abstract (English)

Post training quantization is essential for deploying large language models (LLMs) on resource constrained hardware, yet state of the art methods enforce uniform bit widths across layers, yielding suboptimal accuracy efficiency trade offs. We present RAMP (Reinforcement Adaptive Mixed Precision), an off policy Soft Actor Critic framework that learns per layer bit width assignments to minimize perplexity under a global bit budget. The policy conditions on an 11 dimensional embedding of activation statistics, weight properties, and structural descriptors, enabling zero shot transfer across model families and scales. To enable stable sub 4 bit quantization, we introduce Scale Folding, a preconditioning technique that migrates activation outliers into weights via per channel scaling and normalization layer compensation. A quality prioritized reward with asymmetric penalties and budget cliffs drives rapid convergence. On Llama 2 7B, RAMP achieves 5.54 perplexity at 3.68GB (3.65 effective bits), outperforming uniform 4 bit AWQ (5.60 at 3.90 GB) and GPTQ by 6% in size and 1% to3% in quality. Critically, a policy trained only on Llama 2 7B generalizes zero shot to Llama 2 13B and Mistral 7B, often surpassing target specific training, supporting the hypothesis that quantization sensitivity is primarily architectural. The HALO pipeline exports allocations to GGUF format for kernel free inference on CPUs, GPUs, and edge devices, retaining 99.5% of FP16 commonsense reasoning performance.

量化LLM推理强化学习轻量部署

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。