Skip to main content
QUICK REVIEW

[논문 리뷰] VeRA: Vector-based Random Matrix Adaptation

Dawid Jan Kopiczko, Tijmen Blankevoort|arXiv (Cornell University)|2023. 10. 17.
Domain Adaptation and Few-Shot Learning인용 수 8
한 줄 요약

VeRA는 Layer 간 얼지 않은 무작위 행렬을 공유하고 작은 스케일링 벡터를 학습함으로써 파라미터 수를 줄이고, NLP, 비전, 명령-조정 task 전반에서 LoRA와 성능 차이가 거의 없도록 하며 수십 배 적은 학습 가능 파라미터를 달성합니다.

ABSTRACT

Low-rank adapation (LoRA) is a popular method that reduces the number of trainable parameters when finetuning large language models, but still faces acute storage challenges when scaling to even larger models or deploying numerous per-user or per-task adapted models. In this work, we present Vector-based Random Matrix Adaptation (VeRA), which significantly reduces the number of trainable parameters compared to LoRA, yet maintains the same performance. It achieves this by using a single pair of low-rank matrices shared across all layers and learning small scaling vectors instead. We demonstrate its effectiveness on the GLUE and E2E benchmarks, image classification tasks, and show its application in instruction-tuning of 7B and 13B language models.

연구 동기 및 목표

  • LLMs, 비전, 및 명령-조정 응용에서 대형 사전학습 모델의 ultra-parameter-efficient 파인튜닝 필요성에 대한 동기 제시.
  • 학습 가능한 파라미터를 대폭 줄이면서도 경쟁력 있거나 더 나은 성능을 유지하는 VeRA를 제안.
  • NLP 벤치마크(GLUE), 생성 태스크(E2E), 이미지 분류(ViT), 명령-따름 구성에서의 적용 가능성 시연.
  • VeRA의 각 구성요소 및 초기화의 기여를 이해하기 위한 ablation 제공

제안 방법

  • 적용된 모든 레이어에서 공유되는 단일 쌍의 무작위 행렬을 고정합니다.
  • 고정된 행렬 주변에 대각 스케일링(Lambda_b 및 Lambda_d)으로 작동하는 학습 가능한 스케일링 벡터를 도입하여 레이어별 적응을 가능하게 합니다.
  • 정식으로, h = W0 x + Lambda_b B Lambda_d A x 이고 A와 B는 고정/무작위 및 공유되며, b와 d (Lambda_b 및 Lambda_d의 구성요소)는 학습 가능합니다.
  • 추론 대기시간 증가 없이 원래 가중치로 학습 가능한 파라미터를 병합 가능하도록 보장합니다.
  • 초기화 전략: A와 B에 대해 Kaiming 초기화, b에 대해 0, d에 대한 제어된 초기화; 탐색된 d_init 값으로 0.1 및 1e-7 등을 포함합니다.
Figure 1: Schematic comparison of LoRA (left) and VeRA (right). LoRA updates the weights matrix $W$ by training the low-rank matrices $A$ and $B$ , with intermediate rank $r$ . In VeRA these matrices are frozen, shared across all layers, and adapted with trainable vectors $d$ and $b$ , substantially
Figure 1: Schematic comparison of LoRA (left) and VeRA (right). LoRA updates the weights matrix $W$ by training the low-rank matrices $A$ and $B$ , with intermediate rank $r$ . In VeRA these matrices are frozen, shared across all layers, and adapted with trainable vectors $d$ and $b$ , substantially

실험 결과

연구 질문

  • RQ1VeRA가 NLP, 비전, 명령-튜닝 과제에서 LoRA 및 다른 베이스라인에 비해 어떤 성능을 보이는가?
  • RQ2다양한랭크에서 VeRA를 사용할 때 LoRA와의 파라미터 효율성 트레이드오프는 어떠한가?
  • RQ3초기화 및 스케일링 벡터 선택이 VeRA의 성능과 안정성에 어떤 영향을 미치는가?
  • RQ4공유된 고정 무작위 행렬이 레이어 및 과제 전반에 걸쳐 일반화될 수 있는가, 그리고 공유와 고유 행렬 간의 영향은 무엇인가?

주요 결과

Method# Trainable ParametersSST-2MRPCCoLAQNLIRTESTS-BAvg
LoRA (RoBERTa base)0.3M95.1 ±0.289.7 ±0.763.4 ±1.293.3 ±0.386.6 ±0.791.5 ±0.286.6
VeRA (RoBERTa base)0.043M94.6 ±0.189.5 ±0.565.6 ±0.891.8 ±0.278.7 ±0.790.7 ±0.285.2
LoRA (RoBERTa large)0.8M96.2 ±0.590.2 ±1.068.2 ±1.994.8 ±0.385.2 ±1.192.3 ±0.587.8
VeRA (RoBERTa large)0.061M96.1 ±0.190.9 ±0.768.0 ±0.894.4 ±0.285.9 ±0.791.7 ±0.887.8
  • VeRA는 GLUE에서 LoRA와 경쟁력 있는 성능을 달성하면서 학습 가능한 파라미터를 한 차례에 비해 수 배 더 적은 수(예: RoBERTa base의 0.3M vs 0.043M)로 달성합니다.
  • E2E GPT-2 Medium/Large에서 VeRA는 LoRA보다 각각 3배, 4배 적은 학습 가능한 파라미터로 더 우수한 성능을 보입니다.
  • LlaMA(Llama) 및 Llama2 모델의 명령-조정에서 VeRA는 LoRA와 비슷하거나 더 나은 결과를 약 100배 적은 학습 가능한 파라미터로 달성합니다(예: 1.6M/2.4M vs 159.9M/250.3M).
  • ViT-Base에서 VeRA는 ViT-Base에서 LoRA에 근접하고 ViT-Large에서는 다수의 데이터셋에서 LoRA를 능가하며 학습 가능한 파라미터가 10배 이상 적습니다.
  • 동일한 파라미터 수에서 VeRA를 사용하면 파라미터 수를 LoRA와 동등하게 설정했을 때 RTE에서 여러 정확도 포인트 차이로 우수한 성능을 보일 수 있습니다.
  • ABLation 연구는 스케일링 벡터 d와 b가 모두 필요하다는 것을 확인하며, 초기화 선택(Kaiming, d_init)이 결과에 실질적인 영향을 미칩니다.
Figure 2: Performance of LoRA and VeRA methods for varying ranks on RTE task.
Figure 2: Performance of LoRA and VeRA methods for varying ranks on RTE task.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.