Maxtext

A simple, performant and scalable Jax LLM!

Last verified:

Visit Maxtext

What is Maxtext?

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 and inference. It was initiated by Google as an open-source project to enable efficient large language model training at scale, achieving high Model FLOPs Utilization (MFU) and tokens/second from single host to very large clusters while staying simple and largely

Maxtext pricing

Pricing model: Freemium

MaxText is a free and open-source project with no paid tiers. It is released under an open-source license and hosted on GitHub with documentation on ReadTheDocs. There are no subscription plans or commercial licensing fees. Users only incur costs for the compute infrastructure (Google Cloud TPUs/GPUs or NVIDIA GPUs) they use to run training and inference.

Maxtext pros

  • High performance with optimized Model FLOPs Utilization (MFU)
  • Highly scalable from single host to very large clusters
  • Open-source and free to use
  • Written in pure Python/JAX for simplicity
  • Targets Google Cloud TPUs and NVIDIA GPUs
  • Optimization-free thanks to JAX and XLA compiler
  • Supports pre-training and full fine-tuning
  • Includes reference implementations for Llama 2, 3, 3.1
  • Supports Mistral and Mixtral models
  • Supports Gemma and Gemma2 models
  • Supports DeepSeek and Qwen models
  • Supports GPT architecture
  • Includes RL algorithms like GRPO
  • Supports SFT and Knowledge Distillation
  • Comprehensive documentation on ReadTheDocs
  • Supports dense and MoE models up to trillion parameters
  • Automatic sharding across devices
  • Production-oriented training and optimization
  • Reproducible examples for research and production
  • PyPI package for easy installation

Maxtext cons

  • Does not support PEFT/LoRA
  • Does not support Supervised Fine Tuning (SFT) as PEFT
  • Does not support RLHF directly
  • TPU-focused may limit GPU-only users
  • Steep learning curve for JAX beginners
  • Primarily optimized for Google Cloud infrastructure
  • Limited to pre-training and full fine-tuning only
  • Complex codebase with many abstractions
  • Requires Python virtual environment setup
  • May have compatibility issues with non-standard Python versions

Frequently asked questions about Maxtext

What is MaxText?

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 and inference. It is a Google-initiated open source project that achieves high Model FLOPs Utilization and scales from single host to very large clusters while staying simple and optimization-free thanks to JAX and the XLA compiler.

What models does MaxText support?

MaxText provides highly optimized reference implementations for popular open-source models including Llama 2, Llama 3, Llama 3.1, Mistral, Mixtral, Gemma, Gemma2, GPT, DeepSeek, and Qwen. It supports both dense and mixture-of-experts models up to the order of trillion parameters.

What training tasks does MaxText support?

MaxText supports pre-training and full fine-tuning of models. It provides a scalable framework to fine-tune proprietary or OSS models using state-of-the-art Reinforcement Learning algorithms like GRPO and techniques including SFT and Knowledge Distillation. However, it does not support PEFT/LoRA or RLHF.

What hardware does MaxText target?

MaxText targets Google Cloud TPUs and NVIDIA GPUs for training and inference. It is optimized for training on Google Cloud TPUs and GPUs, though it can also run on NVIDIA GPUs with proper configuration.

Is MaxText free to use?

Yes, MaxText is a free and open-source project. It is released as open-source software with no paid tiers or subscription plans. Users only pay for the compute infrastructure they use to run the framework.

How do I install MaxText?

MaxText can be installed inside a Python virtual environment using the uv package manager. It is also available as a PyPI package, making it easier than ever to get started. Other Python versions may encounter compatibility issues.

What is the codebase architecture of MaxText?

The MaxText framework is intentionally written as much as possible in pure Python and JAX, offloading the burden of performance optimization to the XLA compiler. This design enables simplicity while achieving high performance through JAX's power and the XLA compiler.

Does MaxText support LoRA or PEFT?

No, MaxText today only supports Pre-training and Full Fine Tuning of models. It does not support PEFT/LoRA, Supervised Fine Tuning as parameter-efficient methods, or RLHF. For LoRA and QLoRA, users should use Tunix instead.

What is MaxText's Model FLOPs Utilization performance?

MaxText achieves high Model FLOPs Utilization (MFU) and tokens/second from single host to very large clusters. It is the only public Jax codebase that has demonstrated scaling to models with hundreds of billions of weights, and it scales better than Torch implementations even on GPU.

Categories

Use cases

Browse all AI tools on NeedAnAI