1. Home
  2. Explore
  3. Computer Science
  4. Reinforcement Learning in LLMs

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Reinforcement Learning in LLMs

Transcript

Can you guys hear us? Okay, thank you.  Thanks for joining us. So, first of all,   some correction. I'm not lead for  any AI strategy. Sorry about that.   It was on LinkedIn. I put it five years  ago and it just stayed. I should change it.   I'm, I lead a small co-design partnerships team at  NVIDIA. So, we work with some of our partners who   are on the frontier to help influence the design  decisions for hardware and software roadmap. So, having said that, we have four awesome  panelists on the interesting, very interesting and   continuously evolving topic of reinforcement  learning. So I would like for you to introduce   yourself, your journey with reinforcement  learning, and the framing for this context is   it's changing day by day, especially in LLM space,  and we are trying to monitor how things progress.

There won't be any Q&A at the end, I'm  sorry, but I think it'll be interesting.  So, Linden, you want to start?  Like what was your journey with   reinforcement learning and how you landed where  you are and what you're doing with it right now?  Cool. Thanks for, yeah, thanks. I can get us  started. So my name is Linden. I'm one of the   co-founders of Applied Compute. A lot of what we  do is we help enterprises build agent workforces, and a kind of uncompromising belief that  we have is that the vector for all kind   of economic development via AI will happen within  businesses. And so we embed with them very closely   and we help kind of understand their problems  to work towards automation in that regard.  A big component of that is having access to  specialized intelligence. And so as a result,   a really important part of that is RL,  where we take companies' proprietary data,

transform it into environments and data points  that we can train on, and eventually use that   as the starting point from which we can create  sovereign-owned models that are state-of-the-art   at the tasks that our customers care about. Prior to this, I think a lot of the conviction   for this came from what we were doing at OpenAI.  So my co-founders, Rhythm, Yash, and I were   all working with, I guess, JT, Liam, and  Yuchen here on similar problems back then, where a lot of the conviction came from this  paradigm of having existing models with a lot   of really great capabilities that were learned  during pre-training that we could draw out and   create state-of-the-art agents trained end to  end from. So, yeah, that's how I got started.  Yeah, and I should have mentioned,  you will hear a lot of references   to each other because they all have been at  OpenAI at some point of time. So Yuchen, hi.

Hi, I'm one of the co-founders in  Humans&, and what we're doing is basically   trying to come up with the next RL paradigms that  will make models learn and interact with humans   and with a lot of humans. So what we think is a  lot of training paradigms are focused on trying   to make the model smarter and help people do a  lot of things, but at the same time people are not having the models that are constantly  learning with humans and interacting with humans   along really, really long periods of time and  with a lot of people inside of a community.  So that's why we come across these journeys of  we want to build models that truly understand   and interact with people. And, again, kind  of like I also came from my background, I   started from robotics and then I worked on  recommendation using RL for engaging users, and

also in OpenAI I worked on basically post-training  model behavior. And then I moved to xAI working on   user preference and agentic models. So we think  the next journey of RL will be helping people   understand each other and working with people. Awesome. Thank you. Jerry.  Hello. My name is Jerry. I've worked until very  recently for the last seven years at OpenAI.   I joined this company because I got really smitten  by the results from DeepMind researchers combining deep neural networks and reinforcement  learning together. I saw those agents   trained on Atari and I wanted to find  a team of people I can do this together   with. I can research this RL thing together. I feel like I lived and I worked for the first   wave of RL. When you train on games, I trained  on robots. We trained things like StarCraft and   Go at that time. And RL was pretty exciting  for a while, and me together with a lot of

other researchers, we got a little bit sad  when RL kind of took a little bit of a back,   a big back burner in the world of AI research  where transformers and large language models   started to work. And I always believed on  a really deep level as a researcher that   learning from experience and learning by trial and  error is a necessary element on the path to AGI.  I always was there thinking how do we do that,  and I was lucky enough and persistent enough to be at the right time and place in history  to lead the team that put RL back on the map,   specifically scaling up the large-scale  reinforcement learning that we are doing.   I led the work on the reasoning models at OpenAI,  on the o1 model, o3, and a lot of the work that

