S7 E9: The Evolution of MLOps: Rebranding Grid.ai and Building Modular AI Platforms with William Falcon, CEO of Lightning AI [0:00:00] William Falcon: I'm the type of engineer that builds products and does whatever it takes to get the products out there. And I'll accumulate all the tech that I need to. I don't really care about that. Your goal isn't to have pristine code, your goal is to actually build the product, right? And I think a lot of engineers over index too much on, oh my god, my code needs to be perfect. I'm like, well, great, like if you go out of business, what are you gonna do? Write a tweet that your code was perfect at least? Like, that doesn't make sense. The problem with us is that there's stuff that relies on infrastructure, which is a little bit different. Tech that, on the platform side, will actually make the product experience bad. My name is William Falcon. I'm the creator of PyTorch Lightning, Lightning and the CEO of Lightning AI. [0:00:47] Noah Labhart: This is Code Story, the podcast bringing you interviews with tech visionaries who share in the critical moments of what it takes to change an industry and build and lead a team that has your back. I'm your host, Noah Labhart, and today how Will Falcon built the platform and is leading the charge to power the AI in your app life fast. All this and more on Code Story. Will Falcon did not have a traditional path to tech. He's originally from South America and moved to the U.S. when he was a teenager. Later on in life, he went through SEAL training and and served the country for six years doing primarily special reconnaissance. After leaving the military, he taught himself how to code and fell into the world of AI. He finds the dynamic of uncertainty in the military translates over to the tech startup world. Outside of tech, he likes to try random things, but digs surfing, swimming, and doing art. In his undergrad program, Will created a tool set to help you scale code within the deep learning AI world. Prior to joining Facebook, he open sourced his tooling and shared it with the world. And he noticed that many large enterprises were adopting the tool set, and in doing so, they were running into the same problems. Problems that his current venture could fix. This is the creation story of Lightning AI. [0:02:24] William Falcon: The product's evolved quite a bit, right? Right. So most people probably know it as PyTorch Lightning, which is a framework for training deep learning models. Right. So if you're an AI, you basically have two main options. You have TensorFlow and PyTorch. And a lot of the scaling of that code is really difficult. So I wrote lightning at the time called PyTorch Lightning to basically help you scale that up. So I was a Ph.D. student at NYU. What I was working on was contrastive learning. And at the time, this is 2019. A lot of that was really, really difficult to scale. Right. So PyTorch Lightning is something that I started working on really like probably around 2015, like in my undergrad. As an undergrad, at the time, obviously, it was not called PyTorch Lightning. PyTorch did not exist. It was actually built on top of Theano and then TensorFlow at some point. But when I finally open sourced it, what I had done was I'd rewritten most of it in PyTorch. And then I joined Facebook AI Research where what I was doing was just scaling up models, like just train massive models on a cluster. it right back then, I think I was training on probably 500 to 1,000 GPUs per model and it was like a few of these, if you're following the cost of this, that means every time you train a model, it costs probably, like Facebook, I don't know, $500,000, something like that. So luckily they own the GPUs, so it's not that expensive, but that's where PyTorch Lightning came to be, right? It's really around scalable training and really for research, so you need flexibility. You need all the ability to get in there and modify every piece of that code. And then what we realized over time was that PyTorch Lightning became really, really popular across companies and enterprise. And when you take it to production, you run into a lot of issues that are fault tolerance. How do you scale up clusters? All these different things, right? And so that's where we started Lightning. At the time, it was also known as Grid, so a lot of rebranding. But overall, it's just Lightning now. And what Lightning lets you do now is lets you build machine learning products, like machine learning SaaS products, right? So if you want to go launch the next diffusion app or you want to go launch a product that uses machine learning or deep learning, or you're at a company and you want to build a new service, you can do that really, really quickly in Lightning, right? And so one of the elements that it helps you do is train the models. It helps you deploy the models. It really enables anything like data labeling, enables UIs like React and Angular or Streamlit and those kind of things to all work together in a very seamless experience to where you can have a single developer build a really complicated distributed cloud app in a few weeks and actually monetize it. So that's really powerful because what we're trying to do is enable the next billion dollar AI company to be built on Lightning. [0:04:57] Noah Labhart: Tell me about, you know, what would be the MVP, and there's probably a little PyTorch and maybe some of the evolvement. I don't know where you're going to take it, but I'm excited to hear. Tell me about what you would call the MVP, how long did it take to build, and what sort of tools did you use to bring it to life? [0:05:12] William Falcon: The MVP of PyTorch Lightning probably took about four to five years, right? And it's mostly because it's R&D, like in 2015 you didn't really know how to So structure code so that it could be generalized for deep learning. We didn't have the abstractions. The frameworks changed, right? So I had to rewrite it a bunch of times. So it took a while to get to the MVP. And then once it was at MVP, probably around 20, I would say fall 2019 is when it got to a pretty good stable MVP point. But the more companies continue to use it and the more people that continue building on us just highlighted more problems, right? So at least you could do the bare minimums and actually train models consistently. So that's my MVP definition, right? Now, the MVP for the current product probably took us another two years after that. Right. And it's, you know, I've built many, many things before, like iPhone apps, web apps, things like that. And MVP in a web app or an iPhone app can take you, I don't know, two months, three months tops. Right. But because we're handling infrastructure and we're allowing like what we're enabling is people to literally build full businesses on this and full companies that require a ton of infrastructure, compute and all these complicated systems. It just took a very long time to even figure out how to do that. How do you make it so general that like you can basically be like the Shopify for machine learning, right? Where you can actually create your own store. Well, that takes a long time to figure out. And so the MVP just took us a while to get there. [0:06:35] Noah Labhart: I'm curious about decisions and trade-offs you had to make when building those initial versions on both sides of the coin there. You know, and that could be around, you know, tooling, tech debt. It could be around approach. could be around figuring out that full sort of Shopify experience for AI. So tell me about some of those that you had to work through. And I want to know how you coped with those decisions too. [0:06:57] William Falcon: It's a little bit difficult because I'm the type of engineer that builds products and does whatever it takes to get the products out there. And I'll accumulate all the tech debt that I need to. I don't really care about that. And I think that's probably the attitude most startups should have is your goal isn't to have pristine code, your goal is to actually build the product, right? And I think a lot of engineers over index too much on, oh my god, my code needs to be perfect. I'm like, well, great, like if you go out of business, what are you gonna do? Write a tweet that your code was perfect at least? Like, that doesn't make sense. It's silly. But like the problem with us, uh, and companies like in our stage is that, well, there's stuff that relies on infrastructure, which is a little bit different, right? So tech debt that, on the platform side, will actually make the product have to balance that out and say, well, there are certain places where you just cannot do it. You have to have really good code because they build everything else on that. So the foundation has to be strong. So it's a really hard thing to balance. And I think like it just takes a lot of engineering experience to figure out where that is. And it's probably counterintuitive, I would say to most engineers, right? So I would say probably the hardest trade-off for us has always been how much tech debt do we allow and where do we give the team the focus to go in and say, you know what, like this is worthwhile addressing now because it's keeping us from doing something that's really hard and i think um probably most software is not that complicated i would assume but in um again like web apps iphone apps that kind of stuff pretty easy to determine but you know when you're building a platform that supports workloads where you know you have hundreds of companies and teams and thousands of people and millions of models being trained well that, you know, tech debt can kill you sometimes. [0:08:34] Noah Labhart: it also sounds like it's a balanced approach between between, okay, this is what we cannot budge on. And, and then also like, okay, we can move fast on everything else. Right. So it sounds, it sounds really balanced and knowing what problem you're trying to solve too. [0:08:51] William Falcon: Exactly. But I mean, I will say too, that's coming from big companies like, you know, coming from Meta or Google or whatever, like you're probably used to this like rigorous code all the time. It must be perfect. But like, that's what kills startups, perfection kills startups. Right. And you have to fight that urge because your job is not to write pretty code is it. [0:09:09] Noah Labhart: Okay, let's move forward then. And I would bring that up to nowadays, right? And trying to build that Shopify for AI. How did you progress it and mature it? And I think to wrap that in a box a little bit, I'm curious how you build and have built your roadmap and the process you went through to decide, okay, this is the next most important thing to build, to create with Lightning. [0:09:31] William Falcon: I don't think I'm going to give like any crazy insights here. I mean, it sounds silly. And like Like every book will tell you, talk to your customers, listen to what they want, right? Like that's the base principle, but most people don't do that, right? So I would say if this is the seventh time you're hearing this and you literally have not sat next to customers and try to build with them, then you're doing it wrong. That's how you prioritize the roadmap. It's not what I, the roadmap is more of a guiding principle, right? It's not anything that's set in stone. Like the roadmap should change as you talk to customers and you understand what their needs are. So yeah, the roadmap is very dynamic, I guess. I think there's a vision of where I want to get to for the product and the company, but how we get there will be influenced by the customers. [0:10:11] Noah Labhart: Okay, let's flip to team then. So this will be interesting. How do you go about building your team? And what do you look for in those people to indicate they're the winning horses to join you? [0:10:22] William Falcon: First and foremost, I think it's intellectual rigor. I don't care what school you went to, whether you did a PhD or not. It doesn't matter to me. What I care about is that you think about things critically and how you got that ability. Remember, I came from the military. I didn't do any of this. At some point, yes, I did PhD and all that. But before then, I didn't, right? And so it's just about, can you think critically? Can you think outside the box? Are you going to just be trying to use the same solutions that everyone else is using to things? That may work in certain companies where the problem space is known. Like if you're going to build a 10th database, then sure, like that's pretty known how to do that. but what we're doing is creating the tools for people to build ML products, to build AI, to train and deploy AI models. No one knows how to do that really well. We're in an R&D world, right? So the first and foremost thing I need you to have is critical thinking and like really have more of a researcher mentality. But then you need to also have the, I don't know, the attitude of default to action, I think it's called, right? So you need to also be default to action where you're not just going to sit here and research and think all day, but you're actually going to it well and prototype and try things and fail fast and move on, right? And so it's a very dynamic process. So I think those are the two first key things that I care about is creativity, intellectual creativity, the default to action ability to move fast. And then yes, table stakes are like, you obviously need to be a good engineer and you need to be able to write really good code. You need to understand where the trade-offs are, when should you invest the time in the code or not. And a lot of times you're going to be kind of like alone, sitting there trying to figure something out. you can't Google it. There's no Stack Overflow, and you have to use us as your thinking partners because we also don't know. Right. So it's it's very like bleeding edge kind of research vibes. Right. I think that that's a TLDR. [0:12:04] Noah Labhart: That makes sense. Those types of people are not afraid of that type of environment where there's no Stack Overflow. There's no manual, you're figuring out as you go. OK, well, let's flip to scalability. And given given your product, I'm really curious is how this was approached. So did you build this to scale efficiently from day one, whether it be PyTorch or now, or have you fought this in any way as you grow? [0:12:29] William Falcon: I think you can have a high level architecture in your head, but where I've seen people fail and I push the team not to do this is they try to build for scale upfront and that just doesn't work. Like no time in your life are you going to be hit by 10 million people at once on your service immediately when you launch it. Like everyone thinks it's going to happen. right? So you should not be building for that. Build for 100 users and get them and break the product. And when it breaks, figure out why it broke and then build for a thousand users. And when that breaks, figure out where it broke and continue. So I prefer to build scale as it's needed because people break the product and I'm like, okay, sounds good. And then I figure out what the next milestone is. And so it keeps you from overbuilding because that means that you're only going to build enough, right? So yeah, I'd rather see you fail at stuff when you have too too many people because that highlights where the problems are, right? So I call it like underbuilding. So underbuild and then hopefully if no one, if nothing happens, then great, either the product didn't work so you can kill the product and it's fine and you didn't spend too much time on it or it's stable enough to whatever skill that thing is at the moment, which means you don't have to keep building for it. [0:13:37] Noah Labhart: So as you step out on the balcony and you look across all that that you've built, what are you most proud of? [0:13:45] William Falcon: I think it's our really different approach to building ML products and ML systems because what we've basically done is we've taken what the whole world was doing in terms of tooling and just said, okay, that's great, those are tools, but how do you actually build the product? Like we're not here to build tools for tools sake, how do you actually do the product part of it, right? And the framework that we built, which is open source, is so general that today I believe we can build basically any product on it, even non-ML products. It's a language that we've designed, essentially. And I think that that's flexibility and that expressibility is really cool. And I think you only get to work on maybe one or two of these products in a lifetime. And the first time that happened was PyTorch Lightning, which developed through the community. The second time was a little bit more deliberate with amazing thinking partners. But I'm just so proud of that language that we've developed that really allows you to express extremely complicated distributed cloud programs in a very simple way that like even like a web developer would know how to use, right, and build. That's really powerful because it means you're actually democratizing access to AI and to really, really complicated infrastructure and compute. So, yeah, I think that that's probably what I'm most proud of. [0:14:55] Noah Labhart: Let's flip the script a little bit. Tell me about a mistake you made and how you and your team responded to it. [0:15:01] William Falcon: So we make a lot of mistakes. So it's not just one, right? Probably the mistakes that we'll make in a startup usually. I mean, I think a lot of them come down to hiring. Like, for example, I think some of the mistakes that I made earlier were just hiring the wrong executives. I think that happens a lot to founders. And it's not that the people are bad. They're like objectively amazing people. It's just they're wrong for the stage of company. You go hire the CTO of a public company to try to run your startup. Like that's I guarantee that's going to fail. Right. Because they don't know how to build a small team. They don't know how to operate without support teams and all this other stuff. Right. So I think those are the main mistakes. It's maybe trying to scale too early. Right. Maybe that's what it is. Or just not knowing like what it is that you need at the time. It's hard because you probably need to rely on advisors to do that. But that would be the main, the first main thing. And then obviously that applies to other teams. Right. So maybe you make a hire of a type of engineer that like you don't really need right now, but you thought you did. But they're going to be too rigorous because they're coming from Google or something. And then like, well, you're not at Google scale, so it doesn't make sense. Right. I think it's those kind of mistakes. So maybe summarize it would be like mismatch of skill with company stage, probably. [0:16:14] Noah Labhart: What does the future look like for Lightning, the product and for your team? [0:16:19] William Falcon: For us, the future looks like when new startups get funded or companies want to create a new product and that product needs AI in some way. You need to either train a model, deploy a model or some AI operation that's bounded by compute or disk or something where it's like a lot of data. You can't just build a web app, right? So when people want to launch those kind of companies and products, that we are the default way that those are built, right? Because we've handled all the complexity. So that's all you have to do is, hey, I want to build a thing that, you know, diffusion is a pretty popular example right now where you can type text and it will generate an image of that text, right? So I don't know, dogs jumping in the park, and then you get an image of that. And that's really cool. When you're building that kind of company, you should be able to focus just on that part, on the core ML part, on the part that actually generates the thing, on the product experience, not the app operations. Like, how do I charge people? What about auth? What about scale? What about concurrency? What about autoscaling? What about all these other things that people will have to handle during that? We basically own all of that and help you get rid of it. And you have the ability to change it if you want. so that you can focus really what you want. So the feature is exactly that. It's come build your product, focus on what you want to ship and focus on the product, not the infrastructure, not the authentication, not the building, not all the app ops that you're going to have to solve anyways. [0:17:44] Noah Labhart: Let's switch to you, Will. Who influences the way that you work? Name someone or multiple people or something you look up to and why. [0:17:52] William Falcon: I think he's a bad example, but I really look up to Steve Jobs, like the impact that he's had on the world. this way as well. Not necessarily like the way that they went about it, perhaps. Like I think Jobs seems a little bit toxic. So I think there's like a positive way of doing it. But I just like questioning assumptions about the world and saying, does it have to be this way? And really taking a first principle approach of building something, right? I think those are the first type of people. And then honestly, the other ones who've had the biggest influence, I would say, are like directly my PhD advisors. So I worked with two amazing people, Yann LeCun and then really, really closely over the last few years. And I think that he's always pushed me to be more thoughtful, more principled, like not get caught up in small details, but actually boil down the problem to the root cause or boil down something to like, what are the core principles of it and then build up from there. And I didn't have that skill going into my PhD. I'm not like an expert at it now, but it's definitely improved. I think that those are really the big unlocks. And then probably the third entity is really SEAL training, probably. that's a collective entity and the instructors there and just the mentality of hey we're just going to set a goal and you're just going to do what it takes to do it there's no trying you're just either going to do it or don't even try to do it at all right well [0:19:11] Noah Labhart: okay we talked about a mistake earlier but a little bit different spin if you could go back to the beginning what would you do different or where would you consider taking a different approach [0:19:19] William Falcon: in the beginning you know a lot of what i did initially and with pytorch lightning was really as a solo person built the majority of that on my own for a while. And that's not really, I think, a good thing. I mean, I did it out of necessity, right? So I wasn't like looking to launch a company. I built a product that solved my needs and I thought would help others. And so I open sourced it as well. You know, when we built the evolution of Lightning now where it can solve bigger problems than just training, I did it with a group of people who are amazing. And we were, I think, able to get there. It would have probably taken me, I don't even think I could have done it alone ever. But like, Like if I had, it would have taken me five, 10 years to get there. I think with three, four people that are just amazing, we could get there in a while, like in a few years, right? Much shorter time, still not super, super long time. But probably the key thing is I wish I had developed that with other people because I think I would have gotten to the point where, you know, it's a really loved framework in like a year instead of five years, right? So I think it would have been to do it together. And I know this is a lot coming from research where in research, you really work alone. both sides, like working with people who can push you and you can bounce ideas off of, there's a type of magic that just won't happen in your own brain. [0:20:32] Noah Labhart: Well, Will, last question. So you're getting on a plane and you're sitting next to a young entrepreneur who's built the next big thing. They're jazzed about it. They can't wait to show it off to the world. Can we show it off to you right there on the plane? What advice do you give that person having gone down this road a bit? [0:20:47] William Falcon: Focus on your vision and focus on your customers and don't worry about what anyone else doing. Don't worry about what VCs are doing, competitors, any other thing. None of that matters, right? So really it's about you and your ability to execute and your team's ability to do that. So don't get distracted, basically. Just focus on your thing and take a fresh look at your own problems. Like don't copy what other people are doing. [0:21:08] Noah Labhart: That's solid advice. Well, Will, thank you for being on the show today. Thank you for telling the creation story of Lightning. This [0:21:15] William Falcon: is really fun. I hope this is useful for other people. Thank you. [0:21:19] Noah Labhart: And this concludes another chapter of Code Story. Code Story is hosted and produced by Noah Labhart be sure to subscribe on apple podcast spotify or the podcasting app of your choice and when you get a chance leave us a review both things help us out tremendously and [0:21:41] William Falcon: thanks [0:21:42] Noah Labhart: again for listening you