fix: add a log instead of silent exception
This commit is contained in:
parent
cd0ca56eef
commit
4d2fe69e4b
1 changed files with 5 additions and 2 deletions
|
|
@ -3022,8 +3022,11 @@ class FastLlamaModel:
|
|||
if hasattr(target_module, "weight"):
|
||||
try:
|
||||
delattr(target_module, "weight")
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.warning_once(
|
||||
f"Unsloth: Could not delete existing weight attr during retie on "
|
||||
f"{type(target_module).__name__}: {exc}"
|
||||
)
|
||||
target_module.register_parameter("weight", weight)
|
||||
|
||||
# Tie trainable copies created by ModulesToSaveWrapper first (these are used in forward)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue