transformers
transformers copied to clipboard
Tokenizer problem for model 'patrickvonplaten/longformer-random-tiny'
Environment info
transformersversion: 3.4.0- Platform: Ubuntu 18.04.5 LTS
- Python version: Python 3.6.9
- PyTorch version (GPU?):1.6.0
- Tensorflow version (GPU?):2.3.1
- Using GPU in script?:No
- Using distributed or parallel set-up in script?:No
Who can help
T5: @patrickvonplaten
Information
Model I am using (patrickvonplaten/longformer-random-tiny):
The problem arises when using:
- [ ] the official example scripts: (give details below) https://huggingface.co/patrickvonplaten/longformer-random-tiny
To reproduce
Steps to reproduce the behavior:
- Running the script.
- Result:
_2020-11-08 11:09:14.631646: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-11-08 11:09:14.631672: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "test_tiny.py", line 3, in
tokenizer = AutoTokenizer.from_pretrained("patrickvonplaten/longformer-random-tiny") File "/usr/local/lib/python3.6/dist-packages/transformers/tokenization_auto.py", line 333, in from_pretrained return tokenizer_class_py.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs) File "/usr/local/lib/python3.6/dist-packages/transformers/tokenization_utils_base.py", line 1591, in from_pretrained list(cls.vocab_files_names.values()), OSError: Model name 'patrickvonplaten/longformer-random-tiny' was not found in tokenizers model name list (allenai/longformer-base-4096, allenai/longformer-large-4096, allenai/longformer-large-4096-finetuned-triviaqa, allenai/longformer-base-4096-extra.pos.embd.only, allenai/longformer-large-4096-extra.pos.embd.only). We assumed 'patrickvonplaten/longformer-random-tiny' was a path, a model identifier, or url to a directory containing vocabulary files named ['vocab.json', 'merges.txt'] but couldn't find such vocabulary files at this path or url. _
Expected behavior
I suppose two files are needed - 'vocab.json', 'merges.txt'. Thanks.
Hey @lessenko - the model is useless for any real application as it's just randomly initialized. It's only used for testing purposes.
Hi @patrickvonplaten, Thanks.