From 7b20e93c2375e51f2287d94a32fb94a084113032 Mon Sep 17 00:00:00 2001 From: calpt Date: Mon, 8 Jan 2024 21:01:44 +0100 Subject: [PATCH] Remove faulty adapter skip check in InvertibleAdaptersMixin --- src/adapters/model_mixin.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/adapters/model_mixin.py b/src/adapters/model_mixin.py index a023cf6156..f27a5fa05b 100644 --- a/src/adapters/model_mixin.py +++ b/src/adapters/model_mixin.py @@ -134,10 +134,7 @@ def _get_active_setup(self): adapter_setup = self.adapters_config.active_setup else: adapter_setup = None - skip_adapters = adapter_setup is None or ( - self.adapters_config.skip_layers is not None and self.layer_idx in self.adapters_config.skip_layers - ) - if not skip_adapters and (len(adapter_setup.flatten()) > 0): + if adapter_setup is not None and (len(adapter_setup.flatten()) > 0): return adapter_setup else: return None