Saving only student model in ModelCheckpoint #8592
Unanswered
ari9dam
asked this question in
code help: NLP / ASR / TTS
Replies: 1 comment
-
Dear @ari9dam, Here is one option to save only the student weights. This will drop in-place the parameters associated to the teacher from the checkpoint.
However, you will need to make sure to reload with strict=False mode. Best, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
if my Pytorch Lightning model contains two modules:
self.teacher = AutoModelForSequenceClassification.from_pretrained(hparams["teacher_model_name_or_path"])
self.student = AutoModelForSequenceClassification.from_pretrained(hparams["student_model_name_or_path"])
and I want to save only student weights during checkpointing, how should I proceed?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions