Mistura de Subespaços na Adaptação de Baixo Rank
Mixture-of-Subspaces in Low-Rank Adaptation
June 16, 2024
Autores: Taiqiang Wu, Jiahao Wang, Zhe Zhao, Ngai Wong
cs.AI
Resumo
Neste artigo, apresentamos um método de Adaptação de Baixa Dimensão (LoRA) inspirado em subespaços, que é computacionalmente eficiente, fácil de implementar e prontamente aplicável a grandes modelos de linguagem, multimodais e de difusão. Inicialmente, decompomos equivalentemente os pesos do LoRA em dois subespaços e descobrimos que simplesmente misturá-los pode melhorar o desempenho. Para estudar esse fenômeno, revisitamos o problema através de uma lente de subespaço de granularidade fina, mostrando que tal modificação é equivalente a empregar um misturador fixo para fundir os subespaços. Para maior flexibilidade, aprendemos conjuntamente o misturador com os pesos originais do LoRA, e denominamos o método de Mistura de Subespaços LoRA (MoSLoRA). O MoSLoRA supera consistentemente o LoRA em tarefas de diferentes modalidades, incluindo raciocínio de senso comum, ajuste fino de instruções visuais e geração de texto para imagem orientada por assunto, demonstrando sua eficácia e robustez. Os códigos estão disponíveis em https://github.com/wutaiqiang/MoSLoRA{github}.
English
In this paper, we introduce a subspace-inspired Low-Rank Adaptation (LoRA)
method, which is computationally efficient, easy to implement, and readily
applicable to large language, multimodal, and diffusion models. Initially, we
equivalently decompose the weights of LoRA into two subspaces, and find that
simply mixing them can enhance performance. To study such a phenomenon, we
revisit it through a fine-grained subspace lens, showing that such modification
is equivalent to employing a fixed mixer to fuse the subspaces. To be more
flexible, we jointly learn the mixer with the original LoRA weights, and term
the method Mixture-of-Subspaces LoRA (MoSLoRA). MoSLoRA consistently
outperforms LoRA on tasks in different modalities, including commonsense
reasoning, visual instruction tuning, and subject-driven text-to-image
generation, demonstrating its effectiveness and robustness. Codes are available
at https://github.com/wutaiqiang/MoSLoRA{github}.