You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hub/rate-limits.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,17 @@
1
1
# Hub Rate limits
2
2
3
-
To protect our platform's integrity and make sure we are able to scale our service to as many AI community members as possible, we enforce rate limits on all requests made to the HF Hub.
3
+
To protect our platform's integrity and ensure availability to as many AI community members as possible, we enforce rate limits on all requests made to the Hugging Face Hub.
4
4
5
5
We define different rate limits for distinct classes of requests. We distinguish three main buckets:
6
6
7
7
-**Hub APIs**
8
8
- e.g. model or dataset search, repo creation, user management, etc. Note: all those endpoints are documented in [Hub API Endpoints](./api).
9
9
-**Resolvers**
10
10
- They're all the URLs that contain a `/resolve/` segment in their path, which serve user-generated content from the Hub. Concretely, those are the URLs that are constructed by open source libraries (transformers, datasets, vLLM, llama.cpp, …) or AI applications (LM Studio, Jan, ollama, …) to download model/dataset files from HF.
11
-
-Because they are very heavily used by the community, and because we optimize our infrastructure to serve them with high efficiency, rate limits for Resolvers are the highest ones.
11
+
-Resolve requests are heavily used by the community, and since we optimize our infrastructure to serve them with maximum efficiency, the rate limits for Resolvers are the highest.
12
12
-**Pages**
13
-
- All the Web pages we host on huggingface.co. Usually Web browsing is browsing made by humans hence rate limits don't need to be as high as programmatic endpoints like the two former buckets.
13
+
- All the Web pages we host on huggingface.co.
14
+
- Usually Web browsing requests are made by humans, hence rate limits don't need to be as high as the above mentioned programmatic endpoints.
14
15
15
16
> [!TIP]
16
17
> All values are defined over 5-minute windows, which allows for some level of "burstiness" from an application or developer's point of view.
@@ -19,15 +20,15 @@ If you, your organization, or your application need higher rate limits, we encou
19
20
20
21
## Billing dashboard
21
22
22
-
At any point in time, you can check your rate limit status on your (or your org’s) Billing page: https://huggingface.co/settings/billing
23
+
At any point, you can check your rate limit status on your (or your org’s) Billing page: https://huggingface.co/settings/billing
23
24
24
25

25
26
26
-
On the right side, you will see three gauges, one for each bucket of Rate limiting.
27
+
On the right side, you will see three gauges, one for each bucket of Requests.
27
28
28
29
Each bucket presents the number of current (last 5 minutes) requests, and the number of allowed requests based on your user account or organization plan.
29
30
30
-
Whenever you are above the limit in the past 5 minutes (the view is updated in real-time), the bar will turn red.
31
+
Whenever you exceed the limit in the past 5 minutes (the view is updated in real-time), the bar will turn red.
31
32
32
33
Note: You can use the context switcher to easily switch between your user account and your orgs.
33
34
@@ -43,14 +44,14 @@ Precisely, we implement the following headers:
|**`RateLimit-Policy`**| Carries the rate limit policy itself (e.g. “100 requests per 5 minutes”). It’s informative; shows what policy the client is subject to. |
47
-
|**`RateLimit-Limit`**| The total allowed rate limit for the current window. “How many requests (of this type) you’re allowed.” |
48
-
|**`RateLimit-Remaining`**| How many requests of this type you have left in the current window. |
49
-
|**`RateLimit-Reset`**| Number of seconds until the rate limit window resets (or until quota is refreshed). Uses a “delta-seconds” format to reduce clock sync issues. |
47
+
|**`RateLimit‑Policy`**| Carries the rate limit policy itself (e.g. “100 requests per 5 minutes”). It’s informative; shows what policy the client is subject to. |
48
+
|**`RateLimit‑Limit`**| The total allowed rate limit for the current window. “How many requests (of this type) you’re allowed.” |
49
+
|**`RateLimit‑Remaining`**| How many requests of this type you have left in the current window. |
50
+
|**`RateLimit‑Reset`**| Number of seconds until the rate limit window resets (or until quota is refreshed). Uses a “delta-seconds” format to reduce clock sync issues. |
50
51
51
52
## Rate limit Tiers
52
53
53
-
Here are the current rate limiting values (in September '25) based on your plan:
54
+
Here are the current rate limits (in September '25) based on your plan:
@@ -65,13 +66,15 @@ Here are the current rate limiting values (in September '25) based on your plan:
65
66
66
67
\* Anonymous and Free users are subject to change over time depending on platform health 🤞
67
68
69
+
Note: For organizations, rate limits are applied individually to each member.
70
+
68
71
## What if I get rate-limited
69
72
70
-
First, make sure you are always passing a `HF_TOKEN`, and it gets passed downstream to all libraries or applications you might be using that downloads _stuff_ from the Hub.
73
+
First, make sure you always pass a `HF_TOKEN`, and it is passed downstream to all libraries or applications that downloads _stuff_ from the Hub.
71
74
72
75
This is the number one reason users get rate limited and is a very easy fix.
73
76
74
-
If you're sure you're passing a `HF_TOKEN`, you can:
77
+
Despite passing `HF_TOKEN` if you are still rate limited, you can:
75
78
76
79
- spread out your requests over longer periods of time
77
80
- replace Hub API calls with Resolver calls, whenever possible (Resolver rate limits are much higher and much more optimized).
0 commit comments