Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tokenizer = T5Tokenizer.from_pretrained("t5-base"). Type of tokenizer object is NoneType #19

Open
sreeramk28 opened this issue Jan 16, 2021 · 3 comments

Comments

@sreeramk28
Copy link

When running the main function in CoLab, got the following error
AttributeError: 'NoneType' object has no attribute 'batch_encode_plus'
When I tried this,
tokenizer = T5Tokenizer.from_pretrained("t5-base")
print(type(tokenizer))

got,
<class 'NoneType'>

@v-zmiycharov
Copy link

Install specific version of sentencepiece: pip install sentencepiece==0.1.91
huggingface/transformers#9093 (comment)

@VedantKP
Copy link

Even after installing the exact version of sentencepiece, it is still unable to load the t5-base model.
tokenizer = T5Tokenizer.from_pretrained("t5-base") print(tokenizer)
Gives output as "None"

@hotpeppeper
Copy link

restart notebook, install sentencepiece before tokenizer = T5Tokenizer.from_pretrained("t5-base")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants