AI-Hypercomputer/maxtext

A simple, performant, and scalable Jax LLM!

What it solves

MaxText is designed to provide a high-performance, scalable reference implementation for training Large Language Models (LLMs). It addresses the challenge of achieving high Model FLOPs Utilization (MFU) and throughput (tokens/second) across a wide range of hardware, from single hosts to massive clusters of Google Cloud TPUs and GPUs, while keeping the codebase simple and "optimization-free."

How it works

Written in pure Python and JAX, MaxText leverages the XLA compiler to optimize performance. It integrates with a suite of JAX AI libraries including Flax (neural networks), Tunix (post-training), Orbax (checkpointing), Optax (optimization), and Grain (dataloading). The library supports both pre-training from scratch and scalable post-training using techniques like Supervised Fine-Tuning (SFT) and Reinforcement Learning (GRPO and GSPO).

Who it’s for

It is intended for researchers and developers building ambitious LLM projects in both research and production environments who need a scalable, high-performance framework for training and fine-tuning popular open-source models.

Highlights

  • Broad Model Support: Includes reference implementations for Gemma, Llama, DeepSeek, Qwen, and Mistral, including MoE (Mixture of Experts) and multimodal models.
  • Scale: Supports pre-training on up to tens of thousands of chips.
  • Post-Training Framework: Provides a scalable framework via Tunix for SFT and RL (using vLLM for sampling).
  • Hardware Optimization: Specifically targeted at Google Cloud TPUs and GPUs for maximum efficiency.
  • Multimodal Capabilities: Supports multimodal training for Gemma 3, Gemma 4, and Llama 4 VLMs.

Related

  • Project
  • Project
  • Project
  • Project
  • Project