00:00 从编程语言与编译器经验到构建AI软件栈
Lattner的经历涉及编译器、编程语言和开发工具,也曾在Apple参与构建Swift。创立Modular时,他关注的问题不再只是开发应用,而是AI带来了大量GPU和专用加速器,普通程序员却难以编程使用这些硬件。Modular的目标是让开发者能够访问先进计算能力,Mojo也由此成为其建设方向之一。
The TWIML AI Podcast with Sam Charrington · 18:13
All right, I am Sam Charrington, founder of Twiml and host of the Twiml AI podcast, and I'm super excited to be here in Maui at the Snapdragon Summit with Chris Latner.
好,我是 Sam Charrington,Twiml 的创始人,也是 Twiml AI 播客的主持人。能在毛伊岛的 Snapdragon 峰会上和 Chris Latner 一起交流,我非常兴奋。
Yeah, thank you Sam, I'm excited to chat with you.
是啊,谢谢你,Sam。我也很期待和你聊聊。
Chris is now the EVP of Advanced AI Software and Platforms at Qualcomm following the acquisition of Modular, a company that you co-founded back in 2022. Yep. And it turns out we go back quite a ways. I had to look this up. I had to ask an agent. But the first time that we engaged around the podcast was back in 2020 when we hosted what we called the great ML language debate. That's right. And you were representing Swift at the time. Okay. You weren't done with languages and you went on to found Modular shortly thereafter and created Mojo. And so I think where I'd like to start this conversation is to have you kind of talk about what you built at Modular, you know, starting from Mojo and then Max and.
Chris 现在是高通先进 AI 软件与平台执行副总裁。此前,高通收购了 Modular;这家公司是你在 2022 年共同创立的。 没错。 原来我们认识已经有一段时间了。 我得查一下。 我还得问问智能体。 不过,我们第一次围绕播客交流是在 2020 年,当时我们举办了一场名为「机器学习语言大辩论」的活动。 没错。 那时候你代表的是 Swift。 好。 你并没有就此结束对编程语言的探索。不久之后,你创立了 Modular,并打造了 Mojo。 所以,我想从这里开始这场对话:请你谈谈在 Modular 做出的成果,从 Mojo 开始,再到 Max,以及……
the cloud offering. thank you, sam. it's awesome. my background goes through a lot of compilers, languages, developer tools. and so i've worked a lot at the hardware software boundary building basically the tools for programmers to build applications and the things that we as consumers work with. at apple built swift. and so it was really fun to talk to you. i actually forgot about that. it's been longer than i thought. but when joining modular and starting modular, the problem was different. it wasn't about just building an app. really today we have ai taking over our lives. and as ai takes over our lives, we have a problem of we have all these processors, all these gpus, all these ai accelerators, all this crazy advanced hardware that everybody's coming up with, but nobody knows how to program it. and so you can see this in the data center with cuda and nvidia chips and things like this. you can see this on cell phones. you can see this in every part of our life that computes. but what i wanted to achieve is i wanted normal programmers to be able to have access to all this advanced hardware. and so this leads to mojo, this leads to the modular mission and what we've been building.
云端服务。 谢谢你,Sam。 太棒了。 我的经历涉及很多编译器、编程语言和开发者工具。 所以,我在软硬件交界处做了很多工作,基本上是在构建工具,让程序员能够开发应用程序,也让我们消费者能够使用这些产品。 我在苹果公司打造了 Swift。 所以,和你聊天真的很开心。 我其实把那件事忘了。 时间比我想的还要久。 但加入 Modular 和创办 Modular 时,面临的问题并不一样。 问题不只是开发一个应用。 说真的,如今 AI 正在接管我们的生活。 随着 AI 接管我们的生活,我们面临一个问题:我们有各种处理器、各种 GPU、各种 AI 加速器,还有大家不断研发的各种先进硬件,但没人知道该怎么编程使用它们。 你可以在数据中心里看到这一点,比如 CUDA、英伟达芯片等等。 你也能在手机上看到这一点。 在我们生活中所有需要计算的领域,你都能看到这一点。 但我想实现的是,让普通程序员也能使用所有这些先进硬件。 于是就有了 Mojo,也有了 Modular 的使命,以及我们一直在打造的东西。
yeah, talk a little bit about your views on heterogeneity across devices and in the data center in particular. i know that's something that you.
好,聊聊你对设备异构性的看法吧,尤其是数据中心里的异构性。 我知道这是你……
care quite a lot about. yeah, so heterogeneous compute means different kinds of computers that talk to each other. and so it used to be that as ai was starting out, You had cpus and cpus were the only chip that really mattered very quickly. We realized the ai was so important. So compute intensive, the needed specialized chips and so you saw gpus and so NVIDIA is the leader and a lot of data center compute. You also have google building different tpus and other specialized chips. now, the challenge is that as ai has gotten even more and more and more intense, people are realizing that different parts of the workload can be run by different chips. and so you get some chips that are good at what's called the pre-fill phase of compute, some that are great at the decode phase, some that are good at what's called speculative decoding. and each of these are different workloads and they need to be optimized. some are very parallel and so you need a lot of compute. some are very serial and need lots of memory. others just need very low latency. And so there isn't one size that fits all. Yeah. And so to me this points to if there's not one size that fits all on the chip side of things, then what we need is we need software that can span all of this, that can unify it, make it easy for people. So you're not rewriting the same code over and over and over three times for three chips. You need one thing.
非常关注的事情。 是的,异构计算指的是不同类型的计算机彼此通信。 AI 刚起步时,情况是这样的:当时只有 CPU,而且很快大家就发现,真正重要的芯片只有 CPU。 后来我们意识到 AI 非常重要。 AI 的计算密集度很高,需要专用芯片,于是 GPU 应运而生。英伟达是数据中心计算领域的领军者。 谷歌也在研发各种 TPU 和其他专用芯片。 如今,随着 AI 的计算需求变得越来越高,人们意识到,工作负载的不同部分可以交由不同的芯片来处理。 所以你会有一些芯片擅长所谓的计算预填充阶段,有些擅长解码阶段,还有些擅长所谓的推测解码。 这些都是不同的工作负载,需要针对性地优化。 有些工作负载高度并行,因此需要大量算力。 有些则高度串行,需要大量内存。 还有些只需要极低的延迟。 所以,不存在一种方案适合所有情况。 是啊。 所以在我看来,这意味着:如果芯片方面不存在一种方案适合所有情况,那么我们就需要能够涵盖这一切、将其统一起来,并让人们易于使用的软件。 这样你就不用为三种芯片把同一段代码一遍又一遍地重写三次。 你需要一个统一的方案。
Another thing that I've heard you talk about and that you're quite passionate about is the idea that this can't be least common denominator way of approaching, you know, these hardware. You have to be able to take advantage of all of the individual capabilities that are. available. yeah, how do you do that and maintain a coherent surface?
我还听你谈过另一件事,而且你对此相当热衷:处理这些硬件时,不能采用一种迁就最低公分母的方式。 你必须能够利用它们各自具备的所有特性。 这些特性都可以利用。 是啊,那要怎么做到这一点,同时又保持一个连贯统一的接口呢?
yeah, it's a great question. so when you're looking at building a unifying theory, and i've done this a few times across my career, you have a choice. you can either say, okay, let's take the common subset of all the different systems and let's build something that everything can run on everything but gives up the power. or you can say, let's build something completely specific to each different chip. and give up unification. and so what we've done is try to take the best of approach. and so we unify the part that is common. and so if you look at ai not as it's a monolithic thing, but if you break it down into modular pieces, then you realize that actually in the compute that is a neural net, lots of things get reused. and so, for example, if you're serving a model on a data center server, all the logic for batching the incoming queries, all the logic for reasoning about the speculative decoding and what's called the kv cache and things like this are all completely architecture independent. on the other hand, the innermost part of the matrix multiplication is very hardware specific because each chip has a different way of accessing the data, loading the weights, and dealing with that inner processing. and so i don't look at it as saying, let's make all the chips the same, because they aren't. if you do that, then you lose out on the power of every individual chip. instead, the question is saying, how do we make it as common as possible? and this is where what modular did was we said, let's not build a layer on top of all these legacy systems that have existed for decades in some cases. instead, let's start at the silicon. let's build that programming language. let's build the programming model. let's build the ai kernels for doing the math. let's build the serving architecture. let's build this entire stack from the bottom up. and as you do that, well, suddenly if everything, if you're sine, cosine and... arc tangent and like all these things are the same, well then you can get it so your uh your relu and your softmax and your transformer blocks and attention blocks and then your kv caches and all these things compose up and are the same. And instead of everything defaulting to being different, you can default to being compatible, but still specialize where you get alpha out of taking advantage of the chip.
是啊,这是个很好的问题。 当你试图建立一套统一理论时——我职业生涯中做过几次这样的事——你有两种选择。 你可以说,好吧,我们来找出所有不同系统的共同子集,构建一个能让所有东西都运行的方案,但这样就会牺牲性能。 或者你可以说,我们针对每一种不同的芯片,分别构建完全定制的方案。 这样就牺牲了统一性。 所以我们采取的是一种兼取其优的做法。 因此,我们把共同的部分统一起来。 所以,如果你不把 AI 看成一个不可分割的整体,而是把它拆解成模块化的部分,就会发现,实际上在神经网络的计算中,有很多东西可以重复利用。 举例来说,如果你要在数据中心服务器上部署模型,那么处理传入查询的批处理逻辑、推理投机解码的逻辑,以及所谓的 KV 缓存等,都完全不依赖于具体架构。 另一方面,矩阵乘法最内层的部分则非常依赖硬件,因为每种芯片在访问数据、加载权重和处理内部运算方面的方式都不一样。 所以我不会说,我们要让所有芯片都一样,因为它们本来就不一样。 如果那样做,就会浪费每种芯片各自的优势。 相反,我们要问的是:怎样才能尽可能地实现共通? 这正是 Modular 所做的事情:我们认为,不应该在这些有些已经存在了几十年的遗留系统之上再构建一层。 相反,我们从芯片开始。 我们构建编程语言。 我们构建编程模型。 我们构建用于数学运算的 AI 内核。 我们构建部署架构。 我们从底层开始构建整个技术栈。 这样做之后,突然间,如果所有东西——如果你的正弦、余弦……反正切等等这些函数都一样,那么你的 ReLU、softmax、Transformer 模块、注意力模块,还有 KV 缓存等,就都能组合起来,而且彼此一致。 这样一来,默认情况下,所有东西就不必各不相同,而是可以默认彼此兼容,同时仍然能在利用芯片特性带来优势的地方进行专门优化。
So let's talk about the the synergy with Qualcomm.
那么,我们来谈谈与 Qualcomm 的协同效应。
You know, why join forces with Qualcomm and what do you expect to uh achieve uh under the Qualcomm umbrella?
你知道,为什么要与 Qualcomm 携手?你期待在 Qualcomm 的支持下实现什么目标?
Yeah, absolutely. So we've been building modular for about four and a half years and so as we're coming into the summer, things are working. and so let's just say we're charging towards our event called modcon. if you're interested in this, you can find the modular blog and it gives you a recap of the event. but we were ahead of that event. and so qualcomm is aware that we're launching support for six different architectures from six different hardware vendors, one of which was qualcomm. okay. let's just say things are going well with qualcomm and they were fans of our work and they could see how well it could. work and when they approached us, basically the pitch was, look, you're building an incredible technology platform. you should make this actually open. and as a startup, we couldn't really do that. we had to protect the ip. we had to figure out how to monetize it. that's what you do as a startup. but qualcomm saw this.
是的,当然。 我们开发 Modular 大约已经四年半了。进入夏季时,各方面都开始运转起来了。 所以我们就说,我们正全力筹备一场名为 ModCon 的活动。 如果你对此感兴趣,可以看看 Modular 博客,里面有这场活动的回顾。 不过在那场活动之前,我们就已经开始行动了。 所以,Qualcomm 知道我们将推出对六种不同架构的支持,这些架构分别来自六家不同的硬件厂商,其中一家就是 Qualcomm。 好的。 就这么说吧,我们和 Qualcomm 的合作进展顺利,他们很欣赏我们的工作,也看到了它的潜力。 而他们找到我们时,基本上是这么说的:听着,你们正在打造一个令人惊叹的技术平台。 你们应该真正把它开放出来。 但作为一家初创公司,我们确实做不到。 我们必须保护知识产权。 我们必须想办法将它变现。 这就是初创公司要做的事。 但 Qualcomm 看到了这一点。
layer in particular is max.
尤其是这一层,也就是 MAX。
on top of mojo. yep, this is the mojo and then the max layer for basically. turning a chip into a neural net and a model so you can actually serve it and work with it and things like this. and so what qualcomm is interested in is let's crack open this data center. and qualcomm's building data center chips. it's also building into lots of different layers of the value chain of the data center. and so what it wants is it wants a vibrant ecosystem with lots of different chips, lots of different companies that are all innovating, also competing. and qualcomm's great building chips, of course. and so it wants to be able to compete on the merits of its silicon. It doesn't want software to be in the way of anybody competing in the industry. And so this is a big thing. And for me as a platform builder and as a systems architect, it's an opportunity to have great impact. And so we've already open sourced Mojo, which is a key part of our stack. We're going to be launching uh an open alliance around MAX coming later this year. And so it's very, very.
它位于 Mojo 之上。 没错,这是 Mojo,然后是 MAX 层,基本上…… 它能把芯片转变为神经网络和模型,这样你就能实际部署它、使用它等等。 所以 Qualcomm 感兴趣的是:我们来开放这个数据中心领域。 而 Qualcomm 正在打造数据中心芯片。 它也正在深入数据中心价值链的许多不同环节。 所以它想要的是一个充满活力的生态系统,里面有许多不同的芯片、许多不同的公司,都在创新,也在竞争。 当然,高通很擅长制造芯片。 所以它希望能够凭借自身硅片的实力参与竞争。 它不希望软件妨碍行业内任何人竞争。 所以这是一件大事。 对我这样的平台构建者和系统架构师来说,这是一个能够产生重大影响的机会。 我们已经将 Mojo 开源了,它是我们技术栈中的关键部分。 我们将在今年晚些时候推出一个围绕 MAX 的开放联盟。 所以这非常、非常……
very exciting. Nice. How's the community responded so far?
令人兴奋。 不错。 目前社区的反响怎么样?
People are very excited, right? And so this is also something that as a startup we've been saying, we're going to open source Mojo, we're going to open source Mojo. And uh let's just say that a lot of very smart people on the internet have heard lots of claims. Right. And so when we finally open sourced Mojo and we did it under the Apache license as part of Qualcomm, I think that was... a great reassurance that oh okay well actually things are going well and we're actually gonna see claims turn into reality so that's great. These guys are serious. Yeah, we're actually gonna see claims turn into reality so that's great.
大家都很兴奋,对吧? 而且,作为一家初创公司,我们一直在说要把 Mojo 开源,要把 Mojo 开源。 嗯,只能说,网上很多非常聪明的人已经听过太多承诺了。 对。 所以,当我们终于把 Mojo 开源,并以 Apache 许可证的形式将其作为高通的一部分推出时,我觉得这……让大家很放心:哦,原来事情进展顺利,我们真的会看到承诺变成现实。这太好了。 这帮人是认真的。 没错,我们真的会看到承诺变成现实,这太好了。
Excellent, excellent. And so Qualcomm is entering the data center space but has a significant footprint in much smaller devices.
太好了,太好了。 因此,高通正在进军数据中心领域,但它在小得多的设备中也拥有庞大的市场份额。
That's right. From laptops down to pendants, earbuds, watches, phones, pretty much anything that computes. Pretty much everything. Not to mention IoT. Yep. Um, how do you see the the stack you've built at Modular kind of playing across that broader range of devices?
没错。 从笔记本电脑到吊坠、耳机、手表、手机,几乎所有能进行计算的设备都包括在内。 基本上什么都有。 更别提物联网了。 是啊。 嗯,你觉得你们在 Modular 构建的技术栈,如何应用于更广泛的设备领域?
Yeah, so so the stack we built at Modular is designed to scale. But another problem that we as a startup had is that. you know, you can only make money in cloud. and so as a startup, we're only incentivized to care about the data center. now, for qualcomm, that's actually great because it's entering the data center and needs software and check. you never have to worry about qualcomm hardware in the data center not having software. that's problem solved. but the flip side of that is also true, is that we built this platform to scale. and people are running it on arduinos and things like this. we never had a reason to invest in that. and so now as part of qualcomm, we do. and one of the things that it will take a little bit of time, but one of the things i'm really excited about is bringing a unified ai software platform even to the qualcomm devices, also the world, but start with qualcomm first, where you have so much innovation, so many different capabilities at every different power performance threshold, laptop, cell phone, like all of the things to compute. and if we have software developers, ai developers, able to scale into this compute, suddenly they can use the right chips for their workload. and to me, that's exactly what i'm about.
是的,我们在 Modular 构建的技术栈就是为可扩展而设计的。 但作为一家初创公司,我们面临的另一个问题是…… 你知道,只有在云端才能赚钱。 所以作为一家初创公司,我们只会受到激励去关注数据中心。 现在,对高通来说,这其实很不错,因为它正进军数据中心,并且需要软件支持。 你永远不必担心高通的硬件在数据中心里没有软件可用。 这个问题就解决了。 但反过来说也是如此:我们构建这个平台,本来就是为了让它能够扩展。 而且有人把它运行在 Arduino 之类的设备上。 我们以前没有理由在这方面投入。 而现在成为高通的一员之后,我们有理由投入了。 虽然这需要一点时间,但我真正期待的一件事,是把统一的 AI 软件平台带到高通设备上,也带到全世界的设备上,不过先从高通开始。高通拥有如此多的创新,在不同功耗和性能档位上具备这么多不同能力,从笔记本电脑、手机到各种计算设备,无所不包。 如果软件开发者、AI 开发者能够将他们的应用扩展到这些计算设备上,他们就能根据自己的工作负载选用合适的芯片。 而对我来说,这正是我的追求。
this kind of heterogeneous devices and kind of unifying that from a developer and programming perspective is only one part of the vision that i've heard you talk about in the past.
这种异构设备,以及从开发者和编程的角度将它们统一起来,只是我以前听你谈过的愿景中的一部分。
what's your broader vision for mojo?
你对 Mojo 更宏大的愿景是什么?
yeah, well, so mojo and max, think of them as fundamental technologies. As fundamental technologies, they take time to build. So, they're still coming into existence and right now mojo is really good. If you want to write, you know, a matrix multiplication on a gpu, for example, or you want to write the internals of a neural network, things like this max is really good. If you want to get the full power out of serving a model on a data center gpu, like we support nvidia amd tpus from google training from aws qualcomm, obviously, and apple apple gpus as well. And so, that's really cool, but the number of people that want to write operators to implement a neural network are a pretty small audience. and so what we're doing is we're continuing to invest in mojo. and so as it does so, it will grow into a fully general purpose language. and already people are using it to build networking stacks and high level applications and games and things like this. and as a somewhat of a perfectionist, i don't want to oversell it for something that's not quite ready yet. but give it six months, give it a year, and what you'll see is Mojo will rapidly grow up. and to me, this is really exciting. i mean, as you know, i've worked on swift. it's a good thing. but i've learned a lot from swift.
是的,Mojo 和 Max 可以把它们看作基础技术。 作为基础技术,它们需要时间来构建。 所以,它们仍在发展成形;目前 Mojo 已经相当出色。 比如说,如果你想在 GPU 上编写矩阵乘法,或者编写神经网络的内部实现之类的东西,Max 就很出色。 如果你想充分发挥在数据中心 GPU 上部署模型的能力——我们支持 NVIDIA、AMD、Google 的 TPU、AWS 的训练芯片、Qualcomm,当然还有 Apple 的 GPU。 这确实很棒,不过想要编写算子来实现神经网络的人,受众相当有限。 所以,我们正在持续投入 Mojo。 随着它不断发展,它会成长为一门完全通用的语言。 现在已经有人用它来构建网络协议栈、高级应用程序、游戏之类的东西。 而且我算是个完美主义者,不想把它吹捧成尚未完全成熟的东西。 不过再给它六个月,或者一年,你就会看到 Mojo 迅速成长起来。 对我来说,这真的令人兴奋。 我是说,你知道,我参与开发过 Swift。 这是一件好事。 不过我从 Swift 身上学到了很多。
and this is also... swift is how old now? 20 years?
而且,Swift 到现在也有……多老了? 20 年?
15 years? yeah, 15 years old somehow. somehow happens to us. and so this is a great opportunity to build the next thing. and this is the next thing both in terms of... accessing modern compute, because cpus are cool, but there's a lot more than cpus in the world now, and swift only runs on cpus. but also about bringing in new technologies from programming languages and usability. and also, mojo is a member of the python family. and so much of the world loves python. so much of the ai research community loves python. and so we're steering directly into that, but solving the biggest problem that python has. the performance and distribution and package management and all the kind of...
15年? 对,居然已经15年了。 这事就这么发生在我们身上了。 所以这是打造下一个新事物的绝佳机会。 这就是下一个新事物,不仅体现在……能够使用现代计算资源上。CPU很棒,但如今世界上不只有CPU,而Swift只能运行在CPU上。 还体现在引入编程语言和易用性方面的新技术。 此外,Mojo也属于Python家族。 世界上有很多人喜欢Python。 AI研究社区里也有很多人喜欢Python。 所以我们正朝着这个方向前进,同时解决Python面临的最大问题。 性能、分发、包管理,以及诸如此类的……
a lot of people that leave python do it very reluctantly because they have to for performance reasons, not because they don't enjoy the language.
很多人离开Python时都很不情愿,因为出于性能方面的原因,他们不得不离开,并不是因为他们不喜欢这门语言。
that's right. and so i'm very excited that, again, we get to lean into this and we get to build into this. and what i think you'll see is module will continue to expand and we'll enter into many of different qualcomm devices, but also... hopefully lots of other people's products as well.
没错。 所以我非常激动,我们又有机会拥抱这一方向,并在此基础上继续构建。 我认为你们会看到,Module将继续拓展,并进入许多不同的高通设备,同时也……希望能进入许多其他公司的产品。
beyond the immediate stack that you're working on, what are you most excited about in ai?
除了你正在开发的这个直接相关的技术栈之外,AI领域还有什么最让你期待?
yeah, well, so i mean, ai, so this is a hard question, right? because, you know, i've been in the space for the last decade. i love just the innovation. i love the pace of progress. i love everybody's always feeling a little bit kind of on a back foot because things move so fast. and that can be very intimidating sometimes because, you know, every second tuesday, Somebody says a new category of people are cooked, right? But what I also know from being in AI for 10 years is that happens every second Tuesday, right? And so what I actually believe in and what I've seen is progress continues. And if you just lean into it and if you're okay with a little bit of ambiguity, if you realize people overclaim every day and so and you just focus on building great things and delivering experiences to your customers, then you can get all the benefit of it. And you don't have to like have some sleepless nights about job loss or something.
嗯,我是说,AI这个话题……这是个很难回答的问题,对吧? 因为你知道,我在这个领域已经有十年了。 我就是喜欢创新。 我喜欢这种发展速度。 我喜欢大家总是有点处于被动,因为事情变化得太快了。 有时这会让人很不安,因为你知道,每隔一个星期二,就有人说某一类人要完蛋了,对吧? 但我在人工智能领域做了10年,也知道这种事每隔一个星期二就会发生,对吧? 所以我真正相信、也亲眼见到的是,进步会继续。 只要你拥抱它,能接受一点模糊性,也明白人们每天都在夸大其词,然后专注于打造出色的东西、为客户提供良好的体验,你就能从中获益。 你也不必为失业之类的事而彻夜难眠。
Yeah, yeah. What what are your spiciest AI takes?
对,对。 你对人工智能有哪些最大胆、最有争议的看法?
The ones that I really disagree with are the we spent three months, we now have agents and we've defined away a long-standing problem with agents. Like so agents are awesome. I'm a fan of ai that's saying i spent three months and now i came out with the solution to chip design or ai software or programming or.
我真正不同意的说法是:我们花了三个月,现在有了智能体,而且已经用智能体解决了一个长期存在的问题。 我的意思是,智能体确实很棒。 我支持这样的人工智能:有人说,我花了三个月,现在已经找到了解决芯片设计、人工智能软件或编程问题的方案,或者……
solve.
解决……
math or what math, right? Exactly.
数学问题,或者说数学,对吧? 没错。
Like we've been doing this for a long time. This goes back to we're not going to need radiologists in six.
我们在这方面已经做了很久了。 这又回到了那个说法:六个月后我们就不需要放射科医生了。
months that exactly. Yeah. Geoff Hinton was a very smart guy. But it turns out there's a lot more to building products and building experiences than just writing the code, right? And software engineering. it's just to pick ai coding as an example, it's long been known that people spend more time reading the code than they do writing the code. and so you accelerate the part of writing the code, but you still have the product design, the evolution, the marketing, the brand, and just the judgment that goes into building products. and so we're a long ways away from replacing all that. but i also do think. that if you ignore the tools, if you ignore the techniques, if you just put your head in the sand and hope it goes away, then you'll lose out. and the way i look at it is that the ai technology, it's not optional. you need to adopt it. and the risk isn't that you're going to be obsoleted. the risk is that you're going to fall behind. and so you need to be experimenting with these tools and leaning into it.
没错,就是这样。 是啊。 杰夫·辛顿是个非常聪明的人。 但事实证明,打造产品和创造体验所涉及的事情,远不止写代码,对吧? 还有软件工程。 举人工智能编程为例,这一点早就广为人知:人们花在阅读代码上的时间,比写代码多得多。 所以你加快了编写代码这部分,但产品设计、迭代、营销、品牌,以及打造产品所需的判断力,都还在。 所以,要取代这一切还差得很远。 但我也确实认为…… 如果你无视这些工具,无视这些技术,只是一味埋头装作看不见、希望它们自行消失,那你就会错失机会。 在我看来,人工智能技术不是可选项。 你需要采用它。 风险不在于你会被淘汰。 风险在于你会落后。 所以你需要尝试这些工具,并积极拥抱它们。
on that note, how has your experience or workflow evolved in light of agents as a developer engineer?
说到这个,作为开发者或工程师,智能体的出现如何改变了你的体验或工作流程?
yeah. well, so i still write quite a lot of code. you can follow me on github if you want. so i use ai coding quite a lot. it's really great for a thought partner. it's awesome for knocking out mechanical stuff. it's great for things that are not quite architectural. and also, you realize that a lot of what we do is not actually novel. and so since everything is a remix, saying, okay, well, this system and this system and this system have done similar things, the ai probably knows more about them than we do. what are the pros and cons? what is the right approach for this new scenario can be extremely valuable. and so the challenge is that if you go into complete autopilot and you say, just like, solve the problem for me, it will do something, it will pass the test. it may not be the right way. so you still have to look at it. and again, i love the tools. i use them.
是啊。 嗯,我现在仍然写很多代码。 如果你愿意,可以在 GitHub 上关注我。 所以我经常使用人工智能编程。 它真的很适合用来一起梳理想法。 用它来快速处理机械性的工作,效果非常棒。 它也很适合处理那些不太涉及架构的事情。 而且你会发现,我们做的很多事情其实并不新颖。 既然一切都是 remix,那么你可以说,好吧,这个系统、这个系统和这个系统都做过类似的事,AI 对它们的了解可能比我们更多。 优缺点是什么? 在这个新场景中,正确的做法是什么?这可能极具价值。 所以挑战在于,如果你完全进入自动驾驶模式,说“直接替我解决这个问题”,它确实会做点什么,也能通过测试。 但方法未必正确。 所以你还是得检查一下。 而且再说一次,我很喜欢这些工具。 我也会用它们。
so your team look at every line of code or team know which lines need to be looked at and look at those?
你们团队是会检查每一行代码,还是知道哪些代码行需要检查,然后只看那些?
we have a very deliberate two-tier policy. architectural, we build systems and compilers and things like this. and so the things that are architectural, you have to have a human in the loop. but there's also things that really only you care about their spec. and if there's a behavioral spec, like it's an ai kernel that just needs to go fast, cool, let the agents grind on it. and that's great, right? and i don't have to maintain the code. i don't have to care about it. it doesn't impact anybody else. that's fine, but if you're working on the architecture, a human has to be in the loop because you need somebody that's thinking about not just what are we doing today, but what are we doing six months or 12 months from now. and that's something that there is no really great spec for, no matter how much you try with the agents.
我们有一套非常明确的两层政策。 在架构层面,我们会构建系统、编译器之类的东西。 所以,涉及架构的事情,必须有人参与其中。 但也有一些事情,只有你自己在乎它们的规格。 如果它有明确的行为规格,比如一个只需要运行得很快的 AI 内核,那就很好,让智能体去埋头处理吧。 这很不错,对吧? 而且我不必维护这些代码。 我不必操心它。 它也不会影响其他人。 这样没问题。但如果你在做架构工作,就必须有人参与其中,因为你需要有人考虑的不只是我们今天要做什么,还有六个月或十二个月后要做什么。 无论你怎么尝试让智能体处理这件事,都很难为它制定一套真正完善的规格。
and do you have a take on where you see agentic coding going?
你对智能体编程的发展方向有什么看法?
Yeah, that's that's a really interesting part. I I I would be bad at predicting that because I never would have guessed how fast things have gone Yeah. just in such a short period of time, right? And for context, we've been working on AI coding for the decade that I've been in the space, but it just upticked and inflected when the models got better.
是啊,这确实是个很有意思的话题。 我不太擅长预测这个,因为我根本没想到事情会发展得这么快。是啊。 就在这么短的时间里,对吧? 背景是,我们在我进入这个领域后的这十年里一直在做 AI 编程,但直到模型变得更好,发展才突然加速、出现拐点。
Most of that time it didn't work all that well.
在那之前的大部分时间里,它都不怎么好用。
And exactly that, right? And so and so I don't know. I mean, uh, I could predict two very different outcomes. Like it continues to to just get better and better and better and more analytical, that could happen. but it could also be more like many other curves in ai where it's an s curve. and it could be that we're halfway up or near the peak of the s curve, and it could be that it starts to flatline and go. and the thing that propels ai, in my opinion, isn't strict exponentials. what it is, is it's compounding s curves. the pre-training was amazing, and gpt-4 was actually a huge step over gpt-3.5. but then it flattened out. but then you got rl, and then you got other s curves that get layered in. and so i think that, again, it's hard for me to know. i'm not the ai researcher, but i hope it keeps going fast. yeah.
没错,就是这样,对吧? 所以,所以我也说不准。 我是说,呃,我能想象两种截然不同的结果。 比如,它会继续变得越来越好、越来越好、越来越有分析能力,这种情况有可能发生。 但它也可能更像 AI 领域里的许多其他发展曲线,呈现 S 曲线。 也可能我们已经走过了上升曲线的一半,或者接近 S 曲线的顶端,接下来它就会开始停滞。 在我看来,推动 AI 发展的并不是严格意义上的指数增长。 而是不断叠加、相互推动的 S 曲线。 预训练的效果惊人,而且 GPT-4 相比 GPT-3.5 确实迈出了一大步。 但之后就趋于平缓了。 不过后来出现了 RL,又有其他 S 曲线叠加进来。 所以我觉得,还是那句话,我很难判断。 我不是 AI 研究人员,但我希望它能继续快速发展。 是啊。
and even if it stopped, there's still so much to absorb into enterprises and our personal lives, and there's still a lot to be built.
即使它停下来了,企业和我们的个人生活中仍有很多东西需要吸收,也还有很多东西有待创造。
that's right. well, and also, no matter how fast the ai and technology goes, It's always held back by the pace of humans. Right. So exactly to your point. Technology making something possible and technology turning into product value is a somewhat different thing. And so, you know, I think that we're all still catching up, but I don't know. I'm excited about the pace that we have, so it's good. Yeah.
没错。 是啊,而且无论人工智能和技术发展得多快,始终都会受限于人类的步伐。 对。 所以,正如你所说。 技术让某件事成为可能,和技术转化为产品价值,是两回事。 所以,我觉得我们都还在努力追赶,不过我也说不好。 我对目前的发展速度感到兴奋,所以挺好的。 是啊。
Awesome. Well, Chris, thanks so much for chatting. It's great catching up with you here. Yeah, it's great to see you soon. Thank you.
太棒了。 好了,Chris,非常感谢你和我聊了这么多。 很高兴能在这里和你叙叙旧。 是啊,很高兴见到你,回头见。 谢谢。
Chris Lattner围绕AI计算的异构化,解释不同芯片适合预填充、解码、推测解码等不同任务,因此行业需要能跨架构复用的软件栈,但不能牺牲各芯片的性能优势。Modular从芯片底层构建Mojo、MAX、内核与模型服务体系,通过共享通用逻辑、专门优化关键计算来兼顾统一与适配。加入Qualcomm后,团队推动Mojo开源,并希望将平台扩展至数据中心、笔记本、手机等设备。访谈还讨论Mojo成为通用语言的愿景,以及AI编码工具的边界:代理可以处理明确规格下的优化工作,系统架构和长期产品判断仍需人类负责。
Lattner的经历涉及编译器、编程语言和开发工具,也曾在Apple参与构建Swift。创立Modular时,他关注的问题不再只是开发应用,而是AI带来了大量GPU和专用加速器,普通程序员却难以编程使用这些硬件。Modular的目标是让开发者能够访问先进计算能力,Mojo也由此成为其建设方向之一。
异构计算意味着不同类型的计算设备协同工作。随着AI计算需求增长,GPU及各类专用芯片相继出现;模型工作负载也可拆分为预填充、解码和推测解码等阶段。不同阶段对并行计算、内存或低延迟的要求不同,因此不存在适用于所有任务的单一芯片。软件需要跨芯片复用,避免为每种架构反复重写同一套代码。
统一软件栈有两种极端:只支持所有系统的共同子集,会放弃硬件能力;为每种芯片分别构建,则失去统一性。Modular选择拆分工作负载:批处理、推测解码和KV缓存等服务逻辑可跨架构共享,而矩阵乘法内部需要适配各芯片的数据访问、权重加载和计算方式。团队从硅片出发构建语言、编程模型、AI内核和服务架构,使常用运算与神经网络组件尽量兼容,同时在能发挥芯片优势的部分进行专门优化。
Modular曾准备支持来自六家硬件供应商的六种架构,其中包括Qualcomm。Lattner称,Qualcomm希望把平台开放,建立能让多种芯片参与竞争的生态,使软件不妨碍厂商凭硅片能力竞争;创业公司此前则需要保护知识产权并考虑商业化。加入Qualcomm后,Mojo已按Apache许可证开源,MAX则计划推动开放联盟。MAX位于Mojo之上,负责将芯片连接到神经网络和模型服务。
Modular原先作为创业公司主要受云端商业化激励,因此重点放在数据中心;平台本身则具备扩展能力,甚至有人将其运行在Arduino等设备上。加入Qualcomm后,团队有动力探索数据中心之外的产品形态,并计划先从Qualcomm设备着手,将统一AI软件平台带到笔记本、手机等不同功耗和性能层级的设备,让开发者能按工作负载选择合适的芯片。
Mojo和MAX是需要长期建设的基础技术:Mojo适合编写GPU矩阵乘法等底层代码,MAX适合在多种硬件上部署模型服务。由于编写神经网络算子的开发者群体有限,Modular还在扩展Mojo,使其成长为通用语言;已有用户用它构建网络栈、高层应用和游戏。Lattner将Mojo描述为Python生态的一员,希望解决Python在性能、分发和包管理方面的限制,同时支持现代加速硬件。
Lattner看好AI持续进步,但提醒人们不要轻信短期内解决芯片设计、软件工程或数学等长期难题的夸大说法。软件工程不只是写代码:工程师还需阅读代码,并承担产品设计、迭代、营销、品牌和判断等工作,因此短期内不能把这些职责都视为可替代。同时,忽视AI工具也有落后风险;他认为应主动尝试并采用这些工具。
Lattner仍亲自编写大量代码,也把AI编码工具用于思路交流、机械性工作和非架构任务。代理可以借鉴既有系统,为新场景比较方案,但完全交给代理可能得到能通过测试、却不合适的实现,因此仍需审查。团队采用两层策略:涉及系统和编译器架构的工作必须有人参与;对行为规格明确、目标是提速且维护影响有限的AI内核,则可让代理反复优化。架构判断还要考虑未来数月乃至一年,难以用规格完整表达。
Lattner不确定编码代理会持续快速提升,还是接近S曲线的平缓阶段。他认为AI进步更像多个S曲线叠加:预训练和GPT-4曾带来明显跃迁,之后有所放缓,强化学习等新进展又可能形成新的增长曲线。即使模型能力增速放缓,企业和个人仍有大量技术需要吸收和应用;技术变得可行,与转化为产品价值是两回事,落地速度还受人类适应能力制约。
02:33 AI工作负载在计算、内存和延迟需求上各不相同,因此需要让不同芯片各自承担适合的任务。
04:25 跨架构软件栈应共享通用服务逻辑,同时针对芯片差异优化性能关键内核。
10:38 Mojo的目标不止于AI算子开发,还包括成长为能覆盖更广泛应用的通用语言。
15:59 编码代理可以优化规格明确的内核,但系统架构和长期方向仍需要人类参与判断。
17:43 AI技术进步只有经过人类吸收和产品化,才能转化为实际价值。