alibaba-damo-academy / SpokenNLP

A wide variety of research projects developed by the SpokenNLP team of Speech Lab, Alibaba Group.
Apache License 2.0
108 stars 11 forks source link

can not properly save weights during trainging sld #6

Open danny1222 opened 4 months ago

danny1222 commented 4 months ago

I met the warning when training the sld. WARNING - accelerate.utils.other - Removed shared tensor {'lm_head.weight'} while saving. This should be OK, but check by verifying that you don't receive any warning while reloading .

Then the prediction was failed due to the weight is missing. runtimeError: Error(s) in loading state_dict for GPT2LMHeadModel:
Missing key(s) in state_dict: "lm_head.weight".

How can I resolve this issue?

LGoldenDragon commented 3 months ago

I met the warning when training the sld. WARNING - accelerate.utils.other - Removed shared tensor {'lm_head.weight'} while saving. This should be OK, but check by verifying that you don't receive any warning while reloading .

Then the prediction was failed due to the weight is missing. runtimeError: Error(s) in loading state_dict for GPT2LMHeadModel: Missing key(s) in state_dict: "lm_head.weight".

How can I resolve this issue?

Hello, I also encountered the same problem, may I ask you to solve it?