MAX is here! What does that mean for Mojo🔥?

February 29, 2024

Eric Johnson

Product Lead

Chris Lattner

Co-Founder & CEO

Tim Davis

Co-Founder & President

Chris Hoge

Developer Relations Manager

Jack Clayton

AI Developer Advocate

When we started Modular, building a programming language wasn't our goal, it ended up being a solution to a set of problems. Specifically, as we were building our platform to unify the world’s ML/AI infrastructure, we realized that programming across the entire stack was too complicated.

AI development suffers heavily from fragmentation at every layer of the stack, requiring domain expertise in C++, Python, and hardware specific code such as assembly or CUDA. Modular’s vision was to simplify the portability of code by developing a common programming model across AI hardware, to fully unlock potential for both low-level systems programming, and high-level AI application development.

As such, we embarked on building Mojo, the first programming language targeted at AI developers. We built on top of next-generation compiler technology MLIR and built a completely new end-to-end AI compiler. Mojo generalizes code to vastly different hardware, including CPUs, GPUs, and TPUs.  As we did this, we realized that Mojo could be useful for many other people and for many other purposes, so we released it to the world in May 2023.

If you’re a fan of Mojo and part of our developer community, you may wonder what the arrival of MAX means for Mojo, this post dives in for more information.

MAX: Completing Mojo’s AI story

Modern AI systems include important technology that lives at the level above the programming language - these include graph compilers, automatic “kernel fusion” systems, orchestration and runtime support for managing multiple instances of a single device, and a top-level API that holds everything together in a simple to use way.  This is what MAX provides.

What we have seen is that the success of a programming language is most tied to one specific question: what is the “killer app” of the language? Swift aimed to unify the developer community for the Apple ecosystem, providing a modern language that enabled Swift UI and other new platform libraries. Go was built to modernize rapid backend server development, including the standard libraries required to deploy scalable distributed applications.

We believe that AI is the “killer app” for Mojo, and MAX is a key part of that story.

The MAX package includes “Mojo in the box”

As we prepared the release of MAX, we quickly realized that MAX was very tied to Mojo, and as such, we decided to have the MAX package include Mojo in the box.  We did this for two reasons:

  1. Better UX: We don’t want users of MAX to have version confusion or skew, and don’t want people to have to download and think about multiple things unnecessarily. Unified packaging simplifies how software is delivered.
  2. Deep integration: MAX’s kernels are built with Mojo and rely on the full feature set. As a result, a specific version of Mojo is required. It’s easier to bundle a specific version of Mojo “in the box”.

Looking forward, we will continue to build new MAX APIs in Mojo for serving, distributed inference, and multi-device support, and those APIs depend on the MAX runtime layers. We want these layers to stay in sync, be documented consistently, and we want to be able to iterate fast.

The Mojo-only package versioning changed

MAX is great, but we are also excited about the growing ecosystem on non-AI applications being developed by the community, and want to make building those apps easy. One of the downsides of the MAX package is that it is currently pretty large, and we know that download size is a significant concern for many of our users. The MAX package also doesn’t currently support macOS, and we don’t want to break any existing workflows.

As such, you can still modular install mojo and modular update mojo just like you always have, giving you the same Mojo-only package on the same platforms you’re used to. While MAX inherently depends on Mojo, the opposite is not true: Mojo doesn’t depend on MAX.

We do have one problem to solve though: Mojo and MAX will now be released at the same time, with Mojo included with the MAX package. We didn’t want to have two different version numbers floating around, so we’ve realigned Mojo version numbering to match the MAX versioning: 24.1.0.

Other questions

Will you still open source Mojo?

Yes! We're working hard to open source the Mojo Standard Library next, using the Apache 2.0 license. We are also providing nightly builds of Mojo and have a bunch of other things in store. This is coming very very soon, so stay tuned. We are also planning to open source components of MAX – but will have more to say about that later.

Can I install the MAX and Mojo packages at the same time?

Yes, you can install both the MAX and Mojo package side-by-side today – they coexist and the MAX package will have its own version of Mojo. This ability is very important when you intentionally want multiple different versions of Mojo installed, for example when using experimental nightly development builds of Mojo.

That said, the MAX package includes Mojo, so we are concerned about version confusion when interacting with tools on the command line. This can happen when you are updating and thinking about MAX, but have an old version of the mojo-only package lying around. The VS Code extension will also default to using your MAX installation if Mojo is also installed separately. As such, we’ll warn to `modular uninstall mojo` if MAX is also installed.

Will Mojo have a different license than MAX?

Mojo and MAX are both freely available under the same licenses. MAX will include a commercially supported edition in the future as well. We don’t have plans to offer a commercially supported mojo-only package, but please reach out to us if that is important to you.

Huge thanks!

Lastly, it goes without saying that we are beyond grateful to the incredible community that is now the Modverse. We were thrilled to release MAX, and we can't wait to see what you build and create with it. The future is enormously bright, and we are so excited to build the next generation of AI models on the MAX infrastructure stack.

Onwards!

Eric Johnson
,
Product Lead
Chris Lattner
,
Co-Founder & CEO
Tim Davis
,
Co-Founder & President
Chris Hoge
,
Developer Relations Manager
Jack Clayton
,
AI Developer Advocate