Tech Legend's Advice: CEO & Co-Founder of Modular & Mojo, Chris Lattner, on Tech, Life, & Learning

Tech Legend's Advice: CEO & Co-Founder of Modular & Mojo, Chris Lattner, on Tech, Life, & Learning

Show Video

Hello, we are here at the AI Engineers World  Fair with Chris Lattner, CEO and co-founder   of Modular. Chris has an extremely impressive  background. When he was a graduate student at   the University of Illinois, he created LLVM.  Then he went to Apple in 2005 and helped   create various developer tools, including  notably he was the main author on Swift,   which is Apple's programming language which  came out in 2014. Then he worked at various   ML and processor companies including Google  and Tesla, and at Tesla he was VP of autopilot   software. Then in 2022, he started Modular,  and Modular aims to make development in AI   and ML much quicker and easier, very simple  to make, to take the expediency of a complex   coding language using a relatively simple to  understand coding language similar to Python. So we are so excited to have you here. Thank  you so much for meeting with us here. So tell  

us a little bit about yourself to start off and  how you got into compiler technology and AI. Chris: Yeah, so I mean I represent as developer.  I like building things. I like building things in   the real world too, including woodworking and  stuff like this, but really my passions around   computers and programming and systems. And so the  thing I love about computers is that unlike in   the real world, you don't actually need much to  be able to build almost anything on a computer,   and you have all these free tools. You have  the ability to learn, you have the internet,  

and so you have so much at your fingertips.  It can be kind of overwhelming sometimes,   but it means that you're not limited by having  to run to the hardware store and get some gears   and bolts and things like this. And so I thought  that was really amazing, and so across my career,   I've been able to learn and grow in many  different ways. And so I've just love software. Harper: That's amazing. And so when was  your beginning of your career exposure  

to compiler languages? It sounds like  long, I mean at least in graduate school. Chris: Yeah, so I fell in love with compilers  specifically in school. And so I love compilers   because when I was in school, this was a  long time ago now, you would learn a course,   you would then build a project, you would then  throw it away, you then build the next project,   you would get a grade, you would throw it  away, and you keep doing this. In compilers,   it was the first course where you build a thing,  you get a grade or you get some assessment,   and then you build on top of it, and then  you build on top of it, and then you build on   top of it. And so the thing that was really fun  to me about that is that then you know you're   having to live with your mistakes. This is much  more realistic, this is much more about what real   software engineering is like, and this is what  I really loved about that because it became much   more about building an organism, building an  evolving thing, and then learning from okay,   well I could just push this underneath the rug,  but if I do that later, it comes back to get me.

Harper: So you have to be really, really  thoughtful about every single building block. Chris: Or choose not to be and then decide  to fix it later. Which is also a big part of   software. And so I love that aspect, and  so I got involved in that and then went   to graduate school as you said and was very  fortunate to work on this LLVM technology,   which now has kind of gone on to power  a lot of today's computers and systems. Harper: It's amazing. And including Modular,  I mean that experience building LLVM,   in addition to all of your experience before,  has kind of come together to make Modular.

Chris: Yeah, that's right. Well, so I mean a lot  of what I love to be doing as a human is always   learning. And so what I've done throughout my  career, and I advise many of you all to do,   is think about first when you get into the market,  exactly where you enter doesn't matter so much as   how much you can learn. And then when you learn  something, you're learning from the people around   you. Don't stay in one box for five years, don't  stay doing the same thing for 10 years. Yes, look,   whether it be within the same team or within  the same company or maybe across companies,   you look at other opportunities  where you can now bring something,   yes, but you also get exposed to new things.  And so for me, I've been on kind of this quest   of learning many different things, and whether  it be soft skills like management, whether it be   hard skills like how AI convolutional neural  networks work, or whether it be compilers or   different things across the stack. And so I  love that, and that's one of the things that,  

as you say, brought me to Modular is a  culmination of all of these experiences. Harper: That's amazing. I love that idea of  moving what you're learning so that you can   have this breadth of knowledge and so that you  have so much to bring to your work, to the world. Chris: That's right. Harper: And talking about learning, a lot of  the audience here is just new to technology,   to AI. And so I guess first we'll start with what  

