How to fine tune a PEFT model in stages with LoRA/QLoRA #2774
Replies: 1 comment 2 replies
-
I would generally use two independent LoRA adapters if I plan on using them independently. Just as an example, if I have a LoRA adapter that is trained on certain content and another LoRA adapter that is trained on a certain style, there could be use cases where I just want one or the other. Moreover, if I have separate adapters, I can choose different configurations for them. For example, one adapter may require a higher rank than the other adapter to train properly. If the second LoRA adapter only makes sense on top of the first one and if the same config works for both, I would just continue training on the first one. You can still keep the first one as a separate checkpoint just in case. Having a single adapter is easier to handle and slightly more efficient, so unless you really need two separate ones, stick with one. Another approach would be to train the first one, merge it into the base model (with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm thinking of replicating Zephyr 7B from the Hugging face alignment handbook at here https://github.com/huggingface/alignment-handbook/tree/main/recipes/zephyr-7b-gemma (the technical report: https://huggingface.co/papers/2310.16944)
The guide says the training has two stages:
I'm wondering if I am to do this with LoRA or QLoRA instead of full fine tuning as they've done, does it mean I am training on the same adapter in the second stage as the first? Or does it mean I should add multiple LoRA adapters on each stage? I don't quite understand which makes more sense conceptually since I've only done PEFT with single step fine tuning and I can't find any reference material for this case. Would appreciate any explanation!
Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions