# ModuleNotFoundError: No module named 'huggingface_hub.inference._types'

> Source: <https://discuss.huggingface.co/t/modulenotfounderror-no-module-named-huggingface-hub-inference-types/132503#post_2>
> Published: 2026-11-15 07:07:23+00:00

The traceback points to the LlamaIndex/Hugging Face integration importing `huggingface_hub.inference._types`. Changing the quantization configuration alone would not address that import.

An 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:

``` python
from huggingface_hub.inference._types import ConversationalOutput
```

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

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

To choose a repair, first capture versions from the notebook’s actual Python environment:

``` python
import sys
import subprocess

subprocess.run([
    sys.executable, "-m", "pip", "show",
    "huggingface-hub", "llama-index-llms-huggingface", "llama-index-core"
])
subprocess.run([sys.executable, "-m", "pip", "check"])
```

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