for pytorch weight file

#69
by jotea - opened

I tried to merge the PyTorch weights and config.json files into a complete model. However, it seems that some keys are missing in the weight file. Is it because the current transformer architecture has been updated?
RuntimeError: Error(s) in loading state_dict for GPT2Model:
Missing key(s) in state_dict: "h.0.attn.masked_bias", "h.1.attn.masked_bias", "h.2.attn.masked_bias", "h.3.attn.masked_bias", "h.4.attn.masked_bias", "h.5.attn.masked_bias", "h.6.attn.masked_bias", "h.7.attn.masked_bias", "h.8.attn.masked_bias", "h.9.attn.masked_bias", "h.10.attn.masked_bias", "h.11.attn.masked_bias".

The issue has been resolved. Indeed, it was due to the transformer version. To use the PyTorch weight file, the transformer version must be 2.80 or earlier.

jotea changed discussion status to closed

Sign up or log in to comment