is fueling all the models that we use and love. And I think it has been an inflection point in how   we train models, how we do large-scale modeling in  some way, because it's a very different algorithm,   how we are training models today than  two years ago. And in some way those are   different workloads with different objectives,  with different data sets, and we are in a very,   very different world than we have been. I don't  think the innovation has finished, but everyone is thinking and everyone is doing RL these days. Yeah, thanks for the whole end to end.

Hi, and my name is Liam Fedus. I'm one  of the co-founders of Periodic Labs.   Our goal is to create an AI scientist. The way  we think we get there is you have to do science.   We don't think that comes from just reading  papers, from reading textbooks. We think   it's very necessary to do reinforcement  learning against physical environments.  So what we're building is systems that are  carrying out semi-autonomous experiments and learning from the environment. I had the joy to  work with everyone up here, and over the course   of my time at OpenAI, we just saw reinforcement  learning so successfully deployed to all of   these different products and had a very similar  experience to Jerry, where my first experience   with RL was in Atari. DeepMind was pushing  these frontiers forward, and the models at   the time were just these little three-layer  ConvNets and seeing really nice behavior.

But then putting this on top of really strong  pre-trained models unlocked things like ChatGPT. And I think we saw over time that if you have good  reward signals, if you have something verifiable,   you can basically always make the number go up,  you can always scale. And that's what gave us the hope to go out and actually show that we  can do reinforcement learning against the   physical environment. We think ultimately that  that's the environment to optimize against.  Awesome. Thank you. So since all of you mentioned  scale to some degree, what does scaling in RL   mean? So with pre-training we understand  this: we have laws and we have rules and   everything. And then till a year back there was  this thing going on, scaling has hit its limits,

and then people are talking like scaling  is limitless. So if you want to start,   Liam, what does it mean for you, scaling? So, I mean, quite simply you're just   throwing more compute against these different  environments. So you can scale the number of   environments, you can scale the number  of attempts against these environments,   you can scale how much thinking, what kind of  tools you're applying for each of the tasks, and also just the models have become  larger. And pre-training has been   guided by very nice scaling properties. I think it's been augmented and guided by   very high signal-to-noise evals. I think RL  post-training can be a little bit noisier,   and it can sometimes be a little bit  more difficult to create as smooth scaling properties. So in the early days  there was definitely a lot of vibe-based RL.

But, yeah, I think it's just putting huge  amounts of compute along these different axes.  Okay. And would that be because you're handling  all these different verticals in terms of physical   sciences, or would the definition of scaling for  RL change for someone else? Is it just compute?  Well, the number of environments is a key part.  And so for us, what we're building up are data and   we have access to labs to give access to new types  of environments that simply don't exist anywhere else. So in addition to us thinking about scaling  up the traditional compute infrastructure to do   pre-training, to do reinforcement learning, we're  also thinking about the physical infrastructure   of labs, and we think that this is going to  be the key to unlock scientific discoveries.  Okay. Thank you. So, Linden, you work with a  lot of partners, your own partners, and you are   scaling things in your own capacity for a bunch  of different of them. How do you think about it?

Yeah, I think to kind of continue off of what  Liam was saying, when we look at the previous   generation of pre-training scaling, it was  just kind of like there's this blob of compute,   we measure it in some unit of FLOPs, and then  we figure out how to actually allocate it at   training time. And I think the nice  property of pre-training is that the   optimal data mixture and also number of  parameters kind of smoothly falls out of that. I think we aren't quite in the place of RL that's  as well understood, and so we're still kind of   figuring out the right scaling recipes to do  this. And I think for us, when we scale for our   enterprise customers, a lot of it is just figuring  out the right amount of compute that you can   actually spend on the problem. And for us, it's  less so scaling the amount of training compute,   and, as Jensen said this morning, the new workload  that we're spending a lot of time focusing on

is spending time optimizing language model  inference, where in a lot of our cases the   problems that our customers care about  aren't necessarily in the distribution   of what the large labs are training on. And so it requires a lot more attempts to actually   solve the problem and a lot more thought process  when you're actually going about solving it too.   And so for us, a lot of it is just scaling not  necessarily the number of environments that we train on because, within enterprises, finding a  structured environment is actually quite tricky,   but it's in a limited data regime. How do you  actually get enough learning signal out of the   data points that you have in order to learn  properly on the task? And so we think of that   primarily in terms of how much compute we're  allocating towards language model inference.  Awesome. Thanks. So Yuchen and Jerry,  do you have any comments on top of that?

