maxtext logo

maxtext

Free

A simple, performant and scalable Jax LLM!

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About maxtext

MaxText is a high-performance, highly scalable, open-source LLM library and reference implementation written in pure Python/JAX, targeting Google Cloud TPUs and GPUs for training. It provides a library of high-performance models including Gemma, Llama, DeepSeek, Qwen, and Mistral (with newer models such as Qwen3, Kimi-K2, and GPT-OSS added regularly). MaxText supports pre-training at scale (up to tens of thousands of chips) and scalable post-training using techniques like Supervised Fine-Tuning (SFT), Group Relative Policy Optimization (GRPO), and Group Sequence Policy Optimization (GSPO). The library achieves high Model FLOPs Utilization (MFU) and tokens/second from single-host to very large clusters while remaining simple and largely optimization-free due to the power of JAX and the XLA compiler. It serves as a launching point for ambitious LLM projects in both research and production. MaxText is open source on GitHub under the AI-Hypercomputer organization.

Key Features

High performance and highly scalable LLM library written in pure Python/JAX
Targets Google Cloud TPUs and GPUs for training, capable of scaling to tens of thousands of chips
Supports multiple high-performance models: Gemma, Llama, DeepSeek, Qwen, Mistral, Kimi-K2, Qwen3, and more
Pre-training and post-training support including SFT, GRPO, and GSPO reinforcement learning
Achieves high Model FLOPs Utilization (MFU) and tokens/second across clusters
Optimization-free experience leverages JAX and XLA compiler for performance
Open source with active development and community contributions

Pros & Cons

Pros
  • High performance and scalability from single host to thousands of chips
  • Supports a wide range of popular LLM architectures out of the box
  • Advanced training techniques (SFT, GRPO, GSPO) integrated for post-training
  • Simple and optimization-free code thanks to JAX and XLA compiler
  • Open source with permissive license and active development
  • Works on both TPUs and GPUs on Google Cloud
Cons
  • Primary support is for Python 3.12; other Python versions may encounter compatibility issues
  • Optimized for Google Cloud TPU/GPU hardware, which may limit portability to other environments
  • Requires familiarity with JAX and distributed training concepts for best use
  • Breaking changes occasionally (e.g., removal of legacy post-training shims) require migration

Best For

Pre-training large language models at massive scale on TPU/GPU clustersFine-tuning LLMs with supervised fine-tuning (SFT) for task-specific adaptationReinforcement learning from human feedback or other reward signals using GRPO and GSPOResearch and experimentation with state-of-the-art LLM architecturesProduction deployment of custom LLMs requiring high throughput and performance

FAQ

What is MaxText?
MaxText is a high-performance, open-source LLM library and reference implementation written in pure Python/JAX, designed for training and post-training large language models on Google Cloud TPUs and GPUs.
Which models are supported in MaxText?
MaxText supports a library of high-performance models including Gemma, Llama, DeepSeek, Qwen, Mistral, Kimi-K2, Qwen3, GPT-OSS, and more, with new models added regularly.
What training techniques does MaxText support?
MaxText supports pre-training and scalable post-training including Supervised Fine-Tuning (SFT), Group Relative Policy Optimization (GRPO), and Group Sequence Policy Optimization (GSPO).
What hardware does MaxText target?
MaxText is built for Google Cloud TPUs and GPUs, and can scale from a single host to very large clusters (tens of thousands of chips).
Is MaxText free and open source?
Yes, MaxText is open source under a permissive license and is available on GitHub free of charge.