#447 – Cursor Team: Future of Programming with AI
Thank you for listening ❤ Check out our sponsors: https://lexfridman.com/sponsors/ep447-sc
See below for timestamps, transcript, and to give feedback, submit questions, contact Lex, etc.
Transcript:
https://lexfridman.com/cursor-team-transcript
CONTACT LEX:
Feedback - give feedback to Lex: https://lexfridman.com/survey
AMA - submit questions, videos or call-in: https://lexfridman.com/ama
Hiring - join our team: https://lexfridman.com/hiring
Other - other ways to get in touch: https://lexfridman.com/contact
EPISODE LINKS:
Cursor Website: https://cursor.com
Cursor on X: https://x.com/cursor_ai
Anysphere Website: https://anysphere.inc/
Aman's X: https://x.com/amanrsanger
Aman's Website: https://amansanger.com/
Arvid's X: https://x.com/ArVID220u
Arvid's Website: https://arvid.xyz/
Michael's Website: https://mntruell.com/
Michael's LinkedIn: https://bit.ly/3zIDkPN
Sualeh's X: https://x.com/sualehasif996
Sualeh's Website: https://sualehasif.me/
SPONSORS:
To support this podcast, check out our sponsors & get discounts:
Encord: AI tooling for annotation & data management.
Go to https://encord.com/lex
MasterClass: Online classes from world-class experts.
Go to https://masterclass.com/lexpod
Shopify: Sell stuff online.
Go to https://shopify.com/lex
NetSuite: Business management software.
Go to http://netsuite.com/lex
AG1: All-in-one daily nutrition drinks.
Go to https://drinkag1.com/lex
OUTLINE:
(00:00) - Introduction
(09:25) - Code editor basics
(11:35) - GitHub Copilot
(18:53) - Cursor
(25:20) - Cursor Tab
(31:35) - Code diff
(39:46) - ML details
(45:20) - GPT vs Claude
(51:54) - Prompt engineering
(59:20) - AI agents
(1:13:18) - Running code in background
(1:17:57) - Debugging
(1:23:25) - Dangerous code
(1:34:35) - Branching file systems
(1:37:47) - Scaling challenges
(1:51:58) - Context
(1:57:05) - OpenAI o1
(2:08:27) - Synthetic data
(2:12:14) - RLHF vs RLAIF
(2:14:01) - Fields Medal for AI
(2:16:43) - Scaling laws
(2:25:32) - The future of programming
PODCAST LINKS:
- Podcast Website: https://lexfridman.com/podcast
- Apple Podcasts: https://apple.co/2lwqZIr
- Spotify: https://spoti.fi/2nEwCF8
- RSS: https://lexfridman.com/feed/podcast/
- Podcast Playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4
- Clips Channel: https://www.youtube.com/lexclips
Press play and read along
Transcript
Speaker 1 following is a conversation with the founding members of the Cursor team, Michael Trull, Swaley Asif, Arvid Lunmark, and Amon Senger.
Speaker 1 Cursor is a code editor based on VS Code that adds a lot of powerful features for AI-assisted coding. It has captivated the attention and excitement of the programming and AI communities.
Speaker 1 So I thought this is an excellent opportunity to dive deep into the role of AI in programming. This is a super technical conversation that is bigger than just about one code editor.
Speaker 1 It's about the future of programming, and in general, the future of human-ai collaboration in designing and engineering complicated and powerful systems.
Speaker 1
And now a quick few second mention of each sponsor. Check them out in the description.
It's the best way to support this podcast.
Speaker 1 We got Encorde for unifying your machine learning stack, Masterclass for learning, Shopify for selling stuff online, NetSuite for your business, and AG1 for your health. Choose wisely, my friends.
Speaker 1 Also, if you want to get in touch with me for whatever reason, or take a survey or submit questions for an AMA, all of that would be great. Go to lexreama.com slash contact.
Speaker 1
And now, onto the full ad reads. I try to make them interesting, but if you skip them, please still check out our sponsors.
I enjoy their stuff.
Speaker 2 Maybe you will too.
Speaker 1 This episode is brought to you by Encorde, a platform that provides data-focused AI tooling for data annotation, curation, management, and for model evaluation.
Speaker 1 One of the things I love about these guys is they have a great blog that describes cleanly, I mean, it's technical, but it's not too technical, but it's sufficiently technical to where it's actually describing the ideas, not BS,
Speaker 1 blog posts on...
Speaker 1 sort of the state of the art, like the OpenAI01 model that was just released. So sometimes they integrate it into why this is a part of Encore, why this makes sense, and sometimes not.
Speaker 1
And so I love that. I recommend their blog just in general.
That said, you know, when they are looking at state-of-the-art models, they are always looking for ways to integrate it into their platform.
Speaker 1 Basically, it's a place to organize your data, and data is everything. This was true before the popularity and the explosion of attention methods of Transformers, and it is still very much true now.
Speaker 1 Sort of the non-synthetic, the human-generated data is extremely important.
Speaker 1 How you generate that data, how you organize that data, how you leverage it, how you train on it, how you fine-tune on it, the pre-training, the post-training, all of it, the whole thing.
Speaker 1
Data is extremely, extremely important. And so, Encore takes data very seriously.
Anyway, go try out Encore to create, annotate, and manage your AI data at Encore.com/slash Lex.
Speaker 1 That's Encorde.com/slash Lex.
Speaker 1 This episode is also brought to you by Masterclass, where you can watch over 200 classes from the best people in the world in their respective disciplines. Carlos Santana on guitar, for example.
Speaker 1
I loved that one. There's a few guitar ones, Tom Morello, too.
Great, great, great stuff. But Carlos Santana, his instrumental Europa, I haven't quite tried to play that, but it's on my to-do list.
Speaker 2 It's sort of one of those things.
Speaker 1
You know for sure this is a thing I will play because it's too beautiful. It's too soulful.
It feels like once you play, you understand something about the guitar that you didn't before.
Speaker 1
It's not blues. It's not, I don't know what it is.
It's some kind of dreamlike teleportation into a psychedelic world
Speaker 1 where the tone is warmer than anything else I've ever heard. And still, the guitar can cry.
Speaker 2 I don't know.
Speaker 1
I love it. He's a genius.
So it's such a gift that you can get a genius like that to
Speaker 1 teach us about
Speaker 1
his secrets. Get unlimited access to every masterclass and get an additional 15% off an annual membership at masterclass.com slash Lexpod.
That's masterclass.com slash Lex Pod.
Speaker 1 This episode is also brought to you by Shopify.
Speaker 1 A platform designed for anyone to sell anywhere with a great looking online store or simple looking online store like the one I put together at lexfreeman.com slash store.
Speaker 1
I have a few shirts on there in case you're interested. And speaking of shirts, I'm reminded of thrift stores, which I very much loved for a long time.
I still love.
Speaker 1 Thrift stores were a nice place to get stuff like, I don't know, kitchen stuff and clothing.
Speaker 1 And the kind of clothing you get at thrift stores is actually pretty interesting because there's shirts there. they're just unlike anything else you would get anywhere else.
Speaker 1 So, if you're sort of selective and creative-minded, there's a lot of interesting fashion that's there.
Speaker 1 And in terms of t-shirts, there's just like hilarious t-shirts, t-shirts that are very far away from the kind of trajectories you have taken in life, or are not, but you just haven't thought about it.
Speaker 1 Like a band that you love, but you've never would have thought to wear their t-shirt. Anyway, a little bit, I think of Shopify as the internet's thrift store.
Speaker 1
Of course, you can do super classy, you can do super fancy, or you can do super thrift. All of it is possible.
Sign up for a $1 per month trial period at shopify.com slash Lex. That's all lowercase.
Speaker 1 Go to shopify.com slash Lex to take your business to the next level today.
Speaker 1 This episode is also brought to you by NetSuite, an all-in-one cloud business management system.
Speaker 1 Sometimes I think that NetSuite is supporting this podcast because they're trolling me. They're saying, hey, Lex, aren't you doing a little too much talking? Maybe you should be building more.
Speaker 1 I agree with you, NetSuite.
Speaker 2 I agree with you.
Speaker 1 And so every time I do an ad read for NetSuite, it is a chance for me to confront my
Speaker 1
Jungian shadow. Some of the demons emerge from the subconscious and ask questions.
that I don't have answers to.
Speaker 1 Questions about one's mortality and that life is short and that one of the most fulfilling things in life is to have a family and kids and all of these things I would very much like to have.
Speaker 1
And also the reality that I love programming and I love building. I love creating cool things that people can use and share and that would make their life better.
All of that.
Speaker 1 Of course, I also love listening to podcasts. And I kind of think of this podcast as me listening to a podcast where I can also maybe participate by asking questions.
Speaker 1
So So, all these things that you love, but you ask the hard question of like, okay, well, life is slipping away. It's short.
It really, really is short.
Speaker 1 What do you want to do with the rest of the minutes and the hours that make up your life?
Speaker 1 Yeah.
Speaker 1 So, thank you for the existential crisis, NetSuite. I appreciate it.
Speaker 1 If you're running a business, if you have taken the leap into the unknown and started a company, then you should be using the right tools to manage that company.
Speaker 1
In fact, over 37,000 companies have upgraded to NetSuite. Take advantage of NetSuite's flexible financing plan at netsuite.com slash Lex.
That's NetSuite.com slash Lex.
Speaker 1 This episode is also brought to you by the delicious, the delicious AG1.
Speaker 1 It's an all-in-one daily drink to support better health and peak performance.
Speaker 1 It's basically a super awesome multivitamin that makes me feel like I have my life together, even when everything else feels like it's falling apart. At least I have AG1.
Speaker 1 At least I have that nutritional foundation to my life.
Speaker 1 So all the fasting I'm doing, all the carnivore diets, all the physical endurance events and the mental madness of staying up all night or just the stress of certain things I'm going through, all of that.
Speaker 1 AG1 is there.
Speaker 1 At least I have the vitamins. Also, I sometimes wonder, they used to be called Athletic Greens.
Speaker 1 And now they're called AG1. I always wonder, is AG2 coming? Like, why is it just one? It's an interesting branding decision, like AG1.
Speaker 1 Me as an OCD kind of programmer type, it's like, okay, is this a versioning thing? Okay, is this like AG 0.1 alpha?
Speaker 1 When's the final release?
Speaker 1 Anyway, the thing I like to say and to consume is AG1. They'll give you one month supply of fish oil when you sign up at drinkag1.com/slash Lex.
Speaker 1
This is the Lex Friedman podcast. To support it, please check out our sponsors in the description.
And now, dear friends, here's Michael, Swale, Arvid, and Amon.
Speaker 1
All right, this is awesome. We have Michael, Amon, Swale, Arvid here from the cursor team.
First up, big ridiculous question. What's the point of a code editor?
Speaker 2 So the code editor is largely the place where you build software. And today,
Speaker 2 or for a long time, that's meant the place where you text edit a formal programming language.
Speaker 2 And for people who aren't programmers, the way to think of a code editor is like a really souped up word processor for programmers, where the reason it's souped up is code has a lot of structure.
Speaker 2 And so
Speaker 2 the quote-unquote word processor, the code editor, can actually do a lot for you that word processors, you know, sort of in the writing space haven't been able to do for people editing text there.
Speaker 2 And so that's everything from giving you visual differentiation of the actual tokens in the code so you can like scan it quickly, to letting you navigate around the code base, sort of like you're navigating around the internet with like hyperlinks.
Speaker 2 You're going to sort of definitions of things you're using, to error checking
Speaker 2 to
Speaker 2 catch rudimentary bugs.
Speaker 2 And so traditionally, that's what a code editor has meant.
Speaker 2 And I think that what a code editor is is going to change a lot over the next 10 years as what it means to build software maybe starts to look a bit different.
Speaker 1 I think also code editor should just be fun.
Speaker 4
Yes. That is very important.
That is very important. And it's actually sort of an underrated aspect of how we decide what to build.
Speaker 4 Like a lot of the things that we build and then we try them out, we do an experiment and then we actually throw them out because they're not fun and and so a big part of being fun is like being fast a lot of the time fast is fun yeah fast
Speaker 2 yeah
Speaker 1 oh yeah that should be a t-shirt
Speaker 2 like like fundamentally i think one of the things that draws a lot of people to to building stuff on computers is this like insane integration speed where you know in other disciplines you might be sort of gate capped by resources or the ability even the ability you know to get a large group together and coding is this like amazing thing where it's you and the computer and that alone,
Speaker 2 you can build really cool stuff really quickly.
Speaker 1 So, for people who don't know, Cursor is this super cool new editor that's a fork of VS Code. It would be interesting to get your kind of explanation of your own journey of editors.
Speaker 1 How did you, I think all of you
Speaker 1 were big fans of VS Code with Copilot.
Speaker 1 How did you arrive to VS Code and how did that lead to your journey with Cursor?
Speaker 2 Yeah.
Speaker 4 So
Speaker 2 I think a lot of us, well, all of us were originally Vim users.
Speaker 4 Pure, pure Vim. Pure Vim, yeah.
Speaker 2 No Neo Vim, just pure Vim in a terminal. And
Speaker 2 at least for myself, it was around the time that Copilot came out, so 2021, that
Speaker 2
I really wanted to try it. So I went into VS Code, the only platform, the only code editor in which it was available.
And even though I
Speaker 2 really enjoyed using Vim, just the experience of Copilot with VS Code was more than good enough to convince me to switch. And so that kind of was the default until we started working on Cursor.
Speaker 1
And maybe we should explain what Copilot does. It's like a really nice autocomplete.
It suggests, as you start writing a thing, it suggests one or two or three lines how to complete the thing.
Speaker 1 And there is a... fun experience in that, you know, like when you have a close friendship and your friend completes your sentences.
Speaker 1 like when it's done well there's an intimate feeling uh there's probably a better word than intimate but there's a there's a cool feeling of like holy shit it gets me
Speaker 4 now and then there's an unpleasant feeling when it doesn't get you uh and so there's that that kind of friction but i would say for a lot of people the feeling that it gets me overpowers that it doesn't and i think actually one of the underrated aspects of get up copolot is that even when it's wrong is it's like a little bit annoying but it's not that bad because you just type another character and then maybe then it gets you, or you type another character, and then it gets you.
Speaker 4 So, even when it's wrong, it's not that bad.
Speaker 3
Yeah, you can sort of iterate and fix it. I mean, the other underrated part of Copilot for me sort of was just the first real, real AI product.
It's like the first language model consumer product.
Speaker 1 So, Copilot was kind of like the first killer app for LLMs.
Speaker 2 Yeah, and like the beta was out in 2021, right? Okay.
Speaker 1 So, what's the origins and story of Cursor?
Speaker 2 So around 2020, the scaling loss papers came out from OpenAI.
Speaker 2 And that was a moment where this looked like clear, predictable progress for the field, where even if we didn't have any more ideas, it looked like you could make these models a lot better if you had more compute and more data.
Speaker 1 By the way, we'll probably talk for three to four hours on the topic of scaling loss.
Speaker 2 Yes. But just
Speaker 1 to summarize, it's a paper and a set of papers and a set of ideas that say bigger might be better for model size and data size in the realm of machine learning.
Speaker 3 It's bigger and better, but predictably better.
Speaker 1 Okay, that's another topic of conversation.
Speaker 2 So around that time, for some of us, there were like a lot of conceptual conversations about what's this going to look like?
Speaker 2 What's the story going to be for all these different knowledge worker fields about how they're going to be made better by this technology getting better?
Speaker 2 And then
Speaker 2 I think there were a couple of moments where the theoretical gains predicted in that paper started to feel really concrete.
Speaker 2 And it started to feel like a moment where you could actually go and not do a PhD if you wanted to work on, do useful work in AI.
Speaker 2 It actually felt like now there was this whole set of systems one could build that were really useful.
Speaker 2 And I think that the first moment we already talked about a little bit, which was playing with the early bit of Copelit. Like that was awesome and magical.
Speaker 2 I think that the next big moment where everything kind of clicked together was actually getting early access to GPT-4. So it was sort of end of 2022 was when we were tinkering with that model.
Speaker 2
And the step-up and capabilities capabilities felt enormous. And previous to that, we had been working on a couple of different projects.
We had been,
Speaker 2 because of Copilot, because of scaling laws, because of our prior interest in the technology, we had been tinkering around with tools for programmers, but things that are like very specific.
Speaker 2 So, you know, we were building tools for financial professionals who have to work within a Jupyter notebook, or like, you know, playing around with, can you do static analysis with these models?
Speaker 2 And then the step-up in GPT-4 felt like, look, that really made concrete the theoretical gains that we had predicted before.
Speaker 2 Felt like you could build a lot more just immediately at that point in time. And also,
Speaker 2 if we were being consistent, it really felt like this wasn't just going to be a point solution thing. This was going to be all of programming was going to flow through these models.
Speaker 2
It felt like that demanded a different type of programming environment, a different type of programming. And so we set off to build that.
that sort of larger vision around then.
Speaker 3 There's one that I distinctly remember.
Speaker 3 So my roommate is an amo gold winner and uh there's a competition in the u.s called the putnam which is sort of the imo for college people and it's it's this math competition is he's exceptionally good so sheng tong and ammon i remember it's sort of
Speaker 3 june june of 2022
Speaker 3 had this bet on whether the mod like 2024 june or july you were going to win a gold medal in the imo with the with like models imo is an international math olympiad uh yeah i amo is international math olympiad and so arvid and i are both that have you know also competed in it so it was sort of personal and
Speaker 3 and i i remember thinking matt this is just this is not going to happen this was like it was un like even though i i sort of believed in progress i thought you know i mold just like a mod is just delusional yeah that was the that was the and and to be honest it i mean i i was to be clear very wrong but that was maybe the most prescient bet in the group.
Speaker 1 So the new results from Deep Mind,
Speaker 1 it turned out that you were correct.
Speaker 2
That's what this is. Well, it was technically not.
Technically incorrect, but one point away. Amon was very enthusiastic about this stuff.
Speaker 2 And before,
Speaker 2 Amon had this like scaling laws t-shirt that he would walk around with, where it had like charts and like the formulas on it.
Speaker 1 So you like felt the AGI or you felt the scaling?
Speaker 2 Yeah, I distinctly remember there was this one conversation I had with Michael where before I hadn't thought super deeply and critically about scaling laws.
Speaker 2 And he kind of posed the question, why isn't scaling all you need? Or why isn't scaling going to result in massive gains in progress? And I think I went through like the
Speaker 2 stages of grief. There is anger, denial, and then finally at the end, just thinking about it,
Speaker 2 acceptance.
Speaker 2 And I think I've
Speaker 2 been quite hopeful and
Speaker 2 optimistic about progress since. I think one thing I'll caveat is
Speaker 2 I think it also depends on like which domains you're going to see progress.
Speaker 2 Like math is a great domain because especially like formal theorem proving because you get this fantastic signal of actually verifying if the thing was correct.
Speaker 2 And so this means something like RL can work really, really well. And I think like you could have systems that are perhaps very superhuman in math and still not technically have AGI.
Speaker 1
Okay, so can we take it all the way to cursor? And what is cursor? It's a fork of VS Code. And VS Code is one of the most popular editors for a long time.
Like everybody fell in love with it.
Speaker 1 Everybody left Vim. I left Emacs for it.
Speaker 2 Sorry.
Speaker 1 So it unified in some fundamental way the
Speaker 1
developer community. And then you look at the space of things.
You look at the scaling laws. AI is becoming amazing.
And you decided, okay, it's not enough to just write an extension fee of VS Code
Speaker 1 because there's a lot of limitations to that.
Speaker 1 We need, if AI is going to keep getting better and better and better, we need to really rethink how the AI is going to be part of the editing process. And so you decided to fork VS Code
Speaker 1 and start to build a lot of the amazing features we'll be able to
Speaker 1
talk about. But what was that decision like? Because there's a lot of extensions, including Copilot.
of VS Code that are doing sort of AI type stuff. What was the decision like to just fork VS Code?
Speaker 2 So the decision to do an editor seemed kind of self-evident to us for at least what we wanted to do and achieve.
Speaker 2 Because when we started working on the editor, the idea was these models are going to get much better, their capabilities are going to improve, and it's going to entirely change how you build software, both in a you will have big productivity gains, but also radical in how like the act of building software is going to change a lot.
Speaker 2 And so you're very limited in the control you have over a code editor if you're a plugin to an existing coding environment.
Speaker 2 And we didn't want to get locked in by by those limitations. We wanted to be able to just build the most useful stuff.
Speaker 1 Okay, well then the natural question is,
Speaker 1 you know, VS Code is kind of with Copilot a competitor. So how do you win?
Speaker 1 Is it basically just the speed and the quality of the features?
Speaker 2 Yeah, I mean, I think this is a space that is quite interesting, perhaps quite unique, where
Speaker 2 If you look at previous tech waves, maybe there's kind of one major thing that happened and it unlocked a new wave of companies.
Speaker 2 But every single year, every single model capability or jump you get in model capabilities, you now unlock this new wave of features, things that are possible, especially in programming.
Speaker 2 And so I think in AI programming, being even just a few months ahead, let alone a year ahead, makes your product much, much, much more useful.
Speaker 2 I think the cursor a year from now will need to make the cursor of today look obsolete.
Speaker 2 And I think, you know, Microsoft has done a number of like fantastic things, but I don't think they're in a great place to really keep innovating and pushing on this in the way that a startup can.
Speaker 1 Just rapidly implementing features.
Speaker 2 And push, yeah, like, and kind of doing the research, experimentation necessary
Speaker 2 to really push the ceiling.
Speaker 3 I don't know if I think of it in terms of features as I think of it in terms of like capabilities for programmers. It's that like, you know, as
Speaker 3 the new O1 model came out, and I'm sure there are going to be more models of different types, like longer context and maybe faster.
Speaker 3 Like, there's all these crazy ideas that you can try, and hopefully, 10% of the crazy ideas will make it into something kind of cool and useful. And
Speaker 3 we want people to have that sooner. To rephrase, it's like an underrated fact is we're making it for ourselves.
Speaker 3 When we started Cursor, you really felt this frustration that models, you could see models getting better. But the COPOL experience had not changed.
Speaker 3
It was, it's like, man, these guys, like, the ceiling is getting higher. Like, why are they not making new things? Like, they should be making new things.
They should be like, you know, like, like,
Speaker 3 where's all the alpha features? There were no alpha features.
Speaker 2 It was like,
Speaker 3 I'm sure it was selling well. I'm sure it was a great business, but it didn't feel,
Speaker 3 I'm one of these people that really want to try and use new things. And it was just, there's no new thing for like a very long while.
Speaker 1 Yeah, it's interesting.
Speaker 1 I don't know how you put that into words, but when you compare a cursor with Copilot, Copilot pretty quickly became, started to feel stale for some reason.
Speaker 4 Yeah, I think one thing that I think
Speaker 4 helps us is that we're sort of doing it all in one. We're developing the
Speaker 4 UX and the way you interact with the model at the same time as we're developing like how we actually make the model give better answers.
Speaker 4 So like how you build up the the prompt or or like how do you find the context and for a cursor tab like how do you train the model um so i think that helps us to have all of it like sort of like the same people working on the entire experience end-to-end yeah it's like the the person making the ui and the person training the model like sit to like
Speaker 3 18 feet away so often the same person even yeah often often even the same person so you you can you can create things that are that are sort of not possible if you're not you're not talking you're not experimenting.
Speaker 1 And you're using, like you said, cursor to write cursor.
Speaker 2
Of course. Oh, yeah.
Yeah.
Speaker 1
Well, let's talk about some of these features. Let's talk about the all-knowing, the all-powerful.
Praise be to the tab.
Speaker 1 Autocomplete on steroids,
Speaker 1 basically. So how does tab work? What is tab?
Speaker 2 To highlight and summarize at a high level, I'd say that there are two things that cursor is pretty good at right now. There are other things that it does,
Speaker 2 but two things that it helps programmers programmers with.
Speaker 2 One is this idea of looking over your shoulder and being like a really fast colleague who can kind of jump ahead of you and type and figure out what you're going to do next.
Speaker 2 And that was the original idea behind, that was kind of the kernel of the idea behind a good autocomplete was predicting what you're going to do next.
Speaker 2 But you can make that concept even more ambitious by not just predicting the characters after your cursor, but actually predicting the next entire change you're going to make, the next diff, the next place you're going to jump to.
Speaker 2 And the second thing Cursor is pretty good at right now, too, is helping you sometimes jump ahead of the AI
Speaker 2 and tell it what to do and go from instructions to code.
Speaker 2 And on both of those, we've done a lot of work on making the editing experience for those things ergonomic and also making those things smart and fast.
Speaker 3 One of the things we really wanted was we wanted the model to be able to edit code for us.
Speaker 3 That was kind of a wish, and we had multiple attempts at it before we had a sort of a good model that could edit code for you.
Speaker 3 Then, after we had a good model, I think there have been a lot of effort to make the inference fast for
Speaker 3 having a good experience.
Speaker 3 And
Speaker 3 we've been starting to incorporate, I mean, Michael sort of mentioned this, like, ability to jump to different places. And that jump to different places, I think, came from a feeling of, you know,
Speaker 3 once you accept an edit,
Speaker 3
it's like, man, it should be just really obvious where to go next. It's like, it's like, I, I'd made this change.
The model should just know that, like, the next place to go to is like 18 lines down.
Speaker 3 Like, if you're, if you're a WIM user, you could press 18JJ or whatever.
Speaker 3 But, like, why, why even, why am I doing this? Like, the model, the model should just know it.
Speaker 3 And then, so, so the idea was, yo, you just press tab, it would go 18 lines down, and then make, it would show you the next edit, and you would press tab.
Speaker 3 So, it was just you, as long as you could keep pressing tab. And so the internal competition was how many tabs can we make someone press? Once you have like the idea,
Speaker 3 more
Speaker 3 sort of abstractly, the thing to think about is sort of like once,
Speaker 3 how are the edits sort of zero entropy?
Speaker 3 So once you've sort of expressed your intent and the edit is, there's no like new bits of information to finish your thought, but you still have to type some characters to like make the computer understand what you're actually thinking, then maybe the model should just sort of read your mind and all the zero entropy bits should just be like tabbed away.
Speaker 3 Yeah.
Speaker 3 That was sort of the abstract.
Speaker 2 There's this interesting thing where if you look at language model loss on different domains,
Speaker 2 I believe the bits per byte, which is kind of character normalized loss for code, is lower than language, which means in general, there are a lot of tokens in code that are super predictable, a lot of characters that are super predictable.
Speaker 2 And this is, I think, even magnified when you're not just just trying to autocomplete code, but predicting what the user is going to do next in their editing of existing code.
Speaker 2 And so, you know, the goal with cursor tap is let's eliminate all the low entropy actions you take inside of the editor.
Speaker 2 When the intent is effectively determined, let's just jump you forward in time, skip you forward.
Speaker 1 Well, what's the intuition and what's the technical details of how to do next cursor prediction?
Speaker 1 That jump,
Speaker 1 that's not so intuitive, I think, to people.
Speaker 2 Yeah.
Speaker 2 I think I can speak to a few of the details on how to make these things work. They're incredibly low latency, so you need to train small models on this task.
Speaker 2 In particular,
Speaker 2 they're incredibly pre-fill token-hungry. What that means is they have these really, really long prompts where they see a lot of your code, and they're not actually generating that many tokens.
Speaker 2 And so the perfect fit for that is using a sparse model, meaning an MOE model.
Speaker 2 So that was kind of
Speaker 2 one breakthrough we made that substantially improved its performance at longer context. The other being
Speaker 2 a variant of speculative decoding that we kind of built out called speculative edits.
Speaker 2 These are two, I think, important pieces of what make it quite high quality and very fast.
Speaker 1
Okay, so MOE mixture of experts, the input is huge, the output is small. Yeah.
Okay, so like, what, what? What else can you say about how to make it caching play a role in this?
Speaker 2 Caching plays a huge role
Speaker 2 Because you're dealing with this many input tokens, if every single keystroke that you're typing in a given line, you had to rerun the model on all of those tokens passed in, you're just going to, one, significantly degrade latency.
Speaker 2 Two, you're going to kill your GPUs with load. So
Speaker 2 you need to design the actual prompts used for the model such that they're caching aware.
Speaker 2 And then, yeah, you need to, you need to reuse the KV cache across requests just so that you're spending less work, less compute.
Speaker 1 Again, what are the things that Tab is supposed to be able to do kind of in the near term? Just to like sort of linger on that. Generate code, like fill empty space,
Speaker 1
also edit code across multiple lines. Yeah.
And then jump to different locations inside the same file. Yeah.
And then like a little bit.
Speaker 3 Obviously jump to different files also.
Speaker 4 So if you make an edit in one file and maybe you have to go, maybe you have to go to another file to finish your thought, it should go to the second file also yeah and then the full generalization is like next next action prediction like sometimes you need to run a command in the terminal and it should be able to suggest the command based on the code that you wrote to um or sometimes you actually need to
Speaker 4 like it suggests something but you you it's hard for you to know if it's correct because you actually need some more information to learn like you need to know the type to be able to verify that it's correct and so maybe it should actually take you to a place that's like the definition of something and then take you back so that you have all the requisite knowledge to be able to accept the next completion so providing the human the knowledge yes
Speaker 1 right yeah can you integrate like i just uh gotten to know a guy named prime gen who i believe has an ss you can order coffee via ssh
Speaker 2 oh yeah we did that we did that uh so can that also the model do that like feed you and like
Speaker 1 and provide you with caffeine. Okay, so that's the general framework.
Speaker 1 Yeah.
Speaker 2 And the magic moment would be if
Speaker 2 it is programming is this weird discipline where
Speaker 2 sometimes the next five minutes, not always, but sometimes the next five minutes of what you're going to do is actually predictable from the stuff you've done recently.
Speaker 2 And so can you get to a world where that next five minutes either happens by you disengaging and it taking you through, or maybe a little bit more of just you seeing next step what it's going to do.
Speaker 2 And you're like, like, okay, that's good, that's good, that's good, that's good. And you can just sort of tap, tap, tap through these big changes.
Speaker 1 As we're talking about this, I should mention that one of the really cool and noticeable things about a cursor is that there's this whole diff interface situation going on.
Speaker 1 So, like, the model suggests with
Speaker 1 the red and the green of like, here's how we're going to modify the code. And in the chat window, you can apply and it shows you the diff and you can accept the diff.
Speaker 1 So, maybe can you speak to whatever direction of that?
Speaker 3 We'll probably have like four or five different kinds of diffs uh so we we have optimized the diff for for the autocomplete so that has a different diff interface than
Speaker 3 uh than when you're reviewing larger blocks of code and then we're trying to optimize uh another diff thing for when you're doing multiple different files uh and and sort of at a high level the difference is for
Speaker 3 when you're doing autocomplete, it should be really, really fast to read.
Speaker 3 Actually, it should be really fast to read in all situations. But in autocomplete, it's sort of you're really like your eyes focused on one area.
Speaker 3 You can't be in too many, the humans can't look in too many different places.
Speaker 1 So you're talking about on the interface side?
Speaker 3
On the interface side. So it currently has this box on the side.
So we have the current box.
Speaker 3 And if it tries to delete code in some place and tries to add other code, it tries to show you a box on the side.
Speaker 2
You can maybe show it if we pull it up on cursor.com. This is what we're talking about.
Go on.
Speaker 3 So that box,
Speaker 3 it was like three or four different attempts at trying to make this thing work.
Speaker 3 Where first the attempt was like these blue crossed out lines. So before it was a box on the side, it used to show you the code to delete by showing you like
Speaker 3
Google Doc style. You would see like a line through it.
And then you would see the new code. That was super distracting.
Speaker 3 And then we tried many different ways, you know, there was, there was sort of deletions, there was trying to red highlight.
Speaker 3 Then the next iteration of it, which is sort of funny, would you would hold the on Mac the option button.
Speaker 3 So it would it would sort of highlight a region of code to show you that there might be something coming.
Speaker 3 So maybe in this example, like the input and the value
Speaker 3 would all get blue.
Speaker 3 And the blue would highlight that the AI had a suggestion for you.
Speaker 3 So instead of directly showing you the thing, it would show you that the AI, it would just hint that the AI had a suggestion.
Speaker 3 And if you really wanted to see it, you would hold the option button and then you would see the new suggestion. And if you release the option button, you would then see your original code.
Speaker 1 So that's, by the way, that's pretty nice, but you have to know to hold the option button. Yeah.
Speaker 1 By the way, I'm not a Mac user, but I got it.
Speaker 1 It's a button, I guess.
Speaker 1 You people have.
Speaker 3 Again, it's just non-intuitive. I think that's the key thing.
Speaker 2 And there's a chance this is also not the final version of it.
Speaker 4 I am personally very excited for
Speaker 4 making a lot of improvements in this area.
Speaker 4 We often talk about it as the verification problem, where these diffs are great for small edits. For large edits,
Speaker 4 or like when it's multiple files or something, it's
Speaker 4 actually
Speaker 4 a little bit prohibitive to review these diffs.
Speaker 4 And
Speaker 4
so there are like a couple of different ideas here. Like one idea that we have is: okay, you know, like parts of the diffs are important, they have a lot of information.
And then parts of the diff
Speaker 4
are just very low entropy. They're like example, like the same thing over and over again.
And so maybe you can highlight the important pieces and then gray out the not so important pieces.
Speaker 4 Or maybe you can have a model that looks at the diff and sees, oh, there's a likely bug here.
Speaker 4 I will like mark this with a little red squiggly and say, you should probably review this part of the diff.
Speaker 4 And ideas in that vein, I think, are exciting.
Speaker 1 Yeah, that's a really fascinating space of UX design engineering. So you're basically trying to guide the human programmer through all the things they need to read and nothing more.
Speaker 2 Yeah. Like optimally.
Speaker 4 Yeah, and you want an intelligent model to do it. Like currently,
Speaker 4 diff algorithms are, they're like,
Speaker 4 like, they're just like normal algorithms uh there's no intelligence uh there's like intelligence that went into designing the algorithm but then the there there's no like you don't care if the if it's about this thing or this thing uh and so you want a model to to do this so i think the the the general question is like
Speaker 3 man these models are going to get much smarter as the models get much smarter uh the changes they will be able to propose are much bigger so as the changes gets bigger and bigger and bigger the humans have to do more and more and more verification work.
Speaker 3 It gets more and more and more hard. Like, it's just you need to help them out.
Speaker 4 It sort of,
Speaker 3 I don't want to spend all my time reviewing code.
Speaker 1 Can you say a little more across multiple files, Div?
Speaker 2
Yeah, I mean, so GitHub tries to solve this, right? With code review. When you're doing code review, you're reviewing multiple disks across multiple files.
But like Arvid said earlier,
Speaker 2 I think
Speaker 2
you can do much better than code review. You know, code review kind of sucks.
Like, you spend a lot of time trying to grok this code that's often quite unfamiliar to you.
Speaker 2 And
Speaker 2 it often doesn't even actually catch that many bugs. And I think you can
Speaker 2 significantly improve that review experience using language models, for example, using the kinds of tricks that Arvid had described of maybe pointing you towards the regions that actually matter.
Speaker 2 I think also if the code is produced by these language models and it's not produced by someone else, like
Speaker 2 the code review experience is designed for both the reviewer and the person that produced the code.
Speaker 2 In the case where the person that produced the code is a language model, you don't have to care that much about their experience.
Speaker 2 And you can design the entire thing around the reviewer such that the reviewer's job is as fun, as easy, as productive as possible.
Speaker 2 And I think that that feels like the issue with just kind of naively trying to make these things look like code review. I think you can be a lot more creative and push the boundary in what's possible.
Speaker 4 Just one idea there is I think ordering matters. Generally, when you review a PR, you have this list of files and you're reviewing them from top to bottom.
Speaker 4
But actually, like you actually want to understand this part first because that came like logically first. And then you want to understand the next part.
And
Speaker 4 you don't want to have to figure out that yourself. You want a model to guide you through the thing.
Speaker 1 And is the step of creation going to be more and more natural language is the goal versus with actual?
Speaker 4 I think sometimes. I don't think it's going to be the case that all of programming will be natural language.
Speaker 4 And the reason for that is, you know, if I'm pair programming with Swale and Swallow is at the computer and the keyboard.
Speaker 4
And sometimes if I'm like driving, I want to say to Swala, hey, like implement this function. And that works.
And then sometimes it's just so annoying to explain to Swala what I want him to do.
Speaker 4 And so I actually take over the
Speaker 4
keyboard and I show him, I write like part of the example, and then it makes sense. And that's the easiest way to communicate.
And so I think that's also the case for AI.
Speaker 4 Like sometimes the easiest way to communicate with the AI will be to show an example and then it goes and does the thing everywhere else.
Speaker 4 Or sometimes if you're making a website, for example, the easiest way to show to the AI what you want is not to tell it what to do, but you know, drag things around or draw things.
Speaker 4 And yeah, and like maybe eventually we will get to like brain machine interfaces or whatever and you can like understand what you're thinking. And so I think natural language will have a place.
Speaker 4 I think it will not, definitely not be the way most people program most of the time.
Speaker 1 I'm really feeling the AGI with this editor.
Speaker 1 It feels like there's a lot of machine learning going on underneath. Tell me about some of the ML stuff that makes it all work.
Speaker 2 Recursor really works via this ensemble of custom models that we've trained alongside the Frontier models that are fantastic at the reasoning intense things.
Speaker 2 And so CursorTab, for example, is a great example of where you can specialize this model to be even better than even Frontier models if you look at evals on the tasks we set it at.
Speaker 2 The other domain, which it's kind of surprising that it requires custom models, but it's kind of necessary and works quite well, is in Apply.
Speaker 2 So
Speaker 2 I think these models are, like the Frontier models are quite good at sketching out plans for code and generating like rough sketches of like the change, but actually
Speaker 2 creating diffs is quite hard for frontier models for when you're training models.
Speaker 2 Like
Speaker 2 you try to do this with Sonnet, with O1, any Frontier model, and it really messes up stupid things like counting line numbers, especially in super, super large files.
Speaker 2 And so what we've done to alleviate this is we let the model kind of sketch out this this rough code block that indicates what the change will be.
Speaker 2 And we train a model to then apply that change to the file.
Speaker 1 And we should say that apply is
Speaker 1
the model looks at your code. It gives you a really damn good suggestion of what new things to do.
And the seemingly for humans trivial step of
Speaker 1 combining the two, you're saying is not so trivial.
Speaker 3 Contrary to popular perception, it is not a deterministic algorithm. Yeah.
Speaker 2 i i think like you see shallow copies of apply um elsewhere and it just breaks like most of the time because you think you can kind of try to do some deterministic matching and then it fails you know at least 40 of the time and that just results in a terrible product experience um
Speaker 2 i think in general this this regime of you are going to get smarter and smarter models.
Speaker 2 And like, so one other thing that Apply lets you do is it lets you you use fewer tokens with the most intelligent models. This is both expensive in terms of latency for generating all these tokens
Speaker 2 and cost.
Speaker 2 So you can give this very, very rough sketch and then have your small models go and implement it because it's a much easier task to implement this very, very sketched out code.
Speaker 2 And I think that this regime will continue where you can use smarter and smarter models to do the planning. And then maybe the implementation details can be handled by the less intelligent ones.
Speaker 2 Perhaps you'll have, you know, maybe O1, maybe it'll be even more capable models, given an even higher level plan that is kind of recursively
Speaker 2 applied by Sonnet and then the apply model.
Speaker 3 Maybe we should talk about how to make it fast.
Speaker 2 Yeah.
Speaker 2 Yeah.
Speaker 3 Fast is always an interesting detail.
Speaker 2 Fast is good. Yeah.
Speaker 1 How do you make it fast?
Speaker 2
Yeah. So one big component of making it fast is speculative edits.
So speculative edits are a variant of speculative decoding. And maybe it'd be helpful to briefly describe speculative decoding.
Speaker 2 With speculative decoding, what you do is you can kind of take advantage of the fact that
Speaker 2 most of the time, and I'll add the caveat that it would be when you're memory bound in language model generation.
Speaker 2 If you
Speaker 2 process multiple tokens at once,
Speaker 2 it is faster than generating one token at a time. So this is like the same reason why if you look at tokens per second
Speaker 2 with prompt tokens versus generated tokens, it's much, much faster for prompt tokens.
Speaker 2 So what we do is instead of using what speculative decoding normally does, which is using a really small model to predict these draft tokens that your larger model will then go in and verify,
Speaker 2 with code edits, we have a very strong prior of what the existing code will look like. And that prior is literally the same exact code.
Speaker 2 So what you can do is you can just feed chunks of the original code back into the into the model. model.
Speaker 2 And then the model will just pretty much agree most of the time that, okay, I'm just going to spit this code back out. And so you can process all of those lines in parallel.
Speaker 2 And you just do this with sufficiently many chunks.
Speaker 2 And then eventually you'll reach a point of disagreement where the model will now predict text that is different from the ground truth original code.
Speaker 2 It'll generate those tokens and then we kind of will decide after enough tokens match the original code to re-start speculating in chunks of code.
Speaker 2 What this actually ends up looking like is just a much faster version of normal editing code. So it's just like, it looks like a much faster version of the model rewriting all the code.
Speaker 2 So just we can use the same exact interface that we use for diffs, but it will just stream down a lot faster.
Speaker 3 And then the advantage is that while it's streaming, you can just also be reviewing, start reviewing the code
Speaker 3 before it's done. So there's no big loading screen.
Speaker 2 So
Speaker 3 maybe that is part of the part of the advantage so the human can start reading before the thing is done i think the interesting riff here is something like
Speaker 3 speculation is a fairly common idea nowadays it's like not only in language models i mean there's obviously speculation in cpus and there's like speculation for databases and it's like speculation all over the place let me ask the sort of the ridiculous question of uh which lm is better at coding dpt clawed who wins in the context of programming?
Speaker 1 And I'm sure the answer is much more nuanced because it sounds like every single part of this involves a different model.
Speaker 2 Yeah, I think
Speaker 2 there's no model that Pareto dominates others, meaning it is better in all categories that we think matter. The categories being speed,
Speaker 2 ability to edit code, ability to process lots of code, long context, you know, a couple of other things and kind of coding capabilities.
Speaker 2
The one that I'd say right now is just kind of net best is Sonnet. I think this is a consensus opinion.
Our one's really interesting, and it's really good at reasoning. So if you give it really hard
Speaker 2 programming interview style problems or leaf code problems, it can do quite well on them.
Speaker 2 But it doesn't feel like it kind of understands your rough intent as well as Sonnet does.
Speaker 2 Like,
Speaker 2 if you look at a lot of the other frontier models,
Speaker 2 one qualm I have is it feels like they're not necessarily overfit.
Speaker 2 I'm not saying they train on benchmarks, but they perform really well on benchmarks relative to kind of everything that's kind of in the middle.
Speaker 2 So if you tried on all these benchmarks and things that are in the distribution of the benchmarks they're evaluated on, you know, they'll do really well.
Speaker 2 But when you push them a little bit outside of that, Sonnet's, I think, the one that kind of does best at kind of maintaining that same capability.
Speaker 2 Like you kind of have the same capability in the benchmark as when you try to instruct it to do anything with coding.
Speaker 1 What another ridiculous question is the difference between the normal programming experience versus what benchmarks represent?
Speaker 1 Like where do benchmarks fall short, do you think, when we're evaluating these models?
Speaker 3 By the way, that's like a really, really hard, it's like critically important detail of like how different benchmarks are versus versus like real coding. Where real coding
Speaker 3 it's not interview style coding. it's you're you're doing these
Speaker 3 you know humans are saying like half broken english sometimes and sometimes you're saying like oh do what i did before
Speaker 3 sometimes you're saying
Speaker 3 uh you know go add this thing and then do this other thing for me and then make this ui element and then you know it's it's just
Speaker 3 like a lot of things are sort of context dependent you really want to like understand the human and then do do what the human wants as opposed to sort of this maybe the the the way to put it is sort of abstractly is uh the interview problems are very
Speaker 3 well specified
Speaker 3 they lean a lot on specification while the human stuff is less specified
Speaker 2 yeah i think that this this benchmark question is both complicated by what um swale just mentioned and then also to
Speaker 2 what aman was getting into is that even if you like you know there's this problem of like the skew between what can you actually model and a benchmark versus real programming, and that can be sometimes hard to encapsulate because it's like real programming is like very messy and sometimes things aren't super well specified, what's correct or what isn't.
Speaker 2 But then it's also doubly hard because of this public benchmark problem.
Speaker 2 And that's both because public benchmarks are sometimes kind of hill climbed on, but then it's like really, really hard to also get the data from the public benchmarks out of the models.
Speaker 2 And so, for instance, like one of the most popular like agent benchmarks, SuiBench,
Speaker 2 is really, really contaminated in the training data of these foundation models.
Speaker 2 And so if you ask these foundation models to do a SuiteBench problem, but you actually don't give them the context of a code base, they can hallucinate the right file pass, they can hallucinate the right function names.
Speaker 2 And so
Speaker 2
it's also just the public aspect of these things is tricky. Yeah, in that case, it could be trained on the...
literal issues or pull requests themselves.
Speaker 2 And maybe the labs will start to do a better job, or they've already done a good job at decontaminating those things, but they're not going to omit the actual training data of the repository itself.
Speaker 2 Like these are all like some of the most popular Python repositories. Like SymPy is one example.
Speaker 2 I don't think they're going to handicap their models on SymPy and all these popular Python repositories in order to get true evaluation scores on these benchmarks. Yeah.
Speaker 2 I think that given the dearths in benchmarks,
Speaker 2 there have been like a few interesting crutches that places that build systems with these models or build these models actually use to get a sense of are they going in the right direction or not.
Speaker 2 And in a lot of places, people will actually just have humans play with the things and give qualitative feedback on these.
Speaker 2 Like one or two of the foundation model companies, they have people who, that's a big part of their role.
Speaker 2 And internally, we also, you know, qualitatively assess these models and actually lean on that a lot in addition to like private e-bels that we have.
Speaker 3 It's like the vibe.
Speaker 1 The vibe, yeah, the vibe.
Speaker 1 The vibe benchmark, human benchmark.
Speaker 1
You pull in the humans to do a vibe check. Yeah.
Okay. I mean, that's kind of what I do, like, just like reading online forums and Reddit and X.
Speaker 1 Just like,
Speaker 1 well, I don't know how to
Speaker 1 properly load in people's opinions because they'll say things like, I feel like Claude or GPT has gotten dumber or something. They'll say, I feel like,
Speaker 1 and then I sometimes feel like that too, but I wonder if it's the model's problem or mine.
Speaker 2 Yeah, with Claude, there's an interesting take I heard where
Speaker 2 I think AWS has different chips.
Speaker 2 And I suspect they have slightly different numerics than NVIDIA GPUs.
Speaker 2 And someone speculated that Claude's degraded performance had to do with maybe using the quantized version that existed on AWS Bedrock versus
Speaker 2 whatever was running on Anthropics GPUs.
Speaker 1 I interview a bunch of people that have conspiracy theories, so I'm glad you spoke to this conspiracy theory.
Speaker 2 Well,
Speaker 3 it's not like conspiracy theory as much as conspiracy theory.
Speaker 3 Humans are humans, and there's these details, and you're doing
Speaker 3 like these queasy monoflops, and chips are messy, and man, you can just have bugs.
Speaker 4 Like, bugs are
Speaker 3 it's it's hard to overstate how hard bugs are to avoid.
Speaker 1 What's uh the role of uh a good prompt in all this? See, you mentioned that benchmarks have really uh structured, well-formulated prompts.
Speaker 1 What what should a human be doing to maximize success? And what's the importance of what the human? You wrote a blog post on you called it uh prompt design.
Speaker 4 Yeah, uh, I think it depends on which model you're using. And all of them are slightly different and they respond differently to different prompts.
Speaker 4 But um, I think the original GPT-4 and the original sort of readable models last year, they were quite sensitive to the prompts. And they also had a very small context window.
Speaker 4 And so we have all of these pieces of information around the code base that would maybe be relevant in the prompt.
Speaker 4 Like you have the docs, you have the files that you add, you have the conversation history.
Speaker 4 And then there's a problem like, how do you decide what you actually put in the prompt and when you have a limited space?
Speaker 4 And even for today's models, even when you have long context, filling out the entire context window means that it's slower.
Speaker 4 It means that sometimes the model actually gets confused, and some models get more confused than others.
Speaker 4 And we have this one system internally that we call Preumpt, which helps us with that a little bit.
Speaker 4 And I think it was
Speaker 4 built for the
Speaker 4 era before where we had 8,000 token context windows.
Speaker 4 And it's a little bit similar to when you're making a website.
Speaker 4 You want it to work on mobile, you want it to work on a desktop screen, and you have this
Speaker 4 dynamic information, which you don't have, for example, if you're making, like, designing a print magazine, you have like, you know, exactly where you can put stuff.
Speaker 4 But when you have a website or when you have a prompt, you have these inputs, and then you need to format them to always work.
Speaker 4 Even if the input is really big, then you might have to cut something down.
Speaker 4 And so the idea was: okay, like, let's take some inspiration. What's the best way to design websites? Well,
Speaker 4 the thing that we really like is React and the declarative approach where
Speaker 3 you use JSX
Speaker 4 in JavaScript, and then you declare, this is what I want. And I think this has higher priority, or like this has higher Z index than something else.
Speaker 4
And then you have this rendering engine. In web design, it's like Chrome.
And in our case, it's a preempt renderer, which then fits everything onto the page.
Speaker 4 And so you declare it later, decide what you want, and then it figures out what you want.
Speaker 4 And so we have found that to be quite helpful. And I think the role of it has sort of shifted over time,
Speaker 4 where initially it was to fit to these small context windows. Now it's really useful because
Speaker 4 it helps us with splitting up the data that goes into the prompt and the actual rendering of it. And so
Speaker 4 it's easier to debug because you can change the rendering of the prompt and then try it on old prompts because you have the raw data that went into their prompt.
Speaker 4 And then you can see, did my change actually improve it for
Speaker 4 this entire eval set?
Speaker 1 So do you literally prompt with JSX?
Speaker 4
Yes. Yes.
So it kind of looks like React. There are components.
We have one component that's a file component, and it takes in the cursor.
Speaker 4
Usually there's one line where the cursor is in your file. And that's probably the most important line because that's the one you're looking at.
And so then you can give priorities.
Speaker 4 So like that line has the highest priority. And then you subtract one for every line that is farther away.
Speaker 4 And then eventually when it's rendered, it figure out how many lines can I actually fit and it centers around that thing.
Speaker 1 That's amazing.
Speaker 2 And you can do like other fancy things where if you have lots of code blocks from the entire code base, you could use retrieval and things like embedding and re-ranking scores to add priorities for each of these components.
Speaker 1 So should humans, when they ask questions, also
Speaker 1 try to use something like that? Like, would it be beneficial to write JSX in the problem, or the whole idea is this should be loose and messy?
Speaker 4 I think our goal is kind of that you should just do whatever is the most natural thing for you.
Speaker 4 And then we, our job, is to figure out how do we actually retrieve the relative event thing so that your thing actually makes sense.
Speaker 1 Well, this is sort of the discussion I had with Arvind of Perplexity.
Speaker 1 His whole idea is like, you should let the person be as lazy yes
Speaker 1 yeah but like
Speaker 1 yeah that's a beautiful thing but i feel like you're allowed to ask more of programmers right so like if you say just do what you want i mean humans are lazy there's a kind of tension between just being lazy versus like provide more as uh
Speaker 1 be prompted almost like the system pressuring you or inspiring you to be articulate, not in terms of the grammar of the sentences, but in terms of the depth of thoughts that you convey inside the problems.
Speaker 2 I think even as a system gets closer to some level of perfection, often when you ask the model for something, you just are not, not enough intent is conveyed to know what to do.
Speaker 2
And there are like a few ways to resolve that intent. One is the simple thing of having the model just ask you, I'm not sure how to do these parts based on your query.
Could you clarify that?
Speaker 2 I think the other could be maybe
Speaker 2 if you, there are five or six possible generations given the uncertainty present in your query so far, why don't we just actually show you all of those and let you pick them?
Speaker 1 How hard is it for the model to choose to talk back?
Speaker 1 Sort of versus
Speaker 1 that's hard to sort of like how to deal with the uncertainty.
Speaker 1 Do I choose to ask for more information to reduce the ambiguity?
Speaker 3 So I mean one of the things we do is
Speaker 3 it's like a recent addition is try to suggest files that you can add. So and while you're typing, one can guess what the uncertainty is
Speaker 3 and
Speaker 3 maybe suggest that like, you know, maybe you're writing your API
Speaker 3 and
Speaker 3 we can guess using the commits
Speaker 3 that you've you've made previously in the same file that the client and the server is super useful.
Speaker 2 And
Speaker 3 there's like a hard technical problem of how do you resolve it across all commits, which files are the most important given your current prompt.
Speaker 4 And we're still sort of
Speaker 3 initial version is ruled out, and I'm sure we can make it much more accurate.
Speaker 3 It's very experimental. But then the idea is we show you, like, do you just want to add this file, this file, this file also to tell, you know the model to edit those files for you?
Speaker 3 Because if you're maybe you're making the API, like you should also edit the client and the server that is using the API and the other one resolving the API. And so that would be kind of cool.
Speaker 3 As both there's the phase where you're writing the prompt, and there's before you even click enter, maybe we can help resolve some of the uncertainty.
Speaker 1 To what degree do you use agentic approaches? How useful are agents?
Speaker 4 We think agents are really, really cool. Like, I think agents is like
Speaker 4 it's like resembles sort of like a human. It's sort of like this, like you can kind of feel that it, like you're getting closer to AGI because you see a demo where
Speaker 4 it acts as a human would, and it's really, really cool. I think
Speaker 4 agents are not yet super useful for many things.
Speaker 4 I think we're getting close to where they will actually be useful.
Speaker 4 And so I think
Speaker 4 there are certain types of tasks where having an agent would be really nice. Like, I would love to have an agent.
Speaker 4 For example, if like we have a bug where you sometimes can't command C and command V inside our chat input box. And that's a task that's super well specified.
Speaker 4
I just want to say, like, in two sentences, this does not work. Please fix it.
And then I would love to have an agent that just goes off, does it.
Speaker 4 And then a day later, I come back and I review the thing.
Speaker 1 You mean it goes, finds the right file?
Speaker 4
Yeah, it finds the right files. It like tries to reproduce the bug.
It fixes the bug, and then it verifies that it's correct. And this could be a process that takes a long time.
Speaker 4 And so I think I would love to have that.
Speaker 4 And then I think a lot of programming, like there is often this belief that agents will take over all of programming.
Speaker 4 I don't think we think that that's...
Speaker 4 the case because a lot of programming, a lot of the value is in iterating or you don't actually want to specify something upfront because you don't really know what you want until you have seen an initial version, and then you want to iterate on that.
Speaker 4 And then you provide more information.
Speaker 4 And so, for a lot of programming, I think you actually want a system that's instant, that gives you an initial version instantly back, and then you can iterate super, super quickly.
Speaker 1 What about something like that recently came out, Replit Agent, that does also like setting up the development environment, installing software packages, configuring everything, configuring the databases, and actually deploying the app.
Speaker 1 Is that also in the set of th things you dream about?
Speaker 4 I think so. I think that would be really cool.
Speaker 4 For certain types of programming,
Speaker 4 it would be really cool.
Speaker 1 Is that within scope of Cursor?
Speaker 4 Yeah. We aren't actively working on it right now.
Speaker 4 But it's definitely like we want to make the programmer's life easier and more fun.
Speaker 4 And some things are just really tedious and you need to go through a bunch of steps and you want to delegate that to an agent.
Speaker 4 And then, some things you can actually have an agent in the background while you're working.
Speaker 4 Like, let's say you have a PR that's both back-end and front-end, and you're working on the front-end, and then you can have a background agent that does some work and figure out kind of what you're doing.
Speaker 4 And then, when you get to the back-end part of your PR, then you have some like initial piece of code that you can iterate on.
Speaker 4 And so, that would also be really cool.
Speaker 1 One of the things we already talked about is speed, but I wonder if we can just linger on that some more and the various places that
Speaker 1
the technical details involved in making this thing really fast. So every single aspect of cursor, most aspects of cursor, feel really fast.
Like I mentioned, the apply is probably the slowest thing.
Speaker 1 And for me, for my
Speaker 2 pain.
Speaker 4
It's a pain. It's a pain that we're feeling and we're working on fixing.
Yeah.
Speaker 1 Yeah. I mean, it says something that something that feels, I don't know what it is, like one second or two seconds, that feels slow.
Speaker 1 That means that's actually shows that everything else is just really, really fast.
Speaker 1 So, is there some technical details about how to make some of these models, how to make the chat fast, how to make the diffs fast? Is there something that just jumps to mind?
Speaker 2 Yeah, I mean, so we can go over a lot of the strategies that we use. One interesting thing is cache warming.
Speaker 2 And so, what you can do is, if as the user is typing, you can have, you know, you're probably going to use some piece of context, and you can know that before the user's done typing.
Speaker 2 So, you know, as we discussed before, reusing the KV cache results in lower latency, lower cost,
Speaker 2
cross-requests. So as the user starts typing, you can immediately warm the cache with like, let's say, the current file contents.
And then when they press enter,
Speaker 2
there's very few tokens. It actually has to pre-fill and compute before starting the generation.
This will significantly lower TTFT.
Speaker 1 Can you explain how KVCache works? Yeah.
Speaker 2 So the way transformers work.
Speaker 2 I like it. I mean,
Speaker 2 like one of the mechanisms that allow transformers to not just independently, like the mechanism that allows transformers to not just independently look at each token, but see previous tokens are the keys and values to tension.
Speaker 2 And generally the way attention works is you have at your current token some query, and then you've all the keys and values of all your previous tokens, which are some kind of representation that the model stores internally of all the previous tokens in the prompt.
Speaker 2 And
Speaker 2 like by default, when you're doing a chat, the model has to, for every single token, do this forward pass through the entire model.
Speaker 2 That's a lot of matrix multiplies that happen, and that is really, really slow.
Speaker 2 Instead, if you have already done that and you stored the keys and values and you keep that in the GPU, then when I'm, let's say I have to sort it for the last n tokens, if I now want to compute the output token for the n plus one token, I don't need to pass those first n tokens through the entire model because I already have all those keys and values.
Speaker 2 And so you just need to do the forward pass through that last token. And then when you're doing attention,
Speaker 2 you're reusing those keys and values that have been computed, which is the only kind of sequential part or sequentially dependent part of the transformer.
Speaker 1 Is there like higher level caching of like caching of the prompts or that kind of stuff? That could help.
Speaker 2 Yeah, that that there's other types of caching you can kind of do.
Speaker 2 One interesting thing that you can do for cursor tab is
Speaker 2 you can basically predict ahead as if the user would have accepted the suggestion and then trigger another request.
Speaker 2 And so then you cache, you've done the speculative, it's a mix of speculation and caching, right? Because you're speculating what would happen if they accepted it.
Speaker 2 And then you have this value that is cached, this suggestion. And then when they press tab, the next one would be waiting for them immediately.
Speaker 2 It's a kind of clever heuristic/slash trick that uses a higher level caching and can give
Speaker 2 the, it feels fast despite there not actually being any changes in the model.
Speaker 3 And if you can make the KV cache smaller, one of the advantages you get is like, maybe you can speculate even more. Maybe you can guess here's the 10 things that
Speaker 3 could be useful.
Speaker 3 Predict the next 10, and
Speaker 3 it's possible the user hits the one of the 10. It's like a much higher chance than the user hits the exact one that you show them.
Speaker 3 Maybe they type in other character, and we sort of hit something else in the cache. So there's all these tricks where
Speaker 3 the general phenomena here is
Speaker 3 I think it's also super useful for our RAL.
Speaker 3 Maybe a single sample from the model isn't very good, but if you predict like 10 different things uh turns out that one of the 10 uh that's right is the probability is much higher so there's these pass at k curves and you know part of rl try like what what rl does is
Speaker 3 you know you can you can exploit this pass at k phenomena to to make many different predictions and and
Speaker 3 One way to think about this, the model sort of knows internally has like has some uncertainty over like which of the k things is correct, or like which of the k key things does the human want so when we RL our
Speaker 3 you know cursor tab model one of the things we're doing is we're predicting
Speaker 3 which like which of the hundred different suggestions the model produces is more amenable for humans like which of them do humans more like than other things maybe maybe like there's something where the model can predict very far ahead versus like a little bit and maybe somewhere in the middle and and
Speaker 3 you know just and then you can give a reward to the things that humans would like more and sort of punish the things that it won't like and sort of then train the model to output the suggestions that humans would like more.
Speaker 2 You have these like RL loops that are very useful that exploit these pass at K-curves.
Speaker 3 Oman maybe can go into even more detail.
Speaker 2 Yeah, it is a little different than speed,
Speaker 2 but I mean, like, technically you tie it back in because you can get away with the smaller model if you RL your smaller model and it gets the same performance as the bigger one.
Speaker 2 That's like, and Swallow was mentioning stuff about
Speaker 2 KB, about reducing the size of your KB cache. There are other techniques there as well that are really helpful for speed.
Speaker 2 So kind of back in the day, like all the way two years ago,
Speaker 2 people mainly use multi-head attention.
Speaker 2 And I think there's been a migration towards more efficient attention schemes like group query
Speaker 2 or multi-query attention.
Speaker 2 And this is really helpful for then
Speaker 2 with larger batch sizes being being able to generate the tokens much faster. The interesting thing here is
Speaker 2 this now has no effect on that time to first token pre-fill speed.
Speaker 2 The thing this matters for is now generating tokens. And why is that? Because when you're generating tokens, instead of
Speaker 2 being bottlenecked by doing these super parallelizable matrix multiplies across all your tokens, you're bottlenecked by how quickly,
Speaker 2 for long context, with large batch batch sizes, by how quickly you can read those cache keys and values.
Speaker 2 And so then
Speaker 2 that's memory bandwidth, and how can we make this faster? We can try to compress the size of these keys and values. So multi-query attention is the most aggressive of these,
Speaker 2 where normally with multi-head attention, you have some number of quote-unquote attention heads
Speaker 2
and some number of kind of query. query heads.
Multi-query just preserves the query heads, gets rid of all the key value heads.
Speaker 2 So there's only one kind of key value head, and there's all the remaining query heads. With group query,
Speaker 2 you instead preserve all the query heads, and then
Speaker 2 your
Speaker 2 keys and values are kind of
Speaker 2 there are fewer heads for the keys and values, but you're not reducing it to just one. But anyways, like the whole point here is you're just reducing the size of your KB cache.
Speaker 4 And then there is MLA.
Speaker 2 Yeah, multi-latent.
Speaker 2 That's a little more complicated.
Speaker 2 And the way that this works is it kind of turns the entirety of your keys and values across all your heads into this kind of one latent vector that is then kind of expanded inference time.
Speaker 3 But MLA is from this company called DeepSeek.
Speaker 3 It's quite an interesting algorithm. Maybe the key idea is sort of
Speaker 3 in both MQA
Speaker 3 and in other places, what you're doing is you're sort of reducing
Speaker 3 the number of KV heads. The advantage you get from that is,
Speaker 3 you know, there's less of them, but
Speaker 3 maybe the theory is that you actually want a lot of different,
Speaker 3 like you want each of the keys and values to actually be different. So one way to reduce the size is you keep
Speaker 3
one big shared vector for all the keys and values. And then you have smaller vectors for every single token.
So that when you multiply you can store only the smaller thing.
Speaker 3 There's some sort of like low rank reduction.
Speaker 3 And the low rank reduction will that at the end of the time when you when you eventually want to compute the final thing, remember that like your memory bound, which means that like you still have some compute left that you can use for these things.
Speaker 3 And so if you can expand the
Speaker 3 latent vector back out.
Speaker 3 And somehow like this is far more efficient because
Speaker 3 just like you're reducing like, for example, maybe like reducing like 32 or something, like the size of the vector that you're keeping.
Speaker 2 Yeah, there's perhaps some richness in having a separate set of keys and values and query that kind of pairwise match up versus compressing that all into one
Speaker 2 in that interaction, at least.
Speaker 1
Okay. And all of that is dealing with being memory bound.
Yeah. And
Speaker 1 what, I mean, ultimately, how does that map to the user experience? Trying to get the thing.
Speaker 2 Yeah, the two things that it maps to is you can now make your cache a lot larger because you've less space allocated for the KV cache.
Speaker 2 You can maybe cache a lot more aggressively and a lot more things.
Speaker 2 So you get more cache hits, which are helpful for reducing the time to first token for the reasons that were kind of described earlier. And then the second being when you
Speaker 2 start doing inference with more and more requests and larger and larger batch sizes, you don't see much of a slowdown in, as it's generating the tokens, the speed of that.
Speaker 3 But it also allows you to make your prompt bigger for certain.
Speaker 2 Yeah, yeah. So like the basic size of your KV cache is both the size of all your prompts multiplied by the number of prompts being processed in parallel.
Speaker 2 So you could increase either of those dimensions, right? The batch size or the size of your prompts without degrading the latency of generating tokens.
Speaker 1 Arvid, you wrote a blog post, Shadow Workspace, iterating on code in the background. So what's going on?
Speaker 4 So to be clear, we want there to be a lot of stuff happening in the background, and we're experimenting with a lot of things. Right now,
Speaker 4 we don't have much of that happening, other than the cache warming or
Speaker 4 figuring out the right context that goes into your command key prompts, for example. But the idea is, if you can actually spend computation in the background, then you can
Speaker 4 help the user maybe
Speaker 4 at a slightly longer time horizon than just predicting the next few lines that you're going to make, but actually in the next 10 minutes, what are you going to make?
Speaker 4 And by doing it in the background, you can spend more computation doing that. And so the idea of the shadow workspace that we implemented, and we use it internally for like experiments,
Speaker 4 is that
Speaker 4 to actually get advantage of doing stuff in the background, you want some kind of feedback signal to give back to the model.
Speaker 4 Because otherwise, you can get higher performance by just letting the model think for longer.
Speaker 4 And so O1 is a good example of that. But another way you can improve performance is by letting the model iterate and get feedback.
Speaker 4 And so, one very important piece of feedback when you're a programmer is the language server, which is
Speaker 4 this thing, it exists for most different languages, and there's like a separate language server per language.
Speaker 4 And it can tell you, you know, you're using the wrong type here, and then it gives you an error, or it can allow you to go to definition. It sort of understands the structure of your code.
Speaker 4 So, language servers are extensions developed by, like, there's a TypeScript language server developed by the TypeScript people, a Rust language server developed by the Rust people, and then they all interface over the language server protocol to VS Code.
Speaker 4 So, that VS Code doesn't need to have all of the different languages built into VS Code, but rather you can use the existing compiler infrastructure.
Speaker 4 For linting purposes, what it's for linting, it's for going to definition
Speaker 4 and for like seeing the right types that you're using.
Speaker 1 So, it's doing like type checking also.
Speaker 4 Yes, type checking and going to references.
Speaker 4 And that's like when you're working in a big project, you kind of need that.
Speaker 4 If you don't have that, it's really hard to code in a big project.
Speaker 1 Can you say again how that's being used inside Cursor, the language server protocol communication thing?
Speaker 4 So it's being used in Cursor to show to the programmer, just like in VS Code. But then the idea is you want to show that same information to the models, the IO models.
Speaker 4 And you want to do that in a way that doesn't affect the user, because you want to do it in the background. And so the idea behind the shadow workspace was: okay, like one way we can do this is
Speaker 4
we spawn a separate window of cursor that's hidden. And so you can set this flag and Electron is hidden.
There is a window, but you don't actually see it.
Speaker 4 And inside of this window, the AI agents can modify code however they want, as long as they don't save it, because it's still the same folder,
Speaker 4 and then can get feedback from the linters and go to definition and iterate on their code.
Speaker 1 So, like, literally, run everything in the background. Like, as if
Speaker 1 maybe even run the code.
Speaker 4
So, that's the eventual version. Okay.
That's what you want. And a lot of the blog post is actually about how do you make that happen? Because it's a little bit tricky.
Speaker 4
You want it to be on the user's machine so that it exactly mirrors the user's environment. And then on Linux, you can do this.
cool thing where you can actually mirror the file system and have the
Speaker 4
AI make changes to the files. And it thinks that it's operating on the file level, but actually that's stored in memory.
And you can create this kernel extension to make it work.
Speaker 4 Whereas on Mac and Windows, it's a little bit more difficult,
Speaker 4 but it's... it's a fun technical problem.
Speaker 2 So that's why.
Speaker 2 One maybe hacky but interesting idea that I like is holding a lock on saving.
Speaker 2 And so basically you can then have the language model kind of hold the lock on saving to disk.
Speaker 2 And then instead of you operating in the ground truth version of the files that are saved to disk, you actually are operating in what was the shadow workspace before and these unsaved things that only exist in memory that you still get linter errors for and you can code in.
Speaker 2 And then when you try to maybe run code, it's just like there's a small warning that there's a lock.
Speaker 2 And then you kind of will take back the lock from the language server if you're trying to do things concurrently. or from the shadow workspace if you're trying to do things concurrently.
Speaker 1 That's such an exciting feature, by the way. It's a bit of a tangent, but like to allow a model to change files, it's scary for people,
Speaker 1 but like it's really cool to be able to just let the agent do a set of tasks and you come back the next day and kind of observe like it's a colleague or something like that.
Speaker 2 Yeah.
Speaker 2 And I think there may be different versions of like runnability where for the simple things where you're doing things in the span of a few minutes on behalf of the user as they're programming, it makes sense to make something work locally in their machine.
Speaker 2 I think for the more aggressive things where you're making larger changes that take longer periods of time, you'll probably want to do this in some sandbox remote environment.
Speaker 2 And that's another incredibly tricky problem of how do you exactly reproduce or mostly reproduce to the point of it being effectively equivalent for running code, the user's environment with this
Speaker 2 remote sandbox.
Speaker 3 I'm curious what kind of agents do you want for coding?
Speaker 3 Do you want them to find bugs? Do you want them to to implement new features?
Speaker 3 What agents do you want?
Speaker 1 So, by the way, when I think about agents, I don't think just about coding.
Speaker 1 I think so. For the practice,
Speaker 1 this particular podcast, there's video editing. And a lot of, if you look in Adobe, a lot of there's code behind.
Speaker 1 It's very poorly documented code, but you can interact with Premiere, for example, using code.
Speaker 1 And basically, all the uploading, everything I do on YouTube, everything, as you could probably imagine, I do all of that through code.
Speaker 1
And so, and and including translation and overdubbing, all of this. So I envision all of those kinds of tasks.
So automating many of the tasks that don't have to do directly with the editing.
Speaker 2 So that.
Speaker 1
Okay. That's what I was thinking about.
But in terms of coding, I would be fundamentally thinking about bug finding.
Speaker 1 like many levels of kind of bug finding and also bug finding like logical bugs not logical like spiritual bugs or something
Speaker 1 Ones like sort of big directions of implementation, that kind of stuff.
Speaker 3 Let's open on bug finding.
Speaker 2 Yeah. I mean, it's really interesting that these models are so bad at bug finding
Speaker 2 when just naively prompted to find a bug. They're incredibly poorly calibrated.
Speaker 4 Even the smartest models.
Speaker 2 Exactly.
Speaker 2 Even 01.
Speaker 1 How do you explain that? Is there a good intuition?
Speaker 2 I think these models are a really strong reflection of the pre-training distribution. And I do think they generalize as the loss gets lower and lower.
Speaker 2 But I don't think the loss and the scale is quite or the loss is low enough such that they're really fully generalizing on code.
Speaker 2 The things that we use these things for, the frontier models, that they're quite good at are really code generation and question answering.
Speaker 2 And these things exist in massive quantities in pre-training with all of the code on GitHub on the scale of many, many trillions of tokens and questions and answers on things like Stack Overflow and maybe GitHub issues.
Speaker 2 And so when you try to push into these things that really don't exist
Speaker 2 very much online, like, for example, the cursor tab objective of predicting the next edit, given the edits done so far, the brittleness kind of shows.
Speaker 2 And then bug detection is another great example where there aren't really that many examples of like actually detecting real bugs and then proposing fixes.
Speaker 2 And the models just kind of like really struggle at it. But I think it's a question of transferring the model.
Speaker 2 Like in the same way that you get this fantastic transfer from pre-trained models just on code in general to the cursor tab objective, you'll see a very, very similar thing with generalized models that are really good at code to bug detection.
Speaker 2 It just takes like a little bit of kind of nudging in that direction.
Speaker 3 Like to be clear, I think they sort of understand code really well.
Speaker 3 Like while they're being pre-trained, like the representation that's being built up, like almost certainly, like, you know, somewhere in the stream, there's the model knows that maybe there's something sketchy going on, right?
Speaker 3 It sort of has some sketchiness, but actually eliciting the sketchiness to
Speaker 3 like actually like part of it is that humans are really calibrated on which bugs are really important.
Speaker 3 It's not just actually saying like, there's something sketchy. It's like, is this sketchy trivial? It's the sketchy, like you're going to take the server down.
Speaker 3 It's just like, part of it is maybe the cultural knowledge of,
Speaker 3 like, why is a staff engineer, a staff engineer?
Speaker 3 A staff engineer is good because they know that three years ago, like, someone wrote a really, you know, sketchy piece of code that took the server down. And
Speaker 3 as opposed to maybe there's like, you know, you just,
Speaker 3
this thing is like. an experiment.
So like a few bugs are fine. Like you're just trying to experiment and get the feel of the thing.
Speaker 3 And so if the model gets really annoying when you're writing an experiment, that's really bad. But if you're writing something for super production, you're like writing a database, right?
Speaker 3 You're writing code in Postgres or Linux or whatever. Like, your line is Torvalds.
Speaker 3 It's sort of unacceptable to have even an edge case. And just having the calibration of like
Speaker 3 how paranoid is the user.
Speaker 2 But even then, if you're putting in a maximum paranoia, it still just doesn't quite get it. Yeah, yeah, yeah.
Speaker 1 I mean, but this is hard for humans too to understand what, which line of code is important and which is not.
Speaker 1 I think one of your principles on a website says if a code can do a lot of damage,
Speaker 1 one should add a comment that say
Speaker 1 this line of code is dangerous.
Speaker 2 And all caps and all reds ten times.
Speaker 1 No, and you say like for every single line of code inside the function, you have to add, and that's quite profound. That says something about human beings because
Speaker 1 the engineers move on. Even the same person might just forget how it can sink the Titanic, a single function.
Speaker 1 Like, you don't, you might not intuit that quite clearly by looking at the single piece of code.
Speaker 4 Yeah, and I think that that one is also partially also for today's AI models, where if you actually write dangerous, dangerous, dangerous in every single line, like
Speaker 4 the models will pay more attention to that and will be more likely to find bugs in that region.
Speaker 3 That's actually just straight up a really good practice of a labeling code of how much damage this can do yeah i mean it's controversial like if some people think it's ugly uh swallowing well i actually think it's it's like in fact i i actually think this is one of the things i learned from arvit is you know like i sort of aesthetically i don't like it but i think there's certainly something where like it's it's useful for the models and and humans just forget a lot and it's really easy to make a small mistake and cause like
Speaker 3 bring down you know like just bring down the server and like you like
Speaker 2 of course we we like test a lot and whatever but there's always these things that you have to be very careful yeah like with just normal doc strings i think people will often just skim it when making a change and think oh this i i know how to do this um
Speaker 2 and you kind of really need to point it out to them so that that doesn't slip through
Speaker 1 Yeah, you have to be reminded that you can do a lot of damage.
Speaker 1 That's like we don't really think about that.
Speaker 2 Yeah.
Speaker 1 You think about, okay,
Speaker 1 how do I figure out how this works so I can improve it? You don't think about the other direction.
Speaker 4 Until we have formal verification for everything, then you can do whatever you want and you know for certain that you have not introduced a bug if the proof passes.
Speaker 2 But concretely, what do you think that future would look like?
Speaker 2 I think
Speaker 4 people will just not write tests anymore. And
Speaker 4 the model will suggest, like you write a function, the model will suggest a spec and you review the spec.
Speaker 4 And in the meantime, a smart reasoning model computes a proof that the implementation follows the spec.
Speaker 4 And I think that happens for most functions.
Speaker 2 Don't you think this gets at a little bit some of the stuff you were talking about earlier with the difficulty of specifying intent for what you want with software?
Speaker 2 Where sometimes it might be because the intent is really hard to specify, it's also then going to be really hard to prove that it's actually matching whatever your intent is.
Speaker 2 Like, do you think that spec is hard to generate?
Speaker 2 Yeah, or just like
Speaker 2 for a given spec maybe you can i think there is a question of like can you actually do the formal verification like that's like is that possible i think that there's like more to dig into there but then also even if you have the spec if you have the spec how do you even if you have the spec is the spec written in natural language yeah
Speaker 2 the spec spec would be formal but how easy that so then i think that
Speaker 2 you care about things that are not going to be easily well specified in the spec language i see i see would be um yeah maybe uh an argument against formal verification is all you need. Yeah.
Speaker 2 The worry is there's this massive dock.
Speaker 2
Replacing something like unit tests. Sure.
Yeah. Yeah.
Speaker 4 I think you can probably also evolve the spec languages to capture some of the things that they don't really capture right now.
Speaker 4 But I don't know. I think it's very exciting.
Speaker 1 And you're speaking not just about like single functions. You're speaking about entire code bases.
Speaker 4
I think entire code bases is harder, but that is what I would love to have. And I think it should be possible.
And because you can even, there's like a lot of work recently where you can prove
Speaker 4 formally verify down to the hardware. So like through the you formally verify the C code and then you formally verify through the GCC compiler and then through the Verilog down to the hardware.
Speaker 4 And that's like an incredibly big system, but it actually works. And I think big code bases are sort of similar in that they're like multi-layered system.
Speaker 4 And if you can com decompose it and formally verify each part, then I think it should be possible. I think the specification problem is a real problem, but.
Speaker 2 How do you handle side effects? Or how do you handle, I guess, external dependencies, like calling the Stripe API?
Speaker 3 Maybe Stripe would write a spec for this.
Speaker 2 But you can't do this for everything.
Speaker 2 Can you do this for everything you use?
Speaker 2 How do you do it for if there's a language model? Like maybe
Speaker 2
people will use language models as primitives in the programs they write. And there's a dependence on it.
And how do you now include that?
Speaker 4 I think you might be able to prove prove that still prove what about language models i think if it feels possible that you could actually prove that a language model is aligned for example or like you can prove that it actually gives the the right answer um that's the dream yeah that is i mean that's yeah if it's possible That's your, I have a dream speech.
Speaker 1 If it's possible, that will certainly help with, you know,
Speaker 1 making sure your code doesn't have bugs and making sure AI doesn't destroy all of human civilization. So the full spectrum of AI safety to just bug finding.
Speaker 1 So you said the models struggle with bug finding. What's the hope?
Speaker 3 My hope initially is,
Speaker 3 and I can let Michael chime in too, but it was like this.
Speaker 3
It should first help with the stupid bugs. It should very quickly catch the stupid bugs.
Like off by one errors, sometimes you write something in a comment and do the other way. It's like very common.
Speaker 3
Like I do this. I write less than in a comment and I maybe write the greater than or something like that.
And the model is like, yeah, it looks sketchy. Like, do you sure you want to do that?
Speaker 3 But eventually it should be able to catch harder bugs to you.
Speaker 2 Yeah. And I think that it's also important to note that this is having good bug finding models feels necessary to get to the highest reaches of having AI do more and more programming for you.
Speaker 2 Where you're going to, you know, if the AI is building more and more of the system for you, you need to not just generate, but also verify.
Speaker 2 And without that, some of the problems that we've talked about before with programming with these models
Speaker 2 will just become untenable. So it's not just for humans, like you write a bug, I write a bug, find the bug for me, but it's also being able to verify the AI's code and check it
Speaker 4 is really important. Yeah, and then how do you actually do this? Like we have had a lot of contentious dinner discussions of how do you actually train a bug model.
Speaker 4 But one very popular idea is, you know, it's kind of potentially easy to introduce a bug than actually finding the bug. And so you can train a model to introduce bugs in existing code.
Speaker 4 And then you can train a reverse bug model then that can find bugs using this synthetic data. So that's like one example.
Speaker 4 But yeah, there are lots of ideas for how to do that.
Speaker 2 You can also.
Speaker 2 You can also do a bunch of work, not even at the model level, of taking the biggest models and then maybe giving them access to a lot of information that's not just the code.
Speaker 2 Like it's kind of a hard problem to like like stare at a file and be like, where's the bug? And you know, that's that's hard for humans often, right?
Speaker 2 And so often you have to run the code and being able to see things like traces and step through a debugger.
Speaker 2 There's another whole nother direction where it like kind of tends toward that. And it could also be that there are kind of two different product form factors here.
Speaker 2 It could be that you have a really specialty model that's quite fast that's kind of running in the background and trying to spot bugs.
Speaker 2 And it might be that sometimes, sort of to Arvid's earlier example about, you know, some nefarious input box bug, it might be that sometimes you want to like, there's, you know, there's a bug.
Speaker 2
You're not just like checking hypothesis hypothesis-free. You're like, this is a problem.
I really want to solve it.
Speaker 2 And you zap that with tons and tons and tons of compute, and you're willing to put in like $50 to solve that bug or something even more.
Speaker 1 Have you thought about integrating money into this whole thing? Like, I would pay probably a large amount of money for if you found a bug or even generated code that I really appreciated.
Speaker 1 Like, I had a moment a few days ago when I started using cursor where it generated
Speaker 1 perfect
Speaker 1 like perfect three functions for interacting with the YouTube API to update captions and for localization, like different in different languages. The API documentation is not very good.
Speaker 1 And the code across, like, if I googled it for a while, I couldn't find exactly, there's a lot of confusing information. And Cursor generated perfectly.
Speaker 1
And I was like, I just sat back, I read the code, I was like, this is correct. I tested it.
It's correct. I was like, I want a tip
Speaker 1 on a button that goes,
Speaker 1 here's $5.
Speaker 1 One that's really good just to support the company and support what the interface is, and the others that probably sends a strong signal, like, good job,
Speaker 2 right?
Speaker 1 So, there's just a much stronger signal than just accepting the code, right? You just actually send like a strong good job. That, and for bug finding, obviously, like there's a lot of people,
Speaker 1 you know, that would pay a huge amount of money for a bug, like a bug, bug bounty thing, right? Is that you guys think about that?
Speaker 4 yeah it's a controversial idea inside the the company i think it sort of depends on how much uh you believe in humanity almost you know like uh i think it would be really cool if like uh you spend nothing to try to find a bug and if it doesn't find a bug you you spend zero dollars and then if it does find a bug uh and you click accept then it also shows like in parentheses like one dollar And so you spend $1 to accept the bug.
Speaker 4 And then, of course, there's a worry, like, okay, we spent a lot of computation. Like, maybe people will just copy-paste.
Speaker 4 I think that's a worry.
Speaker 4 And then there is also the worry that, like, introducing money into the product makes it kind of,
Speaker 4 you know, like, it doesn't feel as fun anymore. Like, you have to think about money, and you, all you want to think about is like the code.
Speaker 4 And so maybe it actually makes more sense to separate it out. And like, you pay some fee like every month, and then you get all of these things for free.
Speaker 1 But there could be a tipping component, which is not like a case.
Speaker 4 Yes, but it still has that like dollar symbol. I think it's fine, but I also see the point where
Speaker 4 maybe you don't want to introduce it.
Speaker 2 Yeah, I was going to say the moment that it feels like people do this is when they share it, when they have this fantastic example, they just kind of share it with their friends.
Speaker 2 There is also a potential world where there's a technical solution to this honor system problem too, where if we can get to a place where we understand the output of the system more, I mean, to the stuff we were talking about with like, you know, error checking with the LSP and then also running the code.
Speaker 2 But if you could get to a place where you could actually somehow verify, oh, I have fixed the bug, maybe then the bounty system doesn't need to rely on the honor system too.
Speaker 1 How much interaction is there between the terminal and the code? Like how much information is gained from if you run the code in the terminal?
Speaker 1 Can you do like a
Speaker 1 loop where it runs the code and suggests how to change the code if the code and runtime gives an error? Is right now they're separate worlds completely.
Speaker 1 Like I know you can do control K inside the terminal to help you write the code.
Speaker 2 You can use terminal context as well
Speaker 2 inside of chat command K, kind of everything.
Speaker 2 We don't have the looping part yet, though. We suspect something like this could make a lot of sense.
Speaker 2 There's a question of whether it happens in the foreground too, or if it happens in the background, like what we've been discussing.
Speaker 1
Sure. The background is pretty cool.
Like you can be running the code in different ways. Plus, there's a database side to this, which how do you protect it from not modifying the database? But okay.
Speaker 3 I mean, there's certainly cool solutions there.
Speaker 3 There's this new API that is being developed for
Speaker 3 it's not in AWS, but
Speaker 3
it certainly is, I think it's in Planet Scale. I don't know if Planet Scale was the first one to add it.
It's this ability to sort of add branches to a database,
Speaker 3 which is
Speaker 3 like if you're working on a feature and you want to test against the prod database, but you don't actually want to test against the prod database, you could sort of add a branch to the database.
Speaker 3 And the way they do that is to add a branch to the right-ahead log.
Speaker 3 And there's obviously a lot of technical complexity in doing it correctly. I guess database companies
Speaker 3 need new things to do.
Speaker 2 They have good databases now.
Speaker 3 And I think TurboBuffer, which is one of the databases we use,
Speaker 3 is going to add maybe branching to the
Speaker 2 RiteAhead log.
Speaker 3 And so
Speaker 3 maybe the AI agents
Speaker 3
will use branching. They'll test against and branch.
And it's sort of going to be a requirement for the database to support branching or something.
Speaker 2 It would be really interesting if you could branch a file system, right? Yeah.
Speaker 3 I feel like everything needs branching.
Speaker 2 It's like that. Yeah.
Speaker 1 Yeah.
Speaker 1 That's the problem with the multiverse, right?
Speaker 1 Like if you branch on everything, that's like a lot.
Speaker 3 I mean, there's obviously these super clever algorithms to make sure that you don't actually sort of use a lot of space or CPU or whatever.
Speaker 1
Okay, this is a good place to ask about infrastructure. So you guys mostly use AWS.
What are some interesting details? What are some interesting challenges? Why'd you choose AWS?
Speaker 1 Why is AWS still winning?
Speaker 2 Hashtag.
Speaker 4 AWS is just really,
Speaker 2 really good.
Speaker 4 It's really good. Like,
Speaker 4 whenever
Speaker 4 you use an AWS product, you just know that it's going to work. Like, it might be absolute hell to go through the steps to set it up.
Speaker 1 Why is the interface so horrible?
Speaker 3 Because
Speaker 4 it's just so good. It doesn't need to be.
Speaker 1 The nature of winning.
Speaker 3 I think it's exactly the nature of their winning.
Speaker 2 Yeah. Yeah.
Speaker 4
But AWS, we can always trust. Like, it will always work.
And if there is a problem, it's probably your problem.
Speaker 2 Yeah.
Speaker 1 Okay. Is there some interesting like challenges to you guys are pretty new startup to get scaling to like to so many people and yeah i think that there uh
Speaker 2 it has been an interesting journey adding, you know, each extra zero to the request per second.
Speaker 2 You run into all of these with like the, you know, the general components you're using for caching and databases, run into issues as you make things bigger and bigger.
Speaker 2 And now we're at the scale where we get like, you know, int overflows on our tables and things like that.
Speaker 2 And then also there have been some custom systems that we've built.
Speaker 2 Like, for instance, our retrieval system for computing a semantic index of your code base and answering questions about a code base that have continually, I feel like, been one of the trickier things to scale.
Speaker 3 I have a few friends who are super, super senior engineers, and one of their sort of lines is like: it's very hard to predict where systems will break when you scale them.
Speaker 3 You can sort of
Speaker 3 try to predict in advance, but like there's always something weird that's going to happen when you add this extra zero.
Speaker 3 And you thought you thought through everything, but you didn't actually think through everything.
Speaker 3 But I think for that particular system,
Speaker 3 we've
Speaker 3 so
Speaker 3 for concrete details, the thing we do is obviously we upload
Speaker 3 when like we chunk up all of your code and then we send out sort of the code for for embedding and we embed the code and then we store the embeddings in a in a database, but we don't actually store any of the code.
Speaker 3 And then there's reasons around making sure that we don't introduce client bugs because we're very, very paranoid about client bugs. We store
Speaker 3 much of the details on the server,
Speaker 3 Everything is sort of encrypted.
Speaker 3 So, one of the technical challenges is always making sure that the local index, the local code base state, is the same as the state that is on the server.
Speaker 3 And the way sort of technically we ended up doing that is so for every single file, you can sort of keep this hash.
Speaker 3 And then for every folder, you can sort of keep a hash, which is the hash of all of its children, and you can sort of recursively do that until the top. And why do something complicated?
Speaker 3 One thing you could do is you could keep a hash for every file.
Speaker 3 And every minute, you could try to download the hashes that are on the server, figure out what are the files that don't exist on the server.
Speaker 3 Maybe you just created a new file, maybe you just deleted a file, maybe you checked out a new branch, and try to reconcile the state between the client and the server.
Speaker 3 But that introduces like absolutely ginormous network overhead,
Speaker 3 both on the client side. I mean nobody really wants us to hammer their Wi-Fi all the time if you're using cursor
Speaker 3 but also like I mean it would introduce like ginormous overhead on the database I mean it would sort of be reading this
Speaker 3 tensive terabyte database sort of approaching like 20 terabytes or something database like every second that's just just sort of kind of crazy. You definitely don't want to do that.
Speaker 3 So what you do, you sort of, you just try to reconcile the single hash which is at the root of the project and then if if something mismatches then you go you find where all the things disagree maybe you look at the children and see if the hashes match and if the hashes don't match go look at their children and so on but you only do that in the scenario where things don't match and for most people most of the time the hashes match so it's a kind of like hierarchical reconciliation yeah something like that yeah it's called a merkle tree yeah
Speaker 3 yeah i mean so yeah this is cool to see that you kind of have to think through all these problems and i mean the the the point of like the reason it's gotten hard is just because like the number of people using it and if some of your customers have really, really large code bases to the point where
Speaker 3 we originally reordered our code base, which is which is big, but I mean, it's just not the size of some company that's been there for 20 years and sort of has a ginormous number of files.
Speaker 3 And you sort of want to scale that across programmers.
Speaker 3 There's all these details where like building a simple thing is easy, but sort of scaling it to a lot of people, like a a lot of companies is obviously a difficult problem, which is sort of, you know, independent of actually.
Speaker 3 So that's, there's part of the scaling our current solution is also, you know, coming up with new ideas that obviously we're working on, but then, but then scaling all of that in the last few weeks, months.
Speaker 2 Yeah. And there are a lot of clever things, like additional things that go into this indexing system.
Speaker 2 For example, the bottleneck in terms of costs is not storing things in the vector database or the database. It's actually embedding the code.
Speaker 2 And you don't want to re-embed the code base for every single person in a company that is using the same exact code, except for maybe they're in a different branch with a few different files or they've made a few local changes.
Speaker 2 And so because, again, embeddings are the bottleneck, you can do this one clever trick and not have to worry about like the complexity of like dealing with branches and the other databases where you just have some cache on the actual vectors computed from the hash of a given chunk.
Speaker 2 And so this means that when the nth person at a company goes and embeds their code base, it's really, really fast. And you do all this without actually storing any code on our servers at all.
Speaker 2 No code data stored. We just store the vectors in the vector database and the vector cache.
Speaker 1 What's the biggest gains at this time
Speaker 1 you get from indexing the code base? I could just out of curiosity, like what
Speaker 1 benefit do users have? It seems like longer term, there'll be more and more benefit, but in the short term, just asking questions of the code base,
Speaker 1 what's the usefulness of that?
Speaker 4 I think the most obvious one is
Speaker 4 just
Speaker 4 you want to find out where something is happening in your large code base. And you sort of have a fuzzy memory of, okay, I want to find the place where we do X,
Speaker 4 but you don't exactly know what to search for in a normal text search.
Speaker 4 And so you ask a chat, you hit command enter to ask with the codebase chat, and then very often it finds the right place that you were thinking of.
Speaker 2 I think,
Speaker 2 like you mentioned, in the future, I think this is only going to get more and more powerful, where we're working a lot on improving the quality of our retrieval.
Speaker 2 And I think the ceiling for that is really, really much higher than people give it credit for.
Speaker 1 One question that's good to ask here, have you considered and why haven't you much done sort of local stuff to where you can do the, I mean, it seems like everything we just discussed is exceptionally difficult to do.
Speaker 1 To go to go to the cloud, you have to think about all these things with the caching and the,
Speaker 1 you know large code bases with a large number of programmers are using the same code base you have to figure out the puzzle of that a lot of it you know most
Speaker 4 software just does stuff this heavy computational stuff locally have you considered doing sort of embeddings locally yeah we thought about it and i think it would be cool to do it locally i think it's just really hard and and one thing to keep in mind is that you know uh some of our users use the latest macbook pro uh and but most of our users like more than 80% of our users, are in Windows machines, which and many of them are not very powerful.
Speaker 4
And so local models really only work on the latest computers. And it's also a big overhead to build that in.
And so even if we would like to do that,
Speaker 4
it's currently not something that we are able to focus on. And I think there are some people that do that.
And I think that's great.
Speaker 4 But especially as models get bigger and bigger and you want to do fancier things with like bigger models, it becomes even harder to do it locally.
Speaker 2 Yeah.
Speaker 3 And it's not a problem of like weaker computers. It's just that, for example, if you're some big company,
Speaker 3
you have big company code base. It's just really hard to process big company code base even on the beefiest MacBook Pros.
So even if it's not even a matter of like, if you're, if you're just like
Speaker 3 a student or something. I think if you're like the best programmer at a big company, you're still going to have a horrible experience if you do everything locally.
Speaker 3 You could do edge and sort of scrape by, but like, again, it wouldn't be fun anymore.
Speaker 2 Yeah, like at approximate nearest neighbors and this massive code base is going to just eat up your memory and your CPU. And it's best off of that.
Speaker 2 And that's just that.
Speaker 2 Let's talk about also the modeling side, where, as Arvid said, there are these massive headwinds against local models where one,
Speaker 2 things seem to move towards MOEs, which one benefit is maybe they're they're more memory bandwidth bound, which plays in favor of local versus using GPUs
Speaker 2
or using NVIDIA GPUs. But the downside is these models are just bigger in total.
And they're going to need to fit often, not even on a single node, but multiple nodes.
Speaker 2 There's no way that's going to fit inside of even really good MacBooks.
Speaker 2 And I think especially for coding, It's not a question as much of like, does it clear some bar of like the models good enough to do these things?
Speaker 2 And then like we're satisfied, which may be, maybe the case for other problems and maybe where local models shine.
Speaker 2 But people are always going to want the best, the most intelligent, the most capable things. And that's going to be really, really hard to run for almost all people locally.
Speaker 3 Don't you want the most capable model? Like
Speaker 3 you want Sonet?
Speaker 2 And also with O.
Speaker 1 I like how you're pitching me.
Speaker 1 Would you be satisfied with an inferior model? Listen, I'm, yes, I'm one of those, but there's some people that like to do stuff locally, especially like
Speaker 1
that. Really, there's a whole obviously open source movement that kind of resists.
And it's good that they exist, actually, because you want to resist the power centers that are growing.
Speaker 4 There's actually an alternative to local models that I am particularly fond of. I think it's still very much in the research stage.
Speaker 4 But you could imagine to do homomorphic encryption for language model inference. So you encrypt your input on your local machine, then you send that up, and then
Speaker 4 the server
Speaker 4 can use lots of computation. They can run models that you cannot run locally on this encrypted data, but they cannot see what the data is.
Speaker 4 And then they send back the answer and you decrypt the answer and only you can see the answer. So I think that's still very much research.
Speaker 4 And all of it is about trying to make the overhead lower because right now the overhead is really big. But if you can make that happen, I think that would be really, really cool.
Speaker 4 And I think it would be really, really impactful.
Speaker 4 Because I think one thing that's actually kind of worrisome is that as these models get better and better, they're going to become more and more economically useful.
Speaker 4 And so more and more of the world's information and data will flow through, you know, one or two centralized actors.
Speaker 4 And then
Speaker 4 There are worries about, you know, there can be traditional hacker attempts, but it also creates this kind of scary part where if all of the world's information is flowing through one node in plain text,
Speaker 4 you can have surveillance in very bad ways. And sometimes that will happen for
Speaker 4
initially will be like good reasons. People will want to try to protect against bad actors using AI models in bad ways.
And then you will add in some surveillance code.
Speaker 4 And then someone else will come in and, you know, you're on a slippery slope. And then you start
Speaker 4 doing bad things with a lot of the world's data. And so I'm very hopeful that we can solve homomorphic encryption for much more learning.
Speaker 1 Privacy preserving machine learning, but I would say that's the challenge we have with all software these days. It's like
Speaker 1 there's so many features that can be provided from the cloud and all us increasingly rely on it and make our life awesome, but there's downsides and that's why you rely on really good security to protect from basic attacks.
Speaker 1 But there's also only a small set of companies that are controlling that data, you know, and they obviously have leverage and they could be infiltrated in all kinds of ways.
Speaker 1 That's the world we live in.
Speaker 3 Yeah, I mean, the thing I'm just actually quite worried about is sort of the world where I mean, so Anthropic has this responsible scaling policy, and so we're on like the low, low ASLs, which is the Anthropic security lower, whatever,
Speaker 3 of like of the models. But as we get to like quote-unquote ASL3, ASL4, whatever models,
Speaker 3 which are sort of very powerful, but
Speaker 3 for mostly reasonable security reasons, you would want to monitor all the prompts.
Speaker 3 But I think that's sort of reasonable and understandable where everyone is coming from. But Matt, it'd be really horrible if sort of like all the world's information is sort of monitored that heavily.
Speaker 3 It's way too centralized.
Speaker 3 It's like sort of this
Speaker 3 really fine line you're walking where
Speaker 3 on the one side, like you don't want the models to go rogue, on the other side, like man, it's humans. Like,
Speaker 3 I don't, I don't know if I, if I trust like all the world's information to pass through like three, three model providers.
Speaker 2 Yeah.
Speaker 2 Why do you think it's different than cloud providers?
Speaker 4 Because I think
Speaker 4 the
Speaker 4 this is a lot of this data would never have gone to the cloud providers in the, in the first place, um, where
Speaker 4 This is often like you want to give more data to the EIA models. You want to give personal data that you would never have put online in the first place to these companies or to these models.
Speaker 4 And it also centralizes control, where right now,
Speaker 4 for
Speaker 4 cloud, you can often use your own encryption keys. And like AWS can't really do much.
Speaker 4 But here is just
Speaker 4 centralized actors that see the exact plaintext of everything.
Speaker 1
On the topic of context, that's actually been a friction for me. When I'm writing code, you know, in Python, there's a bunch of stuff imported.
There's a,
Speaker 1 you could probably intuit the kind of stuff I would like to include in the context. Is there, like, how hard is it to auto-figure out the context?
Speaker 2 It's tricky.
Speaker 2 I think we can do a lot better
Speaker 2 at
Speaker 2
computing the context automatically in the future. One thing that's important to note is there are trade-offs with including automatic context.
So the more context you include for these models,
Speaker 2 first of all, the slower they are
Speaker 2 and the more expensive those requests are, which means you can then do less model calls and do less fancy stuff in the background.
Speaker 2 Also, for a lot of these models, they get confused if you have a lot of information in the prompt. So the bar for accuracy and for relevance of the context you include should be quite high.
Speaker 2
But this is already we do some automatic context in some places within the product. It's definitely something we want to get a lot better at.
And
Speaker 2 I think that there are a lot of cool ideas to try there,
Speaker 2 both on the learning better retrieval systems, like better embedding models, better re-rankers.
Speaker 2 I think that there are also cool academic ideas, you know, stuff we've tried out internally, but also the field is grappling with writ large about can you get language models to a place where you can actually just have the model itself like understand a new corpus of information.
Speaker 2 And the most popular talked about version of this is, can you make the context windows infinite?
Speaker 2 Then if you make the context windows infinite, can you make the model actually pay attention to the infinite context?
Speaker 2 And then after you can make it pay attention to the infinite context, to make it somewhat feasible to actually do it, can you then do caching for that infinite context?
Speaker 2 You don't have to recompute that all the time.
Speaker 2 But there are other cool ideas that are being tried that are a little bit more analogous to fine-tuning, of actually learning this information and the weights of the model.
Speaker 2 And it might be that you actually get sort of a qualitatively different type of understanding if you do it more at the weight level than if you do it at the in-context learning level.
Speaker 2 I think the journey, the jury is still a little bit out on how this is all going to work in the end.
Speaker 2 But in the interim, as a company, we are really excited about better retrieval systems and picking the parts of the code base that are most relevant to what you're doing.
Speaker 2 We could do that a lot better. Like one interesting proof of concept for the learning this knowledge directly in the weights is with VS Code.
Speaker 2 So we're in a VS Code fork and VS Code, the code code is all public. So these models in pre-training have seen all the code.
Speaker 2 They've probably also seen questions and answers about it. And then they've been fine-tuned in RLHF to be able to answer questions about code in general.
Speaker 2 So when you ask it a question about VS Code, sometimes it'll hallucinate, but sometimes it actually does a pretty good job at answering the question.
Speaker 2 And I think this is just by, it happens to be okay. But what if you could actually specifically train or post-train a model such that it really was built to understand this code base?
Speaker 2 It's an open research question, one that we're quite interested in.
Speaker 2 And then there's also uncertainty of like, do you want the model to be the thing that end-to-end is doing everything, i.e., it's doing the retrieval in its internals and then kind of answering a question, creating the code?
Speaker 2 Or do you want to separate the retrieval from the frontier model, where maybe you'll get some really capable models that are much better than like the best open source ones in a handful of months?
Speaker 2 And then you'll want to separately train a really good open source model to be the retriever, to be the thing that feeds in the context to these larger models.
Speaker 1 Can you speak a little more to the post-training a model to understand the code base? Like what do you mean by that? Is this a synthetic data direction? Is this...
Speaker 2 Yeah, I mean, there are many possible ways you could try doing it. There's certainly no shortage of ideas.
Speaker 2 It's just a question of going in and like trying all of them and being empirical about which one one works best.
Speaker 2 One very naive thing is to try to replicate what's done with VS Code and these frontier models.
Speaker 2 So let's continue pre-training, some kind of continued pre-training that includes general code data, but also throws in a lot of the data of some particular repository that you care about.
Speaker 2 And then in post-training,
Speaker 2 meaning in let's just start with instruction fine-tuning, you have like a normal instruction fine-tuning data set about code, but you throw in a lot of questions about code in that repository.
Speaker 2 So you could either get ground truth ones, which might be difficult, or you could do what you kind of hinted at or suggested using synthetic data,
Speaker 2 i.e.,
Speaker 2 kind of having the model
Speaker 2 ask questions about various pieces of the code.
Speaker 2 So you kind of take the pieces of the code, then prompt the model or have a model propose a question for that piece of code, and then add those as instruction fine-tuning data points.
Speaker 2 And then in theory, this might unlock the model's ability to answer questions about that code base.
Speaker 1 Let me ask you about OpenAI 01. What do you think is the role of that kind of test-time compute system in programming?
Speaker 2 I think test-time compute is really, really interesting.
Speaker 2 So, there's been the pre-training regime, which will kind of, as you scale up the amount of data and the size of your model, get you better and better performance, both on loss and then on downstream benchmarks and just general performance when we use it for coding or other tasks.
Speaker 2 We're starting to hit a bit of a data wall, meaning it's going to be hard to continue scaling up this regime.
Speaker 2 And so scaling up test time compute is an interesting way of now, you know, increasing the number of inference time flops that we use, but still getting like, like, yeah, as you increase the number of flops you use inference time, getting corresponding improvements in the performance of these models.
Speaker 2 Traditionally, we just had to literally train a bigger model that always uses, that always used that many more flops, but now we could perhaps use the same size model and run it for longer to be able to get an answer at the quality of a much larger model.
Speaker 2 And so, the really interesting thing I like about this is there are some problems that perhaps require 100 trillion parameter model intelligence trained on 100 trillion tokens.
Speaker 2 But that's like maybe 1%,
Speaker 2 maybe like 0.1% of all queries. So, are you going to spend all of this effort, all of this compute, training a model that costs that much and then run it so infrequently?
Speaker 2 It feels completely wasteful when instead you get the model that can, that is, that you train the model that's capable of doing the 99.9% of queries.
Speaker 2 Then you have a way of inference time, running it longer for those few people that really, really want max intelligence.
Speaker 1 How do you figure out which problem requires what level of intelligence?
Speaker 1 Is that possible to dynamically figure out when to use GPT-4, when to use, like when to use a small model, and when you need the 01?
Speaker 2
I mean, yeah, that's an open research problem, certainly. I don't think anyone's actually cracked this model routing problem quite well.
We'd like to.
Speaker 2 We have like kind of initial implementations of this for things for something like CursorTab.
Speaker 2 But at the level of like going between 4.0 Sonnet to 01,
Speaker 2 it's a a bit trickier.
Speaker 2 There's also a question of what level of intelligence do you need to determine if the thing is
Speaker 2 too hard for the four-level model. Maybe you need the 01 level model.
Speaker 2 It's really unclear.
Speaker 1 But you mentioned, so
Speaker 1
there's a pre-training process, then there's post-training, and then there's like test time compute. That's fair to sort of separate.
Where's the biggest gains?
Speaker 2 Well, it's weird because like test time compute, there's like a whole training strategy needed to get test time to compute to work. And the really, the other really weird thing about this is
Speaker 2 no one, like outside of the big labs and maybe even just OpenAI, no one really knows how it works. Like there have been some really interesting papers that
Speaker 2 show hints of what they might be doing. And so perhaps they're doing something with tree search using process reward models.
Speaker 2 But yeah, I just, I think the issue is we don't quite know know exactly what it looks like, so it would be hard to kind of comment on like where it fits in.
Speaker 2 I would put it in post-training, but maybe like the compute spent for this kind of for getting test time compute to work for a model is going to dwarf pre-training eventually.
Speaker 1
So, we don't even know if O1 is using just like chain of thought RL. We don't know how they're using any of these.
I don't know anything.
Speaker 2 It's fun to speculate.
Speaker 1 Like, if you were to build a competing model, what what would you do?
Speaker 2 Yeah.
Speaker 2 So one thing to do would be, I think you probably need to train a process reward model, which is, so maybe we can get into reward models and outcome reward models versus process reward models.
Speaker 2 Outcome reward models are the kind of traditional reward models that people have trained for these, for language models, language modeling. And it's just looking at the final thing.
Speaker 2 So if you're doing some math problem, let's look at that final thing. You've done everything.
Speaker 2
And let's assign a grade to it, how likely we think. Like, what's the reward for this outcome.
Process reward models instead try to grade the chain of thought.
Speaker 2 And so OpenAI had some preliminary paper on this, I think,
Speaker 2 last summer, where they
Speaker 2 use human labelers to get this pretty large several hundred thousand data set of grading chains of thought.
Speaker 2 Ultimately, it feels like I haven't seen anything interesting in the ways that people use process reward models outside of just using it as a means of affecting how we choose between a bunch of samples.
Speaker 2 So like what people do in all these papers is they sample a bunch of outputs from the language model and then use the process reward models to grade all those generations alongside maybe some other heuristics and then use that to choose the best answer.
Speaker 2 The really interesting thing that people think might work and people want to work is tree search with these process reward models.
Speaker 2 Because if you really can grade every single step of the chain of thought, then you can kind of branch out and
Speaker 2 explore multiple paths of this chain of thought. And then use these process reward models to evaluate how good is this branch that you're taking.
Speaker 1 Yeah, when the quality of the branch is somehow strongly correlated with the quality of the outcome at the very end. So like you have a good model of knowing which branch to take.
Speaker 1 So not just in the short term and like in the long term.
Speaker 2 Yeah.
Speaker 2 And like the interesting work that I think has been done is figuring out how to properly train the process or the interesting work that has been open sourced and people, I think, talk about is how to train the process reward models, maybe in a more automated way.
Speaker 2 I could be wrong here, could not be mentioning some papers, but I haven't seen anything super
Speaker 2 that seems to work really well for using the process reward models creatively to do tree search and code.
Speaker 1
This is kind of an AI safety, maybe a bit of a philosophy question. So, OpenAI says that they're hiding the chain of thought from the user.
And they've said that that was a difficult decision to make.
Speaker 1 instead of showing the chain of thought, they're asking the model to summarize the chain of thought.
Speaker 1 They're also in the background saying they're going to monitor the chain of thought to make sure the model is not trying to manipulate the user, which is a fascinating possibility.
Speaker 1 But anyway, what do you think about hiding the chain of thought?
Speaker 2 One consideration for OpenAI, and this is completely speculative. could be that they want to make it hard for people to distill these capabilities out of their model.
Speaker 2 It might actually be easier if you had access to that hidden chain of thought to replicate the technology.
Speaker 2 Because that's pretty important data, like seeing the steps that the model took to get to the final result.
Speaker 1 So you could probably train on that also.
Speaker 2 And there was sort of a mirror situation with this, with some of the large language model providers. And also this is speculation, but
Speaker 2 some of these APIs used to offer easy access to log probabilities for the tokens that they're generating.
Speaker 2
and also log probabilities over the prompt tokens. And then some of these APIs took those away.
And again, complete speculation, but
Speaker 2 one of the thoughts is that the reason those were taken away is if you have access log probabilities, similar to this hidden train of thought, that can give you even more information to try and distill these capabilities out of the APIs, out of these biggest models into models you control.
Speaker 2 As an asterisk on also the previous discussion about
Speaker 2 us integrating O1, I think that we're still learning how to use this model. So we made O1 available in cursor because like we were, when we got the model, we were really interested in trying it out.
Speaker 2 I think a lot of programmers are going to be interested in trying it out. But
Speaker 2 O1 is not part of the default cursor experience in any way yet.
Speaker 2 And we still haven't found a way to yet integrate it into an edit in into the editor in a way that we reach for sort of, you know, every hour, maybe even every day.
Speaker 2 And so I think that the jury is still out on how to use the model.
Speaker 2 And
Speaker 2 we haven't seen examples yet of people releasing things where it seems really clear, like, oh, that's now the use case.
Speaker 2 The obvious one to turn to is maybe this can make it easier for you to have these background things running, right? To have these models and loops, to have these models be agentic.
Speaker 2 But we're still
Speaker 2 discovering.
Speaker 3 To be clear, we have ideas. We just need to
Speaker 3 try and get something incredibly useful before we put it out there.
Speaker 2 But it has these significant limitations.
Speaker 2 Like, even barring capabilities uh it does not stream and that means it's really really painful to use for things where you want to supervise the output um and instead you're just waiting for the wall of text to show up um also it does feel like the early innings of test time compute and search where it's just like a very very much a v0
Speaker 2 um and there's so many things that like
Speaker 2 like don't feel quite right. And I suspect
Speaker 2 in parallel to people increasing the amount of pre-training data and the size of the models in pre-training and finally fixed there, you'll now have this other thread of getting search to work better and better.
Speaker 1 So let me ask you about
Speaker 1 Strawberry Tomorrow Eyes.
Speaker 1 So it looks like GitHub Copilot might be integrating 01 in some kind of way. And I think some of the comments are saying, does this mean cursor is done?
Speaker 1 I think I saw one comment saying that.
Speaker 4 It's a time to shut down cursory.
Speaker 2 Time to shut down cursory.
Speaker 1 So it's a time to shut down cursor.
Speaker 2 I think this space is a little bit different from past software spaces over the 2010s,
Speaker 2 where I think that the ceiling here is really, really, really incredibly high. And so I think that the best product in three to four years will just be so much more useful than the best product today.
Speaker 2 And you can like wax poetic about moats this and brand that and you know, this is our advantage.
Speaker 2 But I think in the end, just if you don't have, like, if you stop innovating on the product, you will, you will lose. And that's also great for startups.
Speaker 2 That's great for people trying to enter this market because it means you have an opportunity to win against people who have, you know, lots of users already by just building something better.
Speaker 2 And so I think, yeah, over the next few years, it's just about building the best product, building the best system.
Speaker 2 And that both comes down to the modeling engine side of things and it also comes down to the to the editing experience.
Speaker 2 Yeah, I think most of the additional value from cursor versus everything else out there is not just integrating the new model fast like 01.
Speaker 2 It comes from all of the kind of depth that goes into these custom models that you don't realize are working for you in kind of every facet of the product, as well as like the really
Speaker 2 thoughtful UX with every single feature.
Speaker 1
All right. From that profound answer, let's descend back down to the technical.
You mentioned you have a taxonomy of synthetic data.
Speaker 2 Oh, yeah.
Speaker 1 Can you please explain?
Speaker 2 Yeah, I think there are three main kinds of synthetic data. The first is, so what is synthetic data first?
Speaker 2 So there's normal data, like non-synthetic data, which is just data that's naturally created, i.e., usually it'll be from humans having done things. So from some human process, you get this data.
Speaker 2 Synthetic data,
Speaker 2 the first one would be distillation. So, having a language model, kind of output tokens or probability distributions over tokens.
Speaker 2 And then you can train some less capable model on this.
Speaker 2 This approach is not going to get you a net, like more capable model than the original one that has produced the tokens.
Speaker 2 But it's really useful for if there's some capability you want to elicit from some really expensive high-latency model, you can then distill that down into some smaller task-specific model.
Speaker 2 The second kind is when like one direction of the problem is easier than the reverse.
Speaker 2 And so a great example of this is bug detection, like we mentioned earlier, where it's a lot easier to introduce reasonable looking bugs than it is to actually detect them.
Speaker 2 And this is probably the case for humans too.
Speaker 2 And so what you can do is you can get a model that's not training that much data, that's not that smart, to introduce a bunch of bugs in code.
Speaker 2 And then you can use that to then train, use the synthetic data to train a model that can be really good at detecting bugs.
Speaker 2 The last category, I think, is, I guess, the main one that it feels like the big labs are doing for synthetic data, which is
Speaker 2 producing text with language models that can then be verified easily.
Speaker 2 So, like, you know, an extreme example of this is if you have a verification system that can detect if language is Shakespeare level, and then you have a bunch of monkeys typing in typewriters.
Speaker 2 Like, you can eventually get enough training data to train a Shakespeare-level language model.
Speaker 2 And I mean, this is the case, like very much the case for math, where verification is actually really, really easy for
Speaker 2 formal languages.
Speaker 2 And then what you can do is you can have an OK model, generate a ton of rollouts, and then choose the ones that you know have actually proved the ground truth theorems and then train that further.
Speaker 2 There's similar things you can do for code with lead code like problems or
Speaker 2 where if you have some set of tests that you know correspond to, if something passes these tests, it has actually solved a problem.
Speaker 2 You could do the same thing where we verify that it's passed the test and then train the model the outputs that have passed the tests.
Speaker 2 I think it's going to be a little tricky getting this to work in all domains or just in general.
Speaker 2 Like having the perfect verifier feels really, really hard to do with just like open-ended, miscellaneous tasks you give the model or more like long horizon tasks even in coding that's because you're not as optimistic as armen but yeah
Speaker 2 so yeah so that that that third category requires having a verifier yeah verification is it feels like it's best when you know for a fact that it's correct and like then like it wouldn't be like using a language model to verify it would be using tests or uh formal systems or running the thing too doing like the human form of verification where you just do manual quality control.
Speaker 2 Yeah, yeah, but like the language model version of that, where it's like running the thing and actually understands the output.
Speaker 2
Yeah, no, that's sort of somewhere between. Yeah, yeah.
I think that that's the category that is most likely to result in like massive gains.
Speaker 1 What about RL with feedback side, RLHF versus RLAIF?
Speaker 1 What's the role of that in
Speaker 1 getting better performance on the models?
Speaker 4 Yeah, so RLHF
Speaker 2 is when the reward model you use
Speaker 2 is trained from some labels you've collected from humans giving feedback.
Speaker 2 I think this works if you have the ability to get a ton of human feedback for this kind of task that you care about.
Speaker 2 RLAIF is interesting
Speaker 2 because you're kind of depending on,
Speaker 2 like this is actually kind of
Speaker 2 going to this it's depending on the constraint that verification is actually a decent bit easier than generation.
Speaker 2 Because it feels like, okay, like, what are you doing? Are you using this language model to look at the language model outputs and then prove the language model?
Speaker 2 But no, it actually may work if the language model has a much easier time verifying some solution than it does generating it. Then you actually could perhaps get this kind of recursive loop.
Speaker 2 I don't think it's going to look exactly like that.
Speaker 2 The other thing you could do is
Speaker 2 that we kind of do is like a little bit of a mix of RLAIF and RLHF, where usually the model is actually quite correct. And this is the case of CursorTap at picking
Speaker 2 between like two possible generations of
Speaker 2 what is the better one. And then it just needs like a hand, a little bit of human nudging with only like on the on the order of 50, 100 examples
Speaker 2 to like kind of align that prior the model has with exactly with what you want. It looks different than I think normal RLHF where you're usually training these reward models on tons of examples.
Speaker 1 What's your intuition when you compare generation and verification or generation and ranking?
Speaker 1 Is ranking way easier than generation?
Speaker 2 My intuition would just say, yeah, it should be. Like this is kind of
Speaker 2 going back to
Speaker 2 like if you if you believe p does not equal np, then there's this massive class of problems that are much, much easier to verify given a proof than actually proving it.
Speaker 1 i wonder if the same thing will prove p not equal to mp or p equal to mp
Speaker 1 that would be that would be really cool that'd be a whatever fields metal
Speaker 1 by ai who gets the credit another open philosophical question
Speaker 3 i'm i'm actually prompted it
Speaker 3 i'm i'm actually surprisingly curious what what what like a good bet for when uh when ai will get the fields metal will be i actually don't know specialty uh i i I don't know what a Mon Sped here is.
Speaker 1 Oh, sorry. Nobel Prize or Fields Metal first? Fields Metal.
Speaker 2 Fields Metal level.
Speaker 3 Fields Metal needs to solve, I think.
Speaker 1 Fields Metal comes first. Well, you would say that, of course.
Speaker 4
But it's also this isolated system in Verify. No, sure.
Yeah.
Speaker 3 Like, I don't even know if I don't need to do so.
Speaker 2
I feel like I have much more uncertainty there. I felt like the path to get to IMO was a little bit more clear because it already could get a few IMO problems.
And
Speaker 2
there was a bunch of low-hanging fruit, given the literature at the time, of like what tactics people could take. I think I'm one, much less first in the space of theorem proving now.
And two,
Speaker 2 yeah, less intuition about how close we are to solving these really, really hard open problems.
Speaker 1 So you think you'll be Fieldsman first? It won't be like in physics or in.
Speaker 3 Oh, 100%.
Speaker 2 I think that's probably more likely.
Speaker 3 Like, it's probably much more likely that it'll get then.
Speaker 2 Yeah, yeah, yeah, yeah.
Speaker 3 Well, I think it boosts that, I don't know, like BSD, which is a Bert Swinner and Direct conjecture, or like Riemann hypots, or or any one of these, like hard, hard math problems, which is actually really hard.
Speaker 3 It's sort of unclear what the path to get even a solution looks like. Like, we don't even know what a path looks like, let alone.
Speaker 4 And you know, by the idea that this is like an isolated system, and you can actually have a good reward system, and
Speaker 4 it feels like it's easier to train for that.
Speaker 2 I think we might get Fields Metal before AGI.
Speaker 2 I think I mean,
Speaker 3 I'd be very happy.
Speaker 2 I'd be very happy.
Speaker 3 But I don't know if I, I think 2028, 2030,
Speaker 2 it feels metal.
Speaker 3 Feels metal. All right.
Speaker 1 It feels like forever from now, given how fast things have been going.
Speaker 1 Speaking of how fast things have been going, let's talk about scaling laws. So for people who don't know,
Speaker 1 maybe it's good to talk about this whole
Speaker 1 idea of scaling laws. What are they? Where do things stand? And where do you think things are going?
Speaker 2 I think it was interesting. The original scaling laws paper by OpenAI was slightly wrong because I think of some issues they did with learning rate schedules.
Speaker 2 And then Chinchilla showed a more correct version.
Speaker 2 And then from then, people have again kind of deviated from doing the compute optimal thing because people start now optimizing more so for making the thing work really well
Speaker 2 given an inference budget. And I think there are a lot more dimensions to these curves than what we originally used of just compute, number
Speaker 2 of parameters, and data.
Speaker 2 Like inference compute is the obvious one. I think context length is another obvious one.
Speaker 2 So if you care, like let's say you care about the two things of inference compute and then context window, maybe the thing you want to train is some kind of SSM because they're much, much cheaper and faster at super, super long context.
Speaker 2 And even if maybe it has 10x worse scaling properties during training, meaning you have to spend 10x more compute to train the thing to get the same level of capabilities,
Speaker 2 it's worth it because you care most about that inference budget for really long context windows. So it'll be interesting to see how people kind of play with all these dimensions.
Speaker 1 So, yeah, I mean, you speak to the multiple dimensions.
Speaker 1 Obviously, the original conception was just looking at the variables of the size of the model as measured by parameters and the size of the data as measured by the number of tokens, and looking at the ratio of the two.
Speaker 2 Yeah.
Speaker 1 And it's kind of a compelling notion that there is a number
Speaker 1 or at least a minimum. And it seems like one was emerging.
Speaker 1 Do you still believe that there is a kind of
Speaker 1 bigger is better?
Speaker 2 I mean, I think bigger is certainly better for just raw performance and raw intelligence. And raw intelligence.
Speaker 2 I think that the path that people might take is I'm particularly bullish on distillation.
Speaker 2 And like, yeah, how many knobs can you turn to, if we spend like a ton, ton of money on training, like get the most capable, uh, cheap model? Right, like really, really caring as much as you can.
Speaker 2 Because like the naive version of caring as much as you can about inference time compute is what people have already done with like the Lama models or just over-training the shit out of 7B models on way, way, way more tokens than is essentially optimal, right?
Speaker 2 But if you really care about it, maybe the thing to do is what Gamma did, which is let's just not, let's not just train on tokens, let's literally train on
Speaker 2 minimizing the kl divergence with uh the distribution of gamma 27b right so knowledge distillation there um and you're spending the compute of literally training this 27 billion model uh billion parameter model on all these tokens just to get out this i don't know smaller model and the distillation gives you just a faster model smaller means faster yeah distillation in theory is um
Speaker 2 I think getting out more signal from the data that you're training on.
Speaker 2 And it's like another, it's perhaps another way of getting over, not like completely over, but like partially helping with the data wall where like you only have so much data to train on.
Speaker 2 Let's like train this really, really big model on all these tokens and we'll distill it into this smaller one. And maybe we can get more signal
Speaker 2 per token for this, for this much smaller model than we would have originally if we trained it.
Speaker 1 So if I gave you $10 trillion,
Speaker 1 how would you spend it?
Speaker 1 I mean, you can't buy an island or whatever. How would you allocate it in terms of improving the big model versus
Speaker 1 maybe paying for HF in the RLHF?
Speaker 2 Yeah.
Speaker 2 Yeah, I think there's a lot of these secrets and details about training these large models that I just don't know and are only privy to the large labs.
Speaker 2 And the issue is I would waste a lot of that money if I even attempted this because I wouldn't know those things.
Speaker 2 Suspending a lot of disbelief and assuming like you had the know-how
Speaker 2 and operate or if you're saying like you have to operate with like the limited information you have now no no no actually I would say
Speaker 1 you swoop in and you get all the information all the little heuristics all the little parameters all the
Speaker 1 all the parameters that define how the thing is trained
Speaker 3 if we look in how to invest money for the next five years in terms of maximizing what you called raw intelligence i mean isn't the answer like really simple you just you just try to get as much compute as possible like like at the end of the day all all you need to buy is the GPUs, and then
Speaker 3 the researchers can find all the like they can sort of you know, you can tune whether you want to pre-train a big model or a small model.
Speaker 2 Like, well, this gets into the question of like, are you really limited by compute and money, or are you limited by these other things?
Speaker 3 And
Speaker 3 I'm more privy to Arvid's belief that we're sort of ideal limited, but there's always like if you have a lot of compute, you can run a lot of experiments.
Speaker 1 So, you would run a lot of experiments versus like use that compute to train a gigantic model.
Speaker 4 I would, but I do believe that we are limited in terms of the ideas that we have.
Speaker 2 I think, yeah, because even with all this compute and like, you know, all the data you could collect in the world, I think you really are ultimately limited by not even ideas, but just like
Speaker 2 really good engineering.
Speaker 2 Like, even with all the capital in the world, would you really be able to assemble, like, there aren't that many people in the world who really can like make the difference here?
Speaker 2 And there's so much work that goes into research that is just like pure, really, really hard engineering work.
Speaker 2 As like a very kind of hand-wavy example, if you look at the original Transformer paper, you know, how much work was kind of joining together a lot of these really interesting concepts embedded in the literature versus then going in and writing all the code, like maybe the CUDA kernels, maybe whatever else.
Speaker 2 I don't know if it ran on GPUs or TPUs originally, such that it actually saturated the GPU performance, right? Getting GNOME Cazir to go in and do all of this code, right?
Speaker 2 And GNOME is like probably one of the best engineers in the world.
Speaker 2 Or maybe going a step further, like the next generation of models, having these things, like getting model parallelism to work and scaling it on like, you know, thousands of or maybe tens of thousands of like V100s, which I think GBDE3 may have been.
Speaker 2 There's just so much engineering effort that has to go into all of these things to make it work.
Speaker 2 If you really brought that cost down to
Speaker 2 like, you know, maybe not zero, but just made it 10x easier, made it super easy for someone with really fantastic ideas to immediately get to the version of like the new architecture they dreamed of that is like getting 50, 40%
Speaker 2 utilization on the GPUs, I think that would just speed up research by a ton.
Speaker 3 I mean, I think if you see a clear path to improvement, you should always sort of take the low-hanging fruit first, right?
Speaker 3 And I i think probably open ai and and all the other labs that did the right thing to pick off the low-hanging fruit where the low-hanging fruit is like sort of
Speaker 3 you you could scale up to a gpt4.25 scale um
Speaker 3 and you just keep scaling and and like things things keep getting better and as long as like you there's there's no point of experimenting with new ideas when like everything everything is working and you should sort of bang on it and try to try to get as much as much juice out as possible.
Speaker 3 And then, and then maybe, maybe when you really need new ideas,
Speaker 3 I think if you're spending $10 trillion, you probably want to spend some, you know, then actually re-evaluate your ideas, like probably your idea limited at that point.
Speaker 2 I think all of us believe new ideas are probably needed to get
Speaker 2 all the way there to AGI.
Speaker 2 And
Speaker 2 all of us also probably believe there exist ways of testing out those ideas at smaller scales
Speaker 2 and being fairly confident that they'll play out.
Speaker 2 It's just quite difficult for the labs in their current position to dedicate their very limited research and engineering talent to exploring all these other ideas when there's like this core thing that will
Speaker 2 probably
Speaker 2 improve performance for some like decent amount of time.
Speaker 1 Yeah, but also these big labs like winning.
Speaker 2 So they're
Speaker 1 just going wild.
Speaker 2 Okay.
Speaker 1 So how
Speaker 1 big question looking out into the future? You're now at the center of the programming world.
Speaker 1 How do you think programming, the nature of programming changes in the next few months, in the next year, in the next two years, in the next five years, 10 years?
Speaker 2 I think we're really excited about a future where the programmer is in the driver's seat for a long time.
Speaker 2 And you've heard us talk about this a little bit, but one that emphasizes speed and agency for the programmer and control, the ability to modify anything you want to modify, the ability to iterate really fast on what you're building.
Speaker 2 And
Speaker 2 this is a little different, I think, than where some people
Speaker 2 are jumping to in this space, where I think
Speaker 2 one idea that's captivated people is, can you talk to your
Speaker 2 computer? Can you have it build software for you? As if you're talking to like an engineering department or an engineer over Slack, and can it just be this sort of isolated text box?
Speaker 2 And
Speaker 2 part of the reason we're not excited about that is some of the stuff we've talked about with latency.
Speaker 2 But then a big piece, a reason we're not excited about that, is because that comes with giving up a lot of control. It's much harder to be really specific when you're talking in the text box.
Speaker 2 And if you're necessarily just going to communicate with a thing like you would be communicating with an engineering department, you're actually abdicating tons of tons of really important decisions to this bot.
Speaker 2 And this kind of gets at fundamentally what engineering is.
Speaker 2 I think that some people who are a little bit more remote from engineering might think of it as, you know, the spec is completely written out, and then the engineers just come and they just implement.
Speaker 2 And it's just about making the thing happen in code and making the thing exist.
Speaker 2 But I think a lot of the best engineering, the engineering we enjoy,
Speaker 2 involves tons of tiny micro decisions about what exactly you're building and about really hard trade-offs between you know speed and cost and just all the other things involved in a system and uh
Speaker 2 we want as long as humans are actually the ones making you know designing the software and the ones um specifying what they want to be built and it's not just like company run by all ais we think you'll really want to humor the human in a driver's seat um dictating these decisions.
Speaker 2 And so there's the jury's still out on kind of what that looks like.
Speaker 2 I think that one weird idea for what that could look like is it could look like you kind of can control the level of abstraction you view a code base at, and you can point at specific parts of a code base that
Speaker 2 may like maybe you digest a code base by looking at it in the form of pseudocode. And
Speaker 2 you can actually edit that pseudocode too, and then have changes get made down at the sort of formal programming level.
Speaker 2 And you keep the like, you know, you can gesture at any piece of logic in your software component of programming, you keep the inflow text editing component of programming.
Speaker 2 You keep the control of, you can even go down into the code, you can go at higher levels of abstraction, while also giving you these big productivity gains.
Speaker 1 It'd be nice if you can go up and down the abstraction stack. Yeah.
Speaker 2
And there are a lot of details to figure out there. That's sort of like a fuzzy idea.
Time will tell if it actually works.
Speaker 2 But these principles of control and speed in the human and the driver's seat, we think are really important.
Speaker 2 We think for some things, like Arvid mentioned before, for some styles of programming, you can kind of hand it off chatbot chatbot style, you know, if you have a bug that's really well specified.
Speaker 2 But that's not most of programming, and that's also not most of the programming we think a lot of people value.
Speaker 1 What about like the fundamental skill of programming? There's a lot of people, like
Speaker 1 young people right now, kind of
Speaker 1 scared,
Speaker 1 like thinking because they like love programming, but they're scared about like, will I be able to have a future if I pursue this career path?
Speaker 1 Do you think the very skill of programming will change fundamentally?
Speaker 2 I actually think this is a really, really exciting time to be building software.
Speaker 2 Like we remember what programming was like in, you know, 2013, 2012, whatever it was.
Speaker 2 And there was just so much more cruft and boilerplate and, you know,
Speaker 2 looking at something really gnarly.
Speaker 2
And yeah, that stuff still exists. It's definitely not at zero.
But programming today is way more fun than back then.
Speaker 2 It's like we're really getting down to the delight concentration.
Speaker 2 And all the things that really draw people to programming, like for instance, this element of being able to build things really fast and
Speaker 2 speed and also individual control, like all those are just being turned up a ton.
Speaker 2 And so I think it's just going to be, I think it's going to be a really, really fun time for people who build software.
Speaker 2 I think that the skills will probably change too.
Speaker 2 I think that people's taste and creative ideas will be magnified and it will be less about
Speaker 2 maybe less a little bit about boilerplate text editing, maybe even a little bit less about carefulness, which I think is really important today if you're a programmer. I think it'll be a lot more fun.
Speaker 2 What do you guys think?
Speaker 4 I agree.
Speaker 4 I'm very excited to be able to change. Like, just
Speaker 4 what one thing that happened recently was like we wanted to do a relatively big migration to our code base.
Speaker 4 We were using async local storage in Node.js, which is known to be not very performant, and we wanted to migrate to our context object. And this is a big migration and affects the entire code base.
Speaker 4 And Swall and I spent, I don't know, five days working through this, even with today's AI tools. And I am really excited for a future where I can just show a couple of examples.
Speaker 4
And then the AI applies that to all of the locations. And then it highlights, oh, this is a new example.
Like, what should I do? And then I show exactly what to do there.
Speaker 4 And then that can be done in like 10 minutes.
Speaker 4 And then you can iterate much, much faster. Then you can, then you don't have to think as much upfront and stand at the blackboard and like think exactly like, how are we going to do this?
Speaker 4
Because the cost is so high. But you can just try something first and you realize, oh, this is not actually exactly what I want.
And then you can change it instantly again after.
Speaker 4 And so, yeah, I think being a programmer in the future is going to be a lot of fun.
Speaker 2 Yeah. I really like that point about, it feels like a lot of the time with programming, there are two ways you can go about it.
Speaker 2 one is like you think really hard carefully up front about the best possible way to do it and then you spend your limited time of engineering to actually implement it uh but i much prefer just getting in the code and like you know taking a crack at it seeing how it how it kind of lays out and then iterating really quickly on that that feels more fun um
Speaker 1 yeah like just speaking to generating the boilerplate is great so you just focus on the difficult design nuanced difficult design decisions The migration, I feel like this is
Speaker 1 a cool one. Like it seems like large language models are able to basically translate from one program language to another or like translate, like migrate in the general sense of what migrate is.
Speaker 1 But that's in the current moment. So I mean, the fear has to do with like, okay, as these models get better and better, then you're doing less and less creative decisions.
Speaker 1 And is it going to kind of move to a place where it's
Speaker 1 you're operating in the design space of natural language, where natural language is the main programming language. And I guess I could ask that by way of advice.
Speaker 1 Like, if somebody's interested in programming now, what do you think they should learn?
Speaker 1 Like, did they, uh, you guys started in some Java
Speaker 1 and
Speaker 1 I forget the other, oh, some PHP?
Speaker 2 Objective-C.
Speaker 1 Objective-C. There you go.
Speaker 1 I mean, in the end, we all know JavaScript is going to win.
Speaker 1
And not TypeScript. It's going to be like vanilla JavaScript.
It's just going to eat the world and maybe a little bit of PHP. And I mean, it also brings up the question of like, I think Don Knuth has
Speaker 1
this idea that some percent of the population is geeks. And like there's a particular kind of psychology in mind required for programming.
And it feels like more and more that
Speaker 1 expands. The kind of person that should be able to can do great programming might expand.
Speaker 2 I think different people do programming for different reasons, but I think the true maybe like the best programmers
Speaker 2 are the ones that really love
Speaker 2 just like absolutely love programming for example there are folks in our team who
Speaker 2 literally when
Speaker 2 they're
Speaker 2 they get back from work they go and then they boot up cursor and then they start coding on their side projects for the entire night and they stay up till 3 a.m. doing that.
Speaker 2 And when they're sad, they said,
Speaker 2 I just really need to code.
Speaker 2 And I think like,
Speaker 2 you know, there's, there's that level of programmer where like this obsession and love of programming,
Speaker 2 I think makes really the best programmers. And I think these types of people will
Speaker 2 really get into the details of how things work.
Speaker 1 I guess the question I'm asking, that exact programmer, let's think about that person.
Speaker 1 When the super tab, the super awesome praise be the tab is succeeds, you keep pressing tab.
Speaker 3 That person in the team loves Curse the Tab more than anybody else.
Speaker 4 Yeah. And it's also not just like
Speaker 4 pressing tab is like the, just pressing tab. That's like the easy way to say it and the, the catch, catchphrase, you know?
Speaker 4 But what you're actually doing when you're pressing tab is that you're, you're injecting intent all the time while you're doing it. You're, you're, uh, sometimes you're rejecting it.
Speaker 4 Sometimes you're typing a few more characters.
Speaker 4 And that's the way that
Speaker 4 you're sort of shaping the things that's being created. And I think programming will change a lot to just what is it that you want to make.
Speaker 3 It's sort of higher bandwidth. The communication to the computer just becomes higher and higher bandwidth as opposed to like
Speaker 3 just typing is much lower bandwidth than communicating intent.
Speaker 1
I mean, this goes to your manifesto titled Engineering Genius. We are an applied research lab building extraordinary productive human AI systems.
So speaking to this hybrid element,
Speaker 1 to start, we're building the engineer of the future, a human AI programmer that's an order of magnitude more effective than any one engineer.
Speaker 1 This hybrid engineer will have effortless control over their code base and no low entropy keystrokes. They will iterate at the speed of their judgment, even in the most complex systems.
Speaker 1 Using a combination of AI and human ingenuity, they will out-smart and out-engineer the best pure AI systems. We are a group of researchers and engineers.
Speaker 1 We build software and models to invent at the edge of what's useful and what's possible. Our work has already improved the lives of hundreds of thousands of programmers.
Speaker 1 And on the way to that, we'll at least make programming more fun. So, thank you for talking today.
Speaker 4 Thank you. Thanks for having us.
Speaker 2 Thank you. Thank you.
Speaker 1 Thanks for listening to this conversation with Michael, Swale, Arvid, and Amon. To support this podcast, please check out our sponsors in the description.
Speaker 1 And now, let me leave you with a random, funny, and perhaps profound programming code I saw on Reddit.
Speaker 1 Nothing is as permanent as a temporary solution that works.
Speaker 1 Thank you for listening, and hope to see you next time.