ArvinZhuang / DSI-transformers

A huggingface transformers implementation of "Transformer Memory as a Differentiable Search Index"
MIT License
155 stars 14 forks source link

步骤2train.py无法启动 #6

Closed jianbingguoz1 closed 12 months ago

jianbingguoz1 commented 1 year ago

您好,我用官方代码步骤2无法启动,以下是报错信息:

Traceback (most recent call last): File "train.py", line 153, in main() File "train.py", line 77, in main tokenizer = T5Tokenizer.from_pretrained(model_name, cache_dir='cache') File "/opt/conda/envs/wyc_308/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 1724, in from_pretrained resolved_vocab_files[file_id] = cached_path( File "/opt/conda/envs/wyc_308/lib/python3.8/site-packages/transformers/file_utils.py", line 1921, in cached_path output_path = get_from_cache( File "/opt/conda/envs/wyc_308/lib/python3.8/site-packages/transformers/file_utils.py", line 2177, in get_from_cache raise ValueError( ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on. wandb: Waiting for W&B process to finish... (failed 1). wandb: You can sync this run to the cloud by running: wandb: wandb sync /root/projects/wyc/dsi/wandb/offline-run-20230718_015122-1nx1bm3h wandb: Find logs at: ./wandb/offline-run-20230718_015122-1nx1bm3h/logs

您有什么建议吗?

ArvinZhuang commented 1 year ago

你好, 看起来是网络问题,你可以试试单独run T5Tokenizer.from_pretrained('t5-large', cache_dir='cache'), 如果报同样的错可以尝试从huggingface先把t5的model跟tokenizer下载下来然后直接给本地下载的路径。

jianbingguoz1 commented 1 year ago

你好, 看起来是网络问题,你可以试试单独run T5Tokenizer.from_pretrained('t5-large', cache_dir='cache'), 如果报同样的错可以尝试从huggingface先把t5的model跟tokenizer下载下来然后直接给本地下载的路径。

好的我尝试一下,谢谢