Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX Make special LoRA inits DeepSpeed compatible (#1887)
Resolves huggingface/accelerate#2886 Possibly resolves #896 (comment) Some LoRA init methods need to access the base layer weight. Getting this access can fail or stall in distributed settings. For DeepSpeed, the weight is now gathered before trying to access it. Note: Without DeepSpeed, this is a no-op and should thus not have any disadvantage. We don't have DS in our CI, so this is not tested. I also made some small changes to OLoRA init to use self.get_base_layer() instead of self.base_layer.
- Loading branch information