would you recommend to them as a way to  break in, just in the most broad sense? Chris: Yeah, so I mean I think that there's really  two things. One is the background knowledge that   you need to kind of build up. There, I would pick  a project, pick something you can build. There's   so many good open source tutorial other things,  including paid courses and university and things   like this, but really building a thing. Get to  that "I did it" moment and prove to yourself,   but also to other people later. You know, build  your resume, build your design book of saying  

like, "I did this, I can explain it." People can  then ask you questions, and you can actually tell   people about the experience. And that experience  of building something, I think, is so critical to   both getting that like moment of pride where you  can show it to your friends, but also it gives you   that learning because you have to struggle  through the parts that are actually pretty   challenging. And so doing that in a way that's  directed, so there's an outcome, really helps.

Once you do that, you can kind of go through  a couple of different projects and things like   this. I'd encourage trying to find an open  source community. And so one of the things   that is not really taught in schools  so much, again depends on where you go,   but it's how to work as a team. And so  much of software, I mean it's super funny,   people think about the lone coder that's just  sitting there at the keyboard late at night,   you know, drinking Red Bull. The reality is that  you're working on a team with other people, and so   as you do that, it's all about the social aspect  of creating software. And those people are who  

you can learn from, the people that can teach you  how to work and the technology and the specific   skills. And so learning that aspect is also super  important. Open source is a really great way to   do that. It's a great way to get involved with a  team that's already working together. Generally,   open source communities are very inclusive,  and so it can be a great way to get started. I've been working with open source since the  1990s, so quite a while. LLVM was open source,   LLVM is open source. I've been driving an open  source project as kind of the, not quite a BDFL,  

but is one of the major leaders for 25 years.  I've built the Swift programming language,   which also open source. And so what I would  say is that open source is an amazing idea,   but different projects have very different  personalities. And so there can be a very big  

difference between open design where you can  get involved and you can have part of design   discussions, whether it's open code but not open  community, whether there's community meetups and   things like this. And so like the actual nature  of the open source project can really vary. Harper: Is Modular working on  that kind of community aspect? Chris: Absolutely. Mojo's open source,  and so you can work with the Mojo open   source library. We have a big community  on Discord, and so that's where we kind   of pull people together, and GitHub and many  of these typical technologies. And so yeah,  

open source is a huge part of AI, and so if  you're interested in AI, then open source is   a really big part of the entire ecosystem  community, which is really important. Harper: Wow, it is amazing that Mojo  is open source. Let's talk a little   bit about Mojo for those who don't  know. How would you describe Mojo? Chris: Yeah, so Mojo, there's many ways to look at  it. First is, let's talk about Python. Python is   amazing. It is the thing that holds together, it's  the glue of all of computing, it feels like. But  

a lot of Python is really good down to a certain  level. And so underneath Python, you have older   technologies like C or C++, or newer things  like Rust that are really what powers the Python   ecosystem. And so the challenge with Python ends  up being that it is beautiful and simple until you   end up having to go and do something hard, and  then you get into this really crazy complexity. And so what Mojo is doing is saying, okay,  well, let's take the thing that is beautiful   about Python, let's take the Python developers,  let's take the tools, let's take the ecosystem,   let's take all the packages and all the  libraries and all the Python code that exists,   and then make it so you don't have to do C or  C++ or Rust. And so the way we do this is we use  

very fancy compiler technologies and things like  this, which you have experience in. So I have some   experience in this, I've built some programming  languages before, and so I have some experience   with this stuff. And say, let's actually take  what we've learned, and we as an industry have   learned a lot in the last 30 years that Python has  been growing, and let's rebuild this whole thing. As we rebuild it, now we can make something  that is just like Python at the top level,   but it displaces the C and C++ part in the  ecosystem. And so for you as a Python programmer,   this means you can continue to grow. You don't  run to this wall where there's like certain   dark magic that you're not allowed to see.  You can actually build and scale into these  