Yeah, I think on top of all the environment,  agent, and data scaling, I think what we find most   useful is people are constantly interacting with  other people, and people are extremely good at   navigating ambiguities and a lot of uncertainty in  the environment. So for us it's more about scaling   over long horizon. How do you get more delayed  reward, learn from all these delayed rewards?   How do you actually build up systems that are  learning from a lot of interactions with a lot of people and agents in the environment? And as well as the scaling comes from also being   able to make the model truly learn from all these  unseen and uncertain setups instead of, yeah,   there might be a lot of verifiable reward we can  learn from, but for us it's a lot of unknowns on   the metric and unverifiable reward over the time. Yeah. Awesome.

So Jerry, if I were to, I mean, you should answer  the same question, but I was also wondering,   since you mentioned that at OpenAI you saw  the whole gamut of it, like robotics and   for it to take a backseat, then come back  again, and you tried a bunch of different   verticals which are spinning off these companies  now. So where would you see things break, like   the evals, or how do you even measure  if scaling is breaking or blocked? Usually when people are training a model,  breaking scaling means the things don't improve   during your training run, and it probably happened  to everyone who ever trained a model. You train a   model and it has some curve and suddenly it stops.  There are sometimes completely failed training   runs where things go down and just plummet. And  there are the ones where things stay or at least   improve more slowly than you would expect. We, as deep learning practitioners,

we do expect some things to extrapolate, and  we usually have some expectations of how good   a training run will be if we finish. And I don't  think, like probably a few times doing completely   new experimental stuff, it has happened that  things turned out better than people expected,   but most of the time either they end up where  you expect or slightly worse. And the question   is how much worse based on that. So usually scalability is how well you can hit your goals, your targets that  you set when you start this journey of scaling.  Okay. And maybe with you I will try to  get into a little bit of research-y side   of things as well, if that's okay. So now folks  are talking about limitless scaling, and is that   infinite amount of compute, which is amazing  for NVIDIA, or is it something different?  I very much believe that learning shouldn't  end, and we think how humans learn or how human

civilization learns, there's always something  more to figure out, there's always something   more to find, and there's definitely tons of  learning signal in the world and, in the limit,   on places like what Liam does, figuring out  new science, figuring out new materials.   There are so many things to learn and to  figure out that there isn't any limit.  There's a question: is our recipe today good  enough to be able to scale it infinitely? And there are clearly still some bottlenecks.  Things are at least shaky. Training models is   a little bit of work where you have to put a lot  of elbow grease and then tweak things around and   try to set them just right so that they train. But  we've been even thinking about how the current run   of scaling up reinforcement learning is not very  old. How many great models have been trained very   successfully, and the agents that we have, how  many things they can do for us very reliably.

It's pretty amazing where we got on it so far. Yeah. So if you were to bring that back to you,   like AI for science, do you  experience things change   if you're doing, say, material science or you're  doing cooling or you're doing genome sequencing? Well, maybe one interesting thing is what  is the RL environment. So you could have   a very simple environment like what is two  plus two. You know the ground truth is four,   so you can do a lot of optimization against  that. In that case you probably don't need a   lot of chain of thought, a lot of tool use, but  you can construct harder verifiable problems.

When we carry out an experiment, it's not that we  get one bit of information from that experiment.   It's not like success or it didn't work, or  it's not even a continuous reward problem.   There's a huge amount of data associated  with each of these experiments. I mean,   to Jerry's point about there's always more to  learn. And so if you have a system at the frontier   of its knowledge, you're directing experiments  where there's just very limited scientific data. You're trying to discover new things. You can also begin to construct environments that   are trying to predict various properties of this.  So in our case, we're doing physics experiments,   materials discovery, and we can try to  predict various aspects of the experiment.   So that's one way we're thinking about it. Awesome.  So, and then maybe another interesting  aspect too is simply just the latency

of the reward functions. In the early days when we  were building ChatGPT, the reward function is just   classic RLHF and the reward function was  basically a forward pass through a neural net,   and it's just hundreds of milliseconds. It's  a fairly quick thing to do a pass, which is,   you know, has this completion. And if you look  at some of the state-of-the-art models, now   you see reasoning traces combined with grading,  getting closer towards an hour, and hour plus.

