[solved] KeyError: 'unexpected key "module.encoder.embedding.weight" in state_dict'

It can solve this but also cause other problems. In my case, as @arturs.polis already pointed out, the model returned completely wrong results.

The solution provided by @fmassa worked fine for me.