exo-explore/exo · error · ValueError

Unsupported mlx dtype on wire: {dtype}

Error message

Unsupported mlx dtype on wire: {dtype}

What it means

Error "Unsupported mlx dtype on wire: {dtype}" thrown in exo-explore/exo.

Source

Thrown at src/exo/worker/engines/mlx/disaggregated/adapter.py:38

    write_done,
    write_header,
    write_kv_chunk,
)
from exo.worker.engines.mlx.types import KVCacheType
from exo.worker.runner.bootstrap import logger

_STR_TO_MX: dict[DType, mx.Dtype] = {
    "bfloat16": mx.bfloat16,
    "float16": mx.float16,
    "float32": mx.float32,
}

_MX_TO_STR: dict[mx.Dtype, DType] = {v: k for k, v in _STR_TO_MX.items()}


def mx_dtype_to_str(dtype: mx.Dtype) -> DType:
    if dtype not in _MX_TO_STR:
        raise ValueError(f"Unsupported mlx dtype on wire: {dtype}")
    return _MX_TO_STR[dtype]


def wire_dtype_from_cache(caches: KVCacheType) -> DType:
    for c in caches:
        keys: mx.array | None = getattr(c, "keys", None)
        if keys is None:
            continue
        if keys.dtype in _MX_TO_STR:
            return _MX_TO_STR[keys.dtype]
        break
    return "bfloat16"


def str_to_mx_dtype(dtype: DType) -> mx.Dtype:
    if dtype not in _STR_TO_MX:
        raise ValueError(f"Unsupported wire dtype: {dtype!r}")
    return _STR_TO_MX[dtype]

View on GitHub (pinned to 21a54c5ea0)

When it happens

Trigger: Thrown at src/exo/worker/engines/mlx/disaggregated/adapter.py:38 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of exo-explore/exo@21a54c5ea0 (2026-08-26). Data as JSON: /api/errors/841856d0c08abe09. Report an issue: GitHub.