You are using a model of type roberta to instantiate a model of type bert. This is not supported for all configurations of models and can yield errors.
Some weights of the model checkpoint at clue/roberta_chinese_pair_tiny were not used when initializing BertModel: ['cls.seq_relationship.weight', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.bias', 'cls.predictions.transform.dense.bias', 'cls.seq_relationship.bias', 'cls.predictions.decoder.bias', 'cls.predictions.decoder.weight', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.weight']
我的代码如下:
from transformers import BertModel
bert = BertModel.from_pretrained("clue/roberta_chinese_pair_tiny")
我通过transformers使用roberta_chinese_pair_tiny,提示以下warning
我的代码如下: