huggingface/transformers · error · RuntimeError

None of the available devices `available_devices = {availabl

Error message

None of the available devices `available_devices = {available_devices or None}` are supported by the bitsandbytes version you have installed: `bnb_supported_devices = {bnb_supported_devices}`. Please check the docs to see if the backend you intend to use is available and how to install it: https://huggingface.co/docs/bitsandbytes/main/en/installation

What it means

Error "None of the available devices `available_devices = {available_devices or None}` are supported by the bitsandbytes version you have installed: `bnb_supported_devices = {bnb_supported_devices}`. Please check the docs to see if the backend you intend to use is available and how to install it: https://huggingface.co/docs/bitsandbytes/main/en/installation" thrown in huggingface/transformers.

Source

Thrown at src/transformers/integrations/bitsandbytes.py:345

            "For some reason the model has not been properly dequantized. You might see unexpected behavior."
        )
    return model


def validate_bnb_backend_availability(raise_exception=False):
    """
    Validates if the available devices are supported by bitsandbytes, optionally raising an exception if not.
    """
    bnb_supported_devices = getattr(bnb, "supported_torch_devices", set())
    available_devices = set(get_available_devices())

    if not available_devices.intersection(bnb_supported_devices):
        if raise_exception:
            err_msg = (
                f"None of the available devices `available_devices = {available_devices or None}` are supported by the bitsandbytes version you have installed: `bnb_supported_devices = {bnb_supported_devices}`. "
                "Please check the docs to see if the backend you intend to use is available and how to install it: https://huggingface.co/docs/bitsandbytes/main/en/installation"
            )
            raise RuntimeError(err_msg)

        logger.warning("No supported devices found for bitsandbytes")
        return False
    return True

View on GitHub (pinned to a597f97485)

Solutions

  1. Install a bitsandbytes build that supports your available devices (see its installation docs).
  2. Run on a device supported by the installed bitsandbytes version.

When it happens

Trigger: Raised in bitsandbytes device compatibility check when no available device is supported by the installed bnb build.

Common situations: bitsandbytes built without support for the current hardware (e.g. no CUDA build on a CUDA-only model load).


AI-assisted analysis of huggingface/transformers@a597f97485 (2026-08-14). Data as JSON: /api/errors/60ee215e50846606. Report an issue: GitHub.