transformers包安装
!pip install pytorch-transformers
代码
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("gpt2")
报错:
No module named ‘transformers.models.auto.tokenization_auto’
解决方案:
重启kernel
restart the runtime