LetheSec / HuggingFace-Download-Accelerator

利用HuggingFace的官方下载工具从镜像网站进行高速下载。
647 stars 56 forks source link

下载 internlm/internlm2-7b 报错 #26

Open alvinshao0313 opened 3 weeks ago

alvinshao0313 commented 3 weeks ago

打算下载internlm2-7b,但是下载这个模型会出错。下载llama2不会,很奇怪。

执行命令: python data/hf_dw.py --model internlm/internlm2-7b --use_hf_transfer False

报错: export HF_ENDPOINT= https://hf-mirror.com /home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/commands/download.py:132: FutureWarning: Ignoring --local-dir-use-symlinks. Downloading to a local directory does not use symlinks anymore. warnings.warn( /home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: resume_download is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use force_download=True. warnings.warn( Fetching 14 files: 21%|███████████████████▉ | 3/14 [00:00<00:01, 6.27it/s] Traceback (most recent call last): File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1754, in _get_metadata_or_catch_error raise FileMetadataError("Distant resource does not have a Content-Length.") huggingface_hub.utils._errors.FileMetadataError: Distant resource does not have a Content-Length.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/shaoyuantian/anaconda3/envs/llm_quant/bin/huggingface-cli", line 8, in sys.exit(main()) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/commands/huggingface_cli.py", line 51, in main service.run() File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/commands/download.py", line 146, in run print(self._download()) # Print path to downloaded files File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/commands/download.py", line 180, in _download return snapshot_download( File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, kwargs) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/_snapshot_download.py", line 294, in snapshot_download thread_map( File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map return _executor_map(ThreadPoolExecutor, fn, *iterables, *tqdm_kwargs) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 51, in _executor_map return list(tqdm_class(ex.map(fn, iterables, chunksize=chunksize), kwargs)) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/tqdm/std.py", line 1181, in iter for obj in iterable: File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator yield _result_or_cancel(fs.pop()) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel return fut.result(timeout) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/concurrent/futures/_base.py", line 458, in result return self.__get_result() File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result raise self._exception File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/_snapshot_download.py", line 268, in _inner_hf_hub_download return hf_hub_download( File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(args, **kwargs) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1221, in hf_hub_download return _hf_hub_download_to_cache_dir( File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1325, in _hf_hub_download_to_cache_dir _raise_on_head_call_error(head_call_error, force_download, local_files_only) File "/home/shaoyuantian/anaconda3/envs/llm_quant/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1826, in _raise_on_head_call_error raise LocalEntryNotFoundError( huggingface_hub.utils._errors.LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.

环境: huggingface-hub 0.23.4 pypi_0 pypi python 3.10.14 torch 2.10 cuda 11.8

alvinshao0313 commented 3 weeks ago

https://huggingface.co/microsoft/Phi-3-mini-128k-instruct/discussions/77 https://huggingface.co/THUDM/glm-4-9b-chat/discussions/49

在寻找解决办法的时候发现了几个很相似的错误,不知道是不是huggingface的问题。