Mojo🔥 is Fast, but Not Furiously Open Source

Modular claims that its "Python++" language is 68,000X faster than Python
Mojo programming language
Listen to this story

If you thought AGI would be built with Python, you are almost halfway there. It would be built on top of the language that has the elegance of Python and the speed of C++ or even CUDA. And there is a language that has married both of these and has made it possible to achieve the AGI dream — it’s called Mojo.

Mojo is finally here. After more than 120,000 developer sign-ups for Mojo Playground and heavy discussions about the capabilities of the language, Modular, the company that built Mojo, has made the language available for local download. It is now available only for Linux, with Microsoft and Mac support coming soon.

Interestingly, developers have already started experimenting with Mojo. Aydyn Tairov, who goes by the name Mojician on the Mojo community, was able to implement within Mojo, 20% faster than Andrej Karpathy’s llama2.c (Baby Llama), which was on C. This shows that Modular’s claims about Mojo being faster than Python are indeed true.

What is Mojo’s Mojo?

During the initial launch of Mojo in May, Modular claimed that it is 35,000X faster than Python. “Well it turns out we meant 68,000X faster,” Modular said in a recent post. How is that even possible?

One of the major motivations behind building the new programming language according to the developers was that most of the modern programming systems rely on accelerators like GPU for operations, and only “fall back” on main CPUs for supporting operations like data loading, pre and post processing, and integrations into foreign system written in other languages. The company wanted to support the full gamut of this into one language. 

Now, with integrability with Python code and a scalable programming model for targeting GPUs, Mojo makes language transition seamless. “With simple code changes to existing Python code, developers can increase the speed of computation of models by more than 68,000X. 

The initial release of the Mojo SDK includes a comprehensive set of tools for convenient Mojo program development. These tools encompass:

  • Mojo driver: This tool offers a shell for executing read-eval-print-loop (REPL) commands and facilitates Mojo program compilation and execution. It also enables Mojo module packaging (including support for the Mojo extension!), document generation, and code formatting.
  • Visual Studio Code Extension (VS Code): This extension provides various productivity-enhancing features like syntax highlighting, code completion, and more.
  • Jupyter kernel: It supports the creation and execution of Mojo notebooks, enabling the inclusion of Python code within them.
  • Debugging support (upcoming feature): Soon, developers will be able to step into and inspect running Mojo programs, even mixing C++ and Mojo stack frames.

Even after all this, Modular has decided to not open source Mojo yet. 

No open source, no attention

Mojo was built with AI development in mind. It has the syntax of Python and the portability and speed of C. Interestingly, during the release of the language, the creators Tim Davis and Chris Lattner said that they had no intention of creating a new programming language, but as they were building their Modular Platform, a unified inference engine, they realised that programming across the entire stack was too complicated.

This meant building a programming language with powerful compile-time metaprogramming, integration of adaptive compilation techniques, caching throughout the compilation flow, and other things that are not supported by existing languages. That is the direction that Mojo was always heading towards, but they thought that can only be achieved on their platform.

All of this, combined with the fact that Modular is trying to compete directly with NVIDIA’s CUDA, for enabling faster inference across AMD, Intel, and other GPUs, the decision of not open sourcing still remains questionable, and it has already received criticism from the developer community. It seems like the company actually just released a closed-source Python, which is maddening.

In a HackerNews discussion, users speculated that Lattner might actually open source it soon, but until then they are not going to use it. Lattner has said that he might open source “parts of it”, and not the entire language. This is what happened with Swift programming language as well, keeping it closed source, which companies call an “incubation period”, to fix the small problems before open sourcing it. This might still be a reasonable approach, given it is a for-profit company indeed. 

Nonetheless, developers say that marketing posts like “it is a billion times faster, oh no, it is actually a zillion times faster” actually doesn’t matter if the entire user base is waiting for licence issues to be clarified. There might be a transition from closed source to open source, but people are already put off with the fact that they still have to wait to use it commercially.

For AGI to be built on Mojo, Modular will have to be quick with open sourcing Mojo, because we all know, open source is the way forward.

Download our Mobile App

Mohit Pandey
Mohit dives deep into the AI world to bring out information in simple, explainable, and sometimes funny words. He also holds a keen interest in photography, filmmaking, and the gaming industry.

Subscribe to our newsletter

Join our editors every weekday evening as they steer you through the most significant news of the day.
Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.

Our Recent Stories

Our Upcoming Events

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox