NOTE: We recommend running MaxText with Python 3.12, as it is our primary supported version. Other Python versions may encounter compatibility issues.
MaxText is a high performance, highly scalable, open-source LLM library and reference implementation written in pure Python/JAX and targeting Google Cloud TPUs and GPUs for training.
MaxText provides a library of high performance models to choose from, including Gemma, Llama, DeepSeek, Qwen, and Mistral. For each of these models, MaxText supports pre-training (up to tens of thousands of chips) and scalable post-training, with popular techniques like Supervised Fine-Tuning (SFT) and Group Relative Policy Optimization (GRPO, a type of Reinforcement Learning) and Group Sequence Policy Optimization (GSPO, a type of Reinforcement Learning).
MaxText achieves high Model FLOPs Utilization (MFU) and tokens/second from single host to very large clusters while staying simple and largely "optimization-free" thanks to the power of JAX and the XLA compiler.
MaxText is the launching point for ambitious LLM projects both in research and production. We encourage you to start by experimenting with MaxText out of the box and then fork and modify MaxText to meet your needs.
Check out our Read The Docs site or directly Get Started with your first MaxText run. If you’re interested in Diffusion models (Wan 2.1, Flux, etc), see the MaxDiffusion repository in our AI Hypercomputer GitHub organization.
See our installation guide to install MaxText with pip from PyPI.
See our guide on running MaxText in decoupled mode, without any GCP dependencies in Decoupled Mode Guide.
num_vocab_tiling to unlock more efficient memory usage.src layout as part of RESTRUCTURE.md. For existing environments, please run pip install -e . from MaxText root.MaxText provides a library of models and demonstrates how to perform pre-training or post-training with high performance and scale.
MaxText leverages JAX AI libraries and presents a cohesive and comprehensive demonstration of training at scale by using Flax (neural networks), Tunix (post-training), Orbax (checkpointing), Optax (optimization), and Grain (dataloading).
In addition to pure text-based LLMs, we also support multi-modal training with Gemma 3 and Llama 4 VLMs.
If you’re building models from scratch, MaxText can serve as a reference implementation for experimentation, ideation, and inspiration - just fork and modify MaxText to train your model, whether it’s a small dense model like Llama 8B, or a large MoE like DeepSeek-V3. Experiment with configs and model design to build the most efficient model on TPU or GPU.
MaxText provides opinionated implementations for how to achieve optimal performance across a wide variety of dimensions like sharding, quantization, and checkpointing.
If you are post-training a model, whether it is proprietary or open source, MaxText provides a scalable framework using Tunix. For RL (like GRPO), we leverage vLLM for sampling and Pathways (soon) for multi-host.
Our goal is to provide a variety of models (dimension “a”) and techniques (dimension “b”), so you can easily explore (a) * (b) combinations and efficiently train the perfect model for your use case.
Check out these getting started guides:
MaxText aims to provide you with the best OSS models, whether as a reference implementation, or to post-train and then serve with vLLM.
Supported JAX models in MaxText
Please join our Discord Channel and if you have feedback, you can file a feature request, documentation request, or bug report here.
$ claude mcp add maxtext \
-- python -m otcore.mcp_server <graph>