From 3e6a88a8f9f063f93010ef94d8646d93e93bc056 Mon Sep 17 00:00:00 2001 From: Qingru Zhang Date: Wed, 5 Apr 2023 16:23:48 -0400 Subject: [PATCH] Update src/peft/tuners/adalora.py Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com> --- src/peft/tuners/adalora.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/peft/tuners/adalora.py b/src/peft/tuners/adalora.py index 5e032a6..76a6b0c 100644 --- a/src/peft/tuners/adalora.py +++ b/src/peft/tuners/adalora.py @@ -139,20 +139,6 @@ class AdaLoraModel(LoraModel): new_module = SVDLinear8bitLt(target.in_features, target.out_features, bias=bias, **kwargs) elif isinstance(target, torch.nn.Linear) and self.peft_config.enable_lora is None: new_module = SVDLinear(target.in_features, target.out_features, bias=bias, **kwargs) - # TODO: Implement the MergedLinear of SVD Adapattion - # elif self.peft_config.enable_lora is not None: - # kwargs.update({"enable_lora": self.peft_config.enable_lora}) - # if isinstance(target, Conv1D): - # in_features, out_features = target.weight.shape - # else: - # in_features, out_features = target.in_features, target.out_features - # if kwargs["fan_in_fan_out"]: - # warnings.warn( - # "fan_in_fan_out is set to True but the target module is not a Conv1D. " - # "Setting fan_in_fan_out to False." - # ) - # kwargs["fan_in_fan_out"] = False - # new_module = MergedLinear(in_features, out_features, bias=bias, **kwargs) self._replace_module(parent, target_name, new_module, target) if not is_target_modules_in_base_model: raise ValueError(