"...rest_server/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "e577bafdaed29b13741017982fa8ceef2b5667c9"
Unverified Commit c8aff1d3 authored by Wang, Yi's avatar Wang, Yi Committed by GitHub
Browse files

when resume from peft checkpoint, the model should be trainable (#24463)

parent 914289ac
......@@ -2058,7 +2058,7 @@ class Trainer:
# If train a model using PEFT & LoRA, assume that adapter have been saved properly.
if hasattr(model, "active_adapter") and hasattr(model, "load_adapter"):
if os.path.exists(resume_from_checkpoint):
model.load_adapter(resume_from_checkpoint, model.active_adapter)
model.load_adapter(resume_from_checkpoint, model.active_adapter, is_trainable=True)
else:
logger.warning(
"The intermediate checkpoints of PEFT may not be saved correctly, "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment