--- id: ml-dtypes version: "0.6.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # ml-dtypes — ml_dtypes is a stand-alone implementation of several NumPy dtype extensions used in machine learning. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install ml-dtypes uv add ml-dtypes poetry add ml-dtypes ## Description # ml_dtypes [![Unittests](https://github.com/jax-ml/ml_dtypes/actions/workflows/test.yml/badge.svg)](https://github.com/jax-ml/ml_dtypes/actions/workflows/test.yml) [![Wheel Build](https://github.com/jax-ml/ml_dtypes/actions/workflows/wheels.yml/badge.svg)](https://github.com/jax-ml/ml_dtypes/actions/workflows/wheels.yml) [![PyPI version](https://badge.fury.io/py/ml_dtypes.svg)](https://badge.fury.io/py/ml_dtypes) `ml_dtypes` is a stand-alone implementation of several NumPy dtype extensions used in machine learning libraries, including: - [`bfloat16`](https://en.wikipedia.org/wiki/Bfloat16_floating-point_format): an alternative to the standard [`float16`](https://en.wikipedia.org/wiki/Half-precision_floating-point_format) format - 8-bit floating point representations, parameterized by number of exponent and mantissa bits, as well as the bias (if any) and representability of infinity, NaN, and signed zero. * `float8_e3m4` * `float8_e4m3` * `float8_e4m3b11fnuz` * `float8_e4m3fn` * `float8_e4m3fnuz` * `float8_e5m2` * `float8_e5m2fnuz` * `float8_e8m0fnu` - Microscaling (MX) sub-byte floating point representations: * `float4_e2m1fn` * `float6_e2m3fn` *... ## AI interpretation — verify before relying ml_dtypes provides NumPy-compatible data types for machine learning, including bfloat16, 8-bit floats (float8_e5m2, float8_e4m3, etc.), 4–6-bit microscaling formats, and narrow integers (int1–int4, uint1–uint4). Verdict: A well-maintained, actively developed library for low-precision ML dtypes with broad platform support and no known vulnerabilities. Apache-2.0 licensing is permissive. Medium install friction is typical for compiled extensions; suitable for ML workflows that need bfloat16 or float8 support in NumPy. [View on SkillFed](https://skillfed.io/packages/ml-dtypes) · [View on PyPI](https://pypi.org/project/ml-dtypes/)