huggingface_hub v2.5.0 revokes leaked tokens and locks sandboxes offline
1 day ago
huggingface_hub v2.5.0 adds hf auth revoke for leaked tokens, sandboxes with no internet or an allowlist, SQL over Hub datasets by name, fsspec transactions for buckets, secretless OAuth for Spaces, and chat calls through the Hub router.
Links
Ask about this presentation
Chapters
0:00Revoke a leaked token
0:10Only the token is needed
0:20Your own token stays safe
0:3002 Sandboxes
0:31No internet, or an allowlist
0:41Root can't lift it
0:49Pools mix both
1:0003 Datasets and buckets
1:01SQL by dataset name
1:12Write back to the Hub
1:22Checkpoints to buckets
1:34Best effort, buckets only
1:4404 Spaces and inference
1:45OAuth without a secret
1:55Users sign in again
2:07Chat through the router
2:18Fixes
2:28Should you upgrade?
Show transcriptHide transcript
Version 2.5 of huggingface_hub adds a command for the moment a token leaks into a repo, a log or a shared snippet. hf auth revoke cancels it from your terminal right away.
You don't have to be logged in. Anyone who holds the raw token can revoke it, and its owner is told by email. The Hub answers revocation requested, whether that token existed or not.
The revoke request goes out without your own authorization header, so the token you're working with can't be revoked by mistake. In Python, the new revoke_tokens helper does the same, a thousand tokens per batch.
Sandboxes.
A Hugging Face sandbox can now be cut off from the internet, or held to a list of IP ranges and hostnames. An agent inside can reach your vLLM server and the Hub, and nothing beyond them.
The sandbox server enforces the policy with seccomp and Landlock. It covers every process the sandbox starts, and it stays in place for root inside the sandbox too.
Pools set the policy per sandbox, so one host can mix isolated and connected ones. On a pool host started by an older huggingface_hub, creation fails with an error instead of quietly connecting.
Datasets and buckets.
The hf datasets sql command now installs and loads the Hugging Face DuckDB extension by itself. You name the dataset with hf_dataset, instead of building read_parquet URLs by hand.
That extension can also copy query results into a dataset on the Hub. It needs DuckDB 2.0 or newer. Where it can't install, you get a warning and your existing parquet queries keep working.
HfFileSystem now supports fsspec transactions on buckets. Files upload when the block ends, and a block that raises skips the upload. PyTorch Lightning wraps every save in one, so its checkpoints can now land in a bucket.
Each file uploads separately at commit time, so a failure partway through can leave the earlier files uploaded. Repo writes, deletes and copies inside a transaction raise an error before anything is touched.
Spaces and inference.
A Space that signs people in with Hugging Face can now run as a public OAuth client. PKCE is always on, and Spaces that still get a client secret keep working as before.
Session cookies are now signed with a key the Hub sets for each Space. That key changed in this release, so everyone signs in once more when the Space upgrades. From then on, sessions survive restarts and carry across replicas.
Chat completion with a Hugging Face token and a named provider now takes the same path as auto calls. If that provider is down or rate limited, the router fails over to another one. Calls made with the provider's own key are unchanged.
Downloads running in parallel into the same local folder now work. Reaching your egress limit raises a dedicated egress limit error. And uv jobs with long script arguments stop crashing.
I would say yes, upgrade, if you share tokens, run agents in sandboxes, or write checkpoints to buckets. Locked-down pools need this version on every pool host. Every fix is listed in the release notes on GitHub.
Up next
2:46Transformers now exports to ONNX and OpenVINO, and transcribes 1,600 languages
@hugging-face
6 days ago
3:39Transformers runs Mistral Large 4 and trains LoRA on FP8 checkpoints
@hugging-face
3 weeks ago
2:43huggingface_hub v2.4.0 copies files into Buckets and flags outdated CLI extensions
@hugging-face
3 weeks ago
3:05huggingface_hub v2.3.0 lists an 800,000-file dataset in 20 seconds, down from 13 minutes
@hugging-face
1 month ago
2:27Transformers adds Reflection AI’s Beam and loads models on PyTorch 2.7 again
@hugging-face
1 month ago
3:46Transformers v5.20.0 runs Meta's Muse Spark Open, and here is the hardware it needs
@hugging-face
1 month ago
3:18huggingface_hub 2.2.0: hf jobs stats prints a snapshot, and parallel downloads always use hf_xet
@hugging-face
1 month ago
3:12Transformers v5.19.0: EmbeddingGemma 2 and token-dispatch expert parallelism
@hugging-face
1 month ago
2:53huggingface_hub's HfFileSystem now downloads a 2 GB bucket file in seconds
@hugging-face
1 month ago
3:12Transformers v5.18.0: streaming speaker diarization, GGUF mixture-of-experts, FSDP2 with expert parallelism
@hugging-face
1 month ago
2:12What huggingface_hub 2.0 changes, and why transformers keeps you on 1.x for now
@hugging-face
2 months ago