Taming the AI Hardware Cambrian Explosion — Abdul Dakkak, Modular
AI Engineer · 17 min · 168 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:01[music]
- 00:13Uh so let's get started.
- 00:15Uh hi, my name is Abdul.
- 00:17Uh uh I'm from modular.
- 00:20Uh today I'm going to be talking about what modular is and what value it brings to you.
- 00:26So as you probably know today there is a huge crunch uh for compute and there's like no alleviation in sight.
- 00:34A lot of these things are booked for the next few years.
- 00:39But there's also a kind of as a result you have an explosion of hardware.
- 00:43We call it like a Cambrian explosion.
- 00:45You have Nvidia providing you know a few generations of GPUs, the Intels, the ARMs, the Apples, everything uh is is present.
- 00:54They all have some niches uh that they cover.
- 00:58But the problem is that you have to ask is how do you program all of these uh systems.
- 01:06Now if you look at the current software as it is today um it's kind of a mess as well and that's because a lot of these hardware choices bubble up from the you know from down under
- 01:19uh into upwards into the stack.
- 01:22So this is a diagram showing how uh VLM supports both Nvidia and AMD.
- 01:29If you add extra hardware the the the diagram becomes even more difficult.
- 01:34Now today folks actually uh deploy not only using VLM but also SG lang TRTLM uh Llama CPP etc. So at Modra we thought well this is kind of a huge mess.
- 01:48Let's rearchitect the uh the stack from the ground up and let's build a unifying layer uh that unifies all the hardware so everything runs on our stack.
- 02:00To realize this, you have to actually go back to first principles and build a complete software stack with portability, performance, and programmability in mind.
- 02:12So at the bottommost level, we've developed Mojo, a heterogeneous programming language that's targeted towards AI as well as general purpose programming uh as well.
- 02:23It's kind of pythonic in style.
- 02:25So folks that actually know Python today pretty much know 90% of Mojo.
- 02:31Uh so we've built that language and that targets both CPUs, GPUs as well as all our accelerators.
- 02:38On top of that, we leverage Mojo to build max our inference engine.
- 02:44Uh so that provides you with uh AI inference for both for a bunch of different modalities like image, video, speech as well as text.
- 02:53We've built all our kernels underneath the hood that are built on top of Mojo.
- 03:00Finally, today's AI inference is distributed.
- 03:03So you actually need a cloud solution as well.
- 03:06uh you need to pick which hardware to deploy your model on, how to route uh different user requests to different uh machines, how to do KV cache offloading and and and distributed inference
- 03:18and disagreed inference uh to be able to serve the model at the speed and the cost that that folks expect.
- 03:26So putting it all together, we built a modular platform that's fully programmable.
- 03:31It's hardware abstracted.
- 03:33It's it's soda perf.
- 03:36Uh and then it actually can be deployed both on prem as well as on our cloud as well.
- 03:41So it can be if you have a cloud uh uh setup, you can actually download the modular cloud and and deployed there.
- 03:49So let me kind of dig into each one at a time, each part of the stack.
- 03:54So the first is Mojo.
- 03:56Uh so Mojo as I mentioned is a Pythonic system programming language.
- 04:01It's not unlike C++, Rust or CUDA C++.
- 04:06The thing is what it enables is uh programmability across different accelerators.
- 04:11It's blazing fast.
- 04:13It's again it actually competes with CUDA in terms of performance.
- 04:18uh and you can think of it as the best way to program CPUs and GPUs within a Python-like programming language.
- 04:27In terms of how we think about Mojo, uh you know, you can think about there's three different quadrants, usability, performance, and portability.
- 04:37Rockcom and KOD and CUDA gives you massive performance, but they sacrifice on both usability and programmability.
- 04:44A lot of folks use agents to actually program these system nowadays.
- 04:48Open CL back in you know a few years ago was popular.
- 04:52It gives you great portability but is sacrificed on performance and usability.
- 04:57Triton is has a good sweet spot that gives you 70% of the Perf uh but it gives you portability and usability and Mojo is is trying to kind of fill the niche of the sweet spot
- 05:10where it's the best of both worlds.
- 05:11It gives you the abstraction to allow you to write portable kernels and and uh and usable kernels while giving you also the low-level access uh to get the maximum performance.
- 05:23We've actually open sourced uh practically all of our kernels so you can actually test this stuff.
- 05:29You can benchmark it on your own machine.
- 05:31Uh we have state-of-the-art kernels on Nvidia, AMD and other hardware.
- 05:36So to tell you what state-of-the-art is, it means that our matrix multiplication is faster than the coupe losses, the hip losses, everything out there.
- 05:45And it's not by 1% in some cases by 2%.
- 05:48We have the fastest attention uh kernel out there, faster than flash attention for uh as well as like the AI it and things like that.
- 05:59Uh one thing that we've announced uh a month ago or so is Mojo 1.0, know the stabilization of our APIs.
- 06:06Uh, and we're going to be releasing Mojo 1.0 in the next few months.
- 06:10And we're also open sourcing Mojo uh, in the next few months as well.
- 06:17Sitting on top of Mojo is Max.
- 06:21So, Max is trying to kind of solve a few of the uh, assumptions that were made uh, back in the day for PyTorch.
- 06:29PyTorch is about 10 years old.
- 06:31It was not really designed for the genai inference of today.
- 06:35As a result, you have like VLM and SG lang that stepped into the void to give you things like KV cache, page detention and and things like that.
- 06:45And but all of that kind of kind of complicated the entire PyTorch ecosystem.
- 06:50A lot of folks don't really uh use PyTorch as is.
- 06:54They're resorting to these layers on top.
- 06:58So think of a new approach and we call that the max framework.
- 07:02So again it's built from the ground up uh with the best technologies with the best state-of-the-art graph compilers uh the eager mode execution.
- 07:12It's portable across devices.
- 07:13It understands your mojo programs to do novel fusion uh and it gives you the maximum performance and deployability that you're otherwise not able to do in in in regular PyTorch.
- 07:26So compared to other stacks uh this is a single stack that allows you to serve develop the model as well as optimize everything in one cohesive uh system.
- 07:40it within Max we support thousands and thousands of models in fact thousands of architectures uh everything from Gemma 4 to M uh Miniax 3 to GLM uh so any model that you think about is is practically supported in uh in in uh in Max
- 08:00and it has the same interface that you'd expect uh from what is standard today.
- 08:06So we also provide a open AI endpoints that you can use uh within the stack.
- 08:14If you're familiar with like PyTorch programming uh the figure on the right would or the left will not be like massive departure of your mental model.
- 08:25Uh you can build a model as you expect.
- 08:28You know you can import modules.
- 08:30The uh programming language for developing models is Python.
- 08:34So as familiar to folks uh and you can compose uh things as as you as you as you um as you build them.
- 08:42We also support like the eager execution to enable debugging as well.
- 08:49Now the other thing that one has to realize is modern LLMs uh are run on across different GPUs and in many cases multiple nodes.
- 09:00So also max the max APIs provide you with a way to uh program multiGPU system AC as well as multi-node systems from within the API so that the model is natively
- 09:14supported across uh different GPUs and different nodes as well.
- 09:19And this can also be heterogeneous.
- 09:21So there's nothing to stop you from saying the prefill is on hardware X and the decode is on hardware Y. Finally, layered on top of all of this is the modular cloud.
- 09:35So, as I mentioned, uh today's AI inference is distributed.
- 09:40It runs on many many different machines.
- 09:42Uh it's heterogeneous.
- 09:44So we provide the module cloud which is a performance native you know we think of it as a glass box because you can actually tinker with all the variables
- 09:55uh that are available for you in both max mojo and everything in between uh within your endpoints.
- 10:02So it provides provides endpoint deployment as well as bring your own cloud deployments as well.
- 10:09We also have a module cloud lab that allows you to experiment with all these different parameters and pick the best point in the perto frontier that you have for that model or based on your workload as well.
- 10:22Uh so in terms of like the UI uh if you're familiar with like any uh cloud provider I mean it's it should be pretty familiar.
- 10:31You just go to the website, you click on which model to you want to run, you get an AP an API key and then you plug that in uh to your HTTP request
- 10:42and uh you can run it.
- 10:45You can have dedicated endpoints as well as we can serve your own custom model.
- 10:49Uh you know in many cases folks have fine-tuned models or models with their own custom speculative decoders.
- 10:55Uh we could do all of that uh for you as well.
- 11:00Now, why do you care about all of this, right?
- 11:03It's a lot of tech.
- 11:04Uh why do folks care?
- 11:06Well, it's because you can actually uh accomplish more things uh through the system, right?
- 11:14So, you can actually decrease cost.
- 11:17You can get greater flexibility because you can actually use different hardware.
- 11:21You're not beholden to one hardware provider.
- 11:23Uh you get portability.
- 11:25You can use multiple different models.
- 11:27Uh etc. So how does Perf look like?
- 11:32Well, we benchmarked a lot of these uh and this is like against uh state-of-the-art, you know, the best combination of VLM or SG lang
- 11:40[snorts]
- 11:40in a bunch of cases.
- 11:41These are these benchmarks are independently verified as well.
- 11:45So in terms of Kimmy Kimmy K2.5, we're 5.5 faster on TTFT uh compared to VLM.
- 11:55We can also get 1.5x throughput improvements.
- 11:59So the token per minutes on per GPU is 1.5x faster uh on B200 than it is on VLM.
- 12:11In terms of Flux 2, and I encourage folks to actually visit the booth behind this curtain, uh there's a nice demo of Flux 2. uh we're about 7x faster
- 12:22uh compared to ters that compile with diffusers.
- 12:26So again, Max supports different modalities within the same framework.
- 12:30So you don't have to use an omni variant of a of a piece of software or anything like that.
- 12:36We support both video generation, audio generation, image generation as well as text generation.
- 12:42Uh we also support you know things on AMD where you can get a TCO benefit as well where we're 4x faster than the equivalent uh on um on on the MI355
- 12:55systems.
- 12:56Actually you know some of this is not a fair comparison because you know some folks might say oh 7x is much larger than 4x but this is you cannot do that comparison very easily.
- 13:10uh that you can you have to factor in the cost uh per uh GPU and AMD is usually 30% cheaper than uh the Nvidia equivalent.
- 13:22Uh artificial analysis actually we've been partnering with them uh and we've been and they've independently been verifying our results.
- 13:30Uh this is our results like as of uh today.
- 13:34Uh we're about 3x faster than the next competitor uh on the flux 2 dev model as well.
- 13:42And this is not playing tricks of distillation and you know quantization or anything like that.
- 13:48This is just raw speed because we can leverage the hardware from the ground up and make sure that uh we're getting the max uh the max PF benefit from the model
- 14:00and you can actually go to artificial analysis today and see and see these results.
- 14:05Now what does that mean to folks again?
- 14:08It means you can open up applications that are otherwise kind of not possible because of slow inference.
- 14:16So this is actually uh a kind of a live demo.
- 14:20It's just somebody's pasting in the prompts.
- 14:22Uh but the generation is is accurate.
- 14:26So you can generate things in subsec generate images in subsecond uh per in many cases these are.3 seconds.
- 14:34Again you can go to the booth.
- 14:35There's a nice demo where uh you can give a prompt and then it reads the video feed and then renders it as well.
- 14:47Uh the other one data point is Gemma 4. So Gemma 4 was a a recent model that was just introduced about a month ago, a month and a half ago.
- 14:57Uh again we're quite faster than other any other competition out there.
- 15:04Uh so uh you know many cases actually some of these are uh hardware companies.
- 15:10you know, Samanova is a hardware accelerator.
- 15:13Uh we're, you know, let's say 6x faster than that.
- 15:18And in general, we're much much faster than others.
- 15:20And by the way, we're for all these cases, we're just starting.
- 15:23There's more optimizations that we're landing uh as as as time goes on.
- 15:29So, we're never never stopping to improving these things.
- 15:34So, we have a bunch of uh places where you can get involved.
- 15:38You can join our open source community.
- 15:39So, a lot of our code is open source.
- 15:42We have over 700,000 lines of kernel code that we've open sourced.
- 15:46We've over open open sourced all of our model definitions, all of our max serve.
- 15:52Um, we have AI skills.
- 15:54So, if you're not familiar with Mojo or Max, you can actually use the AI skills to port uh from languages that you're familiar with into Mojo or Max.
- 16:06You can also join us.
- 16:07We're hiring.
- 16:08So, there's pamphlets on the booth where we're hiring for a variety of different positions.
- 16:14So, as I you probably know, we we hire from low-level kernel engineers to high level folks that work on Kubernetes and everything in between.
- 16:24You can actually try all of this.
- 16:26So, this is not uh demoare or slideware.
- 16:29You can pip install modular right now if you want to and try all of this stuff.
- 16:33And I welcome everybody to validate these results.
- 16:38So, with that, I kind of that's it.
- 16:42And uh but I'm open to questions if folks have it.
- 16:44And I'll also be on the booth uh for the next few hours as well.
- 17:05[music]