Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
calpt committed Dec 23, 2024
1 parent 51f040f commit f8972be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/adapters/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ 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["config"].get("architecture", None) == "lora" and config["config"]["r"] != config["config"]["alpha"]:
if (
config["config"].get("architecture", None) == "lora"
and config["config"]["r"] != config["config"]["alpha"]
):
logger.warning(
"Loading a LoRA trained using a faulty library version. Editing the configuration to make sure the adapter works as trained."
"See https://github.com/adapter-hub/adapters/pull/770 for more."
Expand Down

0 comments on commit f8972be

Please sign in to comment.