Skip to main content
Ctrl+K
This site covers the new Flax NNX API. [Click here for the old Flax Linen API]
 - Home  - Home
  • Flax basics
  • MNIST tutorial
  • Why Flax NNX?
  • JAX/Flax Key Concepts
  • Basic Guides
    • Module & Pytree
    • Transformations
    • Model Views
    • Filters
    • Randomness
    • Save and load checkpoints
    • Data Loaders
    • Flax NNX vs JAX transformations
  • Advanced Guides
    • Scale up on multiple devices
    • Performance considerations
    • Use Flax NNX and Linen together
    • Model surgery
    • Extracting intermediate values
    • A Flax Optimization Cookbook
  • Post-training (Tunix)
  • Hijax (experimental)
    • Hijax
  • Migrating
    • From PyTorch to Jax and Flax
    • NNX 0.10 to NNX 0.11
    • Flax Linen to Flax NNX
    • Haiku to Flax NNX
  • Examples
    • Example: Using pretrained Gemma for inference with Flax NNX
    • Example: Train a diffusion model for image generation
    • Train a miniGPT language model with JAX
    • Example: Train a Vision Transformer (ViT) for image classification
    • Example: Image segmentation with UNETR model
  • Flax NNX glossary
  • The Flax philosophy
  • How to contribute
  • API Reference
    • flax.nnx
      • graph
      • compat
      • object
      • module
      • nn
        • Activation functions
        • Attention
        • Dtypes
        • Initializers
        • Linear
        • LoRA
        • Normalization
        • Pooling functions
        • Recurrent
        • Stochastic
      • rnglib
      • spmd
      • state
      • training
        • Metrics
        • Optimizer
        • EMA
      • transforms
      • variables
      • helpers
      • visualization
      • filterlib
      • bridge
    • flax.core.frozen_dict package
    • flax.struct package
    • flax.training package
  • .rst

Advanced Guides

Advanced Guides#

Advanced

  • Scale up on multiple devices
  • Performance considerations
  • Use Flax NNX and Linen together
  • Model surgery
  • Extracting intermediate values
  • A Flax Optimization Cookbook
  • Exponential Moving Average
  • Low Rank Adaptation
  • LBFGS
  • Per-Parameter Learning Rates
  • Gradient Accumulation
  • Sharding Optimization State Differently from Parameters

previous

Flax NNX vs JAX transformations

next

Scale up on multiple devices

By The Flax authors

© Copyright 2023-Present, The Flax authors.