And at Periodic we're thinking about the next  order of magnitude, and it seems daunting, but   I think just seeing this kind of trajectory over  the last few years, I think this is definitely   going to be in scope. But then it kind of gets  into learning more sample-efficiently, being   very sample-efficient in that, dealing with credit  assignment, dealing with just very sparse rewards.  Yeah. But making progress. Interesting. Okay. So this is something that  you still control. It's still within your   Periodic's regime that you decided to train  this, you train this. For someone like you,   Linden, I saw your latest one, DoorDash, for  example. How do you tackle that problem end   to end for different customers and different  verticals? What are the problems you run into?  Yeah, for sure. So on the topic of, I think  there's the aspect of how do you actually

figure out what the reward signal is, and then the  issues kind of downstream of that, which is once   you have a verifiable signal, there's all sorts of  different failure domains that happen after that.   So the way that we typically run engagements is,  I think to Liam's point earlier, there's a lot   of really nice verifiable properties of math and  programming. And when you get in the real world with enterprises, a lot of those assumptions kind  of go away because oftentimes, in domain experts'   heads, they have some idea about how they complete  a problem. There are other experts which might not   agree with that, and so figuring out what the  metric to optimize is is really challenging.  The nice property of RL is once  you figure out which hill to climb,   you can throw arbitrary amounts of compute  at it, which I guess is great for NVIDIA.

But prior to that it's really challenging to do  that. And so what we do typically on the ground is   we'll work directly with subject matter experts or  technical teams to figure out what it is they care   about. It's maybe some downstream metric with  a lot of business impact, or it's potentially   something else like, for example, the cost  of running a frontier model is far too high.   And so what they want to do is they want to have  a specific completion within a latency budget. And we can just arbitrarily pack those additional  terms onto the reward to make sure that models,   for example, think faster or emit responses a lot  faster than usual. And so that's typically how we   run it originally, and it's a lot of iteration.  So you'll scale the first iteration of compute,   you'll realize that there's all these different  failure domains. There are maybe cases of reward hacking where, for example, there are particular  cases that you had a blind side to that weren't in

the original training data. There are cases maybe  where you didn't mock the environment properly.  For example, DoorDash has a very specific way of  doing things, and if we deviate away from that,   it results in degradation of the model  relative to what they care about. And so,   yeah, I think a lot of that is just really  rigorous engineering to make sure that   what hill we're climbing is fully aligned with  the downstream business impact they care about. Yeah, makes sense. You're still very much  in, I didn't mean to say that everything   is in your control. I was thinking  about it when I asked the question,   but still it's a little bit of variability when  you're dealing with outside forces and partners.  So coming back to you, Yuchen, you're  also building the product right now.  Yeah, we're building product for both consumer  and business, and I think the core for basically,

we cannot scale infinitely, is that verifiable  environment is challenging itself. But on the   other side there's also a lot of these  unverifiable environments, and there's,   when people are in the environment, it actually  introduces more noise and introduces more   dynamics, and people have to work with  each other to achieve great scientific   discoveries, and people have to work with each  other to build software stacks together and build products and build very customized different  frontiers for people to actually leverage.  So I think a fundamental question we are  actually curious about is how general   the model's learning is and how can it actually  generalize from just doing simple math problems   from the beginning, like two plus two, all the  way to solve very complicated problems with   very dynamic environments and basically have the  capabilities to build up its learnings over time

and be able to work with a lot of groups  of people, figure out what they want   over the time. Yeah. Okay, cool.  So what actually just kind of reminded  me of a couple of these points,   one thing that we think a lot about in the  reward construction, seen many times, is   if the policy under the argmax of that reward is  not what you want and you throw a lot of compute   against it, you're going to have a bad time. And  I think this is very often not super concrete, and these misspecifications, when you then optimize  against it, can really cause a lot of issues.   The model doesn't really know what you intend.  It is just trying to find the highest number.  So is that something that can be automated away at  some point or still very much a craft and a skill?

I think it requires a lot of, the craft  of engineering the right reward function,   I think, is very challenging. I think sorting,  I know there's a lot of stuff with automated   researchers these days, but I think that's  only valuable insofar as you actually know   what the objective is. And so I think, to the  extent that we still know our preferences,   I think it's really important  that you actually do that.  And, yeah, to Liam's point earlier, I  think one thing we've been bitten by so many times is that models will just try to get  optimization signal from literally everywhere,   and there's so many interesting ways in which that  can fail. When I think about when I used to work   on pre-training systems, the library itself was  kind of self-contained. It was literally just your   Megatron optimization stack, but these days it  hits all different types of things. It'll hit   external APIs for maybe grading an outcome. It'll  maybe hit a lab in the case of doing AI science.

