arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2412.12178cs.LGcs.AI
收藏

压缩通用大型语言模型的激活稀疏性机遇

Activation Sparsity Opportunities for Compressing General Large Language Models

College of Computing and Software Engineering, Kennesaw State University(肯尼索州立大学计算与软件工程学院)

Nobel Dhar, Bobin Deng, Md Romyull Islam, Kazi Fahim Ahmad Nasif, Liang Zhao, Kun Suo

AI总结:

本文研究通用LLM的激活稀疏性,通过为FFN组件注入强制置零阈值实现约50%的内存与计算压缩,精度损失可忽略,并给出边缘设备上的预测与预取系统设计指导。

摘要:

将本地AI模型(如大型语言模型,LLMs)部署到边缘设备上,可以显著增强设备的独立能力,减轻服务器负担,并降低响应时间。由于这些巨大潜力,许多大型科技公司已经发布了多款轻量级小型语言模型(SLMs)来弥合这一差距。然而,我们仍然有强烈的动机在边缘设备上部署更强大的LLM AI模型并提升其智能水平。与传统的AI模型压缩方法不同,我们研究了激活稀疏性。激活稀疏性方法与现有技术正交且可组合,能够在保持高精度的同时最大化压缩率。LLM的前馈网络(FFN)组件通常占据很大比例的参数量(约2/3),这确保我们的FFN优化更有可能实现有效压缩。此外,我们的发现适用于通用LLM,并不局限于基于ReLU的模型。本工作系统地研究了在最先进的LLM上强制激活稀疏性与困惑度(精度)之间的权衡。我们的实证分析表明,对于关键的FFN组件,我们可以实现约50%的主内存和计算量减少,同时精度下降可忽略不计。这额外的50%稀疏性在当前LLM中并不自然存在,需要通过注入强制置零阈值来调整LLM的激活输出。为了获得激活稀疏性的收益,我们为系统架构师提供了LLM预测和预取的指导方针。成功的预测使系统能够预取必要的权重,同时跳过非活跃权重及其后继者,从而降低缓存和内存污染,并减少LLM在资源受限的边缘设备上的执行时间。

英文摘要:

Deploying local AI models, such as Large Language Models (LLMs), to edge devices can substantially enhance devices' independent capabilities, alleviate the server's burden, and lower the response time. Owing to these tremendous potentials, many big tech companies have released several lightweight Small Language Models (SLMs) to bridge this gap. However, we still have huge motivations to deploy more powerful (LLMs) AI models on edge devices and enhance their smartness level. Unlike the conventional approaches for AI model compression, we investigate activation sparsity. The activation sparsity method is orthogonal and combinable with existing techniques to maximize the compression rate while maintaining great accuracy. LLMs' Feed-Forward Network (FFN) components, which typically comprise a large proportion of parameters (around 2/3), ensure that our FFN optimizations would have a better chance of achieving effective compression. Moreover, our findings are beneficial to general LLMs and are not restricted to ReLU-based models. This work systematically investigates the tradeoff between enforcing activation sparsity and perplexity (accuracy) on state-of-the-art LLMs. Our empirical analysis demonstrates that we can obtain around 50% of main memory and computing reductions for critical FFN components with negligible accuracy degradation. This extra 50% sparsity does not naturally exist in the current LLMs, which require tuning LLMs' activation outputs by injecting zero-enforcing thresholds. To obtain the benefits of activation sparsity, we provide a guideline for the system architect for LLM prediction and prefetching. The success prediction allows the system to prefetch the necessary weights while omitting the inactive ones and their successors, therefore lowering cache and memory pollution and reducing LLM execution time on resource-constrained edge devices.

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

↑