# T0 Tokenizer Throws Error

**URL:** <https://discuss.huggingface.co/t/t0-tokenizer-throws-error/11270>\
**Category:** 🤗Transformers\
**Created:** [November 1, 2021, 7:30pm UTC](https://discuss.huggingface.co/t/t0-tokenizer-throws-error/11270 "2021-11-01T19:30:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RylanSchaeffer](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RylanSchaeffer](https://discuss.huggingface.co/u/RylanSchaeffer)\
**Post date:** [November 1, 2021, 7:30pm UTC](https://discuss.huggingface.co/t/t0-tokenizer-throws-error/11270/1 "2021-11-01T19:30:11Z")

</div>

I’m trying to use the new T0 model ([bigscience/T0pp · Hugging Face](https://huggingface.co/bigscience/T0pp)) but when I try following the instructions, I get the following error:

```auto
from transformers import AutoTokenizer
from transformers import AutoModelForCausalLM, AutoModelForSeq2SeqLM, GPT2Model, GPT2Config, pipeline
t0_tokenizer = AutoTokenizer.from_pretrained("bigscience/T0pp")
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/rschaef/CoCoSci-Language-Distillation/CLIP_prefix_caption/clipgpt_venv/lib/python3.7/site-packages/transformers/models/auto/tokenization_auto.py", line 469, in from_pretrained
    return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
  File "/home/rschaef/CoCoSci-Language-Distillation/CLIP_prefix_caption/clipgpt_venv/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1742, in from_pretrained
    resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs
  File "/home/rschaef/CoCoSci-Language-Distillation/CLIP_prefix_caption/clipgpt_venv/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1858, in _from_pretrained
    tokenizer = cls(*init_inputs, **init_kwargs)
  File "/home/rschaef/CoCoSci-Language-Distillation/CLIP_prefix_caption/clipgpt_venv/lib/python3.7/site-packages/transformers/models/t5/tokenization_t5_fast.py", line 136, in __init__
    **kwargs,
  File "/home/rschaef/CoCoSci-Language-Distillation/CLIP_prefix_caption/clipgpt_venv/lib/python3.7/site-packages/transformers/tokenization_utils_fast.py", line 117, in __init__
    "Couldn't instantiate the backend tokenizer from one of: \n"
ValueError: Couldn't instantiate the backend tokenizer from one of: 
(1) a `tokenizers` library serialization file, 
(2) a slow tokenizer instance to convert or 
(3) an equivalent slow tokenizer class to instantiate and convert. 
You need to have sentencepiece installed to convert a slow tokenizer to a fast one.

```

Am I missing something from the instructions on that page?

---

<div class="post-metadata">

**Author:** ![RylanSchaeffer](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RylanSchaeffer](https://discuss.huggingface.co/u/RylanSchaeffer)\
**Post date:** [November 1, 2021, 7:31pm UTC](https://discuss.huggingface.co/t/t0-tokenizer-throws-error/11270/2 "2021-11-01T19:31:51Z")

</div>

According to [python - Transformers v4.x: Convert slow tokenizer to fast tokenizer - Stack Overflow](https://stackoverflow.com/questions/65431837/transformers-v4-x-convert-slow-tokenizer-to-fast-tokenizer), I need to separately install a library called `sentencepiece` - is that correct?
