arXiv:2412.10362cs.LGcs.CV2024-12

用额外MLP临时提升低秩适配器优化效果,训练后丢弃不增加推理开销。

OP-LoRA: The Blessing of Dimensionality

  • 用MLP预测适配器权重,训练时临时增参改善优化
  • 图像生成任务中性能提升最高达15点CMMD分数
  • 兼容多种适配器结构,推理零成本,适合高效微调

低秩适配器(LoRA)能以少量参数微调大模型,但常面临损失曲面病态导致优化困难。现有方法通过定制优化器对齐适配器更新与全量微调梯度,但灵活性差且计算开销高。本文提出OP-LoRA,将每个LoRA适配器替换为由额外MLP预测的权重,训练完成后丢弃该MLP。这在训练期间临时引入更多参数以改善优化,但推理时无额外开销,且比定制优化器更省时间。关键优势在于可灵活扩展至不同适配器类型,只需调整预测头大小。实验表明,OP-LoRA能自适应调节学习率步长,提升性能并降低对学习率敏感度。在小规模与大规模微调任务中均优于标准LoRA及其变体。图像生成任务中,CMMD得分最高提升15点,实现仅用一半参数达到原LoRA性能。

原文摘要 · Abstract (English)

Low-rank adapters (LoRA) enable finetuning of large models with only a small number of parameters. However, they often suffer from an ill-conditioned loss landscape, leading to difficult optimization. Prior work addresses these challenges by aligning adapter updates with full finetuning gradients via custom optimizers, but these methods lack the flexibility to accommodate new adapter architectures and are computationally expensive. We instead introduce OP-LoRA, a novel method which replaces each LoRA adapter with weights predicted by an extra MLP, which is discarded after training. This temporarily allows additional parameters during training to improve optimization, yet requires less wall time than custom optimizers and zero extra cost at inference time because the MLP is discarded. Crucially, extending OP-LoRA to other adapters is as simple as modifying the size of the prediction head for each new adapter type. We show that OP-LoRA allows the optimization to adaptively increase or decrease step size, improving performance and decreasing sensitivity to learning rate. On both small and large-scale LoRA tuning tasks, we observe consistent performance gains of OP-LoRA relative to LoRA and its variants. We achieve especially notable improvements in image generation, with OP-LoRA CMMD scores improving by up to 15 points relative to LoRA. This allows OP-LoRA to achieve the performance of LoRA with half of the inference parameters.

低秩微调优化改进图像生成高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。