paper-with-me

홈 › Papers

QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMs

2024-03-30 · Saleh Ashkboos, Amirkeivan Mohtashami, Maximilian L. Croci, Bo Li, Pashmina Cameron, Martin Jaggi, Dan Alistarh, Torsten Hoefler, James Hensman

We introduce QuaRot, a new Quantization scheme based on Rotations, which is able to quantize LLMs end-to-end, including all weights, activations, and KV cache in 4 bits. QuaRot rotates LLMs in a way that removes outliers from the hidden state without changing the output, making quantization easier. This computational invariance is applied to the hidden state (residual) of the LLM, as well as to the activations of the feed-forward components, aspects of the attention mechanism, and to the KV cache. The result is a quantized model where all matrix multiplications are performed in 4 bits, without any channels identified for retention in higher precision. Our 4-bit quantized LLaMa2-70B model has losses of at most 0.47 WikiText-2 perplexity and retains 99% of the zero-shot performance. We also show that QuaRot can provide lossless 6 and 8 bit LLaMa2 models without any calibration data using round-to-nearest quantization. Code is available at: https://github.com/spcl/QuaRot.

📄 PDF Abstract BibTeX arXiv:2404.00456

Code (3)

spcl/quarot 공식 구현 pytorch
jingyangxiang/dfrot pytorch
ruikangliu/IntactKV pytorch

Tasks

Quantization

Similar Papers 제목 키워드 기반

DFRot: Achieving Outlier-Free and Massive Activation-Free for Rotated LLMs with Refined Rotation

2024-12-01 · Jingyang Xiang, Sai Qian Zhang

Rotating the activation and weight matrices to reduce the influence of outliers in large language models (LLMs) has recently attracted significant attention, particularly in the context of model quantization. Prior studi…

Quantization

RoLoRA: Fine-tuning Rotated Outlier-free LLMs for Effective Weight-Activation Quantization

2024-07-10 · Xijie Huang, Zechun Liu, Shih-Yang Liu, Kwang-Ting Cheng

Low-Rank Adaptation (LoRA), as a representative Parameter-Efficient Fine-Tuning (PEFT)method, significantly enhances the training efficiency by updating only a small portion of the weights in Large Language Models (LLMs)…

parameter-efficient fine-tuningQuantization

Rotated Runtime Smooth: Training-Free Activation Smoother for accurate INT4 inference

2024-09-30 · Ke Yi, Zengke Liu, Jianwei Zhang, Chengyuan Li 외

Large language models have demonstrated promising capabilities upon scaling up parameters. However, serving large language models incurs substantial computation and memory movement costs due to their large scale. Quantiz…

Quantization

SpinQuant: LLM quantization with learned rotations

2024-05-26 · Zechun Liu, Changsheng Zhao, Igor Fedorov, Bilge Soran 외

Post-training quantization (PTQ) techniques applied to weights, activations, and the KV cache greatly reduce memory usage, latency, and power consumption of Large Language Models (LLMs), but may lead to large quantizatio…

Quantization

KurTail : Kurtosis-based LLM Quantization

2025-03-03 · Mohammad Sadegh Akhondzadeh, Aleksandar Bojchevski, Evangelos Eleftheriou, Martino Dazzi

One of the challenges of quantizing a large language model (LLM) is the presence of outliers. Outliers often make uniform quantization schemes less effective, particularly in extreme cases such as 4-bit quantization. We …

GPULanguage ModelingLanguage ModellingLarge Language Model+2