MAX 24.2 is Here! What’s New?

March 28, 2024

Modular Team

Today, we’re excited to announce general availability of MAX 24.2, with several big features.

First, we're thrilled to share the next evolution of Mojo 🔥, open sourcing the Mojo standard library. Open sourcing the standard library gives our growing developer community an active voice in its development, and is an invitation to contribute directly to Mojo. As part of this commitment and to facilitate community development, we’re also releasing Mojo nightly builds that include the latest language development features. The open source release of the Mojo standard library is available now on GitHub.

Second, MAX 24.2 ships with significant enhancements to the MAX engine and the Mojo programming language. MAX 24.2 and Mojo builds are available directly through the Modular command line interface.

⚡Read on to learn more!

Open sourcing the Mojo standard library

At Modular, we believe that the future of AI and machine learning must be open source. Since its launch in May of 2023, we’ve been on a path to gradually open source Mojo and core parts of the MAX platform, and today we are open sourcing the Mojo Standard Library under the Apache 2 license on GitHub. This release is a big deal - including nightly builds, a new contribution model, and a roadmap for the standard library.  Beyond providing access to the code, we're opening the development processes. For more information on what's next and how to contribute, read our detailed post: “The Next Big Step in Mojo 🔥 Open Source.

MAX Engine enhancements 🏎️

The most significant new feature in MAX 24.2 is support for dynamic tensor input shapes in TorchScript models. This addition to MAX’s TorchScript capabilities greatly increases the usability of MAX-compiled models, especially for applications like LLMs where the entire input size isn’t known at compile time. Additionally, dynamic input shapes make it possible to run with dynamic batch sizes and removes the need for input padding, offering performance improvements to your inference pipeline.

Learn more about the updates to MAX 24.2 in the article “Leveraging MAX Engine's dynamic shape capabilities.”

New features in Mojo 🔥

MAX 24.2 ships with the latest version of Mojo, which includes a number of language improvements. One of the biggest features that will make Python fans rejoice is the addition of keyword arguments to the Python integration layer. This feature greatly simplifies mixing Mojo and Python, and vastly improves the use of popular libraries like matplotlib.

Following more closely to the Python convention of duck typing, structs and other nominal Mojo types are now allowed to implicitly conform to traits. This makes it much easier to write new types that can take advantage of built-in traits like Stringable, simplifying your code while still giving Mojo's strong assurances of flexibility, safety, and performance of compile-time traits.

The Mojo changelog contains a list of improvements showcasing all the Mojo language improvements and additions.

Get started

MAX 24.2 and Mojo nightly builds are available using the modular tool. To get started, download the Modular CLI from the Modular developer portal, which you can use to install the MAX 24.2 release and the latest Mojo nightly build.

Install MAX 24.2

MAX 24.2 is available for Linux on x86 and ARM platforms. You can install it with: modular install max

You can upgrade with: modular upgrade max

Install Mojo nightlies

Mojo nightlies are available for Linux on x86 and ARM platforms and MacOS. You can install them with: modular install nightly/mojo

Join the Modular community!

To learn more about MAX, and get involved with the Modular community:

We're thrilled to share this latest release of MAX with you. Building a language and its infrastructure is hard work and takes time, and we’re excited to invite developers worldwide to help shape the development of Mojo and the future of AI infrastructure!

Modular Team
,