BoA: Attention-aware Post-training Quantization without Backpropagation

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Kim, Junhan, Kim, Ho-young, Cho, Eulrang, Lee, Chungman, Kim, Joonyoung, Jeon, Yongkweon
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866908395616862208
author Kim, Junhan
Kim, Ho-young
Cho, Eulrang
Lee, Chungman
Kim, Joonyoung
Jeon, Yongkweon
author_facet Kim, Junhan
Kim, Ho-young
Cho, Eulrang
Lee, Chungman
Kim, Joonyoung
Jeon, Yongkweon
contents Post-training quantization (PTQ) is a promising solution for deploying large language models (LLMs) on resource-constrained devices. Early methods developed for small-scale networks, such as ResNet, rely on gradient-based optimization, which becomes impractical for hyper-scale LLMs with billions of parameters. While recently proposed backpropagation-free or transformation-based methods alleviate this issue, they ignore inter-layer interactions or use the naive nearest-rounding-based quantized weight assignment to save the heavy computational cost of weight optimization. In this paper, we introduce a novel backpropagation-free PTQ algorithm that optimizes quantized weights by considering inter-layer dependencies. The key innovation is the development of attention-aware Hessian matrices that capture inter-layer interactions within the attention module. Extensive experiments demonstrate that our approach not only outperforms existing weight quantization methods but also shows good synergy with conventional methods to suppress activation outliers, leading to state-of-the-art weight-activation quantization performance. The code will be available at https://github.com/SamsungLabs/BoA.
format Preprint
id arxiv_https___arxiv_org_abs_2406_13474
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle BoA: Attention-aware Post-training Quantization without Backpropagation
Kim, Junhan
Kim, Ho-young
Cho, Eulrang
Lee, Chungman
Kim, Joonyoung
Jeon, Yongkweon
Machine Learning
Artificial Intelligence
Post-training quantization (PTQ) is a promising solution for deploying large language models (LLMs) on resource-constrained devices. Early methods developed for small-scale networks, such as ResNet, rely on gradient-based optimization, which becomes impractical for hyper-scale LLMs with billions of parameters. While recently proposed backpropagation-free or transformation-based methods alleviate this issue, they ignore inter-layer interactions or use the naive nearest-rounding-based quantized weight assignment to save the heavy computational cost of weight optimization. In this paper, we introduce a novel backpropagation-free PTQ algorithm that optimizes quantized weights by considering inter-layer dependencies. The key innovation is the development of attention-aware Hessian matrices that capture inter-layer interactions within the attention module. Extensive experiments demonstrate that our approach not only outperforms existing weight quantization methods but also shows good synergy with conventional methods to suppress activation outliers, leading to state-of-the-art weight-activation quantization performance. The code will be available at https://github.com/SamsungLabs/BoA.
title BoA: Attention-aware Post-training Quantization without Backpropagation
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2406.13474