用高效压缩技术减少大模型训练检查点的存储与传输开销。
Lossless Compression for LLM Tensor Incremental Snapshots
- 基于字节分组和哈夫曼编码设计专用压缩算法
- 压缩速度比最优方案快10倍,吞吐达2.78 GiB/s
- 适合需要高频检查点的大模型训练场景
大语言模型训练过程中,张量数据需定期保存至持久化存储以实现故障恢复。即使采用bfloat16等低精度表示,每次检查点的数据量仍可达数百吉字节,且必须在网络上传输并写入存储系统,时间窗口紧张。本文通过实验分析训练过程中的张量数据特性及其可压缩性,评估了通用压缩引擎与字节分组、增量差分等优化技术的组合效果。基于分析结果,提出名为语言模型压缩器(LMC)的新方案,结合字节分组与哈夫曼编码,在压缩性能上优于最佳替代方案(BZ2),但压缩耗时降低一个数量级。16核并行实现下,压缩与解压吞吐分别达到2.78 GiB/s和3.76 GiB/s。该性能提升显著降低CPU资源占用,为数据写入存储赢得更多时间,支持更高频率的检查点。
原文摘要 · Abstract (English)
During the training of Large Language Models (LLMs), tensor data is periodically "checkpointed" to persistent storage to allow recovery of work done in the event of failure. The volume of data that must be copied during each checkpoint, even when using reduced-precision representations such as bfloat16, often reaches hundreds of gigabytes. Furthermore, the data must be moved across a network and written to a storage system before the next epoch occurs. With a view to ultimately building an optimized checkpointing solution, this paper presents experimental analysis of checkpoint data used to derive a design that maximizes the use of lossless compression to reduce the volume of data. We examine how tensor data and its compressibility evolve during model training and evaluate the efficacy of existing common off-the-shelf general purpose compression engines combined with known data optimization techniques such as byte-grouping and incremental delta compression. Leveraging our analysis we have built an effective compression solution, known as Language Model Compressor (LMC), which is based on byte-grouping and Huffman encoding. LMC offers more compression performance than the best alternative (BZ2) but with an order-of-magnitude reduction in the time needed to perform the compression. We show that a 16-core parallel implementation of LMC can attain compression and decompression throughput of 2.78 GiB/s and 3.76 GiB/s respectively. This increase in performance ultimately reduces the CPU resources needed and provides more time to copy the data to the storage system before the next epoch thus allowing for higher-frequency checkpoints.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。