From 53f28004c6d95d9547cb046dbce3c3e3253d11b9 Mon Sep 17 00:00:00 2001 From: calpt Date: Mon, 23 Dec 2024 13:11:11 +0100 Subject: [PATCH] another fix --- src/adapters/loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapters/loading.py b/src/adapters/loading.py index 529d823d1..44fd556c8 100644 --- a/src/adapters/loading.py +++ b/src/adapters/loading.py @@ -371,7 +371,7 @@ def _rename_legacy_weights(self, k): def _fix_backward_compat(self, config): # Fix error in previous versions for LoRA/ (IA)^3 - if config["version"].startswith("adapters.") and Version(config["version"][9:]) < Version("1.1.0"): + if config.get("version", "").startswith("adapters.") and Version(config["version"][9:]) < Version("1.1.0"): if ( config["config"].get("architecture", None) == "lora" and config["config"]["r"] != config["config"]["alpha"]