Accumulator-Aware Post-Training Quantization for Large Language Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Colbert, Ian, Franco, Giuseppe, Grob, Fabian, Zhang, Jinjie, Saab, Rayan
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866908473133891584
author Colbert, Ian
Franco, Giuseppe
Grob, Fabian
Zhang, Jinjie
Saab, Rayan
author_facet Colbert, Ian
Franco, Giuseppe
Grob, Fabian
Zhang, Jinjie
Saab, Rayan
contents When quantizing weights and activations to increasingly narrower representations, the cost of additions begins to dominate that of multiplications in multiply-accumulate (MAC) units. Recent studies show that reducing addition costs via low-precision accumulation improves throughput, power, and area across inference platforms, albeit with an increased risk of overflow. Accumulator-aware quantization research has so far only considered the quantization-aware training (QAT) paradigm, in which models are fine-tuned or trained from scratch with quantization in the loop. As models and datasets continue to grow in size, QAT techniques become increasingly more expensive, which has motivated the recent surge in post-training quantization (PTQ) research. To bridge this gap, we introduce AXE, the first accumulator-aware quantization framework explicitly designed to endow overflow avoidance guarantees to PTQ algorithms. We present theoretical motivation for AXE and demonstrate its flexibility by implementing it on top of two existing algorithms: GPFQ and OPTQ. We design AXE to support multi-stage accumulation, opening the door to full datapath optimization for the first time. We evaluate AXE using recent language generation models; when quantizing Llama3 8B for a 16-bit multi-stage accumulation datapath, AXE maintains up to 98% of the FP16 perplexity, surpassing naive bit width manipulation by up to 15%.
format Preprint
id arxiv_https___arxiv_org_abs_2409_17092
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Accumulator-Aware Post-Training Quantization for Large Language Models
Colbert, Ian
Franco, Giuseppe
Grob, Fabian
Zhang, Jinjie
Saab, Rayan
Machine Learning
Artificial Intelligence
Discrete Mathematics
When quantizing weights and activations to increasingly narrower representations, the cost of additions begins to dominate that of multiplications in multiply-accumulate (MAC) units. Recent studies show that reducing addition costs via low-precision accumulation improves throughput, power, and area across inference platforms, albeit with an increased risk of overflow. Accumulator-aware quantization research has so far only considered the quantization-aware training (QAT) paradigm, in which models are fine-tuned or trained from scratch with quantization in the loop. As models and datasets continue to grow in size, QAT techniques become increasingly more expensive, which has motivated the recent surge in post-training quantization (PTQ) research. To bridge this gap, we introduce AXE, the first accumulator-aware quantization framework explicitly designed to endow overflow avoidance guarantees to PTQ algorithms. We present theoretical motivation for AXE and demonstrate its flexibility by implementing it on top of two existing algorithms: GPFQ and OPTQ. We design AXE to support multi-stage accumulation, opening the door to full datapath optimization for the first time. We evaluate AXE using recent language generation models; when quantizing Llama3 8B for a 16-bit multi-stage accumulation datapath, AXE maintains up to 98% of the FP16 perplexity, surpassing naive bit width manipulation by up to 15%.
title Accumulator-Aware Post-Training Quantization for Large Language Models
topic Machine Learning
Artificial Intelligence
Discrete Mathematics
url https://arxiv.org/abs/2409.17092