Skip to content
IJK

GPTQ's Mixed Int4 and Float16 Scheme at Inference

By IJK ·

What a Hugging Face post says GPTQ adopts for quantization and what happens to the weights during inference.

The mixed scheme

Specifically, GPTQ adopts a mixed int4/fp16 quantization scheme where weights are quantized as int4 while activations remain in float16. [1]

What happens at inference

During inference, weights are dequantized on the fly and the actual compute is performed in float16. [2]

dequantized forcomputes withWeights stored as int4quantizedActivations stay in float16unquantizedWeights dequantized on the flycompute performed in float16
What runs in which precision?

Sources

  1. The Hugging Face source says: Specifically, GPTQ adopts a mixed int4/fp16 quantization scheme where weights are quantized as int4 while activations remain in float16. Making LLMs lighter with AutoGPTQ and transformers
  2. The Hugging Face source says: During inference, weights are dequantized on the fly and the actual compute is performed in float16. Making LLMs lighter with AutoGPTQ and transformers

Editorial (AI-assisted; automatically checked, not human-reviewed). Each statement is linked to its source; check the source before relying on a detail.

  • gptq
  • quantization
  • inference
  • hugging face