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

BitSparse:ReLU前馈网络的紧凑激活存储

BitSparse: Compact Activation Storage for ReLU Feed-Forward Networks

University of Cambridge(剑桥大学);University of Oxford(牛津大学)

Max Zhu, Bohang Sun, Pietro Lio, Jialin Yu

AI总结:

针对LLM训练内存问题,提出BitSparse稀疏激活无损压缩格式,可降低VRAM开销且不影响反向传播精度,还配套预分配缓冲区系统避免主机同步。

摘要:

减少大语言模型(LLM)训练中的内存使用是持续存在的挑战。激活检查点通过重计算节省内存,而有损压缩会改变存储的激活值。稀疏ReLU和ReLU²激活的重新出现创造了第三种机会:对激活缓存本身进行无损压缩。我们提出BitSparse,一种用于稀疏激活的GPU驻留无损压缩格式。压缩与重建在融合到自动求导函数的自定义Triton内核中运行,可缩小激活缓存,同时在反向传播时精确恢复激活值。它支持Bfloat16(BF16)和FP8激活值,可选的符号位打包进一步将压缩率提升至接近理论极限。我们分析了其压缩率并与理论最优值进行比较。BitSparse在Modded-NanoGPT和Nemotron-H上分别将每令牌VRAM降低31%和30%,在实际序列长度下开销不超过1%。此外,新的预分配缓冲区系统可在训练期间分配可变大小张量时避免主机同步。

英文摘要:

Reducing memory use in large language model (LLM) training is an ongoing challenge. Activation checkpointing saves memory by recomputation, while lossy compression changes the stored activations. The reemergence of sparse $\relu$ and $\relu^2$ activations creates a third opportunity: losslessly compressing the activation cache itself. We present BitSparse, a GPU-resident lossless compression format for sparse activations. Compression and reconstruction run in custom Triton kernels fused into an autograd function, shrinking the activation cache while recovering it exactly for the backward pass. Bfloat16 (BF16) and FP8 activations are supported. Optional sign-bit packing further increases compression up to close to the theoretical limit. We analyze its compression ratio and compare it to the theoretical optimum. BitSparse lowers per-token VRAM by 31\% and 30\% Modded-NanoGPT and Nemotron-H respectively, with overheads of no more than 1\% at practical sequence lengths. Additionally, a new preallocated buffer system avoids host synchronization during training when variable size tensors are allocated.

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

↑