huggingface_hub v2.3.0 lists an 800,000-file dataset in 20 seconds, down from 13 minutes
3 weeks ago
huggingface_hub v2.3.0: HfFileSystem lists large repos in parallel (an 800,000-file dataset in about 20 seconds instead of 13 minutes), Bucket listings that refresh live, attachments in Hub discussions, one-request safetensors shard headers, and fixes for create_commit, hf jobs run, InferenceClient and custom endpoints. https://github.com/huggingface/huggingface_hub/releases/tag/v2.3.0 https://github.com/huggingface/huggingface_hub/compare/v2.2.0...v2.3.0
Ask about this presentation
Chapters
0:00Large repos list in parallel
0:15Shallow listings stop early
0:28Bucket listings stay fresh
0:44Live follow limits
0:5802: Discussions and models
1:00Attachments in discussions
1:15Shard headers in one request
1:28Gated repos that hide requesters
1:4403: Fixes
1:46create_commit keeps re-added files
1:59hf jobs run keeps streaming
2:12Queued Jobs show their status
2:26InferenceClient fixes
2:41Endpoint, offline and Bucket fixes
2:56The biggest repo you list
Show transcriptHide transcript
huggingface_hub 2.3 lists large repos in parallel. Listing every file in the objaverse dataset, almost 800,000 of them, took about 13 minutes. Now it takes about 20 seconds.
The Hub sends a file tree a thousand entries at a time, each page after the last, so the library now lists folders side by side. And a listing two levels deep stops at two levels, in six requests.
HfFileSystem caches folder listings, so files another process added to a Bucket stayed hidden until you cleared the cache. With live follow, the Hub sends each change and the stale listing is dropped. It works from pandas and pyarrow too.
It's off by default, because it keeps a connection open for every Bucket it follows. It only refreshes listings, since reading a file always fetches it from the Hub. Model, dataset and Space repos don't get it.
Discussions, models and gated repos.
Discussions and pull requests on the Hub can now carry images, video and audio, from Python or from the hf command line. Before, that meant calling an undocumented Hub endpoint by hand.
Reading the safetensors headers of a sharded model took one request per shard. A new function gets them all in one. It only reads the main revision, and the old function is unchanged.
Gated repos can now hide the name and email of people asking for access. Listing their requests used to crash. Now you accept each request by its own identifier. Type checkers may flag code that expects a username.
Fixes you may have hit.
Since version 0.24, deleting a folder and pushing the same unchanged files back in one commit removed those files from the repo, without any error. Now the files are kept.
hf jobs run used to stop printing logs when the stream ended before the Job did. It now reconnects until the Job finishes, and Control C exits right away with a hint on how to follow or cancel it.
While a Job waited for hardware, the CLI printed nothing, so it looked stuck. Now it shows the Hub's status message and how long the Job has been waiting, in interactive terminals only.
A reused Inference Client stops holding every finished response in memory. The async client stops freezing your event loop while queue-based providers like fal work. And a timeout raises the documented timeout error.
With a custom endpoint, 20 methods were sent to huggingface dot co with your token. In offline mode, a pinned download could delete your local copy. And pushing a dataset into a new Bucket works again.
The full list is in the 2.3 release notes on GitHub. So, how many files are in the biggest repo you list with HfFileSystem?
Up next
3:39Transformers runs Mistral Large 4 and trains LoRA on FP8 checkpoints
@hugging-face
1 week ago
2:43huggingface_hub v2.4.0 copies files into Buckets and flags outdated CLI extensions
@hugging-face
1 week ago
2:27Transformers adds Reflection AI’s Beam and loads models on PyTorch 2.7 again
@hugging-face
3 weeks 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
1 month ago

