Model I am using (Bert, XLNet ...): Albert
Language I am using the model on (English, Chinese ...): English
27 from typing import List, Optional, Sequence, Tuple, Union
28
---> 29 from tokenizers import AddedToken, Encoding
30 from tokenizers.decoders import Decoder
31 from tokenizers.implementations import BaseTokenizer
ImportError: cannot import name 'AddedToken'
The problem arises when using:
The tasks I am working on is:
Steps to reproduce the behavior:
1.
2.
3.
transformers version:Created another environment from scratch and it got resolved.
you need install transformers this way:
git clone https://github.com/huggingface/transformers
cd transformers
pip install .
you need install transformers this way:
git clone https://github.com/huggingface/transformers cd transformers pip install .
This worked for me thanks!
you need install transformers this way:
git clone https://github.com/huggingface/transformers cd transformers pip install .
I was having a similar issue on colab:
can't pickle AddedToken objects
This solution also worked for me. Thanks!
you need install transformers this way:
git clone https://github.com/huggingface/transformers cd transformers pip install .
Thanks much, this worked for me!
Most helpful comment
you need install transformers this way: