Implement options for selecting layers to apply LoRA to during training #163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements a feature for specifying the layers of the model that LoRA should be applied to during training. This enables further training memory use reductions, and additional QLoRA training experiments (including but not limited to the reproduction of relevant experiments from the QLoRA paper).
The layer selection is done with the lora_modules str argument. Its value can be:
(The latter 2 aim to reproduce ablation experiments from the paper, but work for e.g. Falcon models too, not just LLaMA.)
While the "lora_modules" argument was already in the guanaco training scripts, it was ignored because only the selection of all linear layers was implemented in this repo.