地址链接:https://www.flyai.com/m/CDial-GPT_LCCC-large.zip
查看来源:https://github.com/thu-coai/CDial-GPT
确定自己使用的框架并导入对应的库。导入库实现样例代码可参考 文档中心-预训练模型使用教程
在代码中实现加载预训练模型地址
from flyai.utils import remote_helper
path = remote_helper.get_remote_data('https://www.flyai.com/m/CDial-GPT_LCCC-large.zip')
import os from transformers import BertTokenizer, GPT2LMHeadModel, GPT2Config
model = GPT2LMHeadModel.from_pretrained(path)
tokenizer = BertTokenizer.from_pretrained(path)