flax  by google

NN library for JAX, designed for flexibility in neural network research

Created 5 years ago
6,806 stars

Top 7.6% on SourcePulse

GitHubView on GitHub
Project Summary

Flax is a neural network library and ecosystem for JAX, designed for flexibility and ease of use in research. It targets researchers and developers working with JAX, offering a Pythonic API for building, inspecting, and debugging neural networks, with benefits like simplified state management and mutability.

How It Works

Flax NNX, the latest iteration, introduces first-class support for Python reference semantics, allowing models to be expressed as regular Python objects. This enables natural reference sharing and mutability, simplifying complex model architectures and state management compared to more rigid functional approaches. It builds upon the earlier Flax Linen API, integrating core neural network components and utilities for distributed training and serialization.

Quick Start & Requirements

Highlighted Details

  • Offers a comprehensive neural network API including Linear, Conv, BatchNorm, LayerNorm, Attention, LSTMCell, and GRUCell.
  • Includes utilities for replicated training, serialization, checkpointing, metrics, and on-device prefetching.
  • Provides educational examples such as MNIST, Gemma language model inference, and Transformer LM1B.
  • Developed in close collaboration with the JAX team.

Maintenance & Community

Licensing & Compatibility

  • Apache 2.0 License.
  • Permissive license suitable for commercial use and integration into closed-source projects.

Limitations & Caveats

The project is actively developed, with NNX being a newer API. While the core API is expected to remain stable, users should be aware of potential evolution and follow changelogs for any deprecations or minor breaking changes.

Health Check
Last Commit

18 hours ago

Responsiveness

1 day

Pull Requests (30d)
52
Issues (30d)
19
Star History
65 stars in the last 30 days

Explore Similar Projects

Starred by Théophile Gervet Théophile Gervet(Cofounder of Genesis AI), Jason Knight Jason Knight(Director AI Compilers at NVIDIA; Cofounder of OctoML), and
6 more.

lingua by facebookresearch

0.1%
5k
LLM research codebase for training and inference
Created 11 months ago
Updated 2 months ago
Starred by Clement Delangue Clement Delangue(Cofounder of Hugging Face), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
20 more.

accelerate by huggingface

0.3%
9k
PyTorch training helper for distributed execution
Created 4 years ago
Updated 1 day ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Li Jiang Li Jiang(Coauthor of AutoGen; Engineer at Microsoft), and
26 more.

ColossalAI by hpcaitech

0.1%
41k
AI system for large-scale parallel training
Created 3 years ago
Updated 14 hours ago
Feedback? Help us improve.