Low-rank adaptation (LoRA) is a predominant parameter-efficient finetuning method for adapting large language models (LLMs) to downstream tasks. Meanwhile, Compute-in-Memory (CIM) architectures demonstrate superior energy efficiency due to their array-level parallel in-memory computing designs. In this paper, we propose deploying the LoRA-finetuned LLMs on the hybrid CIM architecture (i.e., pretrained weights onto energy-efficient Resistive Random-Access Memory (RRAM) and LoRA branches onto noise-free Static Random-Access Memory (SRAM)), reducing the energy cost to about 3\% compared to the Nvidia A100 GPU. However, the inherent noise of RRAM on the saved weights leads to performance degradation, simultaneously. To address this issue, we design a novel Hardware-aware Low-rank Adaptation (HaLoRA) method. The key insight is to train a LoRA branch that is robust toward such noise and then deploy it on noise-free SRAM, while the extra cost is negligible since the parameters of LoRAs are much fewer than pretrained weights (e.g., 0.15\% for LLaMA-3.2 1B model). To improve the robustness towards the noise, we theoretically analyze the gap between the optimization trajectories of the LoRA branch under both ideal and noisy conditions and further design an extra loss to minimize the upper bound of this gap. Therefore, we can enjoy both energy efficiency and accuracy during inference. Experiments finetuning the Qwen and LLaMA series demonstrate the effectiveness of HaLoRA across multiple reasoning tasks, achieving up to \textbf{22.7} improvement in average score while maintaining robustness at various noise types and noise levels.


翻译:低秩适配(LoRA)是一种主流的参数高效微调方法,用于使大语言模型(LLM)适应下游任务。与此同时,存内计算(CIM)架构凭借其阵列级并行的存内计算设计,展现出卓越的能效。本文提出在混合CIM架构上部署LoRA微调后的LLM(即将预训练权重存储在能效高的阻变随机存取存储器(RRAM)上,而将LoRA分支存储在无噪声的静态随机存取存储器(SRAM)上),与Nvidia A100 GPU相比,可将能耗降低至约3%。然而,RRAM固有的权重存储噪声同时会导致模型性能下降。为解决此问题,我们设计了一种新颖的硬件感知低秩适配(HaLoRA)方法。其核心思想是训练一个对此类噪声具有鲁棒性的LoRA分支,然后将其部署在无噪声的SRAM上,而由于LoRA的参数远少于预训练权重(例如,LLaMA-3.2 1B模型中仅占0.15%),额外开销可忽略不计。为提升对噪声的鲁棒性,我们从理论上分析了LoRA分支在理想条件和含噪声条件下优化轨迹之间的差距,并进一步设计了一个额外的损失函数来最小化此差距的上界。因此,我们可以在推理过程中同时享受高能效和高精度。在Qwen和LLaMA系列模型上进行的微调实验证明了HaLoRA在多项推理任务中的有效性,其在保持对不同噪声类型和噪声水平鲁棒性的同时,平均得分最高提升了\textbf{22.7}。

0
下载
关闭预览

相关内容

【ICLR2025】大型语言模型的动态低秩稀疏适应
专知会员服务
14+阅读 · 2025年2月21日
【ICLR2025】RANDLORA: 全秩参数高效微调大规模模型
专知会员服务
15+阅读 · 2025年2月4日
低比特大语言模型综述:基础、系统与算法
专知会员服务
28+阅读 · 2024年10月6日
大语言模型的LoRA研究综述
专知会员服务
55+阅读 · 2024年7月17日
【ACL2024】DoRA:通过动态秩分布增强参数高效微调
专知会员服务
21+阅读 · 2024年5月28日
【ICLR2024】MathVista:视觉背景下基础模型的数学推理评估
专知会员服务
35+阅读 · 2024年1月20日
CALDERA 一款对手自动模拟工具
黑白之道
20+阅读 · 2019年9月17日
哈工大讯飞联合实验室发布中文XLNet预训练模型
哈工大SCIR
13+阅读 · 2019年8月20日
【学界】DeepMind论文:深度压缩感知,新框架提升GAN性能
GAN生成式对抗网络
14+阅读 · 2019年5月23日
用Rasa NLU构建自己的中文NLU系统
待字闺中
18+阅读 · 2017年9月18日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
10+阅读 · 5月5日
《美空军条令出版物 2-0:情报(2026版)》
专知会员服务
14+阅读 · 5月5日
帕兰提尔 Gotham:一个游戏规则改变器
专知会员服务
9+阅读 · 5月5日
【综述】 机器人学习中的世界模型:全面综述
专知会员服务
13+阅读 · 5月4日
伊朗的导弹-无人机行动及其对美国威慑的影响
相关VIP内容
【ICLR2025】大型语言模型的动态低秩稀疏适应
专知会员服务
14+阅读 · 2025年2月21日
【ICLR2025】RANDLORA: 全秩参数高效微调大规模模型
专知会员服务
15+阅读 · 2025年2月4日
低比特大语言模型综述:基础、系统与算法
专知会员服务
28+阅读 · 2024年10月6日
大语言模型的LoRA研究综述
专知会员服务
55+阅读 · 2024年7月17日
【ACL2024】DoRA:通过动态秩分布增强参数高效微调
专知会员服务
21+阅读 · 2024年5月28日
【ICLR2024】MathVista:视觉背景下基础模型的数学推理评估
专知会员服务
35+阅读 · 2024年1月20日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员