All Tools
H
OtherFreeOpen Source
HAIKU
Simple neural network building blocks for JAX
Apache-2.0
ABOUT
JAX's pure-functional, transform-based approach is powerful but requires boilerplate — managing parameter collections, random state, and model initialization manually. Haiku provides a familiar object-oriented API (hiking.Module) on top of JAX that feels like PyTorch or Sonnet but composes cleanly with JAX transforms. It handles parameter initialization, random key splitting, and module wiring automatically while preserving full access to JAX's jit, vmap, pmap, and grad transforms. The result is cleaner code for research-scale neural network experiments in JAX.
INSTALL
pip install dm-haikuINTEGRATION GUIDE
1. Build a transformer encoder with Haiku's Module API and train it end-to-end with JAX's grad and jit transforms
2. Implement a custom neural network layer that composes with vmap for efficient batch processing
3. Prototype a deep reinforcement learning policy network with stochastic modules and parameter sharing
4. Experiment with different network architectures by swapping Haiku module configurations in a training loop
5. Train a large-scale model across multiple TPUs using Haiku modules with JAX's pmap gradient aggregation
TAGS
pythonjaxneural-networksdeep-learningdeepmindfunctional