google/flax

Flax is a neural network library for JAX that is designed for flexibility.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 32 minutes ago
Added to GitGenius on September 17th, 2024
Created on January 10th, 2020
Open Issues & Pull Requests: 510 (+0)
Number of forks: 831
Total Stargazers: 7,300 (+0)
Total Subscribers: 81 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 22.9 hours
Mean response time: 45.1 days
90th percentile: 23.9 days
Tracked items: 314

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 93% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "Priority: P1 - soon" is answered fastest, typically in about 2 days, while "Priority: P2 - no schedule" waits about 5 weeks. Only 6% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 198
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 718 days
Stale 30+ days: 193
Stale 90+ days: 186

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 4
Events in 7 days: 4

Top labels

  • Priority: P2 - no schedule (186)
  • Priority: P1 - soon (96)
  • Status: pull requests welcome (45)
  • needs-discussion (9)
  • Priority: P0 (urgent) (8)
  • FLIP (4)
  • Status: blocked (4)
  • awaiting response (3)

Most active issues this week

Detailed Description

Flax is a neural network library built on top of JAX that prioritizes flexibility and ease of use for machine learning research. Developed by Google DeepMind in close collaboration with the JAX team, Flax provides researchers with tools to experiment with novel training approaches by modifying training loops rather than extending framework features. The library is written primarily in Jupyter Notebook and serves both internal Alphabet teams and the broader JAX research community.

The project released Flax NNX in 2024 as a simplified API designed to make neural network creation, inspection, debugging, and analysis more straightforward. Flax NNX introduces first-class support for Python reference semantics, allowing users to express models using regular Python objects with reference sharing and mutability. This represents an evolution from the Flax Linen API, which was released in 2020 and remains available with its own documentation site. The team has committed to avoiding significant breaking changes to the core API, using changelog entries and deprecation warnings when modifications are necessary.

The neural network API includes standard components such as Linear and Conv layers, normalization techniques like BatchNorm, LayerNorm, and GroupNorm, attention mechanisms including MultiHeadAttention, recurrent cells such as LSTMCell and GRUCell, and regularization through Dropout. Beyond core layers, Flax provides utilities and patterns for replicated training, serialization and checkpointing, metrics tracking, and device-level prefetching. Educational examples demonstrate practical usage through MNIST tutorials and inference with the Gemma language model transformer.

The repository overlaps contributors with github/gh-aw, solo-io/gloo, and longhorn/longhorn projects.

Flax is classified across multiple domains including functional programming, modeling frameworks, automatic differentiation, customization capabilities, transformer models, model training, deep learning, and scalable machine learning. The library emphasizes PyTorch-like API design while leveraging JAX's functional programming paradigm, supporting research use cases including federated learning and tensor operations. Installation requires Python 3.8 or later and JAX, with optional dependencies available for additional functionality like matplotlib. The team actively coordinates through GitHub discussions, issues, and pull requests, welcoming feature requests and community feedback at [email protected].