arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.17849cs.LGcs.ITmath.IT
收藏

四长度编码用于e4m3的无损压缩

Quad Length Codes for Lossless Compression of e4m3

Google LLC(谷歌公司)

Aditya Agrawal, Albert Magyar, Hiteshwar Eswaraiah, Patrick Sheridan, Pradeep Janedula, Ravi Krishnan Venkatesan, Krishna Nair, Ravi Iyer

AI总结:

本文提出四长度编码,结合压缩效率与解码速度,适用于e4m3数据类型的无损压缩。

摘要:

训练和部署大型语言模型(LLMs)严重依赖于并行化和集体操作,这些操作经常受到网络带宽的限制。使用无损压缩如霍夫曼编码可以缓解这一问题,但霍夫曼编码由于深度树遍历导致解码速度慢且硬件复杂。通用编码如指数-戈尔邦编码解码速度快但不利用符号频率分布。为了解决这些限制,本文介绍了四长度编码,是一种混合方法,旨在在压缩效率和解码速度之间取得平衡。编码方案使用3个前缀位将256个符号分成8个区域。每个区域有不同的代码长度,并编码不同数量的符号。该方案使用具有256个条目的查找表,与霍夫曼树相比显著简化了硬件实现。该编码方案可以适应不同的分布。对于e4m3数据类型,该方案在压缩率上比霍夫曼编码高13.9%,但显著加快了解码速度并简化了硬件复杂性。

英文摘要:

Training and serving Large Language Models (LLMs) relies heavily on parallelization and collective operations, which are frequently bottlenecked by network bandwidth. Lossless compression using e.g., Huffman codes can alleviate the issue, however, Huffman codes suffer from slow, bit-sequential decoding and high hardware complexity due to deep tree traversals. Universal codes e.g., Exponential-Golomb codes are faster to decode but do not exploit the symbol frequency distributions. To address these limitations, this paper introduces Quad Length Codes, a hybrid approach designed to balance compression efficiency with decoding speed. The coding scheme uses 3 prefix bits to divide the 256 symbols into 8 areas. Each area has a different code length and encodes a different number of symbols. The scheme uses a Look Up Table with 256 entries, significantly simplifying the hardware implementation compared to Huffman trees. The coding scheme can be adapted for different distributions. For the e4m3 data type, the scheme achieves a compressibility of 13.9% in comparison to 15.9% achieved by Huffman codes, but it significantly speeds up the decoding and simplifies the hardware complexity.

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

↑