Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a method to get only the adaptors that are worth computing #14

Open
wants to merge 2 commits into
base: v1
Choose a base branch
from

Conversation

lpietrobon
Copy link

When we compute with lora adapters, there are some situations where we can just prefer to skip the computation. One of these is if r==0 (which was already addressed) and one is when then scaling parameter (or equivalently the lora_alpha param) is zero. This was only addressed partially.

Here we centralize the logic to identify only the adapter (names) that are worthwile for compute into the LoraLayer class, so all classes that extend it can have a consiste way of identifying which layers to run computation for

@lpietrobon lpietrobon closed this Sep 15, 2023
@lpietrobon lpietrobon deleted the v1_lora_compute_when_scaling_gtr_0 branch September 15, 2023 18:06
@lpietrobon lpietrobon restored the v1_lora_compute_when_scaling_gtr_0 branch September 15, 2023 20:53
@lpietrobon lpietrobon reopened this Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 😿Todo
Development

Successfully merging this pull request may close these issues.

1 participant