2

I am trying to follow the huggingface tutorial on finetuning models for summarization. All I'm trying is to load the t5 tokenizer.

from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("t5-small")

And I get the following error: enter image description here ... ... enter image description here Please help. Thank you.

Kiera.K
  • 317
  • 1
  • 13

1 Answers1

2

This solved the issue for me. You can add

import os
os.environ['TRANSFORMERS_OFFLINE'] = 'yes'

Quoting sgugger from here.

No that’s not a bug, the method tries to detect if a more recent version of the model is available, which is why it connects to the repo. To work fully offline, you need to set the environment variable TRANSFORMERS_OFFLINE to 1 or yes (see here 313).

  • Thank you. I did try that but it still gives me the same error. I cannot access anything on huggingface now, not just transformers. I just tried to get the Stanford CoreNLP model from huggingface and it throw an error :( – Kiera.K Mar 31 '22 at 02:06