What huggingface_hub 2.0 changes, and why transformers keeps you on 1.x for now

22 hours ago

Hugging Face released huggingface_hub 2.0 on September 24, 2026: a new HTTP library underneath (httpx2) and every feature deprecated in 1.x removed. Who has to change code, why transformers, datasets and diffusers users stay on 1.x for now, and where the official migration guide is. https://github.com/huggingface/huggingface_hub/releases/tag/v2.0.0 https://huggingface.co/docs/huggingface_hub/main/en/concepts/migration_v2 https://github.com/huggingface/huggingface_hub/issues/4802

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00huggingface_hub 2.0 is out
  2. 0:20Two changes
  3. 0:42Why a major version
  4. 0:55Who has to change code
  5. 1:20Most users stay on 1.x for now
  6. 1:48Where to go
Show transcript

huggingface_hub 2.0 is out

010203What shipped
huggingface/huggingface_hub · GitHub release v2.0.0 · PyPI
Hugging Face
Released September 24, 2026Major versionBreaks some 1.x code

Hugging Face released version 2.0 of huggingface_hub on September 24th. It's the Python library that downloads and publishes models and datasets on the Hub, and transformers, datasets and diffusers all depend on it. It's a major version, so some code written for 1.x will stop working.

Two changes

huggingface_hub 2.0
010203What shipped
huggingface/huggingface_hub · GitHub release v2.0.0

Two changes, both breaking

A new HTTP libraryhttpx is replaced by its successor, httpx2
Deprecated features removedeverything marked deprecated during 1.x is gone

Two things changed. The HTTP library it uses to talk to the Hub moves from httpx to its successor, httpx2. And everything Hugging Face marked as deprecated during the 1.x series is gone. The most visible one is the old huggingface-cli command. The command line is just hf now.

Why a major version

huggingface_hub 2.0
010203What shipped
huggingface/huggingface_hub · issue #4802

httpx is no longer actively maintained

Changing the HTTP library breaks code that depends on it, so Hugging Face made it a major version.

The reason is upstream. The httpx project is no longer actively maintained. Swapping the library underneath breaks code that depends on it, so Hugging Face shipped the change as a major version.

Who has to change code

huggingface_hub 2.0
010203Who it affects
huggingface_hub docs · Migrating to v2.0
Code that calls huggingface_hub directlyespecially code that handles its network errors or builds its own HTTP client
Scripts that use features deprecated in 1.xincluding every huggingface-cli command
Certificate settingsthe default now comes from your operating system; custom bundles still work

So who has to change anything? Mostly people who write code against huggingface_hub itself, especially code that handles its network errors or sets up its own HTTP client. Scripts that still use a deprecated feature, including the old command line, need updating too. And certificates now come from your operating system's trust store by default. A custom certificate bundle set the usual way still works.

Most users stay on 1.x for now

huggingface_hub 2.0
010203Who it affects
PyPI package metadata · September 28, 2026 · huggingface/huggingface_hub · issue #4802

Using transformers, datasets or diffusers? You're on 1.x for now

transformers 5.17.0requires huggingface_hub below 2.0
datasets 5.0.1requires huggingface_hub below 2.0
diffusers 0.40.0requires huggingface_hub below 2.0
sentence-transformers 6.1.0requires huggingface_hub below 2.0

transformers has merged 2.x support; datasets and diffusers have it in review.

If you mostly use Hugging Face through its other libraries, this doesn't reach you yet. As of September 28th, the newest releases of transformers, datasets, diffusers and sentence transformers all require huggingface_hub below 2.0, so installing them keeps you on 1.x. Hugging Face's plan is for those libraries to accept both versions. transformers has merged that change but hasn't released it yet, and it's still under review for datasets and diffusers.

Where to go

huggingface_hub 2.0
010203Where to go
huggingface_hub docs · Migrating to v2.0

The migration guide has every change

huggingface.co/docs/huggingface_hub › Migrating to v2.0

Release notes: github.com/huggingface/huggingface_hub › Releases › v2.0.0

For the exact changes, go to Hugging Face's own migration guide. It's in the huggingface_hub docs, under Migrating to v2.0, and it lists every removed feature with its replacement. The full release notes are on GitHub. That's huggingface_hub 2.0: a new HTTP library, the deprecated features gone, and most of the ecosystem on 1.x for now.