Mava  by instadeepai

MARL research codebase for fast experimentation in JAX

Created 5 years ago
895 stars

Top 40.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Mava is a research-focused codebase for multi-agent reinforcement learning (MARL) in JAX, designed for rapid experimentation and scalability. It provides researchers with fast, single-file implementations of state-of-the-art MARL algorithms, enabling quick iteration on new ideas.

How It Works

Mava leverages JAX for its high-performance, automatic differentiation, and compilation capabilities, allowing for end-to-end JIT compilation of MARL training loops. It supports two distribution architectures: Anakin for JAX-based environments, enabling full JIT compilation, and Sebulba for non-JAX environments, facilitating interaction with multiple CPU cores. This approach results in significantly faster experiment runtimes compared to non-JAX alternatives.

Quick Start & Requirements

  • Installation: Clone the repository and install dependencies using uv sync or pip install -e ..
  • Prerequisites: Python 3.11 or 3.12. Users must install the correct JAX version for their hardware accelerator separately.
  • Getting Started: Run system files like python mava/systems/ppo/anakin/ff_ippo.py. Configuration is managed via Hydra, allowing overrides from the terminal.
  • Resources: A Google Colab notebook is available for a quickstart: https://colab.research.google.com/github/instadeepai/Mava/blob/develop/examples/Quickstart.ipynb

Highlighted Details

  • Implements state-of-the-art MARL algorithms (PPO, Q Learning, SAC, etc.) with support for independent learners, CTDE, and heterogeneous agents.
  • Provides wrappers for JAX-based MARL environments and supports adding new ones.
  • Natively supports statistically robust evaluation by logging to JSON files compatible with MARL-eval.
  • Offers Anakin and Sebulba distribution architectures for scaling RL systems across JAX and non-JAX environments, respectively.

Maintenance & Community

  • Developed by The Research Team at InstaDeep.
  • Roadmap includes adding more Sebulba algorithm versions and scaling across multiple TPUs/GPUs.
  • Related repositories include OG-MARL, Jumanji, Matrax, Flashbax, and MARL-eval.

Licensing & Compatibility

  • License: Apache 2.0.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

Mava is not designed as a modular library and is intended to be used directly from the cloned repository. While it supports various environments, adding new ones requires using existing wrappers as a guide.

Health Check
Last Commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
1
Star History
13 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Wing Lian Wing Lian(Founder of Axolotl AI), and
3 more.

ROLL by alibaba

0.8%
3k
RL library for large language models
Created 10 months ago
Updated 1 day ago
Starred by Eric Zhang Eric Zhang(Founding Engineer at Modal), Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), and
3 more.

tunix by google

0.4%
2k
JAX-native library for efficient LLM post-training
Created 1 year ago
Updated 1 day ago
Starred by Elvis Saravia Elvis Saravia(Founder of DAIR.AI), Roy Frostig Roy Frostig(Coauthor of JAX; Research Scientist at Google DeepMind), and
8 more.

numpyro by pyro-ppl

0.3%
3k
Probabilistic programming library using JAX for GPU/TPU/CPU
Created 7 years ago
Updated 1 week ago
Starred by Hanlin Tang Hanlin Tang(CTO Neural Networks at Databricks; Cofounder of MosaicML), Amanpreet Singh Amanpreet Singh(Cofounder of Contextual AI), and
2 more.

coach by IntelLabs

0%
2k
Reinforcement learning framework for experimentation (discontinued)
Created 8 years ago
Updated 3 years ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Pawel Garbacki Pawel Garbacki(Cofounder of Fireworks AI), and
6 more.

tianshou by thu-ml

0.4%
11k
PyTorch RL library for algorithm development and application
Created 8 years ago
Updated 1 week ago
Feedback? Help us improve.