exo-explore/exo · error · ValueError
Unsupported mlx dtype for wire: {t.dtype}
Error message
Unsupported mlx dtype for wire: {t.dtype} What it means
Error "Unsupported mlx dtype for wire: {t.dtype}" thrown in exo-explore/exo.
Source
Thrown at src/exo/worker/engines/mlx/disaggregated/adapter.py:65
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]
def array_to_bytes(t: mx.array) -> bytes:
# bf16 has no native numpy dtype; bitcast through uint16.
if t.dtype == mx.bfloat16:
return np.asarray(t.view(mx.uint16)).tobytes()
if t.dtype in (mx.float16, mx.float32):
return np.asarray(t).tobytes()
raise ValueError(f"Unsupported mlx dtype for wire: {t.dtype}")
def bytes_to_array(data: bytes, shape: tuple[int, ...], dtype: DType) -> mx.array:
match dtype:
case "bfloat16":
arr = np.frombuffer(data, dtype=np.uint16).reshape(shape).copy()
return mx.array(arr).view(mx.bfloat16)
case "float16":
arr = np.frombuffer(data, dtype=np.float16).reshape(shape).copy()
return mx.array(arr)
case "float32":
arr = np.frombuffer(data, dtype=np.float32).reshape(shape).copy()
return mx.array(arr)
def bhsd_to_nhd(t: mx.array) -> mx.array:
if t.ndim != 4 or int(t.shape[0]) != 1:
raise ValueError(f"Expected BHSD with B=1, got shape={tuple(t.shape)}")View on GitHub (pinned to 21a54c5ea0)
When it happens
Trigger: Thrown at src/exo/worker/engines/mlx/disaggregated/adapter.py:65 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/0a3163224326d5ba.
Report an issue: GitHub.