In our case, we mock customer environments.  And if any one of those portions fails,   then you can get the sadness that Jerry was  talking about, where your reward will just crash.  I remember there was a couple of nights  ago we hit our OpenAI rate limits,   then all of a sudden the model just kind of kept  getting like an anvil dropped on its head, where   everything it would do would be wrong because  the API response would always just be an error. So there's just subtle things like that that  we've just been bitten by many times as well,   to go back to the question of obstacles at scale. Yeah. No, that's helpful. Thank you.

So if I come to you, Jerry, I  always pivoted back to research. So what's research in this optimization for you? You  were mentioning right now it's still pre-training   and inference, pre-training and RL, and if  you don't mind sharing, you were talking about   merging training and inference completely.  How do things get more interesting there?  Yes. I think there are many, many challenges ahead  in terms of reinforcement learning research, and I   think combining pre-training and RL into a single  algorithm is something that we as humanity, we as deep learning researchers, need to figure out.  Currently we have this two-stage research process,   which honestly is a bit awkward and a bit weird.  We need to understand a lot of world knowledge   into our models so that we can kickstart the RL  process, and the RL process teaches us what do   we do with that world knowledge and how do we use  the things that we have seen during pre-training

to achieve goals and outcomes that we want to do. But at the same time this process kind of limits   what the model can do going forward, what the  model can do online. And at some moment, if you   really find the algorithm that can give you both  world knowledge and behavior, goal-seeking at the   same time, you suddenly can start applying  it at test time. You can apply it in,   like Linden said, we need to currently mock  environments and build fake representations of the world. We train the model in the lab and  then we deploy them to the world where they are   essentially static and not learning anything. But we wouldn't have to mock anything if we can   actually train on the real systems. If you can  actually train where the customers are and where   the real-world need for intelligence is, it's very  clearly, for every researcher, something that will   happen at some moment. And I think splitting  training and inference workloads is only so far,

only at this moment. This is how we do those  things. But the models need to be adapting,   just like intelligence is about adapting to  every situation you find and finding new insights   and finding better ways to solve  problems every time you are doing it.  Currently the models are really great at kind of  almost everything, but at nothing they are truly   at the expert level. On everything there's a  human that is kind of better than this model because humans have worked on, every human  has worked on some domain of their expertise   for 10 years, 20 years, and the models still don't  have this type of depth of expertise in a domain,   and only spending that 20 years  on this domain can get them there.  So what would the, how would the platform  change? How would the hardware engineering,   systems engineering, what would the  complications you will encounter there,

how would that meaningfully change for you? In terms of systems, if you are asking about that,   I think at some moment we'll have much more  personalized models. It will not be one model   for the whole world, but people will have their  own models which are really good at what you do   and what you care about. And there are probably  some shared learnings, but if you think about   the current models, even how mixture of experts  work, there are probably experts there describing some medieval war in Europe that almost no one  is asking about, but the model knows all that,   and that knowledge is stored there. When I'm trying to discover new science   or whenever I'm solving deep learning problems, do  I need to know about the medieval wars in Europe?   It's a really great thing, but those are experts  that are probably not very active for me and not   very important. I think models that adapt to what  you are doing and are really, really great at

that thing, this is the journey of first  pre-training, then reinforcement learning is   already going into that direction. We  have this notion of jagged intelligence.   The main downside of jagged intelligence is that  it's jagged not necessarily in the way I want.   Only making it jagged in the right way is  actually training on the things I need.  Thank you. And for you, Liam, just shifting the same question to you. At some point of time,  do you see yourself getting to continual learning,   or what's working right now, and how meaningfully  will it change what you're doing right now?

Yeah, I mean, I think looking towards the future  of this, I think this disconnect of in the old   days we pre-train and then there's a little bit of  RL on top, and then there was a lot of RL on top,   I think it's definitely shifting. One aspect  that's changing is you have a system that can   produce data for itself. And so one source of  data for itself is just it's out in the world.   It's exploring the frontier of its knowledge.  Those types of traces can be useful for just

