The post discusses the concept of low-rank adaptation (LoRA) and introduces a new alternative called Weight-Decomposed Low-Rank Adaptation (DoRA). It explains how LoRA works by modifying a pretrained model's parameters to better suit a specific dataset. The post also provides a code implementation of LoRA and DoRA in PyTorch. It mentions the motivation behind DoRA, which aims to decouple the magnitude and directional components of weight updates, and highlights its advantages over LoRA in terms of parameter efficiency and performance. Finally, it describes how to implement DoRA layers in PyTorch and concludes with the author's opinion on the effectiveness and promise of DoRA.

15m read timeFrom sebastianraschka.com
Post cover image
Table of contents
LoRA Recap #A LoRA Layer Code Implementation #Applying LoRA Layers #Understanding Weight-Decomposed Low-Rank Adaptation (DoRA) #Implementing DoRA Layers in PyTorch #Conclusion #

Sort: