# How to install the model correctly?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-install-the-model-correctly%2F41237%3E%5C
**Category:** Beginners\
**Created:** [May 28, 2023, 8:08pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-install-the-model-correctly%2F41237 "2023-05-28T20:08:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveBowman](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/davebowman/32/16401_2.png) [@DaveBowman](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FDaveBowman)%5C
**Post date:** [May 28, 2023, 8:08pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-install-the-model-correctly%2F41237%2F1 "2023-05-28T20:08:42Z")

</div>

Greetings, I am trying to run the model according to the manual: [Installation](https://huggingface.co/docs/transformers/main/en/installation), but I ran into a problem. Below I describe my steps.

Operating system: Ubuntu 20.04.6 installed on WSL

Updated the packages:

```bash
sudo apt update
sudo apt upgrade -y

```

Installed Python:

```bash
sudo apt-get update
sudo apt-get install git curl python3-pip make gcc libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH" && eval "$(pyenv init --path)" && echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
pyenv install 3.11.3
pyenv global 3.11.3

```

Created and activated the virtual environment:

```bash
python -m venv .env
source .env/bin/activate

```

Installed TensorFlow:

```bash
pip install --upgrade tensorflow

```

Installed PyTorch:

```bash
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

```

Installed Flax:

```bash
pip install --upgrade git+https://github.com/google/flax.git

```

Installed transformers:

```bash
pip install transformers

```

Next I try to download and run the model:

```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("bigscience/T0_3B")
model = AutoModelForSeq2SeqLM.from_pretrained("bigscience/T0_3B")

```

The line

```python
tokenizer = AutoTokenizer.from_pretrained("bigscience/T0_3B")

```

throws an error

```auto
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dave/.env/lib/python3.11/site-packages/transformers/models/auto/tokenization_auto.py", line 711, in from_pretrained
    return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/.env/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 1812, in from_pretrained
    return cls._from_pretrained(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/.env/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 1975, in _from_pretrained
    tokenizer = cls(*init_inputs, **init_kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dave/.env/lib/python3.11/site-packages/transformers/models/t5/tokenization_t5_fast.py", line 133, in __init__
    super(). __init__ (
  File "/home/dave/.env/lib/python3.11/site-packages/transformers/tokenization_utils_fast.py", line 120, in __init__
    raise ValueError(
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.

```

What am I doing wrong?
