maxtext
A simple, performant, and scalable Jax LLM!
What is maxtext?
A simple, performant, and scalable Jax LLM!
Overview of maxtext
What it is
MaxText is a high performance, highly scalable, open-source LLM library and reference implementation written in pure Python/JAX. It targets Google Cloud TPUs and GPUs for training. The project provides a library of high performance models including Gemma, Llama, DeepSeek, Qwen, and Mistral. MaxText supports pre-training (up to tens of thousands of chips) and scalable post-training with techniques like Supervised Fine-Tuning (SFT), Group Relative Policy Optimization (GRPO), and Group Sequence Policy Optimization (GSPO). It achieves high Model FLOPs Utilization (MFU) and tokens/second from single host to very large clusters. The project is hosted under the AI Hypercomputer GitHub organization.
Key features
- Written in pure Python/JAX and leverages the XLA compiler for optimization.
- Supports pre-training at scale (up to tens of thousands of chips) on Google Cloud TPUs and GPUs.
- Provides a library of models: Gemma, Llama, DeepSeek, Qwen, Mistral, and others.
- Supports post-training techniques: SFT, GRPO (a type of Reinforcement Learning), and GSPO (a type of Reinforcement Learning).
- Includes support for multi-modal training with Gemma 3, Gemma 4, and Llama 4 VLMs.
- Integrates with JAX AI libraries: Flax (neural networks), Tunix (post-training), Orbax (checkpointing), Optax (optimization), and Grain (dataloading).
- Available as a PyPI package; recommended Python version is 3.12.
Use cases
MaxText is intended for ambitious LLM projects in both research and production. Use cases include pre-training models from scratch, performing post-training (SFT, RL) on existing models, and experimenting with multi-modal training. The project serves as a reference implementation for experimentation, ideation, and inspiration. Users can fork and modify MaxText to train their own models, whether small dense models like Llama 8B or larger architectures.
Getting started
See the repository README for installation instructions. The recommended approach is to install MaxText from PyPI using pip. The README notes that customers should use the latest PyPI release or corresponding pre-built container images, while the main branch is not expected to be production-ready. Python 3.12 is the primary supported version.
License and pricing
The license is Apache-2.0. The project is open source and listed as open source with no stated pricing.
Based on the project's public README and repository metadata.