A project that optimizes OWL-ViT for real-time inference with NVIDIA TensorRT.
Key parameters and specifications
Key parameters and specifications
Parameter
Value
Language
Python
Category
Infrastructure
Subcategory
Kernels, Model optimization
Keywords
CUDA programming, Inference optimization, Memory management
Stars
534
Forks
79
Contributors
3
Created date
2024-03-31
Updated date
2026-10-14
Stars in 1 day
0
Stars in 7 days
0
Rank
17,549
Previous rank
19,076
Rank change
1,527
7-day stars rank
16,166
Previous 7-day stars rank
16,173
7-day stars rank change
7
Total stars rank
18,394
Previous total stars rank
18,371
Total stars rank change
-23
Country
Switzerland
README summary
QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMs This repository contains the code for **QuaRot**: Outlier-Free 4-Bit Inference in Rotated LLMs. Abstract We introduce QuaRot, a new **Qua**ntization scheme based on **Rot**ations, 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 quantized **LLaMa2-70B** model has losses of at most **0. 29 WikiText perplexity** and retains **99% of the zero-shot** performance. Usage Compile the QuaRot
kernels using the following commands: For simulation results, check fake_quant directory. Star History Citation The full citation is
Frequently asked questions
How many stars and forks are recorded?
spcl/QuaRot has 534 stars and 79 forks.
What is the repository rank?
spcl/QuaRot is ranked 17,549.
What language and category are recorded?
spcl/QuaRot has 534 stars, uses Python and belongs to Infrastructure.
Which repository is closest in rank?
spcl/QuaRot is compared with microsoft/sarathi-serve, ranked 17,547 with 534 stars.
README
QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMs
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 quantized LLaMa2-70B model has losses of at most 0.29 WikiText perplexity and retains 99% of the zero-shot performance.
Usage
Compile the QuaRot kernels using the following commands:
git clone https://github.com/spcl/QuaRot.git
cd QuaRot
pip install -e . # or pip install .
For simulation results, check fake_quant directory.
Star History
Citation
The full citation is
@article{ashkboos2024quarot,
title={QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMs},
author={Ashkboos, Saleh and Mohtashami, Amirkeivan and Croci, Maximilian L and Li, Bo and Jaggi, Martin and Alistarh, Dan and Hoefler, Torsten and Hensman, James},
journal={arXiv preprint arXiv:2404.00456},
year={2024}
}