Model weights warning while loading any model from HuggingFace models

Hi ,
I am trying to load the model from huggingface hub and it throws me some initialization warning. It is happening while trying to load any kind of model.

I am not able understand why this is happening. Can anyone please help me out here?

This warns you that some of the model weights have not been found in the checkpoint, and that there were therefore randomly initialized. This is because you are loading a model trained for masked language modeling (bert-base-cased) in a model for sequence classification, the classification head is randomly initialized.

The warnings ends by telling you that your model needs to be trained because of that random initialization.

1 Like

Hi Sylvain,

Thank you for the reply. It is very much clear now.

1 Like