{"slug": "modulenotfounderror-no-module-named-huggingface-hub-inference-types", "title": "ModuleNotFoundError: No module named 'huggingface_hub.inference._types'", "summary": "A static comparison of the published huggingface-hub 0.27.0 wheel against its pinned v0.27.0 source (commit 6bfa5dd44d0472909dc778d30fbaac92e84ff96e) found that the module path huggingface_hub.inference._types, imported by LlamaIndex's Hugging Face LLM integration, is absent from both, so the wheel did not simply omit a file present in the matching source. The analysis, prepared with AI assistance using a Yumi import-layout checker without installing or executing package code, notes the installed versions were not supplied and the archival snapshots do not establish a working replacement combination. It recommends capturing versions via pip show for huggingface-hub, llama-index-llms-huggingface and llama-index-core plus pip check, then selecting compatible versions from the integration's dependency constraints rather than a blanket Hub downgrade.", "body_md": "The traceback points to the LlamaIndex/Hugging Face integration importing `huggingface_hub.inference._types`. Changing the quantization configuration alone would not address that import.\n\nAn archival [LlamaIndex v0.10.0 integration file](https://github.com/run-llama/llama_index/blob/2b6a46d8498b2259fc84385c1167e0b7b3c0fa87/llama-index-integrations/llms/llama-index-llms-huggingface/llama_index/llms/huggingface/base.py#L8) contains the exact line:\n\n``` python\nfrom huggingface_hub.inference._types import ConversationalOutput\n```\n\nWe checked the published `huggingface-hub==0.27.0` wheel against its pinned v0.27.0 source (`huggingface/huggingface_hub` commit `6bfa5dd44d0472909dc778d30fbaac92e84ff96e`, under `src/`). Their complete Python-file layouts match, and that module path is absent from both. For these selected snapshots, the integration expects an unavailable module; the wheel hasn’t simply omitted a Python file present in the matching source.\n\nThis is an older question, and the installed versions weren’t supplied. These archival snapshots don’t establish your original environment or a working replacement combination. This reply was prepared with AI assistance; we used our [Yumi import-layout checker](https://noqt.no-qt.chatgpt.site/yumi/python-import-layout) for the static comparison, without installing or executing package code.\n\nTo choose a repair, first capture versions from the notebook’s actual Python environment:\n\n``` python\nimport sys\nimport subprocess\n\nsubprocess.run([\n    sys.executable, \"-m\", \"pip\", \"show\",\n    \"huggingface-hub\", \"llama-index-llms-huggingface\", \"llama-index-core\"\n])\nsubprocess.run([sys.executable, \"-m\", \"pip\", \"check\"])\n```\n\nUse the integration’s dependency constraints and documentation to select compatible integration/Hub versions, restart the kernel after installation changes, and test the import before loading the model. A clean dependency check alone doesn’t prove the import works, and this traceback doesn’t justify a blanket Hub downgrade.", "url": "https://wpnews.pro/news/modulenotfounderror-no-module-named-huggingface-hub-inference-types", "canonical_source": "https://discuss.huggingface.co/t/modulenotfounderror-no-module-named-huggingface-hub-inference-types/132503#post_2", "published_at": "2026-11-15 07:07:23+00:00", "updated_at": "2026-11-15 07:22:09.483444+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models"], "entities": ["LlamaIndex", "Hugging Face", "huggingface-hub", "llama-index-llms-huggingface", "llama-index-core", "Yumi"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/modulenotfounderror-no-module-named-huggingface-hub-inference-types", "markdown": "https://wpnews.pro/news/modulenotfounderror-no-module-named-huggingface-hub-inference-types.md", "text": "https://wpnews.pro/news/modulenotfounderror-no-module-named-huggingface-hub-inference-types.txt", "jsonld": "https://wpnews.pro/news/modulenotfounderror-no-module-named-huggingface-hub-inference-types.jsonld"}}