new sources of data. And so then you can kind of  see it's kind of bringing it a little bit closer,   these two disparate things. And then the extreme  would be it's just fully continual learning.  So, yeah, I see the vision of it. But I  think there's hurdles about just so much   of our infrastructure and tooling has kind of been  built up with this paradigm in mind. So it kind of   ossifies the type of research you do. Yeah. So one thing that Jerry mentioned, and  I'm hearing it from quite a few other   folks, I would say, or startups as well, is that  eventually most of the consumption is going to   shift to the personal devices. So even the, you  probably won't have a laptop in the laptop form   that we are seeing right now. So how much of  that applies to the fields you are working in?

We might, depending on some maybe more  data-sensitive environments, we might throw   compute really close to specific machinery. So you  can just go up to a little black box and talk to   that machine and it's just completely insulated.  But generally in the space of scientific discovery   we're different. It's a different application. Yeah. So the same question applies for you, Linden. At  some point everything is tightly tailor-made to   how things are right now. The infrastructure, the  data centers, even the hardware planning that's   going on is okay, you have a base model  and then you do some things on top of it.   But how do the new business cases emerge and you  take care of it as things start, I'm not saying   that, but suppose one of these guys starts yet  another company and cracks continual learning.

How does that impact or how do  you plan for something like that?  Yeah, I'm so glad you asked that. So I think  a lot of the research program that we have at   Applied Compute is dedicated towards solving  the continuous learning problem, and I kind   of view ourselves as well-positioned to do so  because one of the things that I think we've been   really excited about as a company is now that our  models are deployed, they produce a lot of data on how they're actually performing in real time  in production. And I think the central question   for us this year from a research perspective is  not only just scaling up existing RL systems, but   now that you have an abundant, almost limitless  source of traces from production, how can you find   out whatever sparse nuggets there are of reward  signal there to make your model ultimately better?

And so this is kind of how we'll close the data  flywheel here. And so an important component of   that will just be, okay, we need to instrument a  ton of observability and telemetry into how models   are performing, take the ones in which there were  surprising results or cases that we were totally   blindsided to during training, and then retrain  them to make them a lot better. And so I think   figuring out how we close that loop is  something that we're actively experimenting on, especially for the enterprises in which we've  deployed these specific intelligences for them.  I think the other thing as well, just to go back  to your idea of systems and the bottlenecks behind   scaling too, is I think there's something really  exciting and compelling about all the different   hardware advances that are happening right now  where it doesn't really need to be on device.   We can train many, many hundreds of billions of  parameters very quickly now, and now that we have

things like advances in Rubin and the generations  that are happening beyond that, the rate at which   you can produce weight updates is just an order  of magnitude better than you could have before.  And so for us I think the recipe will be first  of all identifying an adequate volume of data   to train on, and then just pumping it through all  the modern NVIDIA rack-scale systems to get weight updates even on the order of magnitude of days or  even a couple of hours, where you can constantly   be training these systems. And so that's kind of  how continuous learning works for us. If there's   another startup that works on cracking it, I think  we'll be competitive with them, but we're just   figuring out ways in which we can leverage all the  information we're getting at deployment time to   make our models way better over time. That's awesome. Thanks.

So if I come to you, Yuchen, whenever we spoke  you referred quite a lot to memory with respect   to scaling the systems. I would like to hear more.  Are you working on that right now, or what's your   past experience, how that scales  or how it needs to evolve?  Yeah, thanks for the question. I worked with Liam  on the ChatGPT user memory two years ago. I think it's kind of an echo back to the previous  continual learning problems as well. The model   goes through pre-training, sets up some priors,  learns how to echo on things, basically repeating   things, but the model doesn't fully understand  what is behind the door and why things happen   that way. It doesn't rationalize things like a  human does. And also I guess, people are saying   nowadays we're basically exhausting all the  pre-training data, but actually there's a lot of

way richer signals that are in all these data that  people generated over so many years, and we're   just not learning all the fundamentals and all the  general capabilities of learn-to-learn from it.  I think memory is one kind of interesting  mechanism people develop because people cannot   store all the information in their brain, and  people have to basically offload some of these   such that they can use the context in a more  efficient sense. And continual learning is more

kind of in a sense the model needs to figure  out what signals matter and how do I learn   from it and how do I optimize my goal, and also  how do I actually figure out what is the right   reward and the right goal I should learn  from. I assume, going back to Liam and Jerry,   there's a lot of unknowns in terms of what  goals the model should optimize itself toward.   That's the majority of the problems  right now for scaling RL and making it   constantly learn new things. Yeah.

