首页|期刊导航|计算机科学与探索|基于动态Power迭代的大语言模型微调算法

基于动态Power迭代的大语言模型微调算法OA

Algorithm for Fine-Tuning Large Language Models Based on Dynamic Power Iteration

中文摘要英文摘要

随着大语言模型在各领域的广泛应用,微调成为其适配特定任务的重要方法.当前主流的大模型微调方法主要分为部分微调和全量微调两种.部分微调虽能降低计算开销,但该方法仅更新大模型的少量参数,导致在复杂任务场景下,微调出的模型性能受限;虽然全量微调可以解决这一问题,但全量微调需要全面更新模型参数,从而导致微调时会存在计算资源需求高、微调时间长等问题.为解决全量微调存在的问题,提出一种基于动态Power迭代的梯度低秩投影算法(DPI-GLRP).该方法基于秩一矩阵近似的思想,将大模型的权重矩阵在反向传播阶段产生的梯度矩阵分解为多个秩一矩阵,并通过Power迭代算法求解前r个特征向量以构成投影矩阵.该方法不仅解决了传统Power迭代只能获取单一最大特征向量的问题,还解决了以往研究中使用奇异值分解构建投影矩阵时间复杂度高、微调时间长的问题.对传统Power迭代算法进行研究发现,在特征值分布接近时,会出现收敛速度慢的问题.针对这一问题,提出一种动态Power迭代算法,该算法通过自适应调整迭代参数加快特征向量的计算效率,并从理论上证明提出的动态Power迭代算法的收敛效率比传统Power迭代要高.在LLaMA、Qwen等大模型上的实验表明,相较于LoRA等主流算法,DPI-GLRP算法能在保持或提升模型能力的同时,显著缩短微调时间,平均微调时间最多减少了80%.

With the widespread application of large language models(LLMs)across various domains,fine-tuning has become a critical method for adapting these models to specific tasks.Current mainstream fine-tuning approaches can be categorized into two types:partial fine-tuning and full fine-tuning.Although partial fine-tuning reduces computational overhead,it updates only a small subset of model parameters,which limits the performance of the fine-tuned model in complex task scenarios.In contrast,full fine-tuning overcomes this limitation by updating all model parameters,but it comes at the cost of significantly higher computational requirements and longer fine-tuning time.To address the challenges associated with full fine-tuning,this paper proposes a dynamic power iteration gradient low-rank projection algorithm(DPI-GLRP).Specifically,this method is based on the idea of rank-one matrix approximation,where the gradient matrix generated from the weight matrix of a large model during backpropagation is decomposed into multiple rank-one matrices.The top r eigenvectors are then computed using the Power iteration algorithm to construct the projection matrix.This approach not only overcomes the limitation of traditional Power iteration,which can extract only the dominant eigenvector,but also addresses the high time complexity and long fine-tuning duration associated with constructing projection matrices using singular value decomposition in previous studies.Furthermore,this paper analyzes the traditional Power iteration method and observes that it converges slowly when eigenvalues are closely distributed.To tackle this issue,this paper introduces a dynamic Power iteration algorithm that adaptively adjusts its iteration parameters to accelerate the computation of eigenvectors.This paper also provides theoretical proof that the proposed dynamic Power iteration achieves faster convergence compared with the traditional variant.Finally,experiments conducted on large models such as LLaMA and Qwen demonstrate that,compared with mainstream approaches like LoRA,the DPI-GLRP algorithm not only maintains or improves model performance,but also significantly reduces fine-tuning time,achieving up to an 80%reduction on average.

匡豪;刘波;李辉越;曾闰;段围

重庆工商大学 人工智能学院,重庆 400067||智能感知与区块链技术重庆市重点实验室,重庆 400067重庆工商大学 人工智能学院,重庆 400067||智能感知与区块链技术重庆市重点实验室,重庆 400067重庆工商大学 人工智能学院,重庆 400067||智能感知与区块链技术重庆市重点实验室,重庆 400067重庆工商大学 人工智能学院,重庆 400067||智能感知与区块链技术重庆市重点实验室,重庆 400067重庆工商大学 人工智能学院,重庆 400067||智能感知与区块链技术重庆市重点实验室,重庆 400067

信息技术与安全科学

大语言模型微调梯度低秩投影Power迭代

large language modelsfine-tuninggradient low-rank projectionPower iteration

《计算机科学与探索》 2026 (3)

785-800,16

重庆市自然科学基金创新发展联合基金项目(CSTB2025NSCQ-LZX0134)重庆市自然科学基金重点项目(CSTB2023NSCQ-LZX0029)重庆市教育委员会科学技术研究项目重点项目(KJZD-K202400809)教育部科学研究发展中心资助项目(2023ZY024)重庆工商大学开放基金项目(1752004).This work was supported by the Chongqing Natural Science Foundation Joint Fund for Innovation and Development(CSTB2025NSCQ-LZX0134),the Key Project of the Natural Science Foundation of Chongqing(CSTB2023NSCQ-LZX0029),the Key Project of the Science and Technology Research Program of the Chongqing Municipal Education Commission(KJZD-K202400809),the Project of Science and Research Development Center of the Ministry of Education of China(2023ZY024),and the Open Fund of Chongqing Technology and Business University(1752004).

10.3778/j.issn.1673-9418.2505062

评论