configuration stringlengths 13 32 | scheme stringclasses 10
values | bits_per_weight float64 2.13 16 | group_size stringclasses 4
values | compression_ratio float64 1 7.5 | memory_footprint_mb float64 0.1 0.75 | memory_savings_pct float64 0 86.7 | sqnr_db float64 7.1 100 | reconstruction_error float64 0 0.44 | perplexity float64 296 296 | perplexity_delta float64 0 0.41 | hardware_acceleration stringlengths 15 51 | primary_use_case stringlengths 34 62 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
FP16 Baseline | fp16 | 16 | None | 1 | 0.75 | 0 | 100 | 0 | 295.638 | 0 | Native Tensor Core (FP16) | Ground-truth uncompressed baseline |
INT8 AbsMax (Per-Channel) | int8 | 8 | None | 2 | 0.38 | 50 | 42.1 | 0.0078 | 295.647 | 0.009 | INT8 Tensor Cores (DP4A / IMMA) | Production standard: zero quality loss serving |
INT8 SmoothQuant (alpha=0.5) | smoothquant | 8 | None | 2 | 0.38 | 50 | 45.3 | 0.0054 | 295.642 | 0.004 | W8A8 Matrix Multiplication | Outlier-heavy architectures (LLaMA/Qwen/OPT) |
FP8 E4M3FN (Simulated) | fp8_e4m3 | 8 | None | 2 | 0.38 | 50 | 38.7 | 0.0116 | 295.656 | 0.018 | Ada / Hopper / Blackwell FP8 Cores | Next-gen enterprise inference (vLLM/TensorRT-LLM) |
FP8 E5M2 (Simulated) | fp8_e5m2 | 8 | None | 2 | 0.38 | 50 | 31.4 | 0.0269 | 295.68 | 0.042 | Hopper FP8 GEMM | Gradient & forward pass during mixed-precision training |
INT4 Blockwise (G=128) | int4 | 4.5 | 128 | 3.55 | 0.21 | 71.8 | 18.6 | 0.1174 | 295.712 | 0.074 | INT4 Dequantizing Fused Kernel | Edge deployment & consumer GPU fitting (RTX 3060/4090) |
INT4 Blockwise (G=64) | int4 | 5 | 64 | 3.2 | 0.23 | 68.8 | 19.4 | 0.1071 | 295.699 | 0.061 | INT4 Dequantizing Fused Kernel | Higher precision edge inference (Ollama / llama.cpp Q4_K_M) |
INT4 Blockwise (G=32) | int4 | 6 | 32 | 2.67 | 0.28 | 62.5 | 20.5 | 0.0944 | 295.686 | 0.048 | Fine-grained block scaling | Small models (<3B parameters) sensitive to quantization |
INT4 AWQ (Activation-Aware) | awq | 4.5 | 128 | 3.55 | 0.21 | 71.8 | 22.4 | 0.0758 | 295.673 | 0.035 | W4A16 TensorRT-LLM / vLLM Marlin | High-throughput serving with protected salient weights |
INT4 GPTQ (Hessian OBS) | gptq | 4.5 | 128 | 3.55 | 0.21 | 71.8 | 23.8 | 0.0645 | 295.667 | 0.029 | ExLlamaV2 / Marlin Fused Kernels | Second-order Hessian-compensated offline calibration |
BitNet 1.58b (Ternary {-1,0,+1}) | ternary | 2.13 | None | 7.5 | 0.1 | 86.7 | 8.2 | 0.3891 | 295.958 | 0.32 | Addition-only integer arithmetic (zero FP multiply) | Extreme edge / microcontroller / zero-multiplication inference |
Ampere 2:4 Structured Sparsity | sparse24 | 10 | None | 1.6 | 0.47 | 37.5 | 7.1 | 0.4416 | 296.048 | 0.41 | NVIDIA Ampere / Hopper 2:4 Sparse Tensor Cores | Hardware-accelerated 2x compute throughput via pruned weights |
โก QuantBench: LLM Quantization Quality vs. Compression Pareto Benchmark
The open-source empirical benchmark quantifying the Pareto frontier between memory compression, Signal-to-Quantization-Noise Ratio (SQNR), relative reconstruction error, and evaluation perplexity across state-of-the-art LLM quantization algorithms.
- GitHub Repository: Prajwal7-2002/quantbench
- PyPI Engine:
pip install quantbench-engine - Documentation: prajwal7-2002.github.io/quantbench
- Author: Prajwal Pujari (@Prajwal7-2002)
๐ Quick Start
Load the benchmark tables directly in Python with one line:
from datasets import load_dataset
# Load Pareto frontier and layer sensitivity tables
dataset = load_dataset("prajwalpujari16/quantbench-pareto")
# Inspect the Pareto trade-off curve
df_pareto = dataset["pareto_frontier"].to_pandas()
print(df_pareto[["configuration", "compression_ratio", "sqnr_db", "perplexity_delta"]])
๐ฌ Master Pareto Frontier Table
| Configuration | Scheme | Bit-Width | Group Size | Compression | Memory Savings | SQNR (dB) | Delta PPL | Primary Acceleration Engine |
|---|---|---|---|---|---|---|---|---|
| FP16 Baseline | fp16 |
16.0 | None | 1.00ร | 0.0% | 100.0 dB | 0.000 | Native Tensor Cores |
| INT8 SmoothQuant (ฮฑ=0.5) | smoothquant |
8.0 | None | 2.00ร | 50.0% | 45.3 dB | +0.004 | W8A8 Matrix Multiplication |
| INT8 AbsMax (Per-Channel) | int8 |
8.0 | None | 2.00ร | 50.0% | 42.1 dB | +0.009 | INT8 Tensor Cores (DP4A / IMMA) |
| FP8 E4M3FN (Simulated) | fp8 |
8.0 | None | 2.00ร | 50.0% | 38.7 dB | +0.018 | Hopper / Blackwell FP8 Cores |
| FP8 E5M2 (Simulated) | fp8 |
8.0 | None | 2.00ร | 50.0% | 31.4 dB | +0.042 | Hopper FP8 GEMM |
| INT4 GPTQ (Hessian OBS) | gptq |
4.5 | 128 | 3.55ร | 71.8% | 23.8 dB | +0.029 | ExLlamaV2 / Marlin Fused Kernels |
| INT4 AWQ (Activation-Aware) | awq |
4.5 | 128 | 3.55ร | 71.8% | 22.4 dB | +0.035 | W4A16 TensorRT-LLM / vLLM Marlin |
| INT4 Blockwise (G=32) | int4 |
6.0 | 32 | 2.67ร | 62.5% | 20.5 dB | +0.048 | Fine-grained block scaling |
| INT4 Blockwise (G=64) | int4 |
5.0 | 64 | 3.20ร | 68.8% | 19.4 dB | +0.061 | Ollama / llama.cpp Q4_K_M |
| INT4 Blockwise (G=128) | int4 |
4.5 | 128 | 3.55ร | 71.8% | 18.6 dB | +0.074 | Standard W4A16 Dequantizer |
| BitNet 1.58b Ternary | ternary |
2.13 | None | 7.50ร | 86.7% | 8.2 dB | +0.320 | Addition-only integer arithmetic |
| Ampere 2:4 Structured Sparse | sparse24 |
10.0 | None | 1.60ร | 37.5% | 7.1 dB | +0.410 | Ampere 2:4 Sparse Tensor Cores |
๐ฏ Key Empirical Insights
The Attention vs. MLP Degradation Asymmetry:
- Attention Query ($Q$) and Key ($K$) projections suffer 1.8 to 2.4 dB higher SQNR degradation than Feed-Forward (MLP) layers under identical quantization schemes.
- Compressing Query/Key projections directly disturbs the attention entropy distribution ($\text{softmax}(QK^T / \sqrt{d})$), causing outsized perplexity spikes. This empirical finding provides direct justification for Activation-Aware Weight Quantization (AWQ) preserving salient channels.
The 3.5ร "Sweet Spot" at INT4:
- Blockwise INT4 with group size $G=128$ yields $3.55\times$ weight compression ($71.8%$ memory savings) while maintaining $>18.6\text{ dB}$ SQNR and minimal perplexity impact ($\Delta\text{PPL} \le +0.074$).
- Applying second-order error compensation (GPTQ) or salient channel scaling (AWQ) recovers another $3.8 - 5.2\text{ dB}$ of signal fidelity.
BitNet 1.58b Memory Ceiling:
- Packing ternary weights ${-1, 0, +1}$ using base-3 arithmetic ($3^4 = 81 < 256$, packing 4 weights per byte) achieves an unprecedented $7.50\times$ compression ratio ($86.7%$ VRAM reduction).
๐งฎ Mathematical Definitions
1. Signal-to-Quantization-Noise Ratio (SQNR)
Measures the ratio of original tensor energy to the noise energy introduced by discrete quantization:
- $\text{SQNR} \ge 40\text{ dB}$: Perceptually lossless (INT8 / SmoothQuant).
- $20\text{ dB} \le \text{SQNR} < 40\text{ dB}$: High fidelity; minor loss (INT4 AWQ / GPTQ).
- $\text{SQNR} < 15\text{ dB}$: Noticeable degradation requiring domain calibration.
2. Relative Frobenius Reconstruction Error
๐ ๏ธ Reproducing Locally
To reproduce this benchmark or inspect sub-byte packing layouts directly on your machine:
# Install the zero-dependency quantbench engine
pip install quantbench-engine
# Run the complete Pareto sweep
quantbench pareto
# Inspect sub-byte ternary packing (4 weights packed per uint8 byte)
quantbench pack-inspect --format ternary
๐ Citation
@misc{pujari2026quantbench,
author = {Prajwal Pujari},
title = {QuantBench: LLM Quantization Quality vs Compression Pareto Benchmark},
year = {2026},
publisher = {Hugging Face},
journal = {Hugging Face Data repository},
howpublished = {\\url{https://huggingface.co/datasets/prajwalpujari16/quantbench-pareto}}
}
- Downloads last month
- 74