nbasyl / dora Goto Github PK
View Code? Open in Web Editor NEWOfficial implementation of "DoRA: Weight-Decomposed Low-Rank Adaptation"
Home Page: https://arxiv.org/abs/2402.09353
License: Other
Official implementation of "DoRA: Weight-Decomposed Low-Rank Adaptation"
Home Page: https://arxiv.org/abs/2402.09353
License: Other
Hello, I have noticed that in the paper, the normalization (norm) is applied to the dimension of out_feature
, but in the implementation of PEFT, it is applied to the dimension of in_feature
. Which one is correct?
d is out_feature, k is in_feature, r is rank
weight.shape = [d, k]
lora_A.shape = [r, k]
lora_B.shape = [d, r]
https://github.com/huggingface/peft/blob/6dca6d22922fcb1ead828b5b3c146911d7b693fb/src/peft/tuners/lora/layer.py#L172-L175
weight.norm(dim=0) -> [1, k]
weight.norm(dim=1) -> [d, 1] [PEFT Implement]
code: result_dora = (mag_norm_scale - 1) * (F.linear(x, transpose(weight, self.fan_in_fan_out)) ) + mag_norm_scale * lora_B(lora_A(x)) * scaling
Question: what is the effect of (mag_norm_scale - 1) and mag_norm_scale ? And, result_dora can't equals the F.linear(x, transpose(weight, self.fan_in_fan_out)) in the Initializing stage due to the parameter "mag_norm_scale - 1"
Hi, thank you very much for your great paper.
I would like to reproduce the results in your paper and would like to ask do you have some recommendations about the codebase of PEFT. The main reason is that I find the results are pretty different for the same method in different paper.
Thank you very much in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.