Unable to download microsoft/Phi-3-small-8k-instruct completely

I’m getting a 416 while trying to download microsoft/Phi-3-small-8k-instruct and Phi-3-small-8k-instruct. Since friday I’m getting this error.

huggingface_hub.utils._errors.HfHubHTTPError: 416 Client Error: Requested Range Not Satisfiable for url: https://cdn-lfs-us-1.huggingface.co/repos/...model-00003-of-00004.safetensor…

Is this is a problem of the repo or the CDN (AWS Cloudfront)?

Other repos do work fine. Download is done by vLLM. huggingface-hub is version 0.24.6.

Pinging @Wauplin here

Hi @stelterlab , sorry for the inconvenience. Are you using any proxies by any chance?

Also, could you update huggingface_hub by installing from source (see guide) and if the problem still happens, copy paste me the full output + the output of huggingface-cli env (run in the terminal). That would be very helpful to me! Thanks in advance :slight_smile:

Hey, @Wauplin !

Aye. As requested the output:

as of huggingface-cli env

- huggingface_hub version: 0.25.0.dev0
- Platform: Linux-5.15.0-119-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /opt/pluski/svc/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: stelterlab
- Configured git credential helpers:
- FastAI: N/A
- Tensorflow: N/A
- Torch: N/A
- Jinja2: N/A
- Graphviz: N/A
- keras: N/A
- Pydot: N/A
- Pillow: N/A
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: N/A
- pydantic: N/A
- aiohttp: N/A
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /data/hf/models
- HF_ASSETS_CACHE: /opt/pluski/svc/.cache/huggingface/assets
- HF_TOKEN_PATH: /opt/pluski/svc/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10

and the failed download.

Fetching 22 files:   0%|                                                                                                                                                                                                       | 0/22 [00:00<?, ?it/s]Downloading 'model-00003-of-00004.safetensors' to '/data/hf/models/models--microsoft--Phi-3-small-8k-instruct/blobs/77aa243e7aa0a19eb37eb8dabc6f30de9a779c606cb476e5ac432d742fe7e917.incomplete' (resume from 4799608240/4799608240)
Fetching 22 files:  55%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹                                                                                      | 12/22 [00:01<00:01,  6.04it/s]
Traceback (most recent call last):
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 405, in hf_raise_for_status
    response.raise_for_status()
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 416 Client Error: Requested Range Not Satisfiable for url: https://cdn-lfs-us-1.huggingface.co/repos/07/8c/078c8c6b6ac025e6e8f786b829aedf1b63e2f8dc1883d61a1a4bc66cff92d31f/77aa243e7aa0a19eb37eb8dabc6f30de9a779c606cb476e5ac432d742fe7e917?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27model-00003-of-00004.safetensors%3B+filename%3D%22model-00003-of-00004.safetensors%22%3B&Expires=1724999493&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcyNDk5OTQ5M319LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmh1Z2dpbmdmYWNlLmNvL3JlcG9zLzA3LzhjLzA3OGM4YzZiNmFjMDI1ZTZlOGY3ODZiODI5YWVkZjFiNjNlMmY4ZGMxODgzZDYxYTFhNGJjNjZjZmY5MmQzMWYvNzdhYTI0M2U3YWEwYTE5ZWIzN2ViOGRhYmM2ZjMwZGU5YTc3OWM2MDZjYjQ3NmU1YWM0MzJkNzQyZmU3ZTkxNz9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoifV19&Signature=No7fx~uOv8I0~sPx7BHVCMPbxcUUV2B7-7iHqNYERDOSSvkHND4XmXtqp2aVCEqL~Hu0kV~~A9wpsAmjYdwrVi9SIYAg6kvj3KgxunzTeqcqh6wTD8V22KvPW4hRFc8E~4GnJC0N3LVeJOJcm5RxiDZNOKsKAh9rjT4dWxOSTEeXOzCKPl59oU839z91u6XAZTtsYe7j2fd6COedWr4MSPysIlLKEsT-dUUqRk0TpgfpqyeRcFM-bB-k-9nqpTaZMdOla35VsCMV9rkpy1s-W9Lx3epxUliDmsBHisJRbBKhNBeIEpnZSN8ZC1c3dXtI8YGmjp5KV1eG4NUHQ8tvzA__&Key-Pair-Id=K24J24Z295AEI9

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

