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

1 month 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 about 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
  1. 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.

    Slide text
    01 02 03 What shipped
    huggingface/huggingface_hub · GitHub release v2.0.0 · PyPI
    Hugging Face
    Released September 24, 2026 Major version Breaks some 1.x code
  2. 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.

    Slide text
    huggingface_hub 2.0
    01 02 03 What shipped
    huggingface/huggingface_hub · GitHub release v2.0.0

    Two changes, both breaking

    A new HTTP library httpx is replaced by its successor, httpx2
    Deprecated features removed everything marked deprecated during 1.x is gone
  3. 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.

    Slide text
    huggingface_hub 2.0
    01 02 03 What 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.

  4. 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.

    Slide text
    huggingface_hub 2.0
    01 02 03 Who it affects
    huggingface_hub docs · Migrating to v2.0
    Code that calls huggingface_hub directly especially code that handles its network errors or builds its own HTTP client
    Scripts that use features deprecated in 1.x including every huggingface-cli command
    Certificate settings the default now comes from your operating system; custom bundles still work
  5. 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.

    Slide text
    huggingface_hub 2.0
    01 02 03 Who 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.0 requires huggingface_hub below 2.0
    datasets 5.0.1 requires huggingface_hub below 2.0
    diffusers 0.40.0 requires huggingface_hub below 2.0
    sentence-transformers 6.1.0 requires huggingface_hub below 2.0

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

  6. 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.

    Slide text
    huggingface_hub 2.0
    01 02 03 Where 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

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York