arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.11722cs.LG
收藏

探索用于Transformer语言模型高效预训练的量化

Exploring Quantization for Efficient Pre-Training of Transformer Language Models

Chandar Research Lab(钱达尔研究实验室);Mila – Quebec AI Institute(米拉-魁北克人工智能研究所);Polytechnique Montréal(蒙特利尔理工学院)

Kamran Chitsaz, Quentin Fournier, Gonçalo Mordido, Sarath Chandar

AI总结:

本研究探索了线性量化在Transformer语言模型预训练中的应用,通过系统量化权重、激活、梯度和优化器状态评估其对效率、稳定性和性能的影响,并提出了一套有效的预训练量化策略以提升从头训练的效率并保持语言建模能力。

摘要:

Transformer模型规模的增加导致其预训练计算需求增加。尽管量化已被证明在预训练后和微调期间是有效的,但在大规模语言建模中,将量化应用于Transformer的预训练在很大程度上仍未被探索。本研究旨在探索量化对Transformer高效预训练的影响,重点关注线性层组件。通过将简单的线性量化系统性地应用于权重、激活、梯度和优化器状态,我们评估了其对训练期间模型效率、稳定性和性能的影响。通过提供一套在Transformer预训练期间应用的有效量化策略的综合方案,我们促进了从头开始的高训练效率,同时保留了语言建模能力。代码可在https://github.com/chandar-lab/EfficientLLMs获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