arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.17836cs.LGcs.AI
收藏

语言模型作为零样本无损梯度压缩器:迈向通用神经参数先验模型

Language Models as Zero-shot Lossless Gradient Compressors: Towards General Neural Parameter Prior Models

CISPA Helmholtz Center for Information Security(CISPA亥姆霍兹信息安全中心)

Hui-Po Wang, Mario Fritz

AI总结:

本研究提出LM-GC方法,利用大型语言模型作为零样本梯度先验,结合算术编码实现无损压缩,压缩率提升10%-17.2%,并兼容有损压缩。

摘要:

尽管统计先验模型在各个领域中被广泛使用,但针对神经网络梯度的此类模型长期以来一直被忽视。其内在挑战源于梯度的高维结构和复杂相互依赖性,这使得有效建模变得困难。在本工作中,我们展示了大型语言模型(LLMs)在零样本设置下作为梯度先验的潜力。我们通过考虑无损梯度压缩——分布式学习中的一个关键应用——来检验这一性质,该应用高度依赖于精确的概率建模。为此,我们引入了LM-GC,一种将LLMs与算术编码相结合的新方法。我们的技术将普通梯度转换为类文本格式,与普通表示相比,令牌效率提高了多达38倍。我们确保这种数据转换与普通梯度的结构以及LLMs常见识别的符号保持紧密对齐。我们的实验表明,LM-GC超越了现有的最先进无损压缩方法,在各种数据集和架构上将压缩率提高了10%至17.2%。此外,我们的方法显示出与量化、稀疏化等有损压缩技术的良好兼容性。这些发现凸显了LLMs作为有效处理梯度模型的巨大潜力。代码可在https://github.com/hui-po-wang/LM-GC获取。

英文摘要:

Despite the widespread use of statistical prior models in various fields, such models for neural network gradients have long been overlooked. The inherent challenge stems from their high-dimensional structures and complex interdependencies, which complicate effective modeling. In this work, we demonstrate the potential of large language models (LLMs) to act as gradient priors in a zero-shot setting. We examine the property by considering lossless gradient compression -- a critical application in distributed learning -- that depends heavily on precise probability modeling. To achieve this, we introduce LM-GC, a novel method that integrates LLMs with arithmetic coding. Our technique converts plain gradients into text-like formats, enhancing token efficiency by up to 38 times compared to their plain representations. We ensure that this data conversion maintains a close alignment with the structure of plain gradients and the symbols commonly recognized by LLMs. Our experiments indicate that LM-GC surpasses existing state-of-the-art lossless compression methods, improving compression rates by 10% up to 17.2% across various datasets and architectures. Additionally, our approach shows promising compatibility with lossy compression techniques such as quantization and sparsification. These findings highlight the significant potential of LLMs as a model for effectively handling gradients. Code is available at https://github.com/hui-po-wang/LM-GC.

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

↑