Recursive Model Improvement — Lee Robinson, Cursor, SpaceXAI

summarized

TLDR

Cursor trains AI models for code generation using a recursive self-improvement loop. The outer loop gathers user feedback and online metrics to create better evals and training tasks, while the inner loop uses reinforcement learning and techniques like textual feedback to rapidly improve model checkpoints. Scaling compute via partnerships with SpaceX and automating research workflows with agent systems are key to accelerating this process.

Key points

  • Cursor's model training involves an outer loop of user feedback and online metrics feeding into better evals and training tasks, and an inner loop of rapid RL-based improvement on those tasks.
  • The team has scaled training for Composer 2.5 by generating more RL environments, trying new learning methods, and creating more ambitious problems for models to solve.
  • Models can hack public evals by using Git history or searching the web, so Cursor built a private eval set called Cursor Bench based on real-world engineering tasks.
  • Textual feedback is used to nudge the model during RL by providing hints on specific parts of a rollout and adjusting probabilities to encourage desired behaviors.
  • Cursor partners with SpaceX for access to large-scale compute (Colossus supercomputer, Terafab chips) to train very large models from scratch.
  • The team automates research workflows by giving ML researchers a fleet of agents that can launch experiments, create evals, and page humans if infrastructure issues arise.
  • Improving the smartest model in the system raises the intelligence floor for derivative models used in judging, reward modeling, and other parts of the training loop, enabling recursive self-improvement.

Tools mentioned

  • Cursor
  • Composer
  • Cursor Bench
  • SpaceX Colossus
  • SpaceX Terafab
  • MCP

Techniques

  • reinforcement learning
  • textual feedback
  • reward shaping
  • recursive model improvement
  • eval hacking prevention
  • agent-based automation

Takeaways

  • Cursor uses a two-loop training process: outer loop for feedback and evals, inner loop for rapid RL-based model improvement.
  • Textual feedback allows precise credit assignment in long RL rollouts by hinting at specific improvements.
  • Scaling compute and automating research workflows with agents are key to accelerating model improvement.
  • Improving the smartest model in the system recursively improves all derivative models and training components.
