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

面向 LLM 张量增量快照的无损压缩

Lossless Compression for LLM Tensor Incremental Snapshots

IBM Research, Almaden Research Center(IBM研究院,阿姆德恩研究中心)

Daniel Waddington, Cornel Constantinescu

AI总结:

本文分析 LLM 训练检查点张量的可压缩性,提出基于 byte-grouping 与 Huffman 编码的 LMC,在压缩率优于 BZ2 的同时显著提速。

摘要:

在大语言模型(LLM)训练期间,张量数据会被定期“检查点化”到持久化存储中,以便在发生故障时恢复已完成的工作。即使使用 bfloat16 等低精度表示,每次检查点期间必须复制的数据量通常也会达到数百 GB。此外,这些数据必须在下一个 epoch 开始之前通过网络传输并写入存储系统。为了最终构建优化的检查点解决方案,本文对检查点数据进行了实验分析,用于推导一种最大限度利用无损压缩以减少数据量的设计。我们考察了张量数据及其可压缩性在模型训练过程中如何演变,并评估了现有常见的现成通用压缩引擎与已知数据优化技术(例如 byte-grouping 和增量 delta 压缩)相结合时的效果。利用这些分析,我们构建了一种有效的压缩解决方案,称为 Language Model Compressor(LMC),它基于 byte-grouping 和 Huffman 编码。LMC 提供了优于最佳替代方案(BZ2)的压缩性能,同时将执行压缩所需的时间降低了一个数量级。我们表明,16 核并行实现的 LMC 可分别达到 2.78 GiB/s 和 3.76 GiB/s 的压缩与解压缩吞吐量。这种性能提升最终减少了所需的 CPU 资源,并为在下一个 epoch 之前将数据复制到存储系统提供了更多时间,从而允许更高频率的检查点。

英文摘要:

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.

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

↑