more advanced topics without having to switch to  and retrain to a completely different universe. Harper: Wow, okay. This is phenomenal.  So also tell us a little bit about MAX,   which is a suite within Modular. Chris: Yeah, absolutely. So MAX is where Mojo is.  Let's go make the Python ecosystem stronger and  

better and also scale onto GPUs and things like  this, which is a big part of what Mojo does. MAX   is saying, let's take AI and make it so you can  deploy it. And so one of the big challenges that   many of us face in the AI deployment industry  is that the technologies in the AI space are   very messy. And so you've got technologies  very focused on training models like PyTorch,  

it's amazing. You've got many endpoints out  there that many, many of you use like OpenAI   and Anthropic and AWS and other things. But if you  want to do something custom that's not training,   it's inference, it's building application,  building AI into your applications,   there isn't really a good solution.  There's a mess of different things. So what MAX is doing is taking the benefit  of learning all the different systems that   have come before and building a  new thing that can help with that,   help get models from research and production  faster, make it easier to use. And if you   look at what Modular is doing globally, we  have a major enemy. Do you know what our  

enemy is? You know what we're fighting  against? You know who the bad guy is? Harper: The bad guy if you're moving  from production to deployment? Or if   you're a Python programmer  that's struggling with C++? Chris: Python programmer struggle  C++. We have a mortal enemy here. And   so this is actually really important  to understanding who we are, really. Harper: Mortal, okay...?

Chris: I won't put you on the  spot. Our enemy is complexity. Harper: Oh, I see. Chris: Well, it's not because of Python. It's  because of, if you look at AI, AI is, you know,   PyTorch and TensorFlow and these things  are almost 10 years old. Pre-Neanderthal,   everything has changed. All the stuff is so  invested in by so many people. There's this  

gigantic mess of systems within Python. Python's  amazing, it's beautiful, everybody loves it,   but it doesn't get you onto a GPU. It doesn't  run fast. And so if you care about something   going fast or about cost being low, you  get exposed to all this complexity. If   you're trying to get, if you're training  a model and you're like programming a GPU,   one GPU is great. If you want to deploy  that thing, suddenly all of this complexity. And so bubbling up, what is Modular about?  It's about taking the source of the complexity,   the fact that all this stuff got  cobbled together, and saying, okay,   well we have to do these things like have a  programming language that can solve the Python   level of the problem. Once you solve the Python  level of the problem, now you can solve the GPU   problem. Now you can solve the AI problem. Now  you can solve each of these things. And this is,  

these are very, very, very big problems that the  industry is struggling with. But if you do that,   then you can actually make a major dent in some  of these big challenges that we all struggle with. Harper: I saw that you don't  have to use CUDA with Mojo. Chris: That's right. Harper: So it just, it's a replacement as  well? It just kind of built into the language? Chris: Yeah, the way I would say is it's  an alternate way to program GPUs. So   CUDA is one of these technologies which  are, again, it's wonderful. It's powered  

the industry for 15 years. It's amazing. It's  also super complicated. It's changed a lot,   very complicated. And also a lot of C++, a lot  of libraries, a lot of version incompatibility.   There's a lot going on with CUDA these  days. And so again, lots of good learnings,   bring forward the best thing, put into Mojo,  make it Pythonic, rethink all these technologies.   Make it, you don't have to deal with CUDA versions  of conflict, like just a nightmare, by the way.  

And so just by removing complexity, what we can do  is we can allow folks to focus on their problem. And then you also bring in other fancy compiler  stuff and like all the technology component of   this. We think we can do something very  significant that then helps people move   on with life instead of having to fight  the Docker container and these things,   which we as AI practitioners have Grown  accustomed to, but it should not be that way.

Harper: It takes so much  time. It's such a headache. Chris: That's right. And so this is things  where, again, it's a very abstract thing, this   like destroying complexity concept. But if you  map it onto the specific pain that people feel,   give you another example. This, if you want to  deploy Llama 3, there's probably a dozen different   ways to deploy Llama 3 from cloud vendors, from  how you run it locally on your Mac, how you do   this and that and the other thing. They all use  different APIs, how they do function calling   completely different, how the model temperature  could be completely different. Like all these  

