ENDE
AEVORIANA

Quantisation: How language models get by with less memory

AI ยท Feature

Large model files are not immutable. Quantisation stores certain model values at lower numerical precision and can therefore reduce memory requirements and memory transfers. Research such as AWQ shows how important weights can be specifically taken into account. Whether a compressed version is sufficiently accurate and actually faster must nevertheless be tested on the intended hardware.

Fewer bits change the computing conditions

Language models contain a very large number of numerical weights. Representing them with fewer bits allows more of them to fit into the same memory. In addition, less data may need to be transferred during execution. This can be particularly helpful where memory bandwidth or RAM limits operation. The method presented by MIT Han Lab, Activation-aware Weight Quantization, or AWQ for short, takes into account that not all weights are equally important to the output. It uses observations of activations to determine suitable scaling factors and better protect sensitive components. Quantisation does not mean that the model acquires new specialist knowledge. It changes the representation and execution of an already trained system. The potential gain lies in efficiency, while its suitability in terms of content must still be assessed separately.

Compression is not a cost-free switch

Lower precision can introduce errors. How noticeable they are depends on the model, method and task. An average score that barely changes does not rule out poorer performance on individual numerical tasks or rare language patterns. Moreover, a smaller file does not lead to a proportionally shorter response time on every platform. The software must support suitable computational operations; otherwise, conversions and management overhead can partly erode the advantage. The additional memory needed for long inputs also remains relevant. Comparative tests should therefore use the same documents, output limits and hardware conditions. Although the Phi-3 research illustrates that compact language models are being investigated for local use, a specific installation requires a clear distinction between model size, numerical compression and actually measured execution time, rather than treating them as equivalent.

Which measurements help before deployment

A useful test report first specifies the model version, quantisation method and runtime environment used. This is followed by memory requirements, time to the first output character and the speed of longer responses. These measurements should cover both short and longer inputs. Alongside them, a quality comparison with the less heavily compressed original version is needed. Tasks where small deviations have consequences are particularly important: extracting numbers, structured formats or precise negations. If the compressed version remains sufficiently reliable, it can enable a more economical local solution. If, on the other hand, it regularly requires additional checking, the practical gain shrinks. The sensible question is therefore not how few bits can still work in principle, but what level of compression is defensible for a clearly defined task under real operating conditions.

Sources & further reading

Written in our own words with AI assistance, based on the sources listed above. The text distinguishes research findings, technical prototypes and established knowledge. This feature is not a breaking-news report.

Keep exploring

All features on AI