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

单阶段Huffman编码器用于机器学习压缩

Single-Stage Huffman Encoder for ML Compression

Google LLC(谷歌公司)

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

AI总结:

本文提出一种单阶段Huffman编码器,通过使用固定代码表实现高效实时压缩,减少计算和延迟开销,适用于芯片间通信等低延迟场景。

摘要:

训练和部署大型语言模型(LLMs)需要将数据分布在多个加速器上,其中集体操作经常受到网络带宽的限制。使用无损压缩的Huffman编码是一种有效的方法来缓解这一问题,然而,其三阶段设计需要实时频率分析、代码表生成和代码表与数据一起传输,这会引入计算、延迟和数据开销,这些开销对于延迟敏感的场景如芯片间通信来说是不可接受的。本文提出了一种单阶段Huffman编码器,通过使用从先前数据批次的平均概率分布导出的固定代码表来消除这些开销。通过我们对Gemma 2B模型的分析,我们证明张量在层和分片之间表现出高度的统计相似性。利用这种方法,我们实现了每分片Huffman编码压缩率在0.5%以内,接近理想Shannon压缩性1%,从而实现了高效的实时压缩。

英文摘要:

Training and serving Large Language Models (LLMs) require partitioning data across multiple accelerators, where collective operations are frequently bottlenecked by network bandwidth. Lossless compression using Huffman codes is an effective way to alleviate the issue, however, its three-stage design requiring on-the-fly frequency analysis, codebook generation and transmission of codebook along with data introduces computational, latency and data overheads which are prohibitive for latency-sensitive scenarios such as die-to-die communication. This paper proposes a single-stage Huffman encoder that eliminates these overheads by using fixed codebooks derived from the average probability distribution of previous data batches. Through our analysis of the Gemma 2B model, we demonstrate that tensors exhibit high statistical similarity across layers and shards. Using this approach we achieve compression within 0.5% of per-shard Huffman coding and within 1% of the ideal Shannon compressibility, enabling efficient on-the-fly compression.

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

↑