TAGC: Optimizing Gradient Communication in Distributed Transformer Training

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Polyakov, Igor, Dukhanov, Alexey, Spirin, Egor
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915233325383680
author Polyakov, Igor
Dukhanov, Alexey
Spirin, Egor
author_facet Polyakov, Igor
Dukhanov, Alexey
Spirin, Egor
contents The increasing complexity of large language models (LLMs) necessitates efficient training strategies to mitigate the high computational costs associated with distributed training. A significant bottleneck in this process is gradient synchronization across multiple GPUs, particularly in the zero-redundancy parallelism mode. In this paper, we introduce Transformer-Aware Gradient Compression (TAGC), an optimized gradient compression algorithm designed specifically for transformer-based models. TAGC extends the lossless homomorphic compression method by adapting it for sharded models and incorporating transformer-specific optimizations, such as layer-selective compression and dynamic sparsification. Our experimental results demonstrate that TAGC accelerates training by up to 15% compared to the standard Fully Sharded Data Parallel (FSDP) approach, with minimal impact on model quality. We integrate TAGC into the PyTorch FSDP framework, the implementation is publicly available at https://github.com/ipolyakov/TAGC.
format Preprint
id arxiv_https___arxiv_org_abs_2504_05638
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle TAGC: Optimizing Gradient Communication in Distributed Transformer Training
Polyakov, Igor
Dukhanov, Alexey
Spirin, Egor
Machine Learning
Distributed, Parallel, and Cluster Computing
I.2.6; C.2.4; I.2.11
The increasing complexity of large language models (LLMs) necessitates efficient training strategies to mitigate the high computational costs associated with distributed training. A significant bottleneck in this process is gradient synchronization across multiple GPUs, particularly in the zero-redundancy parallelism mode. In this paper, we introduce Transformer-Aware Gradient Compression (TAGC), an optimized gradient compression algorithm designed specifically for transformer-based models. TAGC extends the lossless homomorphic compression method by adapting it for sharded models and incorporating transformer-specific optimizations, such as layer-selective compression and dynamic sparsification. Our experimental results demonstrate that TAGC accelerates training by up to 15% compared to the standard Fully Sharded Data Parallel (FSDP) approach, with minimal impact on model quality. We integrate TAGC into the PyTorch FSDP framework, the implementation is publicly available at https://github.com/ipolyakov/TAGC.
title TAGC: Optimizing Gradient Communication in Distributed Transformer Training
topic Machine Learning
Distributed, Parallel, and Cluster Computing
I.2.6; C.2.4; I.2.11
url https://arxiv.org/abs/2504.05638