So Liam, when I come back to you, going back  to your experience at OpenAI, you ran things   at large scale. So now I'm coming to the intro  question. What are, if you were to have an ideal   platform for scaling well, what would it look  like? Liam or Jerry too, we often get confused.  The interesting story in terms of scaling RL  is that it's a very different workload, and   we already chatted a little bit about it. It's a  very different workload than scaling pre-training.

Scaling pre-training is about creating the  world's most synchronized army. Imagine   having millions of soldiers that go perfectly  synchronized. Everyone does the same move in   a parade where they work together and  walk together. And that's what you want   to do when you are running a pre-training run. In terms of RL, it looks much more like guerrilla   warfare. There's still this kind of little  bit part that does pre-training, and that is a well-organized sub-army, but at the same time  you have those subsystems you call and you have   inference, which can be fairly distributed and  fairly different. And the main question people   are asking always is how do we make the kernels  that are kind of similar to what we do in training   so that they don't have that much mismatch, and  the closer we can have the type of code and the   type of systems that we run on inference and in  training, it helps reinforcement learning a lot.

But when I think what is the, how would the  ultimate best RL training system look like,   it's a system that can autotune  in some way and load-balance,   where maybe you can even shift the compute between  inference and training depending on where it is.   Because in RL workloads, basically how much  load you put in each part of the system,   it's not some constant you start with at  the beginning of the run. It depends on the behavior of your model. If your model starts  thinking longer, you may need more inference.   If your model calls more tools, suddenly you  may need more capacity in the tool use. If the   model decides to call sub-agents more, then your  inference starts cascading and calling each other.  And in many ways, the reliability, the speed,  the numerical precision, the interconnect,   those are all necessarily important. But  there's this question: can we build systems

that are flexible to really self-tune and  self-correct given you can't even predict   beforehand what your RL workload will look like.  It only depends on what your model is doing,   and to that you need to keep adapting and keep  shifting the things to really balance that out.   And everyone who has run RL workloads at scale  knows how hard and how tricky those things are.  So it's like an interplay of a lot of permutations  and combinations compared to pre-training. Yes. And the more flexible and the easier  the platform is to shift those things around,   that's a really important thing. Everyone who has  run large-scale pre-training workloads knows that   if you run some N number of GPUs and there's some  failure rate, the tricky bit is, oh, what if one   fails and we need to restart the job. And a lot  of work has been done at the labs to swap out   the faulty GPUs as quickly as possible. And that's  the kind of flexibility you need in pre-training.

In terms of flexibility in RL, it's much more  about can we move stuff around during the run   itself and can we shift more resources to  where they are needed versus where not.  Yeah. So it's like really advanced orchestration. How are you managing, so one thing is if folks  over here, somebody's thinking of planning a   startup, and nowadays it's fashionable,  one-person company. So it sounds like   more and more complicated and you are handling  different, really complicated advanced workloads.   How do you do that? How do you experience that? A lot of pain and suffering.  Yeah. Which

I think Jensen wishes upon all  of us. So it's a good thing.  Yeah, it's a good thing. It's, as Jerry  was saying, incredibly complicated. There's   very complicated interplays between the  machine learning and the systems. But,   yeah, it's just, it's difficult. So any lessons from the trenches?  I think good observability.  I think great hardware. Just really careful debugging. Use agents  abundantly. Kind of standard advice.  So, our time's up. Anything,  last comments from either of you?  Yeah, I mean, I think this is a really exciting  time. I would just say that, to Liam's point   earlier, I think there's so many different ways  that systems can fail outside of just GPUs. And so   knowing that the failure domain is a lot larger  than before. If you've mocked an environment,

that could fail. If you have an external API  call, that could also fail as well. And so   figuring that out, I think, is an important part  of it. But, yeah, I think it's an exciting time.  Yuchen. Yeah, same. In general,   RL can make models learn a lot of things, but I  think more interesting things come from there's   a lot of interaction with the environment and with  different agents. And designing that is actually pretty complicated in terms of different models  having different capabilities and constraints.  Yep. Well, thank you so much for joining us today.   Thank you so much. I'm sorry there's no Q&A, but  it's up to these guys if they want to meet you and   answer questions. Thank you, everybody. [applause]

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent