Live data from Hacker News

DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

arxiv.org

11–20 of 37 posts

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#11
How does this technique differ from the supernet optimization for one-shot NAS? https://proceedings.mlr.press/v80/bender18a.html

It seems like they use a fixed-distribution controller for training. It’d be nice to see why it’s worth deviating from the original RL paradigm.

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#12

I'm unsure of the value of dynamically reducing the rank of the LoRA matrix at inference time given that probably most of the parameter count comes from the original weights rather than the LoRA diff. But nonetheless, training time improvements look interesting. e: Oh I see, the training time improvement is compared to a grid search over the LoRA rank. Not for a single run. I am not convinced that you shouldn't just…

The optimal rank could differ across layers

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#13
post #12

I'm unsure of the value of dynamically reducing the rank of the LoRA matrix at inference time given that probably most of the parameter count comes from the original weights rather than the LoRA diff. But nonetheless, training time improvements look interesting. e: Oh I see, the training time improvement is compared to a grid search over the LoRA rank. Not for a single run. I am not convinced that you shouldn't just…

The optimal rank could differ across layers

I would be shocked if the "optimal rank" in terms of performance wouldn't be using the maximum rank from the DynLoRA across all layers.

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#14

Earlier quoted context omitted.

Fastest way to show what? That you should train with the maximum sized LoRA you can? Because the only upsides to having a smaller LoRA are in the training time, and if you are already able to train a DynLoRA with max rank 8, then you should just train a LoRA with that rank.

You get diminishing returns as you increase the rank, so with a fixed training budget it's not clear whether you get the best return from increasing rank vs increasing something else. If you start off by training DynLORA with max rank 8 you can see returns diminish fast beyond rank 5. Then you can use rank 5 for the rest of your training. You wouldn't know that with LoRA. I think this is the idea behind the paper. If…

I can see that. But are we sure that a rank-based difference that doesn't manifest early in the training process won't manifest as you get further along? See also 'grokking' [0]

[0]: https://arxiv.org/abs/2201.02177

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#15
post #11

How does this technique differ from the supernet optimization for one-shot NAS? https://proceedings.mlr.press/v80/bender18a.html It seems like they use a fixed-distribution controller for training. It’d be nice to see why it’s worth deviating from the original RL paradigm.

It's very different, but hard to distill in a comment. They use a new regularization technique to basically create a LoRA with dynamically adjustable rank.

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#16

Earlier quoted context omitted.

You get diminishing returns as you increase the rank, so with a fixed training budget it's not clear whether you get the best return from increasing rank vs increasing something else. If you start off by training DynLORA with max rank 8 you can see returns diminish fast beyond rank 5. Then you can use rank 5 for the rest of your training. You wouldn't know that with LoRA. I think this is the idea behind the paper. If…

I can see that. But are we sure that a rank-based difference that doesn't manifest early in the training process won't manifest as you get further along? See also 'grokking' [0] [0]: https://arxiv.org/abs/2201.02177

Not sure there's any way to know beforehand whether that would happen but the advantage of DyLoRA is that at least you will know afterwards whether you really needed the full rank whereas with LoRA you wouldn't? In some cases that might not be valuable information but I guess you'd rather know than not.

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#17
post #6

Kudos for the authors for providing the code https://github.com/huawei-noah/KD-NLP/tree/main/DyLoRA and the roberta example. Considering the current state of the OSS LLM community, I'm guessing someone is already porting it to Llama and gpt-style models.

Adding this to the huggingface peft library would be amazing. That's the main library that people using LoRA are currently using. https://github.com/huggingface/peft/issues/289

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#18
post #12

Earlier quoted context omitted.

The optimal rank could differ across layers

I would be shocked if the "optimal rank" in terms of performance wouldn't be using the maximum rank from the DynLoRA across all layers.

Err, I suppose trivially, the higher rank terms include the lower-rank subnets, so they dominate in terms of quality.

But if you have some capacity constraint (e.g., memory, I guess?) then you can imagine dynamic rank allocation helping in the case where the maximum rank across all layers isn't within budget.

It's a bit of a stretch though, I agree

Re: DyLoRA: Parameter Efficient Tuning of Pre-Trained Models

#20
post #18

Earlier quoted context omitted.

I would be shocked if the "optimal rank" in terms of performance wouldn't be using the maximum rank from the DynLoRA across all layers.

Err, I suppose trivially, the higher rank terms include the lower-rank subnets, so they dominate in terms of quality. But if you have some capacity constraint (e.g., memory, I guess?) then you can imagine dynamic rank allocation helping in the case where the maximum rank across all layers isn't within budget. It's a bit of a stretch though, I agree

As someone else mentioned [0], the procedure would basically be to train a DyLoRA for an initial few iterations, then do a search among the layers to find the best scoring combination of ranks, and then train pruned to just use those ranks to completion.

Seems complicated but I could see it being useful potentially.

[0]: https://news.ycombinator.com/item?id=35517353

Post reply on HN