xlang-ai / UnifiedSKG

[EMNLP 2022] Unifying and multi-tasking structured knowledge grounding with language models
https://arxiv.org/abs/2201.05966
Apache License 2.0
549 stars 58 forks source link

huggingface model download failed #10

Closed cdhx closed 2 years ago

cdhx commented 2 years ago

Hi, thanks for sharing this exciting work!

I'm having trouble downloading the model in huggingface

when I download the tokenizer of hkunlp/from_all_T5_base_prefix_grailqa2, got error

tokenizer = AutoTokenizer.from_pretrained("hkunlp/from_all_T5_base_prefix_grailqa2")

Traceback (most recent call last):
  File "<input>", line 4, in <module>
  File "/home2/xh/.conda/envs/skg/lib/python3.6/site-packages/transformers/models/auto/tokenization_auto.py", line 416, in from_pretrained
    return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
  File "/home2/xh/.conda/envs/skg/lib/python3.6/site-packages/transformers/tokenization_utils_base.py", line 1705, in from_pretrained
    resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs
  File "/home2/xh/.conda/envs/skg/lib/python3.6/site-packages/transformers/tokenization_utils_base.py", line 1776, in _from_pretrained
    tokenizer = cls(*init_inputs, **init_kwargs)
  File "/home2/xh/.conda/envs/skg/lib/python3.6/site-packages/transformers/models/t5/tokenization_t5_fast.py", line 136, in __init__
    **kwargs,
  File "/home2/xh/.conda/envs/skg/lib/python3.6/site-packages/transformers/tokenization_utils_fast.py", line 87, in __init__
    fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
Exception: Permission denied (os error 13)

Same problem happens on others like from_all_T5_base_prefix_compwebq2, but download the model of them works fine.

looking forward to your reply, thx

ChenWu98 commented 2 years ago

Hi! Could you try T5Tokenizer.from_pretrained("hkunlp/from_all_T5_base_prefix_grailqa2") instead? Please let us know if it still does not work, and sorry for the confusion!

cdhx commented 2 years ago

It works, thanks for your quickly replay!

Timothyxxx commented 2 years ago

(Or unable the use_fast by use_fast=False.

cdhx commented 2 years ago

(Or unable the use_fast by use_fast=False.

it also works, thanks!

Timothyxxx commented 2 years ago

You are welcome, you can check colab demo for examples of usage or contact us if there's any other problem! 😃