Need smaller numeric representations for deep learning or inference? float16 provides a 16-bit floating-point type that trades precision for lower-precision computation. JAX exposes it through jax.numpy and treats it alongside float32, float64, and bfloat16. section 3.3.2
Create a float16 array by passing dtype=jnp.float16, then inspect its dtype. Lower-precision inference is generally easier than lower-precision training, so the choice belongs in the context of the workload. section 3.3.2
Mixing 16-bit types
x16 = jnp.array(range(10), dtype=jnp.float16)\nxb16 = jnp.array(range(10), dtype=jnp.bfloat16)\nxb16 + x16\n# Array([...], dtype=float32)\n\nJAX promotes the mixed operation to float32, while adding two bfloat16 arrays preserves bfloat16.
