Exploring Quantization for Efficient Pre-Training of Transformer Language Models

Kamran Chitsaz, Quentin Fournier, Gonçalo Mordido, Sarath Chandar
7/16/2024
cs.LG

Official code: chandar-lab/EfficientLLMs (22 stars, last commit 2024-07-30).

Abstract

The increasing scale of Transformer models has led to an increase in their pre-training computational requirements. While quantization has proven to be effective after pre-training and during fine-tuning, applying quantization in Transformers during pre-training has remained largely unexplored at scale for language modeling. This study aims to explore the impact of quantization for efficient pre-training of Transformers, with a focus on linear layer components. By systematically applying straightforward linear quantization to weights, activations, gradients, and optimizer states, we assess its effects on model efficiency, stability, and performance during training. By offering a comprehensive recipe of effective quantization strategies to be applied during the pre-training of Transformers, we promote high training efficiency from scratch while retaining language modeling ability. Code is available at https://github.com/chandar-lab/EfficientLLMs.

View on arXivView PDF

Code Implementations(1)

221Shell, PythonOct 5, 20232 years ago

Similar Papers

Cite this paper

@article{chitsaz2024exploring,
  title  = {Exploring Quantization for Efficient Pre-Training of Transformer Language Models},
  author = {Kamran Chitsaz and Quentin Fournier and Gonçalo Mordido and Sarath Chandar},
  year   = {2024},
  eprint = {2407.11722},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.11722v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.11722.svg)](https://codeofpaper.com/paper/2407.11722)

Discussion