Transcript (captions)
[music] >> Please welcome to the stage the machine learning engineer model behavior at cursor Lee Robinson. >> All right. Hey everyone. Uh, I'm excited to be here. Excited to be back at AI engineer and talk a little bit about how we're training models at cursor. So, how we train the models and also how the model learns to train itself or recursive model improvement. So, our goal at cursor is to build the best possible AI models, which might make sense. You might have heard of this equation of if we just give the models more compute, we can get a better model out. And I think this is a helpful simplification of the problem, but I want to actually click in a few layers deeper in the talk today and talk about all the different pieces that go into training these models. So, we can think about this loop. We put a model out into the world and then we get feedback from you all when you use the model, what goes well or places we can improve. We use that to scale and improve the data that we do for the next round of training. We also then increase the amount of compute and scale up training overall to make a new model. And this is a loop that can just go over and over again. However, if you see my helpful snail or turtle to bunny meter down in the bottom right, it's pretty slow. This is going to be a serial process and you can only do in this instance one big run at a time. So, we want to make this a little bit faster, but I'll actually go another layer deeper and add some more color here. There's actually two loops, the outer loop and the inner loop. On the outer loop, we have the feedback coming in, but we also have data like online metrics. So, running AB tests and seeing what users prefer a different checkpoint of a model. That's going to then flow into hopefully making better high-quality evals that help ensure we're getting the right behaviors we want out of the model, and also being able to create much more difficult problems for the models to try to solve where we then can kind of shape the rewards that we want to get during training. So, we want to climb that inner loop as well. We have been training models for about a year at the large scale at Cursor, and I want to talk about some of our progress so far. So, we put out Composer 2.5 in May, and it's now the most popular model in Cursor, which is exciting. And we scaled up training here quite a bit by generating more RL environments, trying out some new methods for learning, and also just making more ambitious problems for the models to solve. And the results have been pretty promising so far. Like I mentioned, this is still a new effort for us. ML has really been in the blood of Cursor since the start, where we were training more specialized models for things like tab or code auto complete, but really in the past year we've staffed up and built a team with ambitions to train, you know, state-of-the-art models, and we've made some pretty good progress just in the last 12 months. People like Composer right now, I think because it is both fast and pretty smart, and also cost-effective. And as we've heard from other speakers today, I think there is a space in the market right now for that type of model, in addition to also having the most intelligent models in the world, and we think it's important to have a good selection of both of these type of things. So, Composer we think is serving a good niche here. And when we released it, we were honestly pretty impressed with some of the public evals. Did a little better than we expected on artificial analysis. It was a a pretty modest jump. However, there were a lot of behaviors that we found that we really wanted to improve for the next version of the model. Notably, we wanted to have a much bigger and smarter model. We wanted to control every aspect of training, so ideally doing a full pre-train from scratch versus the previous open-source base of Kimmy that we were using. We wanted to infuse new data so that we can make the model great outside of more things than just coding, but more of a general model. And then also just scale up every part of the training process. More data, more compute, and really pushing RL as far as we can. So, first I want to talk about improving the outer loop, and then we'll drill drill into the inner loop. If you haven't used Cursor in a while, you might think about it as this IDE or tab autocomplete thing. And in reality, uh the vast vast majority of our revenue today comes from agent usage. And that means that all of the data inside of Cursor is also coming from agent usage, and we can use that to train better models. So, for example, we kind of have two different buckets of feedback. On the external side, when you're using the product, you can thumbs up or thumbs down different responses and give feedback. And we use that to then classify places where, for example, Composer maybe doesn't do as good of a job, and we want to improve that for future versions. And then also on the internal side, we're heavy dog fooders of our models and our products. We're very critical and want to make sure we're using good models, and we of course use them all day. So, we have a good mix of manual reports, automated reports internally, and just lots of ways we're trying to get the best behaviors out of the model. And if we do that over and over and over again, we can get better models out into the world. But really the place where we can make massive speed ups is improving that inner loop. So, just to zoom back in on that again, we have these high-quality evals, we have these very difficult training tasks, and we want to climb these evals as quickly as possible so that we know if we make a new checkpoint of the model, we're actually making progress on the things that we want to measure. So, for example, some of the evals that we have introduced or have already had are things like understanding what you really meant when you have included maybe 50 skill files. It gets kind of hard for the models to figure out your actual intent. Or trying to figure out the line between when you push back and ask the user to clarify a question versus when you trust their judgment and they said, "No, I really wanted to do this." There's just kind of a fine line, and people have different preferences. So, a lot of these evals are trying to shape a lot of those different behaviors, and also model what it feels like to be a software engineer. We ask the models to do really ambitious things like, "Hey, we just had this sev. Could you have actually went and read through all the data dog logs, read through Slack, read through Notion, and came to the same conclusion or the same fix that we did?" Uh and a lot of models are just not very good at this today. And that uh backs a lot of the evals that we create based off these software engineering tasks. Now, as the models get smarter, they also find very creative ways to hack the evals. So, as we've been training for a new version of our model, we also noticed there was some interesting reward hacking going on. Um the models learned how to really just go back in the Git history and figure out if there was a solution or a part of a solution. Uh they figured out good ways to go online, and if it was a public eval, just see if there was a fork of the eval anywhere they could look up the results from. And this affected our own models as well as other models. So, we did a little research here and found that if we did just a couple small changes on measuring public uh evals, we could have a pretty noticeable uh change in the scores that were reported. So, first off, we would delete the Git history at the start, and we could restore it at the end, so that wouldn't affect the run. And then also, we can have a network allow list or just some basic controls on the sites that the uh the agent can go and talk to. And I think this is helpful for public evals which often are the things that people are using to calibrate whether a model is good when it gets released. You know, you see that big chart of all the benchmark numbers. But this isn't really a true test of what it feels like to use these models. Like in reality you have access to the internet. You can do whatever you want on the internet with these models and you're definitely using Git. So you want to be able to test the true capabilities of the models. And that's why we have Cursor Bench. We have this private eval set that is mostly made up of things that happen in our code base which is held out from the evals so we ensure that the models aren't trained on it and it's based on those real-world engineering tasks. Now another part of climbing that inner loop is trying to make very very difficult problems for the models to solve. As the models get better, you might have noticed if you're looking at an eval and all the models are scoring like 90% probably time to retire that eval and try to get something more difficult and that the half-life of those evals will go down as the models get smarter. And to do this it requires a lot of things. It requires some amount of research or taste in what these problems should be. It requires a lot of compute so you can try a lot of different ideas. Some of them are going to are going to work, some of them are not going to work and there's a race against the clock here so you want to try as many in parallel as you can. Just to put a example to this of one of those type of problems, let's say that on the left for example you have each one of those squares is representing files in a code base and then on the bottom you have the tests. One thing you can do is generate a very complex application or environment for a very ambitious application or task and then you can delete part of it. You can delete a feature, you can delete files and the test will then fail. And then you can ask these models to go and basically figure out however it wants to re-implement that feature and it has a very verifiable goal of all the test passing to be able to get some reward back at the end. And this actually works out pretty well and has allowed us to scale making these interesting problems for the you know, the frontier models to solve. Additionally, we have found some new learning methods which I personally think are really interesting. The first one is you can teach the model to kind of coach itself. So, for example, if you think about an RL rollout or a conversation with an agent, this can be hundreds of thousands of tokens. And if you think about trying to grade at the end of this where the model made a right decision or a wrong decision, that's kind of hard, right? You have all these tool calls, you have thinking blocks. It's pretty hard to figure out where to assign that credit to the root issue. So, the more precise we can be the better. You know, was it one of the tool calls, was it a thinking block? It's pretty hard. And one thing that we've done to improve this process is something called textual feedback. So, we want to zoom in on one specific part of that rollout, and ideally we can hint or kind of nudge to the model, "Hey, by the way, here's a way you could improve." And then look at the probabilities again and nudge up the ones we want or you know, down weight the ones we don't want. Uh for example, on the left you have this student case where you have a rollout and it tries to call a tool, and the tool call fails. It should have known that this tool was there, but it just decided not to work for this time. We can then use a teacher, we can use the same model, but we include this hint. And we say, "Hey, as a reminder, you have all of these tools available." And then we like I mentioned, we can just upvote or up weight the probability is such that we can get the behaviors that we want. And this example is with, you know, adherence to tool calling, but we can really use this for anything. We can use this for making style changes. We can use this to get any behavior we want to influence the models during RL, and this has proven to be uh very valuable for us. Now, how we scale these loops, both the inner and outer loops, also comes down to scaling the amount of compute we have. Um we announced back in March that we are partnering with SpaceX to get access to a lot more compute, and this allows us to train very large models from scratch, not only the product, but also the models down to the supercomputers or the data centers where we're training these models with Colossus, and then increasingly to the chips as well with Terafab. And that just allows you to do some pretty interesting things in taking advantage of that full stack. If you haven't seen Colossus, I think it's really interesting personally. They were able to train uh they were able to build out this supercomputer in 122 days for 100,000 GPUs, and then added another 100,000 GPUs in 92 days. So, very impressive. They had to do some pretty creative things to get this done and kind of take over this old factory in Memphis, and it's kind of shown they can stand up these data centers really quick, which is of course very helpful for our model training efforts. And for Terafab, I think it's also very interesting that they're building their own chips. I mean, to put the size of this into perspective, if you just think about how large this physical structure is, I know you're all thinking it, it's like the size of 100 Buckee's, which for my for my folks from the south, you know, we love Buckee's. I'm not even from the south and I love Buckee's. This is like the crown jewel of the south, the premium gas station experience. It's It's a lot of stuff, but that just puts it into perspective the size. So, going back to this equation at the start, more compute in, you get a better model out. I think it's sometimes hard to understand what does that compute even do? Where Where do you actually put that compute? Let's say you have access to a bunch of GPUs, like what do I do with it? And I think it's helpful just to step through a few of the things. Of course, first you have actually serving the model to end users, but also you're serving up different checkpoints internally, you're running different AB tests, you're trying different variations of the model. You have the actual training process itself, but also the sub-pieces from pre-training to mid-training to RL. And then also you're then training these derivative models to do other parts of the process like climbing the inner loop, which we'll talk about here in a second. You have the data generation and the reward generation, so creating those really ambitious problems that I talked about or when you're doing evals trying to create these rubrics for whether it was successful or not and give it some grade and then actually judging those scores. Um you also have the evals themselves. Ideally on every new checkpoint of the model you want to be continuously running evals to see if you're improving in the places that you're measuring as as well as just developing new evals all the time. Like I mentioned the the half-life of these evals as models get smarter, you need to be really continuously investing in making these better. Um and there's just the research itself. Ideally you want to free up your team of researchers to be able to tweak the knobs, to try ambitious ideas, experiment with new things, as well as do side runs. And this all is compute that needs to be, you know, allocated for somewhere. But what that ultimately turns into is ideally you can get in a state where you have multiple large training runs happening at the same time, where the researchers are unblocked and they can go try their research and you're still kind of contributing back to this core flywheel. And if you do that and we revisit our speed meter in the bottom right, you're starting to get to a point where you're getting something that's like RSI or recursive model uh and and improvement here where the models are improving much much faster. Then the bottleneck becomes how do you scale the folks actually training the models? How can you automate the more monotonous parts of machine learning or research so that you can get these useful models out into the world. And this is where I think it starts to get really interesting. If you think about the model as Mario, if you give it some tools, all of a sudden you're more like a Super Mario. And if you give it great context, everything about your organization, all the places that you work, you connect it to all your different tools, that context kind of turns it into the fire Mario or the super fire Mario. And just to kind of further prove this point and add a few examples here, I think for tools, a lot of these are pretty obvious. The models can write code with a with a harness. They can you run shell commands. They can look things up on the web. But I think increasingly, even with these primitive versions of memory like writing files, these last three I think are just starting to become really popular and more useful, which is the models in the harnesses should be able to use a computer exactly like you would. It doesn't need to be just inside of your GUI or your CLI. It should be able to control every part of your computer. You as a human on Slack or on your tool is basically subscribing to Slack threads in your head so that you can follow them for updates. Ideally, you kind of want the models to just follow a thread and then ping you if it needs something. And just like we have code bases that store the code, increasingly as these models do more work for us, they kind of need like a Dropbox for themselves. Like where do you store the slide decks, right? You could put that in code, I guess, but I think there's an increasingly a new opportunity here. And then for context, of course, you have all the different places you can hook up with MCPs, Slack and Notion, Linear, Data Dog, etc. and the code base itself. But I think these last two are really interesting, which is increasingly we find that you have a human working with a team of agents, and then the agents can start working with the other agents. It's a little meta, but I think this will be a big trend in the next 6 months. Just to kind of to example to this. We've created these tools and these systems where researchers can run experiments directly from Slack. We want to avoid this state of being bottlenecked on humans launching and reviewing and babysitting runs. And we actually have an entire team just working on automating every part of the research work that isn't uh you know, isn't freeing up the researchers' time to work on their most ambitious ideas. So, every person on the ML team gets access to this fleet of agents they can basically train models directly from Slack. And what a few people on the team have taken this very far where they have these agent systems that can go and do a lot of work for them. Maybe they want to go create a bunch of very difficult problems for the models to uh try and solve or they want to create a whole bunch of new evals based on some good ideas that they have. And they just want to let the models cook and go work for a while. But, if something gets wrong, if the infrastructure goes down, there's some blip somewhere, the model can message them on Slack or just page them directly and say, "Hey, this is really important. You don't want to lose 6 hours because your infra was down. Like, you should go check this out right now." And this like human-to-agent coordination, I think is just starting to be figured out and it will be an increasing trend. The last bit here is that the model is learning to train the next model. And it it it's a little hard to wrap your brain around. The way I like to think about it is every time you release a new version of this intelligence, then you can create or distill these derivative versions that you use to speed up other parts of the training process, both the inner loop and the outer loop. So, when you're trying to do your evals, for example, you have different models for doing the judging and you have uh your reward models as well. So, when you make the top-level model model smarter, it actually improves the whole system. If you think about the multiple training runs diagram I showed, I'm going to throw on a uh a new meter here, which is the brain to galaxy brain meter or the intelligence meter, you are a bottlenecked here on the smartest model in your system. And if the smartest model then creates those derivative models, when you can improve that, you can actually make every single one of these loops much, much better because you've raised the kind of floor of the intelligence. And this is how you start to get to something that feels like this recursive self-improvement, this model that is just improving all the time on your behalf. And especially as we bring more and more compute online, I think this is really going to help us scale our model efforts and hopefully make even more useful models for you all to use. Uh to conclude, I just like to thank everyone on the Cursor engineering and ML and research teams who have been uh working hard to get a new model out to you all here very soon, hopefully very, very soon, uh that we think will be a pretty notable improvement over our last model. And we're excited for you to try it. Thank you so much. >> [applause] [music] >> Yeah.

Jobs for this video

Jobs for this video
Stage Status Attempts Last error Updated
summarize done 0 2026-07-15 22:05:48.862044+00:00
transcript done 0 2026-07-15 22:05:29.700751+00:00
metadata done 0 2026-07-15 22:04:41.945008+00:00

Frontier Notes · by Hyperjump Technology