SwitchLoRA: Switched Low-Rank Adaptation Can Learn Full-Rank Information
Zhou, Wang, Xu
In the training of large language models, parameter-efficient techniques such as LoRA optimize memory usage and reduce communication overhead and memory usage during the fine-tuning phase. However, applying such techniques directly during the pre-training phase results in poor performance, primarily because the premature implementation of low-rank training significantly reduces model accuracy. Existing methods like ReLoRA and GaLore have attempted to address this challenge by updating the low-rank subspace. However, they still fall short of achieving the accuracy of full-rank training. Specifically, ReLoRA restricts the frequency of updates to preserve optimizer states consistency, hindering its ability to closely approximate full-rank training behavior. Meanwhile, GaLore relies on Singular Value Decomposition (SVD) to approximate the full-rank space, which introduces accuracy loss during the approximation process. In this paper, we introduce SwitchLoRA, a parameter-efficient training technique that frequently and smoothly replaces the trainable parameters of LoRA adapters with alternative parameters. SwitchLoRA updates the low-rank subspace incrementally, targeting only a few dimensions at a time to minimize the impact on optimizer states. This allows a higher update frequency, thereby enhancing accuracy by enabling the updated parameters to more closely mimic full-rank behavior during the pre-training phase. Our results demonstrate that SwitchLoRA actually surpasses full-rank training, reducing perplexity from 15.23 to 15.01 on the LLaMA 1.3B model, while also cutting communication overhead by 54\% and memory usage by 13\%. Furthermore, after full fine-tuning the SwitchLoRA pre-trained model and the full-rank pre-trained model on the GLUE benchmark, the SwitchLoRA pre-trained model showed an average accuracy gain of about 1\% over the full-rank pre-trained model.
본 논문은 대규모 언어 모델 사전학습 단계에서의 매개변수 효율적 학습 문제를 해결하기 위해 SwitchLoRA 방법을 제안합니다. LoRA와 같은 전통적인 저순위 적응 기술은 미세조정 단계에서 우수한 성능을 보이지만, 사전학습에 직접 적용하면 성능이 크게 저하됩니다. 기존의 ReLoRA와 GaLore 방법은 저순위 부분공간을 업데이트하여 이 문제를 해결하려고 시도했지만, 여전히 전체 순위 학습의 정확도에 미치지 못합니다. SwitchLoRA는 LoRA 어댑터의 학습 가능한 매개변수를 빈번하고 부드럽게 교체하여 저순위 부분공간을 점진적으로 업데이트하며, 매번 소수의 차원만 대상으로 하여 옵티마이저 상태에 미치는 영향을 최소화합니다. 실험 결과는 SwitchLoRA가 LLaMA 1.3B 모델에서 혼란도를 15.23에서 15.01로 감소시켜 전체 순위 학습을 초과하면서 동시에 통신 오버헤드를 54%, 메모리 사용량을 13% 감소시켰음을 보여줍니다.
Transformer 아키텍처의 부상으로 대규모 언어 모델의 규모가 급격히 증가하면서, 조 단위 모델의 분산 학습은 노드 간 통신 오버헤드의 거대한 문제에 직면하고 있습니다. LoRA와 같은 매개변수 효율적 기술이 미세조정 단계에서 우수한 성능을 보이지만, 사전학습 단계에 직접 적용하면 성능이 크게 저하됩니다.
신경망은 학습 초기에 전체 순위 특성을 나타내며, 학습이 진행됨에 따라 내부 순위가 점진적으로 감소합니다. 따라서 사전학습 단계에서 많은 매개변수를 학습하면서 동시에 메모리 사용량과 통신 오버헤드를 줄이기 위해 일부 매개변수를 선택적으로 업데이트할 수 있는 방법이 필요합니다.
사전학습된 모델의 가중치 행렬 W∈Rm×n이 주어졌을 때, 전통적인 LoRA는 이를 W+rαBA로 변환합니다. 여기서 B∈Rm×r, A∈Rr×n, r≪min(m,n)입니다. SwitchLoRA는 이를 기반으로 B와 A의 벡터를 동적으로 전환하여 유효 순위를 증가시킵니다.
종합 평가: 이는 이론적 혁신, 실험 검증, 실용적 가치 측면에서 모두 우수한 고품질 연구 논문입니다. SwitchLoRA 방법은 사전학습 단계의 저순위 학습 문제를 영리하게 해결하여 학습 효과를 유지할 뿐만 아니라 자원을 크게 절감합니다. 일부 한계가 있지만, 그 기여도는 이 분야의 발전을 추진하기에 충분합니다.