用LoRA和DoRA高效微调小模型minBERT,性能不降反升。
Exploring Efficient Learning of Small BERT Networks with LoRA and DoRA
- 在minBERT上应用LoRA与DoRA,结合混合精度训练提升效率。
- 秩1分解即可保持性能,验证小模型梯度更新也具低秩特性。
- 构建多任务集成模型,实现情感分析、相似度等任务统一处理。
尽管大语言模型(LLMs)推动了人工智能发展,但其微调成本极高,限制了资源有限的研究团队参与。Hu等人和Liu等人提出的低秩适配(LoRA)与权重分解低秩适配(DoRA)显著提升了微调效率,已在GPT-3和RoBERTa等模型上实现大幅提速与内存节省。本文将研究扩展至小型模型——minBERT,通过基准测试发现:结合自动混合精度(AMP)的定制化LoRA与DoRA配置可大幅提升训练效率且不影响性能。尽管minBERT参数量远小于GPT-3,结果仍验证了小模型空间中梯度更新本质上为低秩,秩1分解仅导致极小性能损失。借助高效的minBERT实现,我们探索多种架构、自定义损失函数及超参数,最终训练出一个集成多任务minBERT模型,可同时完成情感分析、释义检测与相似度评分。
原文摘要 · Abstract (English)
While Large Language Models (LLMs) have revolutionized artificial intelligence, fine-tuning LLMs is extraordinarily computationally expensive, preventing smaller businesses and research teams with limited GPU resources from engaging with new research. Hu et al and Liu et al introduce Low-Rank Adaptation (LoRA) and Weight-Decomposed Low-Rank Adaptation (DoRA) as highly efficient and performant solutions to the computational challenges of LLM fine-tuning, demonstrating huge speedups and memory usage savings for models such as GPT-3 and RoBERTa. We seek to expand upon the original LoRA and DoRA papers by benchmarking efficiency and performance of LoRA and DoRA when applied to a much smaller scale of language model: our case study here is the compact minBERT model. Our findings reveal that optimal custom configurations of LoRA and DoRA, coupled with Automatic Mixed Precision (AMP), significantly enhance training efficiency without compromising performance. Furthermore, while the parameterization of minBERT is significantly smaller than GPT-3, our results validate the observation that gradient updates to language models are inherently low-rank even in small model space, observing that rank 1 decompositions yield negligible performance deficits. Furthermore, aided by our highly efficient minBERT implementation, we investigate numerous architectures, custom loss functions, and hyperparameters to ultimately train an optimal ensembled multitask minBERT model to simultaneously perform sentiment analysis, paraphrase detection, and similarity scoring.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。