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.
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.
Get the full story
Sign up for Headlinne to unlock AI insights, political bias analysis, and your personalized news feed.
Create free accountAlready have an account? Sign in