Not able to load T5 tokenizer
Transformers==4.0.0 torch == 1.7.0+cu101 tensorflow == 2.3.0 Platform = Colab notebook
@julien-c @patrickvonplaten
Not able to load T5 tokenizer using `tokenizer = T5Tokenizer.from_pretrained('t5-base')'
Getting error -

I am able to download the pre-trained model though.
Hey @adithyaan-creator,
as the error message says you need to install the sentence piece library :-)
If you run:
pip install sentencepiece==0.1.91
before, it should work.
Thanks @patrickvonplaten .
Hi @patrickvonplaten I installed sentencepiece, but it still doesnt seem to be working for me. Please see the snapshot below. Please help.

@DesiKeki try sentencepiece version 0.1.94.
Thanks @adithyaan-creator , it worked!
Hello @patrickvonplaten I have gone through the issue and the suggestions given above. However, I am facing the same issue and for some reason, none of the above solutions are proving fruitful.
The issue I am facing is exactly the same as the one stated above:
from transformers import T5Tokenizer,T5ForConditionalGeneration,Adafactor
!pip install sentencepiece==0.1.91
tokenizer = T5Tokenizer.from_pretrained("t5-base")
print(tokenizer)
The output of the above code is: None. I tried using other versions of sentencepiece as well (as the one suggested above 0.1.94 and others as well). But it is still not working.
Did you restart your kernel after installing sentencepiece? See conversation in https://github.com/huggingface/transformers/issues/10797
Did you restart your kernel after installing
sentencepiece? See conversation in #10797
it works for me, thank you
Did you restart your kernel after installing
sentencepiece? See conversation in #10797
It works for me. Thanks a lot.