Too many requests for URL

I am using a finetuned llama model for inference (using vllm) and keep getting this error:

Traceback (most recent call last):
  File "/pfss/mlde/workspaces/mlde_wsp_Rohrbach/users/ns94feza/.conda/envs/llmonk2/lib/python3.11/site-packages/huggingface_hub/utils/_http.py", line 406, in hf_raise_for_status
    response.raise_for_status()
  File "/pfss/mlde/workspaces/mlde_wsp_Rohrbach/users/ns94feza/.conda/envs/llmonk2/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://huggingface.co/hbXNov/llama3.1-8b_train_gpt_4o_verifications_e3_lr5e-7-31389-merged/resolve/main/sentence_bert_config.json

I have been using this script for weeks and only got this error recently. For context, I got rate limited earlier today while trying to upload a large dataset. I wonder if that caused this issue, and if it’s possible to lift the limit. Also, I have this model locally, so I’m able to successfully load it this way:

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)

but when I go the vllm way, everything crashes.

Any help would be much appreciated!
Tagging @Wauplin in case you could help :slight_smile:

1 Like

Hi @nishadsinghi it is very probable that yes, the rate limit for the dataset upload and this one are related. Since yesterday rate limits should have been lifted again.

1 Like

Is there a way to check if the rate limit has been lifted? I have not been able to log into HF hub (see: Can't login to Huggingface CLI - #11 by Wauplin), so I can’t upload a dataset as a check.

1 Like

Hey @Wauplin, thanks for your reply. I was just trying to upload another large dataset using huggingface-cli upload-large-folder, and again got rate-limited. I thought the whole point of huggingface-cli upload-large-folder was to avoid being rate-limited. What’s the best way to upload large datasets (with lots of files) to HF without facing this issue? Also, the last time this happened to me, it took more than a day for the limit to be lifted. Is it possible to get it lifted sooner? Thanks :slight_smile:

1 Like

Hi @nishadsinghi sorry about that. upload_large_folderstill has to be improved, especially for datasets with lots of smaller files. We are planning to work on it soon. In the meantime, the best you can do is to use the ---include parameter to upload only subparts of the dataset (per folder for instance). Sorry for the inconvenience!

1 Like