Favicon of Modular

Modular

Open-source repo for the Modular Platform: the Mojo programming language and the MAX framework for AI model inference and deployment.

Modular website screenshot
Modular GitHub repository preview

Modular is the open-source home of the Modular Platform, which bundles the Mojo programming language with the MAX framework for AI development and deployment. It targets developers building or serving machine learning models who want a systems-level language and an inference stack that can run on different hardware accelerators without rewriting kernels for each backend.

The repo is a monorepo containing the Mojo compiler front-end pieces, the Mojo standard library, MAX's accelerator kernel library, an inference server, and Python-based model pipeline definitions. It's aimed at both language contributors (standard library, kernels, model architectures) and platform users who just want to serve a model through an OpenAI-compatible API.

Key features

  • Mojo language: a systems programming language designed for performance-critical AI and numerical code, with a standard library maintained in this repo.
  • MAX accelerator library: a kernel library (/max/kernels) for running compute on accelerators, used underneath the inference and pipeline layers.
  • MAX inference server: an OpenAI-compatible endpoint (/max/python/max/serve) for serving models without building your own serving layer.
  • MAX model pipelines: Python-based graph definitions (/max/python/max/pipelines) describing model architectures that run on the MAX stack.
  • Code examples: runnable examples for both Mojo (/mojo/examples) and MAX (/max/examples) to get a working setup quickly.
  • Active contribution paths: the standard library, kernel library, model architectures, and docs all accept community contributions (the compiler itself does not yet).

Ideal use cases

This repo fits teams that want to serve LLMs or other models through a standard API while controlling the underlying compute stack, or developers who want to write performance-sensitive numerical/AI code in a language built for that purpose. It also suits contributors who want to work on a standard library, accelerator kernels, or model architecture definitions in the open.

It's a good fit if you're comfortable working with a newer language ecosystem and want low-level control over inference performance, or if you need an OpenAI-compatible serving endpoint you can self-host and customize.

It's a poor fit if you want a mature, widely-documented, drop-in replacement for existing Python ML serving stacks with a large existing ecosystem of third-party integrations, or if you need a stable long-term API guarantee, since parts of the platform (like the Mojo compiler) are still closed to outside contribution and the language itself is comparatively young. If you just need to fine-tune or run models with an established framework and don't care about the underlying language or kernel internals, a more established serving stack may get you there faster.

Installation

The repo itself is a source monorepo; most users won't build everything from scratch. Instead:

To serve a model with MAX, follow the quickstart:

# See the MAX quickstart guide for full setup:
# https://max.modular.com/get-started

To start writing Mojo code, follow the Mojo quickstart:

# See the Mojo quickstart guide for full setup:
# https://mojolang.org/docs/manual/quickstart/

If you want to contribute to or build components directly from this repo, start with the contribution guide and the component-specific developer docs:

# Clone the repo
git clone https://github.com/modular/modular.git
cd modular

# Read the contribution guide before making changes
cat CONTRIBUTING.md

Developer documentation for working inside the codebase lives in:

  • /max/docs for the MAX framework codebase
  • /mojo/stdlib/docs for the Mojo standard library

Bug reports and issues go through the standard GitHub issue tracker for the repo.

Frequently asked questions

Share:

Stars
29.2K
Forks
3.1K
Last commit
2 days ago
Repository age
3 years
Self-hosted
No
Activity score
84/100
View Repository
Built with:
Ad
Favicon

 

  
 

Similar to Modular

Favicon

 

  
 
Favicon

 

  
 
Favicon