little differences can drive you mad when you're  just trying to build something, your application. And maybe you want to be able to deploy to  cloud for production for your customers,   but you want to write unit tests so that  you can actually test your app before you   deploy to production. And that you want to run  locally on your Mac, but you can't run the cloud   endpoint locally on your Mac. And so that lack of  consistency, again, just drives tons of complexity   into our ecosystem. And these are things that  we are looking to solve through the world.

Harper: Wow, you're a true developer. You've been  doing this for so long. You know the pain points. Chris: I love developing things. And this is  the thing about AI, is that people forget just   how new all this stuff is. I mean, it's  been changing our world just so fast,  

but it's also super mature. And this is where  we want this whole ecosystem to grow up. Harper: If you don't have to use CUDA, does that  mean that Mojo is agnostic to the GPU provider? Chris: We only currently work with NVIDIA.  So we only support NVIDIA. So NVIDIA are   great friends to us. They're one  of our most important partners,  

and we think we can do a lot with  NVIDIA. We're working very hard on that. Harper: Very cool. I know that there's  an open source project working on making   Mojo provider agnostic, so like TPUs  and GPUs. I forget what it's called. Chris: I mean, this is the cool thing  about Mojo being open source in the   community and everything else, is that  Mojo is a very horizontal technology,   just like Python's. And so to me, I think it's  really cool that people are building UI library   and they're building serving frameworks and  they're building all kinds of cool stuff,   and including a lot of AI technologies as well.  And so this is the thing that's very cool is that  

you look at Jeno and FastAPI and like all these  things that the world is built on top of, there's   a lot of room for improvement. And so this is  where again, Modular can't do everything, but we   love the people that are investing in doing these  things. And so I think that is very exciting.  This is again, you talk about developers, I  love the passion of developers. I love the  

spirit of building things. I love giving people  new technologies and new tools so they can be   heroes in their own journey and they can build  things. And so that's what I find so inspiring   about the developer community in general. Harper: I mean, you're so inspiring, frankly.   Sorry, I mean, I'm just like, I'm so inspired.  Thank you for being here. So as I've shared,  

a lot of my audience is new to tech, new  to AI, and they have a few questions. I   guess first we'll start off with how can they  future-proof themselves as technology has changed?   There's a natural concern about jobs shifting over  time, and so they're wondering how can they best   prepare themselves for this world that is coming? Chris: Yeah, that's a really hard question.   It really is. I think that a lot of us  struggle with that, honestly, including me.  Harper: That's good to know. Even you do. Chris: How is the world going to look? We   don't know. You don't know. And so you kind of  have to make certain bets, but also invest in  

kind of general knowledge. And so what I try  to do is I try to follow some of the news,   and like there's these papers of the day and  things like this that people talk about on Twitter   or X or whatever you want to call it. Harper: Oh, okay.  Chris: But also, and so you can kind of  see like what people are talking about,   but then also just the fundamentals I think  are actually pretty consistent. And so if   you care about building models, for example,  you need to learn how back propagation and   some of those kind of stuff works. And  so you can invest in kind of similar,   the basic thing. Again, what I would do is  I would start from just build something,  

build something real, see it through end to end,  build a demo. Don't worry about it lasting for,   because your life and career is not a demo. Your  life and career are the lessons learned, the   experiences you build from having built that demo. So the actual details will change and you know,  

you'll get to figure out things along the way,  but what you're building is a skill set which   is really about problem-solving, how all these  ecosystem components fit together, who are the   people that matter, who are the people that don't.  I mean, one of the things I've learned going into   a new domain over time is just saying like,  "Okay, well just understanding the personality,   okay, like the social side of the community of  your audience or of who you're building for."  Just in the AI space, like okay, who are the big  personalities? It's like the People magazine but   for AI, almost. And so these things, these  people in their back stories a little bit,   but you don't want to spend all your time on  there. But it can help you understand the map,  

