GaugeQuant: Online Learning of Quantization-Optimal Bases from LLM Symmetries

· Source: Machine Learning · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Expert, quick

Summary

GaugeQuant is a novel method for online learning of quantization-optimal bases in Large Language Models (LLMs) by leveraging internal continuous symmetries within Transformers. It introduces a LogSumExp term into the training loss to break these symmetries, thereby selecting a basis that effectively minimizes activation outliers. A stop-gradient operator ensures that only rotation matrices are updated, preserving the original language modeling objective. This approach requires no specific calibration data or quantization simulation and adds negligible training overhead. For the LLaMA-2 7B model, GaugeQuant significantly improves perplexity: under W4A4 quantization with group size 128, perplexity drops from 8.22 to 6.73, and under W4A16, it drops from 11.16 to 5.45.

Key takeaway

For Machine Learning Engineers deploying quantized LLMs, GaugeQuant offers a compelling in-training optimization strategy. You can achieve significant perplexity improvements, such as reducing LLaMA-2 7B W4A4 perplexity from 8.22 to 6.73, without needing calibration data or complex post-training steps. Consider integrating GaugeQuant into your LLM training pipelines to enhance model efficiency and performance with minimal overhead.

Key insights

GaugeQuant optimizes LLM quantization during training by breaking internal symmetries to minimize activation outliers.

Principles

Method

GaugeQuant adds a LogSumExp term to the loss to break Transformer symmetries, using a stop-gradient operator to update only rotation matrices, minimizing activation outliers during training.

In practice

Topics

Code references

Best for: Research Scientist, AI Engineer, AI Scientist, Machine Learning Engineer, NLP Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning.