← all repositories
google/trax

Google Brain’s deep-learning kit that looks like NumPy, runs like JAX

An end-to-end deep learning library that treats every tensor operation as NumPy, then compiles it to GPUs and TPUs via JAX.

trax
Not currently ranked — collecting fresh signals.
star history

What it does Trax is Google Brain’s end-to-end deep learning framework. It provides composable layers—Serial, Branch, and primitives like Embedding or Dense—that stack into models such as Transformers, ResNets, and LSTMs. It also bundles reinforcement-learning algorithms including PPO, A2C, and AWR, and can pull data from TensorFlow Datasets or Tensor2Tensor.

The interesting bit The framework’s trax.fastmath module exposes a NumPy-compatible API and quietly swaps in JAX or TensorFlow NumPy as the backend. That means you write ordinary fastnp.dot and fastnp.tanh calls, but gradients and accelerator support arrive without extra ceremony. Models are initialized with an input signature and then called like functions, so the boundary between “building” and “running” is almost invisible.

Key highlights

  • Actively maintained by Google Brain and used to develop architectures like the Reformer.
  • One-line backend switching between JAX and TensorFlow NumPy.
  • Ships with pre-trained weights, including an English-German Transformer.
  • Runs the same code on CPU, GPU, and TPU.
  • Includes RL algorithms (REINFORCE, A2C, PPO, AWR) alongside supervised models.

Verdict Worth a look if you want readable, research-grade deep learning with first-class JAX integration and pre-built models. Skip it if you are heavily invested in PyTorch ecosystems and prefer imperative debugging over functional layer composition.

Frequently asked

What is google/trax?
An end-to-end deep learning library that treats every tensor operation as NumPy, then compiles it to GPUs and TPUs via JAX.
Is trax open source?
Yes — google/trax is open source, released under the Apache-2.0 license.
What language is trax written in?
google/trax is primarily written in Python.
How popular is trax?
google/trax has 8.3k stars on GitHub.
Where can I find trax?
google/trax is on GitHub at https://github.com/google/trax.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.