understand what's happened, why they're  fighting over something on Twitter or something,   and things like this. And you can make more  sense. But I would, I mean, the short answer   is I would not worry about future-proofing  yourself. I would focus on building things,   learn, gain experience having built things.  And what you'll build is you'll build that core   knowledge of building, problem-building, products  solving problems, working with the technology,   getting in there, wrangling with the uncertainty,  wrangling with the frustrating parts too.  Harper: Absolutely. So pushing through. Chris: I think in the, you know,  

having confidence in yourself is a big part. Harper: That's wonderful. So that's reassuring   for me to hear because that means I'm on the right  track as an educator because I have my 10 days of   AI basic series, which goes through the basics  of AI, like both in short form and in long form,   and then also like a coding series where  we code in Transformers, Mojo, you know,   and then there will be more in-depth advanced  videos like how Transformers work, et cetera.  Chris: Yeah, so building fundamentals with  Python, that's a really great thing to do. And  

because that transcends not just AI but so much of  computing these days. And you know, learning Mojo,   Mojo is a natural extension of Python, and so now  you can learn new kinds of things. And so you can   kind of build into the part that makes sense for  you. Not you don't have to learn everything. Code   is made, software is built by teams, but it allows  you to follow your passion and figure out what   makes sense to your brain and the way you think. Harper: Exactly. And now there are so many tools  

with large language models that make it  so easy to debug, to understand code if   you're new to the field. Used to be so  much more difficult, I'm sure you know.  Chris: I mean, I grew up where you had  to learn from books, and that was very   different than the internet. So unbelievable. Harper: I mean, compilers themselves are already,   in my perspective, the hardest type of engineering  you could possibly do. So I am just so--  Chris: Sorry, AI is also very hard. So I  mean, all these things are very hard. I'd  

say that compilers are one of the most obscure  and very, you know, there's not enough compiler   engineers. People don't fall in love-- Harper: There's a reason for that.  Chris: Maybe, maybe both are true. Harper: So another question that I   get a lot is, what is a fear that you hear a lot  that people have about AI that is just pretty much   a misconception, that just should not be a fear? Chris: I mean, one of the biggest misconceptions   is that anybody knows what they're doing. Harper: I love this. Let's talk about   this. This is a great topic. Chris: So I'll use myself. I   won't talk about anybody else. I'll use myself.  I have built up a body of certain experiences,  

right? I know a few things. I'm very proud  of some of the things I've done. You know,   a lot of things I don't know, a lot of  things either. And so the thing that is very,   something you should just know is that you'll  often feel imposter syndrome because there's all   these smart people in the room. They all sound  like they know what they're talking about. They   may actually not know what each other is talking  about because they've specialized in different   parts of this problem. Harper: Exactly.  Chris: And so a lot of what happens is you have  these very fancy people giving a technical talk,   and you're like, "I understand one out  of every four words they're saying." 

Harper: Right. Chris: They get done with their talk,   they sit in the audience, they're listening to  the next, and they understand one out of every   four words of the next speaker. Harper: Right.  Chris: And so this is actually a  very interesting thing about AI,   is because the ecosystem moves so quick. This is  where again, what I would, what I'd recommend is  

you figure out kind of what to align with, what  technology stack is kind of going in the right   direction. And don't worry about the paper of the  day or the new model or things like this. Instead,   just look at what's useful and be focused  on solving problems and learning as you go. Harper: Solving problems and learning as  you go. And so we talked about imposter   syndrome. I actually want to go a little bit  more into that. I'm sure that's something that   my audience deals with, that I've dealt with.  Perhaps you have dealt with as well, many times. Chris: You know, this is also a  consequence of like saying I'm   hungry to learn. Harper: Yes.

Chris: Because when you're hungry to learn,   you throw yourselves into new situations  where you don't know everything. Harper: Exactly. And you know, it's so funny.  I have this really strong memory. About four   years ago, I was at Meta. I was working with  a really, almost a famous machine learning  

engineer at Meta. He was remote before anyone  was allowed to be remote. And he was the ML guy,   and I went and worked with him very closely.  We became quite close, and he told me one day,   he said, "Harper, I have the worst impostor  syndrome." I mean, this man output so much,   and he said, "Every day I feel like I'm not  enough. I feel like I can't do this. I have   no idea what I'm doing." And that really hit me,  is, is it-- this man can have imposter syndrome,   everyone has imposter syndrome. Hearing  that from you is just again, like so--

