Loading pytorch_pretrained_bert models with transformers

Hi, I have a model (checkpoint) based pytorch_pretrained_bert. I am converting it to use the latest transformer code. I have defined the model:

class BertForTokenAndSequenceJointClassification(BertPreTrainedModel)

and I am loading it with:

model = BertForTokenAndSequenceJointClassification.from_pretrained(
    pretrained_model_name_or_path="bert-base-cased",
    state_dict=torch.load("./20190509-115940.pt", map_location=torch.device('cpu')),
)

I am getting warnings:
Some weights of the model checkpoint at bert-base-cased were not used when initializing BertForTokenAndSequenceJointClassification: [‘module.bert.embeddings.word_embeddings.weight’, ‘module.bert.embeddings.position_embeddings.weight’, ‘module.bert.embeddings.token_type_embeddings.weight’, ‘module.bert.embeddings.LayerNorm.weight’, ‘module.bert.embeddings.LayerNorm.bias’, ‘module.bert.encoder.layer.0.attention.self.query.weight’, ‘module.bert.encoder.layer.0.attention.self.query.bias’, ‘module.bert.encoder.layer.0.attention.self.key.weight’, ‘module.bert.encoder.layer.0.attention.self.key.bias’, ‘module.bert.encoder.layer.0.attention.self.value.weight’, ‘module.bert.encoder.layer.0.attention.self.value.bias’, ‘module.bert.encoder.layer.0.attention.output.dense.weight’, ‘module.bert.encoder.layer.0.attention.output.dense.bias’, ‘module.bert.encoder.layer.0.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.0.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.0.intermediate.dense.weight’, ‘module.bert.encoder.layer.0.intermediate.dense.bias’, ‘module.bert.encoder.layer.0.output.dense.weight’, ‘module.bert.encoder.layer.0.output.dense.bias’, ‘module.bert.encoder.layer.0.output.LayerNorm.weight’, ‘module.bert.encoder.layer.0.output.LayerNorm.bias’, ‘module.bert.encoder.layer.1.attention.self.query.weight’, ‘module.bert.encoder.layer.1.attention.self.query.bias’, ‘module.bert.encoder.layer.1.attention.self.key.weight’, ‘module.bert.encoder.layer.1.attention.self.key.bias’, ‘module.bert.encoder.layer.1.attention.self.value.weight’, ‘module.bert.encoder.layer.1.attention.self.value.bias’, ‘module.bert.encoder.layer.1.attention.output.dense.weight’, ‘module.bert.encoder.layer.1.attention.output.dense.bias’, ‘module.bert.encoder.layer.1.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.1.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.1.intermediate.dense.weight’, ‘module.bert.encoder.layer.1.intermediate.dense.bias’, ‘module.bert.encoder.layer.1.output.dense.weight’, ‘module.bert.encoder.layer.1.output.dense.bias’, ‘module.bert.encoder.layer.1.output.LayerNorm.weight’, ‘module.bert.encoder.layer.1.output.LayerNorm.bias’, ‘module.bert.encoder.layer.2.attention.self.query.weight’, ‘module.bert.encoder.layer.2.attention.self.query.bias’, ‘module.bert.encoder.layer.2.attention.self.key.weight’, ‘module.bert.encoder.layer.2.attention.self.key.bias’, ‘module.bert.encoder.layer.2.attention.self.value.weight’, ‘module.bert.encoder.layer.2.attention.self.value.bias’, ‘module.bert.encoder.layer.2.attention.output.dense.weight’, ‘module.bert.encoder.layer.2.attention.output.dense.bias’, ‘module.bert.encoder.layer.2.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.2.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.2.intermediate.dense.weight’, ‘module.bert.encoder.layer.2.intermediate.dense.bias’, ‘module.bert.encoder.layer.2.output.dense.weight’, ‘module.bert.encoder.layer.2.output.dense.bias’, ‘module.bert.encoder.layer.2.output.LayerNorm.weight’, ‘module.bert.encoder.layer.2.output.LayerNorm.bias’, ‘module.bert.encoder.layer.3.attention.self.query.weight’, ‘module.bert.encoder.layer.3.attention.self.query.bias’, ‘module.bert.encoder.layer.3.attention.self.key.weight’, ‘module.bert.encoder.layer.3.attention.self.key.bias’, ‘module.bert.encoder.layer.3.attention.self.value.weight’, ‘module.bert.encoder.layer.3.attention.self.value.bias’, ‘module.bert.encoder.layer.3.attention.output.dense.weight’, ‘module.bert.encoder.layer.3.attention.output.dense.bias’, ‘module.bert.encoder.layer.3.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.3.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.3.intermediate.dense.weight’, ‘module.bert.encoder.layer.3.intermediate.dense.bias’, ‘module.bert.encoder.layer.3.output.dense.weight’, ‘module.bert.encoder.layer.3.output.dense.bias’, ‘module.bert.encoder.layer.3.output.LayerNorm.weight’, ‘module.bert.encoder.layer.3.output.LayerNorm.bias’, ‘module.bert.encoder.layer.4.attention.self.query.weight’, ‘module.bert.encoder.layer.4.attention.self.query.bias’, ‘module.bert.encoder.layer.4.attention.self.key.weight’, ‘module.bert.encoder.layer.4.attention.self.key.bias’, ‘module.bert.encoder.layer.4.attention.self.value.weight’, ‘module.bert.encoder.layer.4.attention.self.value.bias’, ‘module.bert.encoder.layer.4.attention.output.dense.weight’, ‘module.bert.encoder.layer.4.attention.output.dense.bias’, ‘module.bert.encoder.layer.4.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.4.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.4.intermediate.dense.weight’, ‘module.bert.encoder.layer.4.intermediate.dense.bias’, ‘module.bert.encoder.layer.4.output.dense.weight’, ‘module.bert.encoder.layer.4.output.dense.bias’, ‘module.bert.encoder.layer.4.output.LayerNorm.weight’, ‘module.bert.encoder.layer.4.output.LayerNorm.bias’, ‘module.bert.encoder.layer.5.attention.self.query.weight’, ‘module.bert.encoder.layer.5.attention.self.query.bias’, ‘module.bert.encoder.layer.5.attention.self.key.weight’, ‘module.bert.encoder.layer.5.attention.self.key.bias’, ‘module.bert.encoder.layer.5.attention.self.value.weight’, ‘module.bert.encoder.layer.5.attention.self.value.bias’, ‘module.bert.encoder.layer.5.attention.output.dense.weight’, ‘module.bert.encoder.layer.5.attention.output.dense.bias’, ‘module.bert.encoder.layer.5.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.5.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.5.intermediate.dense.weight’, ‘module.bert.encoder.layer.5.intermediate.dense.bias’, ‘module.bert.encoder.layer.5.output.dense.weight’, ‘module.bert.encoder.layer.5.output.dense.bias’, ‘module.bert.encoder.layer.5.output.LayerNorm.weight’, ‘module.bert.encoder.layer.5.output.LayerNorm.bias’, ‘module.bert.encoder.layer.6.attention.self.query.weight’, ‘module.bert.encoder.layer.6.attention.self.query.bias’, ‘module.bert.encoder.layer.6.attention.self.key.weight’, ‘module.bert.encoder.layer.6.attention.self.key.bias’, ‘module.bert.encoder.layer.6.attention.self.value.weight’, ‘module.bert.encoder.layer.6.attention.self.value.bias’, ‘module.bert.encoder.layer.6.attention.output.dense.weight’, ‘module.bert.encoder.layer.6.attention.output.dense.bias’, ‘module.bert.encoder.layer.6.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.6.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.6.intermediate.dense.weight’, ‘module.bert.encoder.layer.6.intermediate.dense.bias’, ‘module.bert.encoder.layer.6.output.dense.weight’, ‘module.bert.encoder.layer.6.output.dense.bias’, ‘module.bert.encoder.layer.6.output.LayerNorm.weight’, ‘module.bert.encoder.layer.6.output.LayerNorm.bias’, ‘module.bert.encoder.layer.7.attention.self.query.weight’, ‘module.bert.encoder.layer.7.attention.self.query.bias’, ‘module.bert.encoder.layer.7.attention.self.key.weight’, ‘module.bert.encoder.layer.7.attention.self.key.bias’, ‘module.bert.encoder.layer.7.attention.self.value.weight’, ‘module.bert.encoder.layer.7.attention.self.value.bias’, ‘module.bert.encoder.layer.7.attention.output.dense.weight’, ‘module.bert.encoder.layer.7.attention.output.dense.bias’, ‘module.bert.encoder.layer.7.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.7.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.7.intermediate.dense.weight’, ‘module.bert.encoder.layer.7.intermediate.dense.bias’, ‘module.bert.encoder.layer.7.output.dense.weight’, ‘module.bert.encoder.layer.7.output.dense.bias’, ‘module.bert.encoder.layer.7.output.LayerNorm.weight’, ‘module.bert.encoder.layer.7.output.LayerNorm.bias’, ‘module.bert.encoder.layer.8.attention.self.query.weight’, ‘module.bert.encoder.layer.8.attention.self.query.bias’, ‘module.bert.encoder.layer.8.attention.self.key.weight’, ‘module.bert.encoder.layer.8.attention.self.key.bias’, ‘module.bert.encoder.layer.8.attention.self.value.weight’, ‘module.bert.encoder.layer.8.attention.self.value.bias’, ‘module.bert.encoder.layer.8.attention.output.dense.weight’, ‘module.bert.encoder.layer.8.attention.output.dense.bias’, ‘module.bert.encoder.layer.8.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.8.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.8.intermediate.dense.weight’, ‘module.bert.encoder.layer.8.intermediate.dense.bias’, ‘module.bert.encoder.layer.8.output.dense.weight’, ‘module.bert.encoder.layer.8.output.dense.bias’, ‘module.bert.encoder.layer.8.output.LayerNorm.weight’, ‘module.bert.encoder.layer.8.output.LayerNorm.bias’, ‘module.bert.encoder.layer.9.attention.self.query.weight’, ‘module.bert.encoder.layer.9.attention.self.query.bias’, ‘module.bert.encoder.layer.9.attention.self.key.weight’, ‘module.bert.encoder.layer.9.attention.self.key.bias’, ‘module.bert.encoder.layer.9.attention.self.value.weight’, ‘module.bert.encoder.layer.9.attention.self.value.bias’, ‘module.bert.encoder.layer.9.attention.output.dense.weight’, ‘module.bert.encoder.layer.9.attention.output.dense.bias’, ‘module.bert.encoder.layer.9.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.9.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.9.intermediate.dense.weight’, ‘module.bert.encoder.layer.9.intermediate.dense.bias’, ‘module.bert.encoder.layer.9.output.dense.weight’, ‘module.bert.encoder.layer.9.output.dense.bias’, ‘module.bert.encoder.layer.9.output.LayerNorm.weight’, ‘module.bert.encoder.layer.9.output.LayerNorm.bias’, ‘module.bert.encoder.layer.10.attention.self.query.weight’, ‘module.bert.encoder.layer.10.attention.self.query.bias’, ‘module.bert.encoder.layer.10.attention.self.key.weight’, ‘module.bert.encoder.layer.10.attention.self.key.bias’, ‘module.bert.encoder.layer.10.attention.self.value.weight’, ‘module.bert.encoder.layer.10.attention.self.value.bias’, ‘module.bert.encoder.layer.10.attention.output.dense.weight’, ‘module.bert.encoder.layer.10.attention.output.dense.bias’, ‘module.bert.encoder.layer.10.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.10.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.10.intermediate.dense.weight’, ‘module.bert.encoder.layer.10.intermediate.dense.bias’, ‘module.bert.encoder.layer.10.output.dense.weight’, ‘module.bert.encoder.layer.10.output.dense.bias’, ‘module.bert.encoder.layer.10.output.LayerNorm.weight’, ‘module.bert.encoder.layer.10.output.LayerNorm.bias’, ‘module.bert.encoder.layer.11.attention.self.query.weight’, ‘module.bert.encoder.layer.11.attention.self.query.bias’, ‘module.bert.encoder.layer.11.attention.self.key.weight’, ‘module.bert.encoder.layer.11.attention.self.key.bias’, ‘module.bert.encoder.layer.11.attention.self.value.weight’, ‘module.bert.encoder.layer.11.attention.self.value.bias’, ‘module.bert.encoder.layer.11.attention.output.dense.weight’, ‘module.bert.encoder.layer.11.attention.output.dense.bias’, ‘module.bert.encoder.layer.11.attention.output.LayerNorm.weight’, ‘module.bert.encoder.layer.11.attention.output.LayerNorm.bias’, ‘module.bert.encoder.layer.11.intermediate.dense.weight’, ‘module.bert.encoder.layer.11.intermediate.dense.bias’, ‘module.bert.encoder.layer.11.output.dense.weight’, ‘module.bert.encoder.layer.11.output.dense.bias’, ‘module.bert.encoder.layer.11.output.LayerNorm.weight’, ‘module.bert.encoder.layer.11.output.LayerNorm.bias’, ‘module.bert.pooler.dense.weight’, ‘module.bert.pooler.dense.bias’, ‘module.classifier.0.weight’, ‘module.classifier.0.bias’, ‘module.classifier.1.weight’, ‘module.classifier.1.bias’, ‘module.masking_gate.weight’, ‘module.masking_gate.bias’, ‘module.merge_classifier_1.weight’, ‘module.merge_classifier_1.bias’]

