You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Error with latest transformers: module 'transformers.utils.hub' has no attribute 'create_repo' #2916
However, it looks like you missed a few other functions. The latest transformers branch (5.5.0+) dropped the passthrough for several other Hugging Face Hub functions that gptqmodel/utils/hub.py still tries to re-export.
If you pull main right now, the import still crashes on list_repo_tree:
AttributeError: module 'transformers.utils.hub' has no attribute 'list_repo_tree'
To fully fix the transformers >= 5.5.0 compatibility, you'll need to update gptqmodel/utils/hub.py to import these directly from huggingface_hub as well:
list_repo_tree
hf_hub_download
has_file
cached_file (Note: depending on the transformers version, you might need to use huggingface_hub.hf_hub_download or try/except fallbacks for cached_file).
@selfhypnosis-ai Thanks for following up! Good news — list_repo_tree, hf_hub_download (and snapshot_download, create_repo) are already imported directly from huggingface_hub on current main of gptqmodel/utils/hub.py, so those crashes are resolved.
On cached_file and has_file — those two are a different case. They aren't huggingface_hub re-exports that transformers dropped; they're transformers-native helpers and are still defined in transformers.utils.hub on 5.5.0+ (cached_file and has_file are real defs in that module, not passthroughs). huggingface_hub itself has no cached_file/has_file symbol (it exposes hf_hub_download and file_exists instead), so re-pointing them at huggingface_hub would actually raise AttributeError on import. They should keep coming from transformers.utils.hub.
If you're still hitting an AttributeError on cached_file/has_file specifically, could you share the transformers version and full traceback? That would point to a genuinely different breakage rather than the re-export drop this issue was about.
@Anai-Guo Thanks for the clarification! You're completely right. I just double-checked my local monkey patch, and I only had to patch list_repo_tree, create_repo, and hf_hub_download to get things working. I incorrectly assumed cached_file and has_file were also dropped passthroughs, but since they are native to transformers.utils.hub, I wasn't actually getting an AttributeError for them.
The current fix on main mapping the first three to huggingface_hub covers everything. Thanks for looking into it and getting it resolved so quickly!
Activity
fix(hub): import create_repo from huggingface_hub (transformers dropp…
fix(hub): import create_repo from huggingface_hub (transformers dropp…
IlyasMoutawwakil commentedon Jun 4, 2026
@Qubitium will there be a patch soon ? optimum ci is also failing bcz of this 🙏
Qubitium commentedon Jun 4, 2026
@BenjaminBossan @IlyasMoutawwakil The issue has been fixed in
mainand will push a new release in the next 24 hours.selfhypnosis-ai commentedon Jun 5, 2026
@Qubitium @Anai-Guo Thanks for the quick fix on create_repo!
However, it looks like you missed a few other functions. The latest transformers branch (5.5.0+) dropped the passthrough for several other Hugging Face Hub functions that gptqmodel/utils/hub.py still tries to re-export.
If you pull main right now, the import still crashes on list_repo_tree:
AttributeError: module 'transformers.utils.hub' has no attribute 'list_repo_tree'
To fully fix the transformers >= 5.5.0 compatibility, you'll need to update gptqmodel/utils/hub.py to import these directly from huggingface_hub as well:
list_repo_tree
hf_hub_download
has_file
cached_file (Note: depending on the transformers version, you might need to use huggingface_hub.hf_hub_download or try/except fallbacks for cached_file).
Anai-Guo commentedon Jun 8, 2026
@selfhypnosis-ai Thanks for following up! Good news —
list_repo_tree,hf_hub_download(andsnapshot_download,create_repo) are already imported directly fromhuggingface_hubon currentmainofgptqmodel/utils/hub.py, so those crashes are resolved.On
cached_fileandhas_file— those two are a different case. They aren't huggingface_hub re-exports that transformers dropped; they're transformers-native helpers and are still defined intransformers.utils.hubon 5.5.0+ (cached_fileandhas_fileare realdefs in that module, not passthroughs).huggingface_hubitself has nocached_file/has_filesymbol (it exposeshf_hub_downloadandfile_existsinstead), so re-pointing them athuggingface_hubwould actually raiseAttributeErroron import. They should keep coming fromtransformers.utils.hub.If you're still hitting an
AttributeErroroncached_file/has_filespecifically, could you share the transformers version and full traceback? That would point to a genuinely different breakage rather than the re-export drop this issue was about.selfhypnosis-ai commentedon Jun 9, 2026
@Anai-Guo Thanks for the clarification! You're completely right. I just double-checked my local monkey patch, and I only had to patch list_repo_tree, create_repo, and hf_hub_download to get things working. I incorrectly assumed cached_file and has_file were also dropped passthroughs, but since they are native to transformers.utils.hub, I wasn't actually getting an AttributeError for them.
The current fix on main mapping the first three to huggingface_hub covers everything. Thanks for looking into it and getting it resolved so quickly!