Raise an error instead of a warning when model files are not loaded correctly
# 🚀 Feature request

Currently, when I initialize a model and if my pre-trained model files aren't fully matched with my model architecture, code silently logs the event and warns the user. I think it is better to have a flag to stop the training if model weights are not loaded as expected.

## Motivation

With the current implementation, user can train a model from scratch without knowing it if he/she doesn't look at the logs carefully (Even if he/she should look at it).


## Your contribution

I am open to work for this issue. If you have any idea about how to implement it, let me know. I can start working on this issue in the coming weeks (not for now).
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.<|||||>Today, I have encountered a bug in our codebase due to this issue. The model loading wasn't ok for some reason and the code just logged the warnings. I would like to get an error instead of a warning. I can't monitor thousands of models that are running in production for this particular warning message. Could you help me to work on this issue?