Chris: I mean, it's extremely intimidating  when you're so-- I'll give you a concrete   example. So I joined Google, Google Brain  team, some of the most elite experts in AI   building some of the most advanced, some of  the most furthest ahead, the most at scale,   like etc., things. All because I want to  learn the technology. And so I found myself   meeting after meeting after meeting where  I'm like, "I don't want to slow everybody   down by asking what is an embedding" or  something like that. It's like, "I will   have to go do some research tonight and  understand what that is" and spend a lot   of time on Wikipedia or whatever it is to even  just understand what people are talking about.  But what I've learned is that if you  kind of plow through, you invest,   you-- a tool I use is particularly when  I'm in rapid learning modes, I'll write   things down in a little book. And so by writing  things down, you're like, "What is an embedding?" Harper: When I'm doing my AI guides, I like to go  through the process of debugging and of hitting   errors. And I don't try to make it polished.  I try to make it real in the sense that like,  

once you hit a bug, you go, what do you do?  Because I've gone through tutorials before.   I was learning React a few years ago.  As you say, it makes it too easy because   you're following the script and see, actually  proven script. And real world is more messy. Chris: It's much more messy.

Harper: And I was following this  tutorial and I hit an issue. And then I,   I didn't know where to go because the tutorial  was so clean, they had no solution for me. This   was like pre-large language models, and I was  like, "Well, I guess I have to leave. I guess   I'm just not going to finish the tutorial.  I guess I'm not smart enough" or something. Chris: Exactly. And that's the problem. And  this is one of the problems with these overly   polished scripts for demos versus "Let me teach  you how to think about this. Let me teach you how  

this works. Let me show you the error message  case. Let me show you these things." Because   that's actually your life as an engineer. You  end up having a message, struggling through,   "What the heck does this mean? How do  I solve this? What is this crazy thing   mean?" And so again, coming back to destroying  complexity, right? So much of the systems of   today are connecting together incompatible systems  that were not designed to work together. And so   you can't really make progress on some of these  inherent things unless you clean up the mess. Harper: Do you have any advice for new grads?  You know, it seems like you're a very thoughtful   person about your life as a whole, to be honest.  And so I'm, I haven't asked anyone this question,   but I'd like to ask you this question. Do you have  any advice for someone starting their journey,  

their career journey? It sounds like you  said don't be worried about a certain path,   don't trust it to be linear, don't hope for an end  goal. Is there anything you'd like to add to that? Chris: Yeah, I mean, I would, I would try to  find a balance. And so what I would do is I   would find a balance between learning the  technical skills. Learn how to code Python,  

what a for loop is, like technical skills  like this. Learn how to work with people,   super important. Communities, go to a meetup,  go join an open source project and just like   go to the forum and see what people are talking  about. Again, you're not going to know everything   or understand everything they're saying,  but you'll figure out who the personalities   are. And software is a very social thing. Another is build something. Build a demo,   like actually get in, get in there,  do something, follow the tutorial,   fall off the path, try breaking it, see  what happens, and like intentionally do that   because that's how you kind of learn how these  things work. And then figure out a place where,  

particularly you're entering your career, what is  a good entry point that isn't just about how much   money you get paid or something, but where you  can maximize learning. Maximize learning. And if   you think about your career as something that  you build over a long arc of time, it's not a   job. Like think about what is your objective for  that first job that you take, and often it should   be about like, where is it position you? What can  you prove? What can you learn? Who do you learn   from? Things like this. That's way more important  than is this paycheck bigger than this paycheck. Harper: It's long-term thinking. Chris: That's right. 

Harper: Well, thank you so much for being here,  Chris. It's really great to talk with you.  Chris: Thank you for having me. Harper: I hope you enjoy the rest   of the conference. So glad that you're here, and  thank you again for all your work at Modular. I'm   excited to teach everyone about how to use Mojo. Chris: I'm very happy to be here.

2024-07-26 02:00

Show Video

Other news