Defining new Jax types with hijax
The article introduces 'hijax,' an experimental feature in the JAX machine learning library that allows developers to define custom data types. This enables more complex data structures to be treated as single entities rather than collections of arrays, improving control over derivatives and sharding.
Why it matters
This advancement provides researchers and engineers with greater flexibility in building specialized machine learning models, particularly for quantized or non-standard data types.
JAX’s built-in currency is the array: functions you transform take arrays in and produce arrays out, and every intermediate the tracing machinery sees has an array type like f32[3,4] . When you want to work with aggregate data, the usual tool is a pytree : you bundle arrays into containers, and JAX transparently flattens the bundle into its array leaves at every boundary.
Technical documentation with no political or social agenda.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in