News for hackers. Stuff that matters.
Re:Training Deep Networks with Data Parallelism in Jax by patrickkidger on Friday February 24, 2023 @07:48PM (#34932459)
It sounds like you're concerned about how downstream libraries tend to wrap JAX transformations to handle their own thing? (E.g. `haiku.grad`.)

If so, then allow me to make my usual advert here for Equinox:

https://github.com/patrick-kidger/equinox

This actually works with JAX's native transformations. (There's no `equinox.vmap` for example.)

On higher-order functions more generally, Equinox offers a way to control these quite carefully, by making ubiquitous use of callables that are also pytrees. E.g. a neural network is both a callable in that it has a forward pass, and a pytree in that it records its parameters in its tree structure.

Re:Training Deep Networks with Data Parallelism in Jax by 6gvONxR4sf7o on Friday February 24, 2023 @11:26PM (#34933893)
As a matter of fact, you’re preaching to the choir! Equinox is my go-to library for jax NN work!