Group-wise quantization, also called block-wise quantization, is a method of compressing neural network tensors in which the values are divided into small contiguous groups, typically 32 to 128 elements, and each group receives its own scale factor and often its own zero point. In edge AI, it is the standard way to run 4-bit and lower-precision language models on phones, laptops and embedded boards without the accuracy collapse that a single scale per tensor would cause.
The technique sits between per-channel quantization and full floating point: it adds a small amount of metadata per group in exchange for a much closer fit to the local value range. Formats such as GGUF, methods such as GPTQ and AWQ, and the NF4 data type all rely on it.
How group-wise quantization works
Group-wise quantization works by computing a separate mapping from real values to integers for every group of weights. For a weight matrix, each row is usually cut along the input dimension into segments of a fixed group size. Within a segment, the quantizer finds the range of values, derives a scale, and rounds every value to the nearest integer level that the bit width allows.
With symmetric quantization, the scale is the largest absolute value in the group divided by the highest integer level, and no zero point is stored. With asymmetric quantization, the group minimum and maximum define both a scale and a zero point, which fits skewed distributions better. During inference, the kernel dequantizes each group by multiplying the integers by the group scale before or during the matrix multiplication.
The benefit comes from outlier isolation. Large-magnitude weights, which are common in transformer layers, inflate the scale only for the group they belong to, so the remaining groups keep fine resolution for their typical small values.
Group size and storage overhead
Group size is the main tuning parameter, and it sets the trade-off between accuracy and metadata overhead. Smaller groups track local ranges more closely but store more scales; larger groups save memory but let outliers degrade precision for more weights.
The table shows the effective storage cost for 4-bit weights with one 16-bit scale per group, which is a common configuration.
| Group size | Scale overhead | Effective bits per weight | Typical use |
|---|---|---|---|
| 32 | 0.5 bits | About 4.5 | Q4_0-style GGUF blocks |
| 64 | 0.25 bits | About 4.25 | NF4 in fine-tuning setups |
| 128 | 0.125 bits | About 4.125 | Common GPTQ and AWQ setting |
| Whole row | Negligible | About 4.0 | Per-channel quantization |
Storing a zero point per group adds a similar amount again. Some schemes reduce this cost with double quantization, in which the group scales themselves are quantized to 8 bits with a second-level scale, saving roughly 0.4 bits per weight at group size 64.
Comparison with other quantization granularities
Quantization granularity describes how many values share one scale, and group-wise quantization is the finest granularity in common use for weights. Per-tensor quantization shares one scale across an entire tensor, while per-channel quantization assigns one scale per output channel.
The comparison below summarizes the main granularity levels.
| Granularity | Values per scale | Accuracy at 4 bits | Hardware friendliness |
|---|---|---|---|
| Per-tensor | Entire tensor | Usually poor | Very high |
| Per-channel | One output channel | Moderate | High |
| Group-wise | 32 to 128 values | Good | Needs custom kernels |
| Element-wise float | One value | Reference quality | No compression |
At 8 bits, per-channel quantization is usually accurate enough, so group-wise schemes matter mostly for 4-bit, 3-bit and 2-bit weights, where the small number of levels makes range fitting critical. Group-wise scales are also combined with mixed-precision quantization, in which sensitive layers keep more bits.
Group-wise quantization on edge hardware
On edge devices, group-wise quantization is mostly used as weight-only quantization: weights are stored in low precision, while activations remain in 16-bit floating point. Since local language model inference is usually limited by memory bandwidth, loading four times fewer bytes per weight speeds up token generation even though the kernel spends extra work on dequantization.
The scheme is less convenient for integer-only inference. Because group scales change along the reduction dimension of a matrix multiplication, they cannot be factored out of the whole dot product. Kernels must accumulate partial sums per group and rescale each one, which suits CPUs and GPUs with flexible kernels better than fixed-function neural accelerators.
The table lists typical deployment choices.
| Target | Suggested setting | Reason |
|---|---|---|
| Laptop CPU with local LLM | 4-bit, group size 32 | Good accuracy, mature kernels |
| Phone GPU | 4-bit, group size 64 or 128 | Lower overhead, fits memory |
| NPU with integer pipeline | Per-channel 8-bit | Group scales poorly supported |
| Very small memory budget | 3-bit, group size 32 | Small groups offset low precision |
Limitations and common mistakes
Group-wise quantization reduces but does not remove quantization error, and it interacts with other parts of the pipeline in ways that practitioners sometimes overlook.
- Ignoring overhead in size estimates: a 4-bit model with group size 32 is closer to 4.5 bits per weight.
- Mismatched kernels: a group size the runtime does not support forces slow fallback paths.
- Grouping along the wrong axis: groups should follow the reduction dimension used by the kernel.
- Assuming groups fix activation outliers: activation outliers need methods such as SmoothQuant.
- Skipping evaluation: perplexity and task accuracy should be measured after conversion.
Group-wise scales are most effective when paired with error-compensating algorithms such as GPTQ or activation-aware scaling such as AWQ, which choose the rounded values or per-channel factors so that the output error of each layer stays small, not just the weight error.
Put simply
Imagine measuring many objects with one ruler marked only in large steps. A few huge objects force big steps, and the small objects all look the same size.
Group-wise quantization gives each small group of numbers its own ruler. A group of small numbers gets fine marks. A group with a large number gets coarse marks. The model becomes much smaller but stays close to the original quality. That is why large AI models can run on a laptop or phone.
In practice
A developer wants to run a 7-billion-parameter language model offline on a laptop with 16 GB of memory for a field inspection app. In 16-bit precision, the weights alone need about 14 GB, which leaves too little room for the operating system and the context cache.
The developer converts the model to 4-bit weights with a group size of 32, which brings the weight file to roughly 4 GB. A test on internal inspection questions shows only a small drop in answer quality compared with the full model, while an earlier per-channel 4-bit version had produced noticeably more wrong answers. Token generation also becomes faster, because the CPU reads far fewer bytes from memory for each token.