Change8

Migrating to HuggingFace Hub v0.30.0

Version v0.30.0 introduces 1 breaking change. This guide details how to update your code.

Released: 3/28/2025

1
Breaking Changes
3
Migration Steps
10
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

InferenceClient.zero_shot_classificationInferenceClient.zero_shot_image_classificationInferenceClienthuggingface_hub[hf_xet]HfApi.list_lfs_filesHfApi.permanently_delete_lfs_filesModelHubMixinhuggingface-cli uploadhuggingface-cli delete-cachecreate_inference_endpoint_from_catalog

Breaking Changes

Issue #1

The argument `labels` has been removed from `InferenceClient.zero_shot_classification` and `InferenceClient.zero_shot_image_classification` tasks. Use `candidate_labels` instead.

Migration Steps

  1. 1
    Install the optional dependency to enable Xet support: `pip install -U huggingface_hub[hf_xet]`.
  2. 2
    When using `InferenceClient.zero_shot_classification` or `InferenceClient.zero_shot_image_classification`, replace usage of the `labels` argument with `candidate_labels`.
  3. 3
    If you were explicitly setting `token=False` in `InferenceClient`, remove that argument.

Release Summary

This major release introduces Xet, a new protocol for storing large objects in Git, and significantly enhances the InferenceClient with new providers (Cerebras, Cohere, Novita) and organizational billing support. New features also include wildcard support for CLI uploads and programmatic LFS file management.

Need More Details?

View the full release notes and all changes for HuggingFace Hub v0.30.0.

View Full Changelog