
LLM quantization reduces the precision used to store or process selected model tensors. The immediate benefit is usually lower memory use. Depending on the model, format, runtime, and hardware, it can also improve throughput or latency. Those performance gains are not automatic, and a smaller checkpoint is only useful if it preserves the capabilities your workload needs.
This guide covers the complete deployment decision: what can be quantized, how the common methods differ, how to estimate memory, and how to evaluate a quantized model before production. If your decision is specifically between two integer precisions, use our focused INT4 vs INT8 comparison.
“A 4-bit model” is incomplete shorthand. A deployment may reduce the precision of weights, activations, the KV cache, or some combination of them. It may also store values at one precision and perform arithmetic at another.
Quantization does not change tokenization or the public shape of an inference API. It changes how tensors are represented and how the runtime executes the model.
For the broader toolkit beyond quantization, compare LLM optimization techniques including fine-tuning, pruning, sparsity, and knowledge distillation.
Bit width alone does not identify a quantization format. INT4, NF4, FP4, and NVFP4 all use four bits, but they represent values differently and depend on different software and hardware paths.
Check the checkpoint configuration and runtime documentation instead of inferring behavior from “4-bit” or “8-bit” in a model name.
Integer quantization assigns a floating-point value to a finite set of levels. A common affine mapping is q = clamp(round(x / s) + z, q_min, q_max), where x is the original value, s is a positive scale, z is the integer zero point, and the bounds are the allowed integer range. Reconstruction gives x_hat = s × (q − z). Rounding loses detail; clipping adds error when values exceed the chosen range.
For example, with s = 0.1 and z = 0, the value 0.26 becomes 3 and reconstructs as 0.3, an error of 0.04. This arithmetic example says nothing about a model’s task accuracy. Symmetric quantization commonly centers the range on zero; asymmetric quantization can accommodate an offset range. Per-tensor scaling shares parameters across a whole tensor, while per-channel or group-wise scaling uses smaller sets of values. Hugging Face’s quantization guide explains these choices.
Most teams start with a pre-quantized checkpoint or post-training quantization rather than retraining a model from scratch.
The method name is only one variable. Group size, scale granularity, calibration data, skipped modules, compute type, and serving kernels can all change memory use, speed, and quality.
Post-training quantization (PTQ) describes when the conversion happens. Static and dynamic quantization describe how parameters such as activation scales are obtained. Static quantization estimates them from representative calibration inputs before deployment. Dynamic quantization computes them from inputs during inference, adding runtime work. Both can be post-training approaches, so static quantization is not another name for PTQ.
ONNX Runtime documents both approaches. Neither is universally faster or more accurate across models and processors. Confirm what your runtime supports, then compare quality and latency using the same input data. A fixed calibration sample count is not a substitute for coverage of your actual tasks.
A useful first-pass estimate is:
weight memory ≈ parameter count × bits per weight ÷ 8
Using that raw calculation:
These are weight-only estimates, not complete VRAM requirements. Scales, zero points, packing metadata, unquantized layers, activations, runtime buffers, and the serving engine add overhead. The KV cache also grows with context length and concurrency. Training and fine-tuning require additional memory for saved activations, gradients, and optimizer state, which is why the same model may fit for inference and still exceed the available hardware during training. Our training vs inference hardware guide explains that distinction.
The estimates use decimal GB, with one GB equal to one billion bytes. A fully resident 70B model at four bits already needs about 35 GB for raw weights, so it cannot fit entirely in a single 32 GB GPU’s VRAM. CPU offloading, a different compression recipe, or supported multi-GPU execution changes the deployment requirements and should be measured separately. For the memory used by attention state, see our KV-cache guide.
A checkpoint is deployable only when the runtime can execute its quantization method on the target processor. Current vLLM quantization documentation lists support by method and hardware family. NVIDIA publishes a separate TensorRT-LLM support matrix for its INT, FP8, and FP4 recipes.
Those matrices change as runtimes add kernels. Confirm the exact runtime version, model architecture, GPU generation, and quantization configuration at deployment time. A format that is compact on disk may fall back to higher precision for unsupported operations or spend enough time packing and dequantizing values that it produces little speed benefit.
Quantization often raises capacity before it raises speed. Lower weight memory can let you fit the model on fewer GPUs, increase batch size, or leave more room for the KV cache. Prefill may remain compute-bound while decode benefits from lower memory traffic. Measure both phases rather than reporting one universal speed number.
Generic leaderboard results are useful screening evidence, but the release decision should come from the model, prompts, runtime, and hardware you will use.
For a steady benchmark, divide the total GPU cost per hour by the measured output tokens per hour to estimate GPU cost per output token. Use aggregate throughput across requests, and include every GPU in the cost. This estimate excludes idle time and other infrastructure costs unless you add them. Compare configurations that meet the same quality and latency targets; a smaller checkpoint alone does not establish lower serving cost.
Send a small share of traffic to the quantized candidate, compare outputs and operating metrics with the baseline, and keep a fast route back to the higher-precision model. Monitor quality samples alongside latency, throughput, GPU memory, and failure rates. A model that passes an offline benchmark can still behave differently when prompts, context lengths, or traffic shape change.
HivenetQuant publishes optimized open-model checkpoints with the measurements used to evaluate them. Its current work includes NVFP4 mixed-precision models for Blackwell GPUs and reports task-level regressions as well as performance gains. That evidence matters because an average score can hide a larger change in the workload you care about.
For your own comparisons, review Compute with Hivenet and the documented GPU configurations. Check current availability and pricing in the console, then benchmark the candidate with your actual serving stack.
No. It reduces representation size first. Speed depends on hardware support, kernels, model architecture, batch shape, context length, and whether the workload is limited by compute or memory movement.
Raw weight storage is roughly half, but complete VRAM use is not. Scales, metadata, higher-precision layers, activations, the KV cache, and runtime buffers reduce the real difference.
Usually not for post-training methods such as GPTQ, AWQ, or SmoothQuant. Calibration and reconstruction may still be required. Quantization-aware training is a separate, more expensive path.
Some runtimes support lower-precision KV caches, but compatibility and quality effects vary. Treat KV-cache precision as a separate experiment from weight quantization.
Compare the quantized model with a higher-precision baseline on representative and held-out tasks. Review task-level results, not only an average score.
Pick one AI, compute, or storage workload and see the difference for yourself. Spin it up in minutes, or let our team map your fastest path to production.