Traceback (most recent call last):
  File "/opt/pluski/svc/.venv/bin/huggingface-cli", line 8, in <module>
    sys.exit(main())
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/commands/huggingface_cli.py", line 52, in main
    service.run()
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/commands/download.py", line 146, in run
    print(self._download())  # Print path to downloaded files
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/commands/download.py", line 180, in _download
    return snapshot_download(
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/_snapshot_download.py", line 296, in snapshot_download
    thread_map(
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/tqdm/contrib/concurrent.py", line 69, in thread_map
    return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs)
  File "/opt/pluski/svc/.venv/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 "/opt/pluski/svc/.venv/lib/python3.10/site-packages/tqdm/std.py", line 1181, in __iter__
    for obj in iterable:
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
    yield _result_or_cancel(fs.pop())
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
    return fut.result(timeout)
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/_snapshot_download.py", line 270, in _inner_hf_hub_download
    return hf_hub_download(
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f
    return f(*args, **kwargs)
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1242, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1391, in _hf_hub_download_to_cache_dir
    _download_to_tmp_and_move(
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1917, in _download_to_tmp_and_move
    http_get(
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 465, in http_get
    r = _request_wrapper(
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 402, in _request_wrapper
    hf_raise_for_status(response)
  File "/opt/pluski/svc/.venv/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 472, in hf_raise_for_status
    raise _format(HfHubHTTPError, message, response) from e
huggingface_hub.errors.HfHubHTTPError: 416 Client Error: Requested Range Not Satisfiable for url: https://cdn-lfs-us-1.huggingface.co/repos/07/8c/078c8c6b6ac025e6e8f786b829aedf1b63e2f8dc1883d61a1a4bc66cff92d31f/77aa243e7aa0a19eb37eb8dabc6f30de9a779c606cb476e5ac432d742fe7e917?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27model-00003-of-00004.safetensors%3B+filename%3D%22model-00003-of-00004.safetensors%22%3B&Expires=1724999493&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcyNDk5OTQ5M319LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmh1Z2dpbmdmYWNlLmNvL3JlcG9zLzA3LzhjLzA3OGM4YzZiNmFjMDI1ZTZlOGY3ODZiODI5YWVkZjFiNjNlMmY4ZGMxODgzZDYxYTFhNGJjNjZjZmY5MmQzMWYvNzdhYTI0M2U3YWEwYTE5ZWIzN2ViOGRhYmM2ZjMwZGU5YTc3OWM2MDZjYjQ3NmU1YWM0MzJkNzQyZmU3ZTkxNz9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoifV19&Signature=No7fx~uOv8I0~sPx7BHVCMPbxcUUV2B7-7iHqNYERDOSSvkHND4XmXtqp2aVCEqL~Hu0kV~~A9wpsAmjYdwrVi9SIYAg6kvj3KgxunzTeqcqh6wTD8V22KvPW4hRFc8E~4GnJC0N3LVeJOJcm5RxiDZNOKsKAh9rjT4dWxOSTEeXOzCKPl59oU839z91u6XAZTtsYe7j2fd6COedWr4MSPysIlLKEsT-dUUqRk0TpgfpqyeRcFM-bB-k-9nqpTaZMdOla35VsCMV9rkpy1s-W9Lx3epxUliDmsBHisJRbBKhNBeIEpnZSN8ZC1c3dXtI8YGmjp5KV1eG4NUHQ8tvzA__&Key-Pair-Id=K24J24Z295AEI9. Requested range: bytes=4799608240-. Content-Range: None.

Hope this helps tracing down the problem.

Thanks in advance!

Oh. I forgot to mention that there is no proxy involved.

Hi @stelterlab , thanks for the details. It helped me investigate your issue. I think I have found the root cause and opened a PR to fix it: Fix 416 requested range not satisfiable by Wauplin Β· Pull Request #2511 Β· huggingface/huggingface_hub Β· GitHub

In the meantime the solution for you is to delete the .incomplete files in your cache system.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.