arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2602.13069cs.LGcs.CL
收藏

面向设备上大语言模型微调的内存高效结构化反向传播

Memory-Efficient Structured Backpropagation for On-Device LLM Fine-Tuning

OptAI Inc.(OptAI公司)

Juneyoung Park, Yuri Hong, Seongwan Kim, Jaeho Lee

AI总结:

提出MeSP方法,通过手动推导利用LoRA低秩结构的反向传播,在计算数学等价梯度的同时平均减少49%内存,使内存受限设备上的微调成为可能。

摘要:

设备上微调能够实现大语言模型的隐私保护个性化,但移动设备存在严重的内存限制,通常所有工作负载共享6-12GB内存。现有方法迫使在高内存的精确梯度(MeBP)和低内存的噪声估计(MeZO)之间进行权衡。我们提出内存高效结构化反向传播(MeSP),通过手动推导利用LoRA低秩结构的反向传播来弥合这一差距。我们的关键洞察是,中间投影 $h = xA$ 可以在反向传播中以最小成本重新计算,因为秩 $r \ll d_{in}$,从而无需存储它。在Qwen2.5模型(0.5B-3B)上,MeSP相比MeBP平均减少49%内存,同时计算数学上等价的梯度。我们的分析还揭示,MeZO的梯度估计与真实梯度的相关性接近零(余弦相似度≈0.001),解释了其收敛缓慢的原因。MeSP将Qwen2.5-0.5B的峰值内存从361MB降低到136MB,使得先前在内存受限设备上不可行的微调场景成为可能。

英文摘要:

On-device fine-tuning enables privacy-preserving personalization of large language models, but mobile devices impose severe memory constraints, typically 6--12GB shared across all workloads. Existing approaches force a trade-off between exact gradients with high memory (MeBP) and low memory with noisy estimates (MeZO). We propose Memory-efficient Structured Backpropagation (MeSP), which bridges this gap by manually deriving backward passes that exploit LoRA's low-rank structure. Our key insight is that the intermediate projection $h = xA$ can be recomputed during backward at minimal cost since rank $r \ll d_{in}$, eliminating the need to store it. MeSP achieves 49\% average memory reduction compared to MeBP on Qwen2.5 models (0.5B--3B) while computing mathematically identical gradients. Our analysis also reveals that MeZO's gradient estimates show near-zero correlation with true gradients (cosine similarity $\approx$0.001), explaining its slow convergence. MeSP reduces peak memory from 361MB to 136MB for Qwen2.5-0.5B, enabling fine-tuning scenarios previously infeasible on memory-constrained devices.

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

↑