Saved in:
Bibliographic Details
Main Authors: Xi, Haocheng, Cai, Han, Zhu, Ligeng, Lu, Yao, Keutzer, Kurt, Chen, Jianfei, Han, Song
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2410.19313
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909490277777408
author Xi, Haocheng
Cai, Han
Zhu, Ligeng
Lu, Yao
Keutzer, Kurt
Chen, Jianfei
Han, Song
author_facet Xi, Haocheng
Cai, Han
Zhu, Ligeng
Lu, Yao
Keutzer, Kurt
Chen, Jianfei
Han, Song
contents FP8 training has emerged as a promising method for improving training efficiency. Existing frameworks accelerate training by applying FP8 computation to linear layers while leaving optimizer states and activations in higher precision, which fails to fully optimize memory usage. This paper introduces COAT (Compressing Optimizer States and Activations for FP8 Training), a novel FP8 training framework designed to significantly reduce memory footprint when training large models. COAT addresses current limitations through two key innovations: (1) Dynamic Range Expansion, which aligns optimizer state distributions more closely with the FP8 representation range, thereby reducing quantization error, and (2) Mixed-Granularity Activation Quantization, which optimizes activation memory using a combination of per-tensor and per-group quantization strategies. Experiments demonstrate that COAT effectively reduces end-to-end training memory footprint by 1.54x compared to BF16 while achieving nearly lossless performance across various tasks, such as Large Language Model pretraining and fine-tuning and Vision Language Model training. COAT also achieves a 1.43x end-to-end training speedup compared to BF16, performing on par with or surpassing TransformerEngine's speedup. COAT enables efficient full-parameter training of large models on fewer GPUs, and facilitates doubling the batch size in distributed training settings, providing a practical solution for scaling large-scale model training. The code is available at https://github.com/NVlabs/COAT.
format Preprint
id arxiv_https___arxiv_org_abs_2410_19313
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle COAT: Compressing Optimizer states and Activation for Memory-Efficient FP8 Training
Xi, Haocheng
Cai, Han
Zhu, Ligeng
Lu, Yao
Keutzer, Kurt
Chen, Jianfei
Han, Song
Machine Learning
Artificial Intelligence
FP8 training has emerged as a promising method for improving training efficiency. Existing frameworks accelerate training by applying FP8 computation to linear layers while leaving optimizer states and activations in higher precision, which fails to fully optimize memory usage. This paper introduces COAT (Compressing Optimizer States and Activations for FP8 Training), a novel FP8 training framework designed to significantly reduce memory footprint when training large models. COAT addresses current limitations through two key innovations: (1) Dynamic Range Expansion, which aligns optimizer state distributions more closely with the FP8 representation range, thereby reducing quantization error, and (2) Mixed-Granularity Activation Quantization, which optimizes activation memory using a combination of per-tensor and per-group quantization strategies. Experiments demonstrate that COAT effectively reduces end-to-end training memory footprint by 1.54x compared to BF16 while achieving nearly lossless performance across various tasks, such as Large Language Model pretraining and fine-tuning and Vision Language Model training. COAT also achieves a 1.43x end-to-end training speedup compared to BF16, performing on par with or surpassing TransformerEngine's speedup. COAT enables efficient full-parameter training of large models on fewer GPUs, and facilitates doubling the batch size in distributed training settings, providing a practical solution for scaling large-scale model training. The code is available at https://github.com/NVlabs/COAT.
title COAT: Compressing Optimizer states and Activation for Memory-Efficient FP8 Training
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2410.19313