With the latest version installed, you need to add ignore_mismatched_sizes=True to your from_pretrained call for this to work.
Otherwise, you try to load a model with 2 labels inside a model with 3 labels, and you get mismatched sizes like that.