使用方法;
from transformers import AutoTokenizer
from transformers import TFAutoModelForSeq2SeqLM
pre_trained_model_path = './t5/'
model = TFAutoModelForSeq2SeqLM.from_pretrained(pre_trained_model_path)
tokenizer = AutoTokenizer.from_pretrained(pre_trained_model_path)
模型加载完毕之后就可以对接下游任务或用自己的数据继续对模型进行微调。
1