地址链接:https://www.flyai.com/m/chinese_roberta_wwm_large_ext_L-24_H-1024_A-16.zip
查看来源:https://pan.iflytek.com/link/AC056611607108F33A744A0F56D0F6BE
确定自己使用的框架并导入对应的库。导入库实现样例代码可参考 文档中心-预训练模型使用教程
在代码中实现加载预训练模型地址
#按照BERT的迁移方式,RoBERTa_wwm是中文的预训练模型,采用全词掩码
export RoBERTa_DIR=/path/to/RoBERTa/
export FILE_DIR=/path/to/your_data_path
python run_classifier.py \ --task_name=your_task_name \ --do_train=true \ --do_eval=true \ --data_dir=$FILE_DIR/ \ --vocab_file=$RoBERTa_DIR/vocab.txt \ --bert_config_file=$RoBERTa_DIR/bert_config.json \ --init_checkpoint=$RoBERTa_DIR/bert_model.ckpt \ --max_seq_length=128 \ --train_batch_size=32 \ --learning_rate=2e-5 \ --num_train_epochs=3.0 \ --output_dir=/tmp/mrpc_output/
bert-base-chinese-tf_model.h5
查看来源:https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-chinese-tf_model.h5chinese_roberta_wwm_large_ext_L-24_H-1024_A-16.zip
查看来源:https://pan.iflytek.com/link/AC056611607108F33A744A0F56D0F6BE