from_pretrained
-
AutoTokenizer.from_pretrained:从path/vocab.json中加载tokenizer
-
AutoConfig.from_pretrained:从path/config.json中加载模型配置信息
- 更新模型配置信息:model = Model(config)
-
PreTrainedModel.from_pretrained:加载模型结构和模型参数
load_checkpoint
从 checkpoint 中加载模型 parameter,而不加载模型结构
标签:load,模型,state,dict,PreTrainedModel,pretrained,加载 From: https://www.cnblogs.com/W-Exert/p/17823149.html