21st-may-banner design

Mojo🔥 is Fast, but Not Furiously Open Source

Modular claims that its "Python++" language is 68,000X faster than Python

Share

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 llama2.py 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.

Share
Picture of Mohit Pandey

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.
Related Posts

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

Upcoming Large format Conference

May 30 and 31, 2024 | 📍 Bangalore, India

Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

AI Forum for India

Our Discord Community for AI Ecosystem, In collaboration with NVIDIA. 

Flagship Events

Rising 2024 | DE&I in Tech Summit

April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore

MachineCon GCC Summit 2024

June 28 2024 | 📍Bangalore, India

MachineCon USA 2024

26 July 2024 | 583 Park Avenue, New York

Cypher India 2024

September 25-27, 2024 | 📍Bangalore, India

Cypher USA 2024

Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA

Data Engineering Summit 2024

May 30 and 31, 2024 | 📍 Bangalore, India

Subscribe

Subscribe to our Youtube channel and see how AI ecosystem works.

There must be a reason why +150K people have chosen to follow us on Linkedin. 😉

Stay in the know with our Linkedin page. Follow us and never miss an update on AI!