Skip to main content
QUICK REVIEW

[论文解读] Any-Precision LLM: Low-Cost Deployment of Multiple, Different-Sized LLMs

Yeonhong Park, Jake Hyun|arXiv (Cornell University)|Feb 16, 2024
Advanced Surface Polishing Techniques被引用 4
一句话总结

本文提出 Any-Precision LLM,一种低成本解决方案,通过在单个 n 位模型中实现任意位宽(3–8 位)的后训练量化,支持部署多个不同尺寸的 LLM。该方法通过轻量级量化方法和专用软件引擎,采用位交错内存布局,将内存占用减少至接近单个 n 位模型的水平,同时保持最先进模型质量与高推理吞吐量。

ABSTRACT

Recently, considerable efforts have been directed towards compressing Large Language Models (LLMs), which showcase groundbreaking capabilities across diverse applications but entail significant deployment costs due to their large sizes. Meanwhile, much less attention has been given to mitigating the costs associated with deploying multiple LLMs of varying sizes despite its practical significance. Thus, this paper introduces \emph{any-precision LLM}, extending the concept of any-precision DNN to LLMs. Addressing challenges in any-precision LLM, we propose a lightweight method for any-precision quantization of LLMs, leveraging a post-training quantization framework, and develop a specialized software engine for its efficient serving. As a result, our solution significantly reduces the high costs of deploying multiple, different-sized LLMs by overlaying LLMs quantized to varying bit-widths, such as 3, 4, ..., $n$ bits, into a memory footprint comparable to a single $n$-bit LLM. All the supported LLMs with varying bit-widths demonstrate state-of-the-art model quality and inference throughput, proving itself to be a compelling option for deployment of multiple, different-sized LLMs. Our code is open-sourced and available online.

研究动机与目标

  • 解决在实际应用中运行多个不同尺寸 LLM 所带来的高部署成本问题。
  • 通过单一统一的模型存储,实现对多种位宽(3–n 位)LLM 的高效推理。
  • 克服现有量化方法需要微调或无法降低低比特位宽下内存带宽的局限性。
  • 开发一种支持任意精度推理的软件引擎,实现性能损耗最小化。
  • 证明 Any-Precision LLM 在模型质量与推理吞吐量方面可匹配或超越当前最先进量化模型。

提出的方法

  • 一种轻量级后训练量化(PTQ)框架,通过从高比特模型中提取最高有效位(MSBs)生成低比特模型,保持任意精度特性。
  • 一种位交错(位平面)权重内存布局,可在推理时仅高效访问所需位宽。
  • 一种为量化矩阵-向量乘法专门优化的 GPU 内核,仅加载每个权重位向量的相关部分,降低内存带宽使用。
  • 通过 PTQ 将低比特量化模型逐步提升至更高比特位宽,同时保持模型质量。
  • 将任意精度量化流水线与专用推理引擎集成,实现在推理时动态选择位宽。
  • 采用仅权重量化,以减少内存瓶颈,符合当前 LLM 推理的最佳实践。

实验结果

研究问题

  • RQ1能否通过单个 LLM 高效服务多种不同位宽(3–n 位)的模型,且内存开销极小?
  • RQ2后训练量化能否被适配以实现无需微调或微调的任意精度 LLM?
  • RQ3专用软件引擎能否通过优化内存布局与内核操作,降低低比特位宽推理的内存带宽使用?
  • RQ4Any-Precision LLM 在所有支持的位宽下是否均能保持最先进模型质量?
  • RQ5所提出系统能否实现与或优于非任意精度最先进引擎的高推理吞吐量?

主要发现

  • 所提方法将 3–8 位量化后的 LLM 打包存储,其内存占用与单个 8 位模型相当,显著降低存储与内存成本。
  • Any-Precision LLM 在各比特位宽下均达到最先进模型质量,匹配或超越现有量化技术。
  • Any-Precision LLM 的推理吞吐量与非任意精度最先进引擎相当或更优,即使采用位交错内存布局亦然。
  • 该方案支持推理时的动态模型选择,适用于推测性解码与低延迟工作负载。
  • 该方法通过仅加载所需位宽,降低内存带宽使用,而现有内核则加载完整的位向量。
  • 该方法仅需一份模型存储,即可支持多个具有不同质量-延迟权衡的 LLM 部署,显著降低运营成本。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。