chinese%5frbtl3%5fpytorch.zip
PyTorch BERT
在线加载模型地址

确定自己使用的框架并导入对应的库。导入库实现样例代码可参考 文档中心-预训练模型使用教程

在代码中实现加载预训练模型地址

调用模型的实现方法

#roberta 中文维基百科训练模型, 类似于 bert-base-chinese 的加载方式, 解压文件夹 

from transfromers import BertTokenizer, BertConfig, BertModel 

tokenizer = BertTokenizer.from_pretrained('./rbtl3')  

config = BertConfig.from_pretrained('./rbtl3/bert_config.json', output_hidden_states=True) 

model = BertModel.from_pretrained('./rbtl3', config=config)