Some weights of BertForTokenAndSequenceJointClassification were not initialized from the model checkpoint at bert-base-cased and are newly initialized: ['embeddings.word_embeddings.weight', 'embeddings.position_embeddings.weight', 'embeddings.token_type_embeddings.weight', 'embeddings.LayerNorm.weight', 'embeddings.LayerNorm.bias', 'encoder.layer.0.attention.self.query.weight', 'encoder.layer.0.attention.self.query.bias', 'encoder.layer.0.attention.self.key.weight', 'encoder.layer.0.attention.self.key.bias', 'encoder.layer.0.attention.self.value.weight', 'encoder.layer.0.attention.self.value.bias', 'encoder.layer.0.attention.output.dense.weight', 'encoder.layer.0.attention.output.dense.bias', 'encoder.layer.0.attention.output.LayerNorm.weight', 'encoder.layer.0.attention.output.LayerNorm.bias', 'encoder.layer.0.intermediate.dense.weight', 'encoder.layer.0.intermediate.dense.bias', 'encoder.layer.0.output.dense.weight', 'encoder.layer.0.output.dense.bias', 'encoder.layer.0.output.LayerNorm.weight', 'encoder.layer.0.output.LayerNorm.bias', 'encoder.layer.1.attention.self.query.weight', 'encoder.layer.1.attention.self.query.bias', 'encoder.layer.1.attention.self.key.weight', 'encoder.layer.1.attention.self.key.bias', 'encoder.layer.1.attention.self.value.weight', 'encoder.layer.1.attention.self.value.bias', 'encoder.layer.1.attention.output.dense.weight', 'encoder.layer.1.attention.output.dense.bias', 'encoder.layer.1.attention.output.LayerNorm.weight', 'encoder.layer.1.attention.output.LayerNorm.bias', 'encoder.layer.1.intermediate.dense.weight', 'encoder.layer.1.intermediate.dense.bias', 'encoder.layer.1.output.dense.weight', 'encoder.layer.1.output.dense.bias', 'encoder.layer.1.output.LayerNorm.weight', 'encoder.layer.1.output.LayerNorm.bias', 'encoder.layer.2.attention.self.query.weight', 'encoder.layer.2.attention.self.query.bias', 'encoder.layer.2.attention.self.key.weight', 'encoder.layer.2.attention.self.key.bias', 'encoder.layer.2.attention.self.value.weight', 'encoder.layer.2.attention.self.value.bias', 'encoder.layer.2.attention.output.dense.weight', 'encoder.layer.2.attention.output.dense.bias', 'encoder.layer.2.attention.output.LayerNorm.weight', 'encoder.layer.2.attention.output.LayerNorm.bias', 'encoder.layer.2.intermediate.dense.weight', 'encoder.layer.2.intermediate.dense.bias', 'encoder.layer.2.output.dense.weight', 'encoder.layer.2.output.dense.bias', 'encoder.layer.2.output.LayerNorm.weight', 'encoder.layer.2.output.LayerNorm.bias', 'encoder.layer.3.attention.self.query.weight', 'encoder.layer.3.attention.self.query.bias', 'encoder.layer.3.attention.self.key.weight', 'encoder.layer.3.attention.self.key.bias', 'encoder.layer.3.attention.self.value.weight', 'encoder.layer.3.attention.self.value.bias', 'encoder.layer.3.attention.output.dense.weight', 'encoder.layer.3.attention.output.dense.bias', 'encoder.layer.3.attention.output.LayerNorm.weight', 'encoder.layer.3.attention.output.LayerNorm.bias', 'encoder.layer.3.intermediate.dense.weight', 'encoder.layer.3.intermediate.dense.bias', 'encoder.layer.3.output.dense.weight', 'encoder.layer.3.output.dense.bias', 'encoder.layer.3.output.LayerNorm.weight', 'encoder.layer.3.output.LayerNorm.bias', 'encoder.layer.4.attention.self.query.weight', 'encoder.layer.4.attention.self.query.bias', 'encoder.layer.4.attention.self.key.weight', 'encoder.layer.4.attention.self.key.bias', 'encoder.layer.4.attention.self.value.weight', 'encoder.layer.4.attention.self.value.bias', 'encoder.layer.4.attention.output.dense.weight', 'encoder.layer.4.attention.output.dense.bias', 'encoder.layer.4.attention.output.LayerNorm.weight', 'encoder.layer.4.attention.output.LayerNorm.bias', 'encoder.layer.4.intermediate.dense.weight', 'encoder.layer.4.intermediate.dense.bias', 'encoder.layer.4.output.dense.weight', 'encoder.layer.4.output.dense.bias', 'encoder.layer.4.output.LayerNorm.weight', 'encoder.layer.4.output.LayerNorm.bias', 'encoder.layer.5.attention.self.query.weight', 'encoder.layer.5.attention.self.query.bias', 'encoder.layer.5.attention.self.key.weight', 'encoder.layer.5.attention.self.key.bias', 'encoder.layer.5.attention.self.value.weight', 'encoder.layer.5.attention.self.value.bias', 'encoder.layer.5.attention.output.dense.weight', 'encoder.layer.5.attention.output.dense.bias', 'encoder.layer.5.attention.output.LayerNorm.weight', 'encoder.layer.5.attention.output.LayerNorm.bias', 'encoder.layer.5.intermediate.dense.weight', 'encoder.layer.5.intermediate.dense.bias', 'encoder.layer.5.output.dense.weight', 'encoder.layer.5.output.dense.bias', 'encoder.layer.5.output.LayerNorm.weight', 'encoder.layer.5.output.LayerNorm.bias', 'encoder.layer.6.attention.self.query.weight', 'encoder.layer.6.attention.self.query.bias', 'encoder.layer.6.attention.self.key.weight', 'encoder.layer.6.attention.self.key.bias', 'encoder.layer.6.attention.self.value.weight', 'encoder.layer.6.attention.self.value.bias', 'encoder.layer.6.attention.output.dense.weight', 'encoder.layer.6.attention.output.dense.bias', 'encoder.layer.6.attention.output.LayerNorm.weight', 'encoder.layer.6.attention.output.LayerNorm.bias', 'encoder.layer.6.intermediate.dense.weight', 'encoder.layer.6.intermediate.dense.bias', 'encoder.layer.6.output.dense.weight', 'encoder.layer.6.output.dense.bias', 'encoder.layer.6.output.LayerNorm.weight', 'encoder.layer.6.output.LayerNorm.bias', 'encoder.layer.7.attention.self.query.weight', 'encoder.layer.7.attention.self.query.bias', 'encoder.layer.7.attention.self.key.weight', 'encoder.layer.7.attention.self.key.bias', 'encoder.layer.7.attention.self.value.weight', 'encoder.layer.7.attention.self.value.bias', 'encoder.layer.7.attention.output.dense.weight', 'encoder.layer.7.attention.output.dense.bias', 'encoder.layer.7.attention.output.LayerNorm.weight', 'encoder.layer.7.attention.output.LayerNorm.bias', 'encoder.layer.7.intermediate.dense.weight', 'encoder.layer.7.intermediate.dense.bias', 'encoder.layer.7.output.dense.weight', 'encoder.layer.7.output.dense.bias', 'encoder.layer.7.output.LayerNorm.weight', 'encoder.layer.7.output.LayerNorm.bias', 'encoder.layer.8.attention.self.query.weight', 'encoder.layer.8.attention.self.query.bias', 'encoder.layer.8.attention.self.key.weight', 'encoder.layer.8.attention.self.key.bias', 'encoder.layer.8.attention.self.value.weight', 'encoder.layer.8.attention.self.value.bias', 'encoder.layer.8.attention.output.dense.weight', 'encoder.layer.8.attention.output.dense.bias', 'encoder.layer.8.attention.output.LayerNorm.weight', 'encoder.layer.8.attention.output.LayerNorm.bias', 'encoder.layer.8.intermediate.dense.weight', 'encoder.layer.8.intermediate.dense.bias', 'encoder.layer.8.output.dense.weight', 'encoder.layer.8.output.dense.bias', 'encoder.layer.8.output.LayerNorm.weight', 'encoder.layer.8.output.LayerNorm.bias', 'encoder.layer.9.attention.self.query.weight', 'encoder.layer.9.attention.self.query.bias', 'encoder.layer.9.attention.self.key.weight', 'encoder.layer.9.attention.self.key.bias', 'encoder.layer.9.attention.self.value.weight', 'encoder.layer.9.attention.self.value.bias', 'encoder.layer.9.attention.output.dense.weight', 'encoder.layer.9.attention.output.dense.bias', 'encoder.layer.9.attention.output.LayerNorm.weight', 'encoder.layer.9.attention.output.LayerNorm.bias', 'encoder.layer.9.intermediate.dense.weight', 'encoder.layer.9.intermediate.dense.bias', 'encoder.layer.9.output.dense.weight', 'encoder.layer.9.output.dense.bias', 'encoder.layer.9.output.LayerNorm.weight', 'encoder.layer.9.output.LayerNorm.bias', 'encoder.layer.10.attention.self.query.weight', 'encoder.layer.10.attention.self.query.bias', 'encoder.layer.10.attention.self.key.weight', 'encoder.layer.10.attention.self.key.bias', 'encoder.layer.10.attention.self.value.weight', 'encoder.layer.10.attention.self.value.bias', 'encoder.layer.10.attention.output.dense.weight', 'encoder.layer.10.attention.output.dense.bias', 'encoder.layer.10.attention.output.LayerNorm.weight', 'encoder.layer.10.attention.output.LayerNorm.bias', 'encoder.layer.10.intermediate.dense.weight', 'encoder.layer.10.intermediate.dense.bias', 'encoder.layer.10.output.dense.weight', 'encoder.layer.10.output.dense.bias', 'encoder.layer.10.output.LayerNorm.weight', 'encoder.layer.10.output.LayerNorm.bias', 'encoder.layer.11.attention.self.query.weight', 'encoder.layer.11.attention.self.query.bias', 'encoder.layer.11.attention.self.key.weight', 'encoder.layer.11.attention.self.key.bias', 'encoder.layer.11.attention.self.value.weight', 'encoder.layer.11.attention.self.value.bias', 'encoder.layer.11.attention.output.dense.weight', 'encoder.layer.11.attention.output.dense.bias', 'encoder.layer.11.attention.output.LayerNorm.weight', 'encoder.layer.11.attention.output.LayerNorm.bias', 'encoder.layer.11.intermediate.dense.weight', 'encoder.layer.11.intermediate.dense.bias', 'encoder.layer.11.output.dense.weight', 'encoder.layer.11.output.dense.bias', 'encoder.layer.11.output.LayerNorm.weight', 'encoder.layer.11.output.LayerNorm.bias', 'pooler.dense.weight', 'pooler.dense.bias', 'classifiers.0.bias', 'classifiers.0.weight', 'classifiers.1.weight', 'classifiers.1.bias', 'masking_gate.weight', 'masking_gate.bias']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.

What does it mean? Does it mean those weights in the list was not loaded from checkpoint?

Okay, went through the source code it does indicate those weights are unexpected.

The problem was that the original model was saved with DataParallel, so instead of bert.encoder.layer11, it is module.bert.encoder.layer11. I have re-saved the module without DataParallel wrapper. The problem is solved now.