按年被提到
20222023 · 5 次2026
大模型与语言模型›模型表达力与计算理论·arXiv:2208.07339 · cs.LG

LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale

LLM.int8():面向大规模 Transformer 的 8 位矩阵乘法
Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer · 2022

LLM.int8():向量级量化加离群值混合精度,推理显存减半且无损

开始阅读 ↗PDFalphaXiv 讨论
被推荐 · 8 人首次 2022-08-17 · 最近 2024-06-20
8不同的人
7活跃月份
8讨论串
487被引(OpenAlex)

针对大语言模型推理占用大量 GPU 显存,作者为 Transformer 的前馈层和注意力投影层开发了 Int8 矩阵乘法流程,使推理内存减半且保持全精度性能:一个 175B 参数的 16/32 位检查点可直接加载、转成 Int8 并立即使用而无性能下降。方法是两部分的 LLM.int8():先对大部分特征做逐向量量化(每个内积使用独立归一化常数),再对「涌现离群特征」采用混合精度分解,把这些维度隔离到 16 位矩阵乘法中,同时仍有超过 99.9% 的数值以 8 位相乘。这使得在配备消费级 GPU 的单台服务器上使用 OPT-175B 或 BLOOM 成为可能,软件已开源。

HN 为什么提它

HN 上的人把它当作「让大模型用一半显存而性能不降」的代表方法来推荐,常提到其要点是除少数离群值外都量化到 8 位,并与 Hugging Face 中的相关支持对照。

方法难度 4 / 5约 60 分钟经得起时间
读之前最好知道
1Transformer 架构
2神经网络量化(quantization)
3矩阵乘法与 GPU 内存
4混合精度(mixed precision)

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
推荐eternalban · 2023-02

“A very cool cite from that article is LLM.int8(): LLM.int8()”

推荐它,认为是那篇文章引用中很酷的一篇
How to Train Large Models on Many GPUs?原评论 ↗
推荐v64 · 2023-03

“LLM.int8() is a recent development allowing LLMs to run in half the memory without loss of performance [2].”

引它说明 LLM 可在性能不降的前提下只用一半内存运行
Show HN: Llama-dl – high-speed download of LLaMA, Facebook's 65B GPT model原评论 ↗
引用monkmartinez · 2022-09

“there is a concerted effort, at least for inference, to reduce memory requirements and provide more access to giant LLMs.[0]”

引它说明业界正努力降低推理内存需求,让更多人用上巨型 LLM
Hot Chips 34: AMD’s Instinct MI200 Architecture原评论 ↗
引用chuckcode · 2023-05

“I've seen neural nets using int8 for matrix multiplication to reduce memory size [1].”

引它说明用 int8 矩阵乘法可以减小神经网络内存
Billion-Scale Approximate Nearest Neighbor Search [pdf]原评论 ↗
引用make3 · 2023-05

“The idea was just to quantize all weights to 8 bits except a few outliers, which are kept in original precision.”

说明其思路是把权重量化到 8 位,只保留少数离群值原精度
QLoRA: Efficient Finetuning of Quantized LLMs原评论 ↗
引用janalsncm · 2024-06

“I would be curious how this differs from [1] which is supported in Huggingface”

好奇它与 Hugging Face 所支持的方法有何区别
Optimizing AI Inference at Character.ai原评论 ↗
被提交为 story · 2 次