The Impact of Initialization on LoRA Finetuning Dynamics

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Hayou, Soufiane, Ghosh, Nikhil, Yu, Bin
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866910483523567616
author Hayou, Soufiane
Ghosh, Nikhil
Yu, Bin
author_facet Hayou, Soufiane
Ghosh, Nikhil
Yu, Bin
contents In this paper, we study the role of initialization in Low Rank Adaptation (LoRA) as originally introduced in Hu et al. (2021). Essentially, to start from the pretrained model as initialization for finetuning, one can either initialize B to zero and A to random (default initialization in PEFT package), or vice-versa. In both cases, the product BA is equal to zero at initialization, which makes finetuning starts from the pretrained model. These two initialization schemes are seemingly similar. They should in-principle yield the same performance and share the same optimal learning rate. We demonstrate that this is an incorrect intuition and that the first scheme (initializing B to zero and A to random) on average yields better performance compared to the other scheme. Our theoretical analysis shows that the reason behind this might be that the first initialization allows the use of larger learning rates (without causing output instability) compared to the second initialization, resulting in more efficient learning of the first scheme. We validate our results with extensive experiments on LLMs.
format Preprint
id arxiv_https___arxiv_org_abs_2406_08447
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle The Impact of Initialization on LoRA Finetuning Dynamics
Hayou, Soufiane
Ghosh, Nikhil
Yu, Bin
Machine Learning
Artificial Intelligence
Computation and Language
In this paper, we study the role of initialization in Low Rank Adaptation (LoRA) as originally introduced in Hu et al. (2021). Essentially, to start from the pretrained model as initialization for finetuning, one can either initialize B to zero and A to random (default initialization in PEFT package), or vice-versa. In both cases, the product BA is equal to zero at initialization, which makes finetuning starts from the pretrained model. These two initialization schemes are seemingly similar. They should in-principle yield the same performance and share the same optimal learning rate. We demonstrate that this is an incorrect intuition and that the first scheme (initializing B to zero and A to random) on average yields better performance compared to the other scheme. Our theoretical analysis shows that the reason behind this might be that the first initialization allows the use of larger learning rates (without causing output instability) compared to the second initialization, resulting in more efficient learning of the first scheme. We validate our results with extensive experiments on LLMs.
title The Impact of Initialization on LoRA Finetuning Dynamics
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2406.08447