WEBVTT

1
00:00:00.040 --> 00:00:16.560
[ on-hold music] Hey, everyone. Welcome to the Latent Space Podcast. This is Alessio, partner and CTO in residence at Decibel Partners, and I'm joined by my co-host, Swyx, founder of Small AI. Hey, and today we have Dr.

2
00:00:16.720 --> 00:00:24.540
Nathan Lambert in the house. Welcome. Thanks, guys. You didn't have to come too far. You, uh, got your PhD in Berkeley, and, uh, it seems like you've, you've lived there most of the time in recent years.

3
00:00:24.900 --> 00:00:31.260
You worked on robotics and model-based reinforcement learning on your PhD, and you also interned at FAIR and DeepMind.

4
00:00:31.620 --> 00:00:39.220
You bootstrapped the RLHF team at Hugging Face, and you recently joined the Allen Institute as a research scientist. So that's your quick bio.

5
00:00:39.500 --> 00:00:49.860
What, what should people know about you that maybe is not super obvious about you fr- on, on your LinkedIn? I stay sane in various insane sport ac- [chuckles] in ultra-endurance sport activities that I do.

6
00:00:50.140 --> 00:00:59.520
What's a ultra-endurance sport activity? Like, long distance trail running or gravel biking. So try to unplug sometimes, although it's harder these days. [chuckles] Yeah.

7
00:00:59.620 --> 00:01:10.580
Um, well, you know, just the Bay Area is just really good for that stuff, right? Oh, yeah. You, you can't beat it. I have a trail head, like, 1.2 miles from my house, which is pretty unmatchable in any other urban area.

8
00:01:10.960 --> 00:01:21.680
Uh, pretty excellent. You also have a incredible blog, Interconnects, which, uh, which I'm a fan of, and I also just recently discovered that you have a new podcast, Retort. Yeah, we do.

9
00:01:21.720 --> 00:01:28.980
I've been writing for a while, and I feel like I've finally started to write things that are understandable and fun after- [chuckles]... a few years lost in the wilderness.

10
00:01:29.040 --> 00:01:35.240
If you ask some of my friends that I made read the earlier blogs, they're like, "Oh, this is yikes." But- Yeah... that was... It's, it's coming along.

11
00:01:35.320 --> 00:01:52.080
And the podcast is with my friend Tom, and we just kind of like riff on what's actually happening on AI and not really do news recaps, but just what it all means and have a more critical perspective on the things that really are kind of funny but still very serious happening in the world of machine learning.

12
00:01:52.320 --> 00:01:59.200
Yeah. Awesome. Uh, for people who are new to your work, like, what would you highlight as, like, your greatest hits so far on, like, Interconnects at least?

13
00:01:59.920 --> 00:02:03.860
So, like, the ones that are most popular are, like, timely and/or opinion pieces.

14
00:02:03.900 --> 00:02:17.720
So the first real breakout piece was in April when I also just wrote down the thing that everyone in AI was feeling, which is, like, we're all feeling stressed, um, that we're gonna get scooped and that we're overworked, which is, like, behind the curtain what it feels to work, like, work in AI.

15
00:02:17.980 --> 00:02:25.580
And then a similar one, which we might touch on later in this, was about my recent job search, which wasn't the first time I wrote a job search post- I love that... but people always love that stuff. It's so open.

16
00:02:25.640 --> 00:02:34.380
I mean, it's, like, easy for me to do in a way that it very on brand and it's very helpful. Like, I understand that until you've done it, it's hard to share this information.

17
00:02:34.580 --> 00:02:43.860
And then other popular ones are various model training techniques or fine-tuning. There's an early one on RLHF, which is... This stuff is all just, like, when I figure it out in my brain.

18
00:02:43.920 --> 00:02:52.400
So I wrote an article that's like how RLHF actually works, which is just the intuitions that I had put together in the summer about RLHF, and that was pretty well.

19
00:02:52.420 --> 00:02:58.160
And then I opportunistically wrote about Q*, which- [laughs]... you hate that you have to do it, but it is pretty funny.

20
00:02:58.440 --> 00:03:04.680
From a literature perspective, and, like, OpenAI publishes on work that is very related to mathematical reasoning.

21
00:03:04.740 --> 00:03:10.140
So it's like, oh, you just poke a little around what they've already published, and it seems pretty reasonable. But we don't know.

22
00:03:10.280 --> 00:03:18.180
They probably just got, like, a moderate bump on one of their benchmarks, and then everyone f-l- lost their minds. [laughs] It doesn't really matter. Like, this is why Sam Altman was fired. I don't know.

23
00:03:18.500 --> 00:03:20.400
Anyway, we're here to talk about RLHF 101.

24
00:03:20.840 --> 00:03:29.660
You did a presentation, and I think you expressed some desire to re-record it, and that's why I reached out on Twitter saying, like, "Why not re-record it with us, and then we can ask questions and talk about it?" Yeah.

25
00:03:29.860 --> 00:03:34.360
Sounds good. Yeah. I try to do it every six or 12 months- [chuckles]... is my current, is my estimated cadence- Yeah...

26
00:03:34.380 --> 00:03:44.760
just to refine the ways that I say things, and people see that we don't know that much more, but we have a bit of better way of saying what we don't know. Awesome. Um, we can dive right in.

27
00:03:44.840 --> 00:03:50.540
I don't know if there's- Yeah... any other, uh, topics that we wanna lay out as groundwork. No, you have some awesome slides.

28
00:03:50.580 --> 00:04:00.300
So for people listening on podcasts only, we're gonna have the slides on our show notes, and then we're gonna have a YouTube version where we run through everything together. Sounds good. Yeah.

29
00:04:00.680 --> 00:04:05.460
I think to start skipping a lot of the, like, what is a language model stuff. Yeah. Everyone knows that at this point.

30
00:04:05.520 --> 00:04:16.420
I think the quote from the Llama 2 paper is a great kind of tidbit on RLHF becoming, like, a real deal. There was some uncertainty earlier in the year about whether or not RLHF was really gonna be important.

31
00:04:16.500 --> 00:04:28.120
I think it was not that surprising that it is. I mean, with recent models still using it, the signs were there. But the Llama 2 paper essentially reads like a bunch of NLP researchers that were skeptical and surprised.

32
00:04:28.180 --> 00:04:35.220
So the quote from the paper was, "Meanwhile, reinforcement learning, known for its instability, seemed a somewhat shadowy field for those in the NLP research community.

33
00:04:35.600 --> 00:04:40.180
However, reinforcement learning proved highly effective, particularly given its cost and time effectiveness."

34
00:04:40.700 --> 00:04:45.280
So you don't really know exactly what the costs and time that Meta is looking at 'cause they have a huge team- Mm-hmm...

35
00:04:45.300 --> 00:04:51.920
and a pretty good amount of money [chuckles] here to release these Llama models, but, like, this is just the kind of thing that we're seeing now.

36
00:04:51.980 --> 00:05:02.960
I think any major company that wasn't doing RLHF is now realizing they have to have a team around this. At the same time, we don't have a lot of that in the, like, open end research communities at the same scale.

37
00:05:03.160 --> 00:05:06.820
I think seeing that converge would be great, but it's still very early days.

38
00:05:07.160 --> 00:05:16.080
And another thing on the slide is, like, some of Anthropic's work, but everyone knows Anthropic is kind of the masters of this, and they have some of their own techniques that we're gonna talk about later on.

39
00:05:16.140 --> 00:05:21.040
But that's kind of where we start. Can we do just a one-second RL diversion?

40
00:05:21.240 --> 00:05:31.980
So you come from a robotics background, which RL used to be, or maybe still is, state-of-the-art, and then now you're seeing a lot of LLM plus RL. So you have the Gym Fans, Eureka.

41
00:05:32.040 --> 00:05:40.080
You have, um, Mbio, which we had on, on the podcast. They went... They started with RL. Now they're doing RL plus LLMs. Um, yeah.

42
00:05:40.140 --> 00:05:45.960
Any thoughts there on how we got here and, like, uh, maybe how the, the pendulum will keep swinging?

43
00:05:46.260 --> 00:05:58.132
I really think RL is about, like, a framing of viewing the world through trial and error learning and feedback, and really just one that's Focused on thinking about decision-making and inputs in the world and how inputs have reactions.

44
00:05:58.672 --> 00:06:03.792
And in that, a lot of people come from a lot of different backgrounds, whether it's physics, electrical engineering, mechanical engineering.

45
00:06:04.172 --> 00:06:10.432
There are obviously computer scientists, but compared to other fields of CS, I do think it's a much more diverse background of people.

46
00:06:10.872 --> 00:06:16.592
You know, like my background was in electrical engineering and doing robotics and things like that. It really just changes the worldview.

47
00:06:16.672 --> 00:06:26.412
I think that reinforcement learning as it was back then, so to say, is really different because it's like you're looking at these toy problems and the numbers are totally different. Mm-hmm.

48
00:06:26.452 --> 00:06:32.672
And this, like we-- everyone went kind of zero to one at scaling these things up. But like people like Jim Fan and other people that were...

49
00:06:33.472 --> 00:06:43.072
You saw this transition in like the decision transformer and papers and when people are trying to use transformers to do decision-making for things like offline RL, and I think that was kind of like the early days.

50
00:06:43.152 --> 00:06:48.112
But then once language models were so proven, it's like everyone is using this tool for their research.

51
00:06:48.472 --> 00:07:01.332
I think in the long run it will still settle out or RL will still be a field that people work on just because of these kind of fundamental things that I talked about, that it's just viewing the whole problem formulation different than predicting text.

52
00:07:01.392 --> 00:07:10.092
And so there needs to be that separation. And the view of RL in language models is pretty contrived already. So it's not, it's not like we're doing real RL.

53
00:07:10.192 --> 00:07:19.292
I think the last slide that I have here is like how [chuckles] is a way to make RLHF more like what people would think of with RL, so like actually running things over time.

54
00:07:19.632 --> 00:07:29.052
But a weird lineage of tools that happen to get us to where we are, so that's why the name takes up so much space, but it could have gone a lot of different ways. Cool.

55
00:07:29.112 --> 00:07:37.392
We made it one slide before going on a tangent [both laughing]. Yeah, I mean, it's kind of, it's kind of related. This is a- Yeah. So we have a history of RL.

56
00:07:37.912 --> 00:07:51.552
Yeah, so and given the context, this paper really started 'cause I've had this more diverse background than some computer scientists, which is like trying to understand what the difference of a cost function or a, a reward function and a preference function would be without going into the, all of the details.

57
00:07:51.592 --> 00:08:00.872
Like costs are normally things that control theorists would work with in these kind of closed domains. And then reinforcement learning has always worked with rewards that's central to the formulation that we'll see.

58
00:08:00.912 --> 00:08:07.892
And then the idea was like, okay, we now are at preferences. And each step along the way, there's kind of different assumptions that you're making, and we'll get into these.

59
00:08:07.932 --> 00:08:10.992
And those assumptions are built on other fields of work.

60
00:08:11.152 --> 00:08:24.792
So that's what this slide is going to say, is like RLHF, while directly building on tools from RL in language models, is really implicitly impacted and built on theories and philosophies spanning tons of like human history.

61
00:08:24.832 --> 00:08:33.452
I think we cite Aristotle in this paper, which is fun [chuckles]. It's like going pre-BC. It's like twenty-three hundred years old or something like that. So that's the reason to do this.

62
00:08:33.532 --> 00:08:44.332
I think we kind of list some things in the paper about summarizing what different presumptions of RLHF could be. I think going through these is actually kind of funny. It's fun to talk about these and the...

63
00:08:44.352 --> 00:08:49.712
'Cause they're kind of a grab bags of things that you'll see could return throughout this podcast that we're talking about it.

64
00:08:49.752 --> 00:08:54.812
Like the core thing of RLHF that in order to be a believer in this is that like RL actually works. Mm-hmm.

65
00:08:54.832 --> 00:09:02.972
It's like if you have a reward function, you can optimize it in some way and get a different performance out of it, and you could do this at scale, and you could do this in really complex environments, which is...

66
00:09:03.332 --> 00:09:09.632
I, like I don't know how to do that in all the domains. Like I don't know how to exactly make ChatGPT. So it's kind of will overshadow everything.

67
00:09:09.652 --> 00:09:30.632
And then there's go from something kind of obvious like that, and then you re-read the Von Neumann-Morgenstern utility theorem, which is essentially a economic theory that says you can like weight different probabilities of different people, which is a theoretical piece of work that is the foundation of utilitarianism, and trying to quantify preferences is crucial to doing any sort of RLHF.

68
00:09:31.212 --> 00:09:36.272
And if you look into this, all of these things, there's way more you could go into if you're interested in any of these.

69
00:09:36.392 --> 00:09:44.032
This is kind of like grabbing a few random things and then kinda similar to that is the Bradley-Terry model, which is the fancy name for the pairwise preferences that everyone is doing.

70
00:09:44.272 --> 00:09:51.812
And then all the things that are like, that Anthropic and OpenAI figured out that you can do, which is that you can aggregate preferences from a bunch of different people and different sources.

71
00:09:52.072 --> 00:10:00.612
And then when you actually do RLHF, you extract things from that data, and then you train a model that works somehow. And we don't know [chuckles] there's a lot of complex links there.

72
00:10:00.952 --> 00:10:08.952
But if you wanna be a believer in doing this at scale, these are the sorts of things that you have to accept as preconditions for doing RLHF. Yeah.

73
00:10:09.012 --> 00:10:17.332
You have a nice chart of like the sort of intellectual history of RLHF, um, that we'll send people to refer to either in your paper or in the YouTube video for this podcast.

74
00:10:17.512 --> 00:10:26.172
But I like the other slide that you have on like the presumptions that you need to have for R- RLHF to work. You already mentioned some of those. Uh, which, which one's underappreciated?

75
00:10:26.252 --> 00:10:31.612
Like this is the first time I've come across the VNM utility theorem. Yeah, I know. This is what you get from working with people.

76
00:10:31.752 --> 00:10:40.772
[laughs] Like, like to my co-host on the podcast, the rhetor is a sociologist by training. Okay. So he knows all these things and like who the philosophers are that found these different things- Uh-huh...

77
00:10:40.792 --> 00:10:43.472
like utilitarianism. But there's a lot that goes into this.

78
00:10:43.512 --> 00:10:51.052
Like essentially, there's even economic theories that like there's debate whether or not preferences exist at all, and there's like different types of math- Oh, gosh...

79
00:10:51.132 --> 00:10:54.032
you can use with whether or not you actually can model preferences at all.

80
00:10:54.252 --> 00:11:02.092
So it's pretty obvious that RLHF is built on the math that thinks that you can actually model any human preference, but this is the sort of thing that's been debated for a long time.

81
00:11:02.152 --> 00:11:08.452
So all the work that's here is like, and people hear about in their AI classes, so like Jeremy Bentham, like hedonic calculus and all these things.

82
00:11:08.492 --> 00:11:14.052
Like these are the side of work where people assume that preferences can be measured. And this is like I don't really know. Like

83
00:11:15.112 --> 00:11:22.792
this is why I kind of go on a rant and I say that in RLHF, calling things a preference model is a little annoying because there's no inductive bias of what a preference is.

84
00:11:22.952 --> 00:11:29.612
It's like if you were to learn a robotic system and you learn a dynamics model, like hopefully that actually mirrors the world in some way of the dynamics.

85
00:11:30.072 --> 00:11:37.432
But with a preference model, it's like, oh, like I don't, I don't know what this model... Like I don't know what ChatGPT encodes as any sort of preference or what I would want it to be in a fair way.

86
00:11:37.532 --> 00:11:45.532
Anthropic has done more work on trying to write these things down, but even like if you look at Claude's Constitution, like that doesn't mean the model believes these things.

87
00:11:45.652 --> 00:11:53.460
It's just trained and to prioritize these things. Mm-hmm. And that's kind of what the later points I'm looking at, like what RLHF is doing, and if it's actually like a...

88
00:11:53.520 --> 00:11:56.060
repeatable process in the data and in the training.

89
00:11:56.280 --> 00:12:05.420
That is just unknown, and we have a long way to go before we understand what this is and the link between preference data and any notion of, like, writing down a specific value.

90
00:12:05.780 --> 00:12:14.680
Did this connection between more sociology work versus computer work already exist, or is it, like, a recent cross-contamination?

91
00:12:14.720 --> 00:12:24.140
Because when we had Tri Dao on the podcast, he said flash attention came to be because at AZ they have so much overlap between systems engineer and, like, uh, deep learning engineers.

92
00:12:24.220 --> 00:12:30.820
Like, is it the same in, in this field? So I've gone to a couple workshops where the populations of people who you'd want to include this, like, are.

93
00:12:30.880 --> 00:12:40.920
I think the reason why it's not really talked about is just because the RLHF techniques that people use were built in labs like OpenAI and DeepMind where, where there are some of these people.

94
00:12:40.960 --> 00:12:45.840
They have-- these places do a pretty good job of trying to get these people in the door when you compare them to, like, normal startups.

95
00:12:46.300 --> 00:12:51.840
But, like, they're not bringing in academics from economics, um, like social choice theory. There's just too much.

96
00:12:52.240 --> 00:12:58.120
Like, the, the criticism of this paper that this is based on is like, "Oh, you're missing these things in RL or at least this decade of RL."

97
00:12:58.160 --> 00:13:07.660
And it's like it would be literally be bigger than the Sutton and Barto book if you were to include everyone. So it's really hard to include everyone in a, in a principled manner when you're designing this.

98
00:13:07.800 --> 00:13:15.320
It's just a good way to understand and improve the communication of what RLHF is and, like, what is a good reward model for society.

99
00:13:15.380 --> 00:13:35.560
It really probably comes down to what an individual wants, and it'll probably motivate models to move more in that direction and just be a little bit better about the communication, which is a recurring theme in kind of my work, is, like, I just get frustrated when people say things that don't really make sense, especially when it's gonna, like, manipulate individuals' values or manipulate the general view of AI or anything like this.

100
00:13:35.580 --> 00:13:42.500
So that's kind of why RLHF is so interesting. It's, it's very vague in what it's actually doing while the problem specification is very general.

101
00:13:42.760 --> 00:13:51.140
Shall we go to the, I guess, the, the diagram here on the reinforcement learning basics? Yeah. So reinforcement learning, I kind of mentioned this. It's a trial and error type of system.

102
00:13:51.500 --> 00:13:59.980
The diagram in the slides is really this classic thing where you have an agent interacting with an environment. So it's kind of this agent has some input to the environment, which is called the action.

103
00:14:00.240 --> 00:14:11.260
The environment returns a state and a reward, and that repeats over time. And the agent learns based on these states and these rewards that it's seeing, and it should learn a policy that makes the rewards go up.

104
00:14:11.720 --> 00:14:19.880
That seems pretty simple. Uh, then the-- if you try to mentally map what this looks like in language, which is that, like, the language models don't make this easy.

105
00:14:20.120 --> 00:14:29.160
I think with a language model it's very hard to define what an environment is. So if the language model is the policy and it's generating, it's like the environment should be a human.

106
00:14:29.440 --> 00:14:40.500
But setting up the infrastructure to take tens of thousands of prompts and generate them and then show them to a human and collect the human responses and then shove that into your training architecture is very far away from working.

107
00:14:40.760 --> 00:14:47.940
So we don't really have an environment. We just have a reward model that returns a reward, and the state doesn't really exist when you look at it like, um, an RL problem.

108
00:14:48.280 --> 00:14:54.080
What happens is the state is a prompt, and then you do a completion, and then you throw it away and you grab a new prompt.

109
00:14:54.480 --> 00:15:02.400
Where really in-- as an RL researcher, you would think of this as being like you take a state, you get some completion from it, and then you look at what that is and you keep kind of iterating on it.

110
00:15:02.440 --> 00:15:10.260
And all of that is in here, which is why you'll hear RLHF referred to as a bandits problem, which is kind of like you choose one action and then you watch the dynamics play out.

111
00:15:10.900 --> 00:15:21.460
There's many more debates that you can have [laughs] in this if you get the right RL people in the room, then kind of like this isn't RL even [laughs] when you zoom into what- Mm-hmm... RLHF is doing.

112
00:15:21.980 --> 00:15:29.260
Does this change as you think about, um, chain of thought reasoning and things like that? Like, does the state become part of the chain that you're going through?

113
00:15:29.720 --> 00:15:36.300
There's work that I've mentioned on one slide called process reward models that essentially rewards each step in the chain of thought reasoning.

114
00:15:36.700 --> 00:15:46.460
It doesn't really give the part of interaction, but it does make it a little bit more fine-grained where you can think about, like, calling it at least you have many states from your initial state.

115
00:15:46.880 --> 00:15:49.400
That formulation I don't think people have fully settled on.

116
00:15:49.560 --> 00:15:57.880
I think there's a bunch of great work out there, like even OpenAI is releasing a lot of this, and Let's Verify Step-by-Step is their pretty great paper on the matter.

117
00:15:58.240 --> 00:16:09.160
I think in the next year that'll probably get made more concrete by the community on, like, if you can easily draw out, like, if chain of thought reasoning is more like RL. We can talk about that more later. Yeah, yeah.

118
00:16:09.200 --> 00:16:19.660
That's a kind of a more advanced topic than we probably should [laughs] spend all the time on. RLHF for decision-making. Uh, you have a slide here that compares pre deep RL versus deep RL.

119
00:16:19.800 --> 00:16:28.760
This is getting into the history of things, which is showing that the work that people are using now really came from well outside of NLP, and it came before deep learning was big.

120
00:16:28.960 --> 00:16:37.700
And the step from this paper, TAMER, which is from two thousand eight, some names that are still really relevant in kind of human-centric RL, Bradley Knox and Peter Stone.

121
00:16:38.140 --> 00:16:44.880
If you have an agent take an action, you would just have a human give a score from zero to one as a reward rather than having a reward function.

122
00:16:44.940 --> 00:16:53.720
And then with that classifier, you can do something with a policy that learns to take actions to maximize that reward. It's a pretty simple setup. It works in simple domains.

123
00:16:53.760 --> 00:17:08.500
And then the reason why this is interesting is you compare it to the paper that everyone knows, which is this Paul Christiano et al., Deep Reinforcement Learning from Human Preferences paper, which is where they showed that learning from human preferences, you can solve, like, the basic RL tasks at the time, so various control problems and simulation.

124
00:17:08.540 --> 00:17:19.640
And this kind of, like, human preferences approach had higher rewards in some environments than if you just threw RL at the environment that returned a reward. So the preferences thing was you took two trajectories.

125
00:17:19.860 --> 00:17:24.640
So in this case, it was tr-- like complete trajectories of the agent, and the human was labeling which one is better.

126
00:17:25.040 --> 00:17:29.500
And you could see how this kind of comes to be, like, the pairwise preferences that are used today that we'll talk about.

127
00:17:29.760 --> 00:17:42.620
And there's also a really kind of interesting nugget that is the trajectory that the humans were labeling over has a lot more information than the RL algorithm would see if you just had one state, which is kind of why people think that it's why the performance in this paper was so strong.

128
00:17:42.660 --> 00:17:52.260
But I still think that it's surprising that there isn't more RL work of this style happening now, 'cause this paper is in twenty seventeen, so it's like six years later and I haven't seen things that are- Mm-hmm...

129
00:17:52.320 --> 00:18:00.916
exactly similar. But it's a great paper to understand where stuff that's happening now kinda came from. Just on the, on the Cristiano paper, you mentioned the performance being strong.

130
00:18:00.996 --> 00:18:04.436
I don't remember, uh, what, what results should I have in mind when I think about that paper?

131
00:18:04.696 --> 00:18:11.396
It's mostly like if you think about a RL learning curve, which is like on the X-axis you have environment interactions, on the Y-axis you have performance.

132
00:18:11.896 --> 00:18:18.896
You can think about different like ablation studies of between algorithms. So I think they use like A2C, which I don't even remember what that stands for, as their baseline.

133
00:18:19.276 --> 00:18:28.636
But if you do the human preference version on a bunch of environments, like the human preference labels, the agent was able to learn faster- I see... than if it just learned from the signal from the environment.

134
00:18:28.696 --> 00:18:34.136
Which means like it's happening because the reward model has more information than the norm- Humans have more signal... than the agent would. Yeah.

135
00:18:34.136 --> 00:18:41.716
But like the fact that it can do better, I was like, "That's pretty surprising to me," 'cause RL algorithms are pretty sensitive. [laughs] So I was like, I was like, "Okay."

136
00:18:41.776 --> 00:18:46.016
There's just one thing I, I do want to establish as a baseline for our listeners. We are updating all the weights.

137
00:18:46.456 --> 00:18:57.036
In some sense, the next token prediction task of training a language model is a form of reinforcement learning, except that it's not from human feedback, it's just self-supervised learning from a general corpus. Yeah.

138
00:18:57.396 --> 00:19:05.856
There's one distinction which I love, which is that you can actually give negative feedback, whereas in a, in a general sort of pre-training situation, you, you cannot.

139
00:19:06.176 --> 00:19:14.716
And maybe like the, the order of magnitude of feedback, like the Likert scale that you're gonna talk about, that actually just gives more signal than a typical training process would, would do in a language model setting.

140
00:19:15.296 --> 00:19:24.556
Yeah. I, I don't think I'm the right person to comment exactly, but like you can make analogies that reinforcement learning is self-supervised learning as well. Like there are a lot of things that'll point to that.

141
00:19:25.116 --> 00:19:31.656
I don't know like whether or not it's a richer signal. I think that's, could be seen in the results. It's a good thing for people to look into more.

142
00:19:32.156 --> 00:19:44.036
It's like as reinforcement learning is so much less compute, like it is a richer signal in terms of its impact, 'cause if they could do what RLHF is doing at pre-training, they would, but they don't, they don't know how to have that effect in like a stable manner.

143
00:19:44.396 --> 00:19:45.356
Otherwise everyone would do it.

144
00:19:45.676 --> 00:19:57.236
On a practical basis, like as someone fine-tuning models, I have often wished for negative fine-tuning, which like m- pretty much doesn't exist in OpenAI land, and it's not the, the default setup in open source land.

145
00:19:57.636 --> 00:20:05.416
How does this work in like diffusion models and stuff? 'Cause you can give negative prompts to something, to like- Yeah... Stable Diffusion or whatever. It's for guidance. That's for clip guidance.

146
00:20:05.816 --> 00:20:10.676
Is that just from like how they prompt it then? I'm just wondering if we could do something similar. It's another tangent.

147
00:20:10.696 --> 00:20:19.396
[laughs] I do wanna sort of spell that out for people in case they've, haven't made the connection between RLHF and the rest of the training process. They might, they might have some familiarity with- Yeah...

148
00:20:19.436 --> 00:20:19.476
from our previous episodes.

149
00:20:19.496 --> 00:20:37.156
So like these, these coming slides can really b- dig into this, which is like this 2018 paper that was a position paper from the some of, bunch of the same authors from the Cristiano paper and from the OpenAI work that everyone knows, which is like they write a position paper on what a preference reward model could do to solve alignment for agents.

150
00:20:37.596 --> 00:20:46.216
That's kind of based on two assumptions. The first assumption is that we can learn user intentions to a sufficiently high accuracy. That doesn't last with me because I don't, like I don't know what that means.

151
00:20:46.256 --> 00:20:53.336
But the second one is pretty telling in the context of RLHF, which is for many tasks we want to solve, evaluation of outcomes is easier than producing the correct behavior.

152
00:20:53.736 --> 00:21:04.016
And this is the whole thing, is like we can compare it to poems that the model generates and it can be viewed as liking a positive example or it could be viewed as really disliking a negative example.

153
00:21:04.056 --> 00:21:20.496
And that's what I think a lot of people are doing in like the harm space, is like a harmful response to a language model, whether or not you agree with the company's definition of harms, is that [laughs] it's a really bad negative example and they down-weight them by preferring something more benign in the RLHF process, among other ways of dealing with safety.

154
00:21:20.676 --> 00:21:29.436
So this is a good way of saying, it's like this is core. This kind of like comparison and positive or negative example is core to all of the RLHF work that has continued.

155
00:21:29.796 --> 00:21:36.656
People often say, "I don't know what I want, but I'll know it when I see it." This is that expressed in [laughs] reinforcement learning terms. Yeah, it is. [laughs] Yeah, it is.

156
00:21:36.696 --> 00:21:46.056
That's, that's what everyone's doing in the preference modeling stage that we'll get to. Yep. Yeah, and you can see there are more papers. This is really just to have all the links for people that go deeper.

157
00:21:46.116 --> 00:21:57.016
There's a Ziegler et al paper in 2019 which shows that you can do this RLHF process on language models. This familiar diagram start to emerge in 2019, and it's just to show that this goes really far back.

158
00:21:57.076 --> 00:22:04.896
I think we can kind of breeze through some of these. And then 2020 is the first OpenAI experiment that I think caught people's eyes, which was this learning to summarize experiment.

159
00:22:05.136 --> 00:22:16.356
It has this three-step process that we'll go to into more when I kind of go into the main concepts. But this is like the first time you see this diagram that they reuse with InstructGPT, they reuse with ChatGPT.

160
00:22:16.696 --> 00:22:31.536
And the types of examples that they would have, I don't think I need to read these exactly, but one that I have read a whole bunch of times is like they took these prompts from Reddit that was like explain like I'm five or get career advice, and people really pour their heart [laughs] and soul into these.

161
00:22:31.556 --> 00:22:41.996
Yeah. So these are like multi-paragraph pieces of writing, and then they essentially do comparisons between a vanilla language model, like I think it was either GPT-2 or GPT-3. I always get the exact years.

162
00:22:42.016 --> 00:22:52.436
Uh, 3 was early 2020, so that's about right. Yeah. So this was probably done with GPT-2. I- it, it doesn't really matter, but the language model does normal things when you do few shot, which is like it repeats itself.

163
00:22:52.496 --> 00:23:01.096
It doesn't have nice text. And what they did is this was the first time where a language model would generate like pretty nice text from an output. Mm-hmm.

164
00:23:01.176 --> 00:23:04.496
It was restricted to the summarization domain, but I think that...

165
00:23:04.576 --> 00:23:27.876
I, like this is where I wish I was paying attention more 'cause I would see the paper, but I didn't know to read language model outputs and kind of understand this qualitative sense of the models very well then, because you look at the plots in the papers, these learning to summarize into InstructGPT have incredibly pretty plots, just with like nicely separated lines with error bars and they're like s- this supervised fine-tuning works, the RL step works.

166
00:23:27.976 --> 00:23:38.016
But if you were early to see like how different the language that was written by these models was, I think you could have been early to like things like ChatGPT and knowing RLHF would matter.

167
00:23:38.116 --> 00:23:44.396
But that's now, I think- Obvious. Yeah. [laughs]... the good, the good people know to chat with language models, but not even everyone does this.

168
00:23:44.436 --> 00:23:55.456
Like people are still looking at numbers and I think OpenAI probably figured it out when they were doing this, how important that could be, and then they had years to kind of chisel away at that and that's why they're doing so well now.

169
00:23:55.776 --> 00:24:02.948
Yeah. I mean, arguably, you know, it's well known that ChatGPT was kind of an accident, that they didn't, [laughs] they didn't think it would be that big of a deal. Yeah. So maybe they didn't.

170
00:24:03.008 --> 00:24:11.648
[laughs] Maybe they didn't, but they were getting the proxy that they needed. I- I've heard off the record from other labs that it was i- in the air. If, if OpenAI didn't do it, someone else would've done it.

171
00:24:12.348 --> 00:24:20.888
So you've mentioned a couple of other papers that are very seminal to this period, and I, I love how you say way back when in referring to 2019. [laughs] It feels like it in my life.

172
00:24:21.468 --> 00:24:32.828
So how much should people understand the relationship between RLHF, instruction tuning, PPO, KL divergence, anything like that? Like, how would you construct the level of knowledge that people should dive into?

173
00:24:32.868 --> 00:24:38.088
Like, what, what, what should people know at the high level, and then if people want to dive in deeper, what- where do they go?

174
00:24:38.148 --> 00:24:48.848
Like, um, is instruct tuning important here, or is that part of the overall process towards modern RLHF? I think for most people, instruction tuning is probably still more important in their day-to-day life.

175
00:24:48.928 --> 00:24:59.148
I think instruction tuning works very well. You can write samples by hand that makes sense. You can get the model to learn from them. You could do this with very low compute.

176
00:24:59.208 --> 00:25:05.148
It's easy to do almost in, like, no code solutions at this point, and the loss function is really straightforward.

177
00:25:05.268 --> 00:25:14.788
And then if you're interested in RLHF, you can kind of learn from it from a different perspective, which is, like, how the instruction tuning distribution makes it easier for your RLHF model to learn.

178
00:25:14.988 --> 00:25:20.828
There's a lot of details depending on your preference data, if it's close to your instruction model or not, if that matters.

179
00:25:21.068 --> 00:25:27.188
But that's really at the RLHF stage, so I think it's nice to segment and just kind of understand what your level of investment and goals are.

180
00:25:27.248 --> 00:25:41.148
I think instruction tuning still can do most of the, what you want to do, and it's like, if you want to think about RLHF, at least before DPO really had taken off at all, it would be like, do you wanna have a team of at least, like, five people if you're really thinking about doing RLHF?

181
00:25:41.448 --> 00:25:46.628
I think DPO makes it a little bit easier, but that's still really limited to kind of one data set that everyone's using at this point.

182
00:25:46.668 --> 00:25:54.428
Like, everyone's using this ultra feedback data set, and it boosts AlpacaEval, MT-Bench, TruthfulQA, and, like, the qualitative model a bit.

183
00:25:54.488 --> 00:26:03.148
We don't really know why, and it's like it might just be that data set combined with the mo- [laughs]... with the method. But you've got to be ready for a bumpy ride if you're wanting to try to do RLHF.

184
00:26:03.268 --> 00:26:16.108
I don't really recommend most startups to do it unless it's, like, gonna provide them a clear competitive advantage in their kind of niche because you're not gonna make your model ChatGPT, like, better than OpenAI or anything like that.

185
00:26:16.148 --> 00:26:26.768
You've got to accept that there's some exploration there, and you might get a vein of benefit in your specific domain. But I'd still like go be careful going into the RLHF can of worms. You probably don't need to.

186
00:26:27.288 --> 00:26:33.408
Mm-hmm. Okay. So there's a bit of a time skip in what you mentioned. DPO is, like, a couple months old. Yeah. So we'll leave that towards the end. [laughs] Yeah, yeah, yeah.

187
00:26:33.428 --> 00:26:53.668
[laughs] Um, I think the, the main result that I think most people talk about at, at this stage, we're talking about September 2020, and then going into, I guess maybe last year, was Vicuna as one of the more interesting applications of instruction tuning that pushed Llama 1 from, let's say a GPT 3-ish model to a GPT 3.5 model in, in pure open source with not a lot of resources.

188
00:26:53.748 --> 00:27:01.208
I think, I mean, they, they, they said something like, you know, they used, like, under $100 to, to make this. Yeah. Like, instruction tuning can really go a long way.

189
00:27:01.368 --> 00:27:08.848
I think the claims of ChatGPT level are long overblown in most of the things in open source. I think it's not to say...

190
00:27:08.888 --> 00:27:17.908
Like, Vicuna was a huge step, and it's just kind of showing that instruction tuning with the right data will completely change what it feels like- Yeah... to talk with your model.

191
00:27:18.148 --> 00:27:25.028
And- From text completion to actually chatting back and forth- Yeah... multi-turn. And like, yeah, instruction tuning can be multi-turn.

192
00:27:25.308 --> 00:27:29.108
Just having a little bit of data that's, like, a couple turns can go a really long way. Mm-hmm.

193
00:27:29.268 --> 00:27:35.428
That was, like, the story of the whole first part of the year is, like, people would be surprised by how far you can take instruction tuning on a small model.

194
00:27:35.508 --> 00:27:43.848
I think the things that people see now is, like, the small models don't really handle nuance as well- Yeah... and they could be more repetitive if even if they have really good instruction tuning.

195
00:27:43.888 --> 00:27:52.068
But if you take that kind of 7 to 70 billion parameter jump, like, the instruction tuning at the bigger model is, like, robustness, little things make more sense.

196
00:27:52.568 --> 00:28:03.008
But that's still just with instruction tuning and scale more than anything else. Excellent. Shall we go to technical overview? Yeah. This is kind of where we go through my own version of this, like, three-phase process.

197
00:28:03.028 --> 00:28:09.188
Mm-hmm. You can talk about instruction tuning, which we've talked about a lot. It's, it's funny because all these things, instruction tuning has the fewest slides even though it's- [laughs]...

198
00:28:09.248 --> 00:28:17.568
like, the most practical thing for most people. We could save the debate for, like, if the big labs still do instruction tuning for later, but that's a coming wave for, for people.

199
00:28:17.628 --> 00:28:23.528
And then, like, preference data and, and training, and then kind of like what does reinforcement learning optimization actually mean.

200
00:28:23.748 --> 00:28:32.048
We talk about these sequentially because you really have to be able to do each of them to be able to do the next one. You need to be able to have a model that's chatty or helpful, instruction following.

201
00:28:32.368 --> 00:28:39.588
Every company has their own word that they like to assign to what instructions mean. And then once you have that, you can collect preference data and do some sort of optimization.

202
00:28:39.628 --> 00:28:44.488
When you say word, you mean, like, angle bracket inst, or do you mean something else? Oh, I don't even know what inst means. But- [laughs] Instruction...

203
00:28:44.528 --> 00:28:53.068
just saying, like, they, they, they use their adjective that they like. [laughs] Okay. Like, I think Anthropic also likes steerable is another one. I see. I see. I see. Just the, the way they describe it. Yeah.

204
00:28:53.128 --> 00:29:02.128
So, like, instruction tuning, we've covered most of this, is really about, like, you should try to adapt your models to specific needs. It makes models that were only okay extremely comprehensible.

205
00:29:02.188 --> 00:29:05.188
A lot of the times it's where you start to get things like chat templates.

206
00:29:05.208 --> 00:29:11.748
So if you want to do system prompts, if you want to ask your model, like, act like a pirate, that's one of the ones I always do, which is always funny. But, like, whatever you...

207
00:29:11.848 --> 00:29:20.868
Like, act like [laughs] a chef, like anything. You-- this is where those types of things that people really know in language models start to get applied.

208
00:29:21.248 --> 00:29:27.428
So it's good as a kind of starting point because this chat template is used in RLHF and all of these things down the line.

209
00:29:27.648 --> 00:29:35.808
But as a basic pointer, it's like once you see this with instruction tuning, you really know it, which is like you take things like Stack Overflow where you have a question and an answer.

210
00:29:35.868 --> 00:29:42.688
You format that data really nicely. You push it through the model. The model then kind of knows what to do when somebody asks a question.

211
00:29:42.968 --> 00:29:51.188
There's much more tricky things that people do, but I still think the vast majority of it is question answer. It's like, "Please explain this topic to me. Generate this thing for me."

212
00:29:51.488 --> 00:30:01.928
That hasn't changed that much this year. I think people have just gotten better at scaling up the data that they need. Yeah. This is where this talk will kind of take a whole left turn into more technical detail land.

213
00:30:02.384 --> 00:30:12.544
I put a slide with the RLHF objective, which I think is good for people to know. I've started going back to this more to just kind of understand what is trying to happen here and what type of math people could do.

214
00:30:13.044 --> 00:30:23.564
I think because of this algorithm we've mentioned this, it's in the air, direct preference optimization. But everything kind of comes from an equation of trying to learn a policy that maximizes the reward.

215
00:30:23.764 --> 00:30:34.544
The reward is some learned metric. A lot can be said about what the reward should be, subject to some constraint. The most popular constraint is the KL constraint, which is just a distributional distance.

216
00:30:35.364 --> 00:30:43.884
Essentially in language models, that means if you have a completion from your instruction or RLHF model, you can compare that completion to a base model.

217
00:30:44.524 --> 00:30:54.644
And looking at the log probs from the model, which are essentially how likely each token is, you can see a rough calculation of the distance between these two models, just as a scalar number.

218
00:30:55.244 --> 00:31:02.684
I think what that actually looks like in code, you can look at it. It'd be like a, a s- a sum of log probs that you get right from the model.

219
00:31:03.044 --> 00:31:13.324
It'll look much more simpler than, than it sounds, but it is just to make the optimization kind of stay on tracks. It's a guardrail. Make sure it doesn't overfit to the- Yeah. It was like-... RLHF data...

220
00:31:13.364 --> 00:31:17.084
because we have so little data in RLHF, overfitting is really something that could happen.

221
00:31:17.244 --> 00:31:26.704
I think it'll fit to specific features that labelers like to see, that the model likes to generate, punctuation, weird tokens like calculator tokens.

222
00:31:26.744 --> 00:31:33.684
Like, it could overfit to anything if it's in the data a lot, and it happens to be in a specific format, and the KL constraint prevents that.

223
00:31:33.864 --> 00:31:42.884
There's not that much documented work on that, but [chuckles] there's a lot of people that know if you take that away, it just doesn't work at all. [chuckles] I think it's something that people don't focus on too much.

224
00:31:43.784 --> 00:31:47.404
But this objective, as I said, it's just kind of you optimize the reward.

225
00:31:47.604 --> 00:31:54.544
The reward is where the human part of this comes in, and we'll talk about that next, and then subject to a constraint, don't, don't change the model too much.

226
00:31:55.064 --> 00:32:03.284
The real questions are how do you implement the reward, and then how do you make the reward go up in a meaningful way? So like a preference model, the task is kind of to design a human reward.

227
00:32:03.384 --> 00:32:13.144
I think the equation that most of the stuff is wor- based on right now is something called a Bradley-Terry model, which is like a pairwise preference model where you compare two completions and you say which one you like better.

228
00:32:13.344 --> 00:32:16.004
It'll show a interface that Anthropic uses here.

229
00:32:16.384 --> 00:32:31.544
And the Bradley-Terry model is really a fancy probability between two selections, and what's happening in the math is that you're looking at the probability that the chosen completion, the one you like better, is actually the better completion over the rejected completion.

230
00:32:31.904 --> 00:32:36.224
And what these preference models do is they assume this probability is correlated to reward.

231
00:32:36.404 --> 00:32:43.624
So if you just sample from this probability, it'll give you a scalar, and then you use that reward later on to signify, like, what piece of text is better.

232
00:32:44.364 --> 00:32:51.624
I'm kind of inclined to breeze through the math stuff because otherwise it's gonna be not as good to listen to. [chuckles] Yeah. No, no. I think people wanna hear it, you know? Yeah.

233
00:32:51.624 --> 00:32:55.364
[chuckles] I think there's a lot of, like, higher level explanations out there, so. Yeah.

234
00:32:55.404 --> 00:33:21.084
So the real thing is you need to assign a scalar reward of how good a response is, and that's not necessarily that easy to understand because, like, if we take back to the one of the first works that I mentioned, this Tamer thing for decision-making, like people tried that with language models, which is if you have a prompt and a completion and you just have someone rate it from zero to 10, could you then train a reward model on all of these completions and zero to 10 ratings and see if you can you get ChatGPT with that?

235
00:33:21.124 --> 00:33:28.444
And the answer is really kind of no. Like [chuckles] a lot of people tried that. It didn't really work. And then that's why they tried this pairwise preference thing, and it happened to work.

236
00:33:28.504 --> 00:33:36.484
And this Bradley-Terry model comes from, like, the '50s. It's from these fields that I was mentioning earlier, and it's wild how much this- [chuckles]... happens.

237
00:33:36.524 --> 00:33:45.524
I mean, this, this screenshot I have in the slides is from the DPO paper, I think might be the appendix, but, like, it's still really around in the literature of what people are doing for RLHF. Yeah.

238
00:33:45.584 --> 00:33:49.584
So that's a fun one to know. I'll point out one presumption that this heavily re- relies on.

239
00:33:49.624 --> 00:33:57.464
You, you mentioned this as part of your six presumptions that we covered earlier, which is that you can aggregate these preferences. This is not exactly true among all humans, right?

240
00:33:57.504 --> 00:34:02.724
Like, I have a preference of one thing. You have a preference of a different thing. And actually coming from economics, you mentioned economics earlier.

241
00:34:03.084 --> 00:34:10.744
There's a theorem or a name for this called Arrow impossibility, which I'm sure you've come across. Yeah, yeah. It's one of the many kind of things we throw around in the paper. [chuckles] Right.

242
00:34:10.944 --> 00:34:22.924
Do, do we just ignore it? Yeah. We just, yeah, just aggregate. Yeah. Yeah. Yeah. I think the reason this really is done on a deep level is that you're not actually trying to model any contestable preference in this.

243
00:34:23.203 --> 00:34:27.504
Like, you're not trying to go into things that are controversial or anything. Yeah.

244
00:34:27.524 --> 00:34:34.944
It, it's really the, the notion of preference is trying to stay around, like correctness and style rather than any meaningful notion of preference, 'cause otherwise- That's right...

245
00:34:34.944 --> 00:34:42.584
these companies, they don't want to do this, [chuckles] like at all. I think that's just how it is. And it's like if you look at what people actually do, so I have a bunch of slides on the feedback interface.

246
00:34:42.904 --> 00:34:47.744
And they all publish this. Uh, it's always at the ap- appendices of every paper. Yeah. It's pretty interesting. Yeah.

247
00:34:47.784 --> 00:35:06.604
There's something later on in this talk which is like, but it's good to mention in this, is when you're doing this preference collection, you write out a very long document of instructions to people that are collecting this data, and it's like, "This is the hierarchy of what we want to prioritize," something about like factuality, helpfulness, honestness, harmlessness.

248
00:35:06.644 --> 00:35:16.604
These are all different things. Every company will rank these in different ways, provide extensive examples. It's like, "If you see these two answers, you should select this one," and why and all of this stuff.

249
00:35:16.744 --> 00:35:23.284
And then my kind of like head-scratching is like, why don't we check if the models actually do these things that we tell the data annotators to collect?

250
00:35:23.424 --> 00:35:28.304
But I think it's because it's hard to make that attribution, and it's hard to test if a model is honest and stuff.

251
00:35:28.524 --> 00:35:37.404
It would just be nice to understand the kind of causal mechanisms as a researcher of like if our goals are met. But at a simple level, what it boils down to, I have a lot more images than I need.

252
00:35:37.444 --> 00:35:45.484
It's like you're having a conversation with an AI, something like ChatGPT. You get shown two responses or more in some papers, and then you have to choose which one is better.

253
00:35:45.804 --> 00:35:55.124
I think something you'll hear a lot in this space is something called a Likert scale. Likert is a name. It's a name for probably some research in economics, decision theory, something.

254
00:35:55.204 --> 00:36:08.564
But essentially, it's a type of scale where if you have integers from like one to eight, the middle numbers will represent something close to a tie, and the smallest numbers will represent one model being way better than the other, and the biggest numbers will be like the other model is better.

255
00:36:08.644 --> 00:36:17.044
So in the case of one to eight, if you're comparing models A to B, if you return a one if you really liked option A, you return eight if you really liked B, and then like a four or a five if they were close.

256
00:36:17.304 --> 00:36:25.188
There's other ways to collect this data. This one's become really popular. We played with it a bit at Hugging Face. It's- Hard to use. Filling out this preference data is really hard.

257
00:36:25.268 --> 00:36:34.128
You have to read, like, multiple paragraphs. It's not for me. Some people really like it, I hear. I'm like, "I can't imagine sitting there and reading AI-generated text and, like, having to do that for my job."

258
00:36:34.348 --> 00:36:45.708
But a lot of these early papers in RLHF have good examples of what was done. The one I have here is from, uh, Anthropic's collection demo 'cause it was from slides that I did with Anthropic.

259
00:36:45.748 --> 00:36:57.108
But you can look up these in the various papers. It looks like ChatGPT with two responses, and then you have an option to say which one is better. It's nothing crazy. The, the infrastructure is almost exactly the same.

260
00:36:57.328 --> 00:37:09.588
But they just log which one you, you think is better. I think places like Scale are also really big in this, where a lot of the labeler companies will help control, like, who's doing how many samples.

261
00:37:10.128 --> 00:37:16.968
You have multiple people go over the same sample once, and, like, what happens if there's disagreement? I don't really think this disagreement data is used for anything.

262
00:37:17.048 --> 00:37:24.508
But it's good to know, like, what the distribution of prompts is, who's doing it, how many samples you have, controlling the workforce. All of this is very hard.

263
00:37:24.768 --> 00:37:28.608
A last thing to add is that a lot of these companies do collect optional metadata.

264
00:37:28.868 --> 00:37:36.148
I think the Anthropic example shows a rating of, like, how good was the prompt or the conversation from good to bad because things matter.

265
00:37:36.188 --> 00:37:49.188
Like, there's kind of a quadrant in preference data in my mind, which is you're comparing a good answer to a good answer, which is, like, a really interesting signal, and then there's kind of the option of you're comparing a bad answer to a bad answer, which is, like, you don't [laughs] like, you don't wanna train your model on- They're both terrible...

266
00:37:49.188 --> 00:37:55.388
two different answers. Yeah. It's like this is why we did this at Hugging Face, and it was like our data was like, "We, like, don't know if we can use this" 'cause a lot of it- [laughs]...

267
00:37:55.428 --> 00:38:03.628
was just bad answer to bad answer- Yeah... 'cause we were, like, rushing to try to do this real contract. And then there's also good answer to bad answer, which I think is probably pretty reasonable to include.

268
00:38:03.668 --> 00:38:12.108
You just prefer the good one and move on with your life. But those are very different scenarios. I think OpenAIs of the world are all in good answer, good answer and have learned to eliminate everything else.

269
00:38:12.148 --> 00:38:20.328
But when we- when people try to do this in open source, it's probably, like, what Open Assistant saw is, like, there's just a lot of bad answers in your preference data and you're like, "What do I do with this?"

270
00:38:20.808 --> 00:38:24.928
Metadata flags can help. I threw in the InstructGPT metadata.

271
00:38:25.328 --> 00:38:38.668
You can see [laughs] how much they collect here and, like, everything from the model fails to actually complete the task, hallucinations, different types of offensive or dangerous content, moral judgment, expresses opinion.

272
00:38:38.848 --> 00:38:41.228
Like, I don't know if exactly if they're doing this now.

273
00:38:41.528 --> 00:38:52.428
But you can kind of see why doing RLHF at scale and prioritizing a lot of different endpoints would be hard because these are all things I'd be interested if I was scaling up a big team to do RLHF and, like, what is going into the preference data.

274
00:38:52.588 --> 00:39:01.308
You do an experiment and you're like, "Okay, we'll remove all the data where they said the model hallucinates. Like, does that... And then retrain everything. Like, what does that do?" Yeah, so hallucination is big.

275
00:39:01.348 --> 00:39:10.388
But some of these other metadata categories, and I've seen this in a lot of papers, uh, is, like, does it contain sexual content? Does it express a moral judgment? Does it denigrate a protected class?

276
00:39:10.448 --> 00:39:20.268
That kind of stuff, very binary. Should people try to adjust for this at the RLHF layer, or should they put it as a pipeline where they have a classifier as a separate model that grades the model output?

277
00:39:20.928 --> 00:39:30.288
Do you mean for training or, like, a deployment? Deployment. I do think that people are doing it at deployment. I think we've seen safety in other things in the RLHF pipeline.

278
00:39:30.588 --> 00:39:36.108
Like, Llama 2 is famous for kind of having this, like, helpfulness and safety reward models.

279
00:39:36.928 --> 00:39:44.448
Deep in the Gemini report is something that Gemini re- has, like, four things, which is, like, helpfulness, factuality, maybe safety, maybe something else.

280
00:39:45.068 --> 00:39:54.488
But places like Anthropic and ChatGPT and Bard almost surely have a classifier after, which is, like, d- is this text good? Is this text bad? That's not that surprising.

281
00:39:54.588 --> 00:40:01.328
I think we could-- because you could use, like, a hundred times smaller language model- Yeah... and do much better at filtering than RLHF.

282
00:40:01.448 --> 00:40:11.228
But I do think it's still so deeply intertwined with the motivation of RLHF to be for safety that some of these categories still persist. Yeah. I think that's something that'll kind of settle out, I think.

283
00:40:11.448 --> 00:40:18.208
I'm just wondering if it's worth collecting this data for the RLHF purpose if you're not gonna use it in any way as a separate model to- Yeah... separate it.

284
00:40:18.208 --> 00:40:26.228
[laughs] I don't think OpenAI will collect all of this anymore. [laughs] But I think for research perspective, it's very exciting to know. But it's also expensive.

285
00:40:26.288 --> 00:40:35.328
So essentially, your preference data scales with how many minutes it takes for you to do each task, and every button is [laughs] like, it scales pretty linearly. Yeah. So it's not cheap stuff to do this.

286
00:40:35.348 --> 00:40:41.688
Can, can we, uh... S- since you mentioned expensiveness, I think you may have joined one of our, one of our spaces back when Llama 2 was released.

287
00:40:41.928 --> 00:40:54.048
We had an estimate from you that was something on the order of Llama 2 costs $3 to 6 million to train GPU-wise, and then it was something like $20 to $30 million in preference data. Yeah.

288
00:40:54.048 --> 00:40:57.568
The- Is that something that's still in the ballpark? Like, I don't need precise numbers. I think it's still a ballpark.

289
00:40:57.648 --> 00:41:05.708
I know that there's the 20 million was off by a factor of four because I was converting from a prompt number to a total data point. So essentially- Ah...

290
00:41:05.708 --> 00:41:16.488
when you do this, you have, if you have multi-turn setting, each turn will be one data point. And the Llama 2 paper reports, like, 1.5 million data points, which could be, like, 400,000 prompts. Yeah.

291
00:41:16.528 --> 00:41:25.308
So I would say, still say, like, 6 to 8 million is safe to say that they're spending, if not more. They're probably also buying other types of data and/or throwing out data that they don't like.

292
00:41:25.348 --> 00:41:34.208
But it's very comparable to compute costs. But the compute costs listed in the paper always are way lower because all they have to say is, like, what does one run cost?

293
00:41:34.268 --> 00:41:40.008
But they're running tens or hundreds [laughs] of runs. So it's like, okay, like [laughs] they- Yeah, it's kind of a meaningless number... it's like a meaningless number. Yeah.

294
00:41:40.268 --> 00:41:51.948
This is the kind- The data number would be more interesting. What's the depreciation of this data? Ooh. You know? It depends on the method. Like, some methods people think that it's more sensitive to the...

295
00:41:51.988 --> 00:41:56.708
This is what I was saying is, like, does the type of instruction tuning you do matter for RLHF?

296
00:41:56.968 --> 00:42:07.968
So, like, depending on the method, some people are trying to figure out if you need to have, like, what is called, like, it's very confusing, it's called, like, on-policy data, which is, like, your RLHF data is from your instruction model.

297
00:42:08.388 --> 00:42:15.108
I really think people in open source and academics are gonna figure out how to use any preference data on any model just because they're scrappy.

298
00:42:15.668 --> 00:42:29.228
But there's been an intuition that to do, like, PPO well and keep improving the model over time and do, like, what Meta did and what people think that OpenAI does, is that you need to collect new preference data to kind of edge the distribution of capabilities forward.

299
00:42:29.528 --> 00:42:37.048
So there's a depreciation where, like, the first batch of data you collect isn't really useful for training the model when you have the fifth batch. Mm-hmm. We don't really know.

300
00:42:37.408 --> 00:42:43.568
But it's a good question, and I do think that if we had all the Llama data, we wouldn't know what to do with all of it. Like- [laughs]...

301
00:42:43.588 --> 00:42:51.548
probably, like, 20% to 40% would be pretty useful for people, but not the whole data set. Like, a lot of it's probably kind of gibberish 'cause they had a lot of data in there.

302
00:42:51.988 --> 00:42:59.580
So do you think, like, the open source community should spend more time figuring out how to reuse the data that we have? Or, like- Generate more data.

303
00:42:59.800 --> 00:43:09.640
I think that's one of the bigger questions- I think people are kind of locked into using synthetic data. People also think that synthetic data is, like, GPT-4 is more accurate than humans at labeling preferences.

304
00:43:09.680 --> 00:43:15.520
So if you look at these diagrams, like, humans are about 60 to 70% in agreement. Or like, that's what the models get to.

305
00:43:16.060 --> 00:43:26.440
And if humans are about 70% a- agreement or accuracy, like, GPT-4 is, like, 80%, so it is a bit better [chuckles] which is, like, in one way of saying it. Like, humans don't even agree with humans, uh- Yeah...

306
00:43:26.460 --> 00:43:35.300
50% of the time. [chuckles] Yeah, so like, that's the thing is, like, the human disagreement or the lack of accuracy should be, like, a signal. But how do you, how do you incorporate that?

307
00:43:35.360 --> 00:43:40.720
It's really tricky to actually do that. I think the people just keep using GPT-4 'cause that's really cheap.

308
00:43:40.780 --> 00:43:56.620
It's one of my, like, go-to, like, I just say this over and over again, is like, GPT-4 for data generation, all terms and conditions aside because we know OpenAI has this stuff, is, like, very cheap for getting pretty good data and compared to compute or salary of any engineer or anything.

309
00:43:56.620 --> 00:44:04.320
Right. So it's like, tell people to go crazy generating [chuckles] GPT-4 data if you're willing to take the organizational, like, clout of should we be doing this.

310
00:44:04.360 --> 00:44:09.660
But I think most people have accepted that you kind of do this, especially individuals. Like- Yeah... they're not gonna come after individuals.

311
00:44:09.740 --> 00:44:21.680
I do think more companies should think twice before doing tons of OpenAI outputs, also just 'cause it's the data contamination and what it does to your workflow is k- probably hard to control at scale.

312
00:44:21.920 --> 00:44:27.740
And we should just mention, uh, at the time of recording, we've seen the first example of OpenAI enforcing their terms of service.

313
00:44:28.220 --> 00:44:37.720
Uh, ByteDance was caught, uh, reported to be training on GPT-4 data, and they got their access to OpenAI revoked. So that was one example. Yeah. I don't know if you have a comment on that.

314
00:44:37.780 --> 00:44:46.120
I don't expect OpenAI to go too crazy on this 'cause they're just gonna, there's just gonna be so much backlash- There's-... against them. Everyone's doing it, yeah. And like, everyone's gonna do it anyways.

315
00:44:46.480 --> 00:44:56.160
And, and what's at stake here, to spell it out, is like, okay, let's, let's, like, cost $10 to collect one data point from a human. Uh, it's gonna cost you, like, a 10th of a cent with OpenAI, right? Yeah.

316
00:44:56.200 --> 00:45:03.080
So, like, it's just orders of magnitude cheaper and therefore people are just gonna do it. Yeah, and it's like the signal you get from humans is from preferences isn't that high.

317
00:45:03.120 --> 00:45:08.300
The signal that you get from humans for instructions is pretty high, but it is also very expensive.

318
00:45:08.339 --> 00:45:13.700
So, like, the human instructions are definitely, like, by far and away the best ones out there compared to the synthetic data.

319
00:45:13.940 --> 00:45:20.180
But I think, like, the synthetic preferences are just so much easier to get some sort of signal- Yeah... running with, and you can work in other...

320
00:45:20.240 --> 00:45:29.020
I think people will start working in other goals there between safety and whatever. That's something that's taking off, and we'll kind of see that, I think, in 2024 at some point.

321
00:45:29.060 --> 00:45:36.900
People will start doing things like constitutional AI for preferences- Yeah... which will be pretty interesting. I think we saw how long it took RLHF to get started in open source.

322
00:45:37.320 --> 00:45:43.940
Uh, instruction tuning was, like, the only thing that was really happening until maybe, like, August really. I think Zephyr was the first model that

323
00:45:44.860 --> 00:45:53.320
showed success with RLHF in the public, but that's a long time from everyone knowing that it was something that people are interested in to having any, like, check mark.

324
00:45:53.540 --> 00:46:01.520
So I accept that and think the same will happen with constitutional AI. But once people show that you can do it once, they continue to explore. Excellent.

325
00:46:01.980 --> 00:46:12.200
Just in the domain of human preference data suppliers, uh, Scale AI very happily will tell you that they, they supplied all that data for Llama 2. The other one is probably interesting, LMSYS from Berkeley.

326
00:46:12.600 --> 00:46:19.700
The, what they're running with Chat Arena is perhaps a good store of human preference data. Yeah, they released some toxicity data.

327
00:46:19.740 --> 00:46:28.000
They, I think, are generally worried about releasing data because they have to process it and make sure everything is safe, and they're a really lightweight org. I think they're trying to release the preference data.

328
00:46:28.060 --> 00:46:37.000
I have-- If we make it to evaluation, I'd pretty much say that Chat Arena is the best limited evaluation that people have to learn how to use language models, and, like, it's very valuable data.

329
00:46:37.500 --> 00:46:41.240
They also may share some data with people that they host models from.

330
00:46:41.540 --> 00:46:48.460
So, like, if your model is hosted there and you pay for the hosting, you can get the prompts because you're pointing the endpoint at it, and that gets pinged to you, and- Mm-hmm...

331
00:46:48.640 --> 00:46:57.700
your, any real LLM inference stack saves the prompts that you get. So, like, that is some signal. I don't know if the shared preference is. I do think they're trying to. They're trying to do all the right things.

332
00:46:57.780 --> 00:47:04.300
They're just very strapped, and moving data comes with other, like, legal and liability concerns in some, some cases. Awesome.

333
00:47:04.540 --> 00:47:10.220
So kind of looping back a little bit from that very valuable digression on, like, what preference data is.

334
00:47:10.680 --> 00:47:17.300
So we're talking about the actual loss function because it's kind of like this classifier approach that might not make too much sense to people.

335
00:47:17.800 --> 00:47:22.320
You take a language model, and you chop it into pieces a little bit at the end so that it outputs one number.

336
00:47:22.680 --> 00:47:30.880
It's like, uh, in technical level, it's a logit that corresponds to the probability that we talked about earlier. But in order to train this, you can't just have, like, prompt and completions.

337
00:47:30.940 --> 00:47:34.320
You need to have these pairs because we talked about scalers don't really work.

338
00:47:34.740 --> 00:47:44.280
So in order to train it, you use the magical batching of all language model, all deep learning architectures, and you put in the chosen prompt and the rejected prompt at the same time, and then you end up with two numbers.

339
00:47:44.520 --> 00:47:53.600
And then there's this fun loss function, and you essentially have to increase the difference between these two predicted numbers. It's always fun when you think about, like, automatic differentiation.

340
00:47:53.660 --> 00:48:02.320
It updates the same parameters to, to kind of separate these two numbers at once. And there's this loss function that you'll see in OpenAI, Anthropic, and everyone's papers.

341
00:48:02.860 --> 00:48:09.440
What it looks like is it's, like, some log of a scaler with an exponential that's the difference between these two predicted rewards.

342
00:48:09.940 --> 00:48:18.880
It's just some fancy math around a difference, a subtraction between the predicted reward for the rejected completion and the predicted reward of the chosen completion.

343
00:48:19.260 --> 00:48:26.280
Fun fact is that these loss functions look different in Anthropic and OpenAI's papers, but they're just literally just log transformed.

344
00:48:26.340 --> 00:48:35.000
So if you start, like, exponentiating both sides and taking the log of both sides, both the two papers end up being the same thing. And people don't know how to train preference models particularly well now.

345
00:48:35.180 --> 00:48:53.680
I think if you zoom into any of the details to look at, like, the agreement number, so how if you look at a test set, you'll have a chosen and rejected, and you can take the reward model you're training, pass in those completions, and you see if the chosen predicted reward, so the scaler number, is higher than the rejected predicted reward.

346
00:48:53.900 --> 00:48:59.380
And this is the agreement numbers in all of these datasets is, like, that where you see they have the 65 to 75% agreement.

347
00:48:59.420 --> 00:49:08.720
This just means that, like, these scaler numbers were ordered correctly, and that's a pretty low number. It's not gonna get to 100%. That goes to show the kind of, like, deep questions at play here.

348
00:49:09.000 --> 00:49:17.680
People are playing with different loss functions, ensembles, different models to try to address this, but it's really a fundamental issue. It's like, it goes back to, like, what does it mean to do RLHF?

349
00:49:17.880 --> 00:49:23.220
And we're not gonna answer that now, but it's good to know that, like, this 65 to 75% agreement, you'll see these numbers everywhere.

350
00:49:23.260 --> 00:49:32.940
It's like we don't have 100% agreement with the reward model and the data, and that's fine. That's just where we're at. And we essentially take this model, and then we start throwing RL at it.

351
00:49:33.080 --> 00:49:42.100
I think PPO, proximal policy optimization, it's pretty complicated compared to what you really need to know. It really just does RL under the hood.

352
00:49:42.620 --> 00:49:54.320
Things like PPO, it learns a value function, and then it uses the value function to update the model. If you actually look at, like, a feedback diagram, more of, like, a systems problem than an RL problem.

353
00:49:54.540 --> 00:49:59.920
So you'll see things like you need to have two copies of the language model. This is for the KL constraint that we talked about before.

354
00:49:59.980 --> 00:50:04.960
You need to have the reward model, which is either a separate reward model or a value head on your base model.

355
00:50:05.280 --> 00:50:10.000
And then you need to have your, like, RL code that actually learns a value function and updates all the parameters.

356
00:50:10.140 --> 00:50:17.120
I think it just is really messy to actually set up, but if you dig into it, most people could understand what each of the components are.

357
00:50:17.160 --> 00:50:22.860
And then the hard parts are, like, how do we actually make a language model that works out of this, which is not something that people know that well.

358
00:50:22.960 --> 00:50:32.400
I think things that I talk about a lot is just like, okay, like, what is the signal flow? How do you access the reward model? The reward model is used in RLHF exactly what you would think.

359
00:50:32.440 --> 00:50:42.552
You have a prompt The language model generates a completion, and then that completion is given a score. That score gets plugged into the whole RL stuff, then it updates the parameters. That's kind of the core of it.

360
00:50:42.772 --> 00:50:52.852
There's a lot of different things like zooming in on where exactly you put this distance penalty between the base model and the RL model. Most people say that you just deduct it from the reward.

361
00:50:52.932 --> 00:51:02.972
So like if you go all the way back to, like, RL as an agent acting in the world, the reward from that world would be a combination of the reward model and any constraints like KL that you put on it.

362
00:51:03.432 --> 00:51:12.292
There's a lot of different ways to do this 'cause a lot of RL algorithms like PPO actually have a KL constraint built into them. So it's confusing 'cause you hear KL twice, but those are different KLs.

363
00:51:12.452 --> 00:51:18.372
One of them is about the text, and one of them is about the value function distance or the policy distance or something like this. So those are different.

364
00:51:18.632 --> 00:51:27.112
It really ends up being kind of like gibberish that I think is less important now 'cause [chuckles] it's more about data and infrastructure than RL details than, like, value functions and everything.

365
00:51:27.472 --> 00:51:30.672
A lot of the papers have different terms in the equations.

366
00:51:30.752 --> 00:51:38.932
I think Instruct GPT does something where they, like, try to get the RL model to match the instruction tuning dataset 'cause they were really happy with that dataset to constrain the distribution.

367
00:51:39.272 --> 00:51:49.632
Llama does some different things, but I think these are all small gains over just getting the deep understanding of the data in the infrastructure setup. This is why we say it's, like, so little RL.

368
00:51:49.692 --> 00:51:59.992
It's like w- now we're getting to the point where you don't even really need this to get a good model. So that's why it's like, okay, the RL is such a small part of the actual [laughs] like doing RLHF.

369
00:52:00.032 --> 00:52:06.212
Like RLHF is a metaphor for, like, all language model adaptation, and RL is one tool used at one point in the time.

370
00:52:06.752 --> 00:52:15.612
So that's kind of where I wrap up, like, the core overview in my mind to say, like, RL doesn't really do as much as people think, but you could put up flashy equations and do all sorts of stuff if you want to.

371
00:52:15.652 --> 00:52:23.912
It's just, like, I think it's kind of misleading even 'cause I don't think about those equations on a regular basis. [laughs] But what if we call it Q star? [laughs] Yeah.

372
00:52:23.932 --> 00:52:38.432
[laughs] So i- in your mind, is the takeaway for this kinda next generation of people working on models maybe the underlying theories is less important than actually getting good data basically?

373
00:52:38.712 --> 00:52:40.012
Yeah, I think it's getting good data.

374
00:52:40.032 --> 00:52:49.372
And we'll see, like, I have this, like, advanced topics thing in the slides which it starts with the vals, and then it talks about a lot of different ways that people are using reward models or constructing training signals really.

375
00:52:50.072 --> 00:53:00.712
And I think that's, like, about understanding what your information flow is and, like, if your reward signal is good and, like, if your language model is generating right, like zooming in on the tokens it's generating- Mm-hmm...

376
00:53:00.832 --> 00:53:09.292
and kind of understanding how those things change over time. Like, this is something we could also talk about evaluation, but it's really, like, RLHF has not that shown to improve capabilities yet.

377
00:53:09.352 --> 00:53:12.372
I think one of the fun ones is from the GPT-4 technical report.

378
00:53:12.412 --> 00:53:24.832
They essentially listed their kind of bogus evaluations 'cause it's a hilarious table 'cause it's like LSAT, AP exams, like [laughs] and then, like, AMC 10 and AMC 12 are, like, kind of reasonable vals in language model land.

379
00:53:25.212 --> 00:53:31.132
But they just showed that, like, RLHF doesn't improve their evaluation metrics. We don't know if internally they have other ones. They probably do.

380
00:53:31.172 --> 00:53:40.652
But from what OpenAI has shown us externally, like, RLHF improves some metrics. It decreases some metrics. No one could really see. I do think it, it does things that they care about.

381
00:53:41.212 --> 00:53:47.592
But it's like RLHF is not an easy tool to make numbers go up with. It's a, it's a powerful tool to change your language model.

382
00:53:48.152 --> 00:53:57.552
But, like, as we've seen with Llama and safety RLHF, like, that doesn't always mean that people are gonna be happy with those changes, or it's gonna do exactly what you want. It's like- Well, I think this is intuitive.

383
00:53:57.592 --> 00:54:05.152
Like, a lot of these tests are multiple choice, and RLHF isn't necessarily intended to improve your multiple choice reasoning capabilities. Yeah.

384
00:54:05.212 --> 00:54:12.852
I, I think it is reasonable, but I don't think a lot of people have, like, connected the dots there and, and, like, what is it in a preference point.

385
00:54:12.892 --> 00:54:22.252
Like, what if your preference data was between a correct and a wrong answer? Like, it could conceivably do it, but I just don't think that it is remotely what it is actually doing.

386
00:54:22.572 --> 00:54:32.332
It's, uh, much better being a sommelier. Yeah. [laughs] That was the weirdest one that was included in the GPT-404. Yeah, dude, I just see that. The last three down there. That's really funny.

387
00:54:32.472 --> 00:54:38.612
[laughs] Can't even taste it, you know? Just can't taste it. [laughs] Like- Cool. Uh, emerging directions. Yeah.

388
00:54:38.672 --> 00:54:46.092
So this is essentially how to use RLHF-like things to make the model better without using PPO because PPO is kind of a nightmare to scale.

389
00:54:46.592 --> 00:54:50.952
The first thing that I started with is kind of the thing- ideas of rejection sampling and best event sampling.

390
00:54:51.072 --> 00:55:01.572
I think best event sampling is what people often encounter first, which is the idea of you take a prompt, you generate like 10, 20 responses to it. You pass it through a reward model.

391
00:55:01.772 --> 00:55:07.672
The reward model assigns a scalar for each of them. You pick the one with the highest number, and that's the one you answer the question with.

392
00:55:07.892 --> 00:55:14.212
It seems pretty logical to people 'cause it's just spending more inference time compute to make your outputs better, and it works in a lot of things.

393
00:55:14.732 --> 00:55:22.112
This let's verify step-by-step paper that I talked about from OpenAI, they use it. Lots of papers use it. It's just kinda like a good thing to know that you can do.

394
00:55:22.152 --> 00:55:32.832
You can spend more inference compute based on a preference dataset to make your answers better. The interesting thing that people are confused about more is rejection sampling 'cause Meta talked about it in Llama 2.

395
00:55:33.472 --> 00:55:45.992
Essentially, a rejection sampling is putting something like best event sampling in a feedback loop, and instead of just returning the best answer to a user, you take the best few answers, and then you apply instruction tuning on that dataset.

396
00:55:46.152 --> 00:55:53.732
And then you, like, you do the instruction tuning, and then you can collect more preference data, do a new reward model, and then you rank some new outputs, and you do instruction tuning again.

397
00:55:54.092 --> 00:55:59.352
So essentially, like, Llama started their RLHF process with this to get some signal out of preference data.

398
00:55:59.552 --> 00:56:08.352
That preference data went into a reward model, and then the reward model did a good enough ranking that it was, like, essentially super powered instruction tuning based on rewards.

399
00:56:08.812 --> 00:56:16.352
Works pretty well, much easier to implement than PPO because you can use it in all of your kind of like it's still instruction tuning, so it's the same autoregressive loss.

400
00:56:16.412 --> 00:56:25.752
It's easy to plug into things like transformers and stuff like that. A lot easier to start with than whatever freaking mess doing RL at scale is gonna be. So that's one.

401
00:56:26.372 --> 00:56:37.772
A quick nod that offline RL is something that people talk about for RLHF essentially because your model doesn't have to generate. In that case, you look at data, and it back propagates through your reward model directly.

402
00:56:37.912 --> 00:56:43.072
So in PPO, you have the step of, like, needing to generate everything and passing it through the reward model.

403
00:56:43.432 --> 00:56:57.696
How offline RL essentially works is that all of this is kind of just done in one big dataset [laughs] where it's just like, I'm not an expert in this, but essentially you need- you do Much less inference costs during the RLHF process if you do offline RL.

404
00:56:58.136 --> 00:57:02.396
There's a few papers that people have published. Not a lot of traction. I think it could take off.

405
00:57:02.476 --> 00:57:11.996
Some people that I know in the RLHF area really think a lot of people are doing this in industry just because it makes the kind of training process simpler in the number of things you have to have running.

406
00:57:12.676 --> 00:57:23.896
Different feedback types are probably gonna come into play. There's papers like wr- written feedback or labeling multiple scores or multiple pairwise preferences for every completion. That's coming.

407
00:57:24.336 --> 00:57:32.476
It's also kind of related to what we mentioned in process reward models where you get- you're labeling each step in the chain of thought reasoning just to kind of make the problem more specific.

408
00:57:32.676 --> 00:57:41.676
It seems very likely that different feedback will be used for different domains. Chain of thought reasoning is great for math, and that's where these process reward models are being designed.

409
00:57:42.176 --> 00:57:51.936
Probably not great for things like poetry. But as any tool gets better, it gets more specific. Then kind of get into more of a talking point, which I think is fun. The next one I have is constitutional AI.

410
00:57:52.096 --> 00:57:55.256
I think this is something that people really just kind of misunderstood.

411
00:57:55.316 --> 00:58:06.156
I mean, like, I think most people thought that constitutional AI was doing something where it's, like, created the preference data based on the specific principles in some way, where it's like...

412
00:58:06.496 --> 00:58:11.336
Like, I don't-- like, what did you two think of constitutional AI? Yeah, I'll, I'll be the, you know, dumb person and you correct me.

413
00:58:11.836 --> 00:58:21.916
As far as I understood, Anthropic came out and said that the best way of generating this sort of preference data or alignment is give a second model a constitution to evaluate the first model's outputs. Yeah.

414
00:58:21.956 --> 00:58:28.536
The, the, the constitution is unspecified, but it, like, this draws from, like, the UN Declaration of Human Rights and, and, and the Apple terms of service for some reason.

415
00:58:28.616 --> 00:58:36.676
Yeah, and this leads into the question is of, like, what is the other model evaluating and, like, how is it evaluating in a way that you can train on? And that's what I mean. It's like people didn't think about this.

416
00:58:37.076 --> 00:58:49.276
A lot of the CAI paper was actually talking about instruction tuning, which is if you have an instruction, you then have a language model that critiques the instruction based on principles, and then your instruction responses are closer to the constitutional principles.

417
00:58:49.316 --> 00:58:55.216
This was the first half, which is like they have some acronym for all of this. The, the diagram in their paper is wild in this one.

418
00:58:55.796 --> 00:59:02.795
I think their papers are sometimes pretty funny 'cause they're, they're not capabilities papers. They're like alignment papers. So, like, they don't make everything super clear.

419
00:59:03.096 --> 00:59:08.836
So the first half of constitutional AI is fine-tuning your com- instructions based on principles. So that's one half.

420
00:59:08.876 --> 00:59:17.036
And then the second half is what people really thought that they knew, which is, like, how do you use these other model to provide a critique based on principles?

421
00:59:17.256 --> 00:59:29.216
And in the paper, they list essentially, they, like, say what their prompt was, which is, like, for the synthetic feedback for generating new preferences, which is essentially, like, pick between these two answers based on this principle.

422
00:59:29.596 --> 00:59:46.456
So they're kind of sampling from the principles in their constitution and from kind of A, B, like two options of completions, and then the AI model is essentially given the context of a certain principle to pick the A or B preference, and then that's a new preference dataset.

423
00:59:46.496 --> 00:59:50.076
It's just the two completions without the context of the principles.

424
00:59:50.616 --> 01:00:01.156
So with this kind of, like, sampling idea, they're sampling from, like, 30 principles and a wide dataset of two candidate completions across different prompts. So to me, it's a very, like, loose...

425
01:00:01.216 --> 01:00:05.756
Like, the values are not explicit in this. It's just kind of how they're guided.

426
01:00:06.156 --> 01:00:14.356
It's a very machine learning-y approach 'cause it is relying on averages and scale to get the principles in there, but it is way less explicit than I thought it was gonna be.

427
01:00:14.516 --> 01:00:21.256
I kind of thought there was this, like, feedback thing in the preference data where it, like, checked to see if the principles were satisfied or anything like this.

428
01:00:21.656 --> 01:00:34.176
It's really just, like, a modification to the RLHF setup that we've talked about with instruction tuning and preference data collection, where there's an AI model providing critiques, and a lot of those critiques are based on, like, sampling of constitutional values.

429
01:00:34.536 --> 01:00:42.516
It almost sounds more tractable in that way, but I, I would also guess, while I just, like, say, like, "Oh, look, I figured it out," I'm guessing they do different things than they said in the paper.

430
01:00:42.616 --> 01:00:50.236
Like, this paper is in from 2022. It's a pretty old paper. They're surely doing more. But it's good to know, like, where they started at least- Yeah... in this case.

431
01:00:50.556 --> 01:01:02.996
I thought the communication around the Pareto optimal improvement was helpful i- in understanding that, uh, you do actually want it to be more helpful and honest while maintaining the same level of harmlessness or something like that.

432
01:01:03.116 --> 01:01:04.116
Yeah. Right? Yeah.

433
01:01:04.176 --> 01:01:14.875
So that figure right at the top of the constitutional AI paper is worth seeing if you don't have it immediately pop into your head, where they essentially compare, like, constitutional AI to other RLHF that they're doing internally.

434
01:01:15.156 --> 01:01:20.716
And something that most RLHF papers don't do is, like, they have little dots on the lines to indicate intermediate checkpoints.

435
01:01:21.056 --> 01:01:30.036
It'd be really great to see more RLHF papers kind of showing, like, how per epoch or per half epoch of training, because most RLHF is only a few epochs, at least- Mm-hmm...

436
01:01:30.276 --> 01:01:39.796
in the open models, like what is happening there. People release checkpoints, but, like, that's how we should be thinking about it because the optimizer is so strong, and it's like we don't know what's happening- Yeah...

437
01:01:39.836 --> 01:01:41.036
in this kind of intermediate land.

438
01:01:41.416 --> 01:01:51.256
I don't know if this, uh, is a relevant comparison for you, but OpenAI also recently released a weak-to-strong generalization paper where they actually talked about a few intermediate checkpoints for GPT-4.

439
01:01:51.416 --> 01:01:56.836
Any comments on the comparison between constitutional AI and weak-to-strong generalization? I didn't see the paper.

440
01:01:56.936 --> 01:02:07.636
I think that I saw people criticizing it for, like, just being, like, safety washing [chuckles] from the fact that they're, like, talking about GPT-2 still, which is such a kind of, like, odd model to focus on.

441
01:02:07.736 --> 01:02:14.596
I didn't really look at the paper. Had it lying around. I mean [laughs] So it's like, I think that it's the thing with OpenAI, it's like they're sharing less than they know. Mm-hmm.

442
01:02:14.636 --> 01:02:20.696
So I think they probably have things that are pretty cool that they're doing [chuckles] internally. And I- So I'll, I'll summarize for listeners- Yeah...

443
01:02:20.776 --> 01:02:23.736
who may not have seen the paper because, you know, it's impossible to keep up on everything.

444
01:02:24.196 --> 01:02:34.496
I do think that what constitutional AI and RLAIF represents is that we are starting to come to a point where it's just impossible for manual human preference data collection to scale.

445
01:02:34.756 --> 01:02:42.276
And the only way to scale this is to trust our AI overlords to [laughs] to model our human preferences. And constitutional AI was the first version of this.

446
01:02:42.756 --> 01:02:50.956
What the second version or what weak-to-strong is, is that anticipating a future of the need for super alignment, where the, the thing that we're trying to control is smarter than us.

447
01:02:51.556 --> 01:03:02.916
So you take GPT-2 and try to use GPT-4 to teach it to be smarter than, than itself because, uh, this is what we're gonna have to do in the future as well when we are not-- we're no longer fully in control.

448
01:03:03.296 --> 01:03:12.436
Are we the metaphorical GPT-2 or is- No. Okay. We're, we're, like, not even in the process anymore- Okay. Okay... at, at, at the point of super intelligence. They're prepping. And [laughs] Yeah...

449
01:03:12.476 --> 01:03:20.296
and they're saying this will happen, and humans will be, like, so far out, like, in the dust that we just, like, have no say in this debate. How do we still control systems then?

450
01:03:20.616 --> 01:03:30.916
And weak-to-strong generalization seems to be the answer. And I see a lineage from constitutional AI to this thing. Uh, yeah. The constitutional AI and the super alignment is, like, very conceptually linked.

451
01:03:30.956 --> 01:03:38.956
It's like a group of people that has, like, a very similar intellectual upbringing, and they work together for a long time- Yeah... like, coming to the same conclusions in different ways.

452
01:03:39.216 --> 01:03:41.896
And I understand the argument, and I, I mostly just don't...

453
01:03:42.256 --> 01:03:53.496
I think they're just waiting to see more from the super alignment team because I just didn't really put it together in my brain quickly looking at weak-to-strong generalization of, like, exactly how it all fits, but I'm also not a safety researcher.

454
01:03:53.696 --> 01:04:01.916
Yeah. But I think that could be feedback for them. It's like I understand what synthetic data means in all of this. It's like how could they communicate that a little bit more specifically in this context?

455
01:04:02.320 --> 01:04:04.200
'Cause, like, I wanna know what they think about this.

456
01:04:04.200 --> 01:04:13.560
[laughs] Which is why I like that Pareto optimal thing because it steers debate away from X risk to, like, no, like, this makes language models more useful, and we can all get behind that. I agree.

457
01:04:13.940 --> 01:04:21.700
I think the last kind of emerging direction that I have might just be, like, this debate that you can control how long we talk about this, which is about direct preference optimization. DPO.

458
01:04:21.700 --> 01:04:35.060
[laughs] You could go read my blog post on this. I had tried to summarize this already, but essentially DPO is a different class of algorithms. I still call it RLHF because RLHF is so vague in how it's defined.

459
01:04:35.140 --> 01:04:41.280
I think DPO is closer to RLHF than RLHF is to RL. You can unpack that if you need to. [laughs] need to.

460
01:04:41.320 --> 01:04:57.020
But what DPO is doing is essentially deriving a optimal reward function from the preference data, where the preference data is the same thing that we've talked about, and then the clever math in the paper emerges optimal policy to that based on an implicit reward function that's a ratio of, like, log probs.

461
01:04:57.080 --> 01:04:58.020
It's very odd.

462
01:04:58.060 --> 01:05:13.280
Like, the difference between what a DPO reward is and a classifier reward is very different, where, like, the classifier is trained to output a scalar value based on this kind of, like, contrastive like loss, where DPO is purely based on, like, the difference between two log prob ratios.

463
01:05:13.340 --> 01:05:20.360
So the reward there is the ratio between, like, the policy generation likelihood and the base model generation likelihood.

464
01:05:20.600 --> 01:05:25.120
I don't have intuitions for what that means yet, but, like, what the reward actually is is very different.

465
01:05:25.340 --> 01:05:31.140
The data starting point in principle could be the same, and I think, like, we've seen a lot of successes in open source with it.

466
01:05:31.200 --> 01:05:38.160
It's way simpler to implement and to work with in that regard, which is why I think we'll keep seeing a lot of success with it in the short term.

467
01:05:38.220 --> 01:05:47.780
I think we'll keep seeing DPO models for the time being, but we won't really answer, like, what the fundamental differences are because it, like, depends on your data. It depends on your infrastructure.

468
01:05:48.340 --> 01:05:57.700
Rumors seem to be that people still think that PPO-like methods or other RL methods have a, like, higher top end, but I don't necessarily think, like- What-- Sorry, what is top end?

469
01:05:57.760 --> 01:06:00.960
Just, like, the absolute best model you could get. I see. So, like- I see...

470
01:06:01.000 --> 01:06:08.360
Google and OpenAI aren't using DPO because they could do something more complicated, but, like, that's not what academics and open source people really care about.

471
01:06:08.400 --> 01:06:13.580
They care about, like, being able to improve on their methods and understand where to, like, iterate the models and kind of work off of each other.

472
01:06:13.640 --> 01:06:21.200
So, like, I- in a lot of ways, I think DPO still will be what people see, but, like, [laughs] in some ways it's probably, like, slightly more constrained.

473
01:06:21.580 --> 01:06:28.680
There's other ways that you could think of PPO, like, working nicely in code, where it's like if your code runs is the score that you give it.

474
01:06:28.900 --> 01:06:34.140
You have to generate-- like, you have to kind of do canned things to get DPO to have the same data.

475
01:06:34.380 --> 01:06:42.060
So there are specific cases where, like, the DPO formulation is a little bit harder, but I expect to see more DPO models than anything else in the next six months.

476
01:06:42.140 --> 01:06:46.920
That's probably, like, what most people [laughs] need to know unless they're an RLHF expert and, like- Mm-hmm...

477
01:06:47.380 --> 01:06:54.440
I would love to learn more about PPO and a lot of the authors in this space from the DPO authors who are great to talk to. You could reach out to all three of them.

478
01:06:54.740 --> 01:07:03.060
So as of time of recording, we actually about to publish our NeurlPS recap where we talk to the authors. Yeah. So like- Uh, so for people who are listening to this in the future, you can refer to that episode. Yeah.

479
01:07:03.160 --> 01:07:13.640
So, like, Raphael, Eric, and Archit, I've talked to all of them at good length, and they're all fantastic. And it's like they'll say similar things, and they'll also defend their method because it's an awesome paper.

480
01:07:13.700 --> 01:07:25.260
Like, the-- if you wanna learn how, like, a good math, like a kind of mathy but still experimental paper in language models is, like, the DPO paper is a really good one to spend more time on. Yeah.

481
01:07:25.640 --> 01:07:31.220
When I asked them questions about it, they just kind of gestured at the p- poster and said, "Look at the equation. Just stare at it, and you'll see." [laughs] Yeah.

482
01:07:31.220 --> 01:07:36.160
That's my, that's my criticism for them is, like, they- [laughs] Like what? Yeah.

483
01:07:36.200 --> 01:07:45.020
They're a little-- They're still in the academic world where some of their answers reflect that, but I've done it enough with them that I understand what they're saying. [laughs] Yeah, yeah.

484
01:07:45.200 --> 01:07:53.640
I will say, like, it does remind me of flash attention a little bit in the sense that, like, it kind of an equivalent thing to the thing it's replacing, and it's just faster, cheaper. It's just better in every way.

485
01:07:53.680 --> 01:07:55.640
It's a very different optimization tool. Yeah.

486
01:07:55.640 --> 01:08:11.580
[laughs] There's-- It was essentially the thing in my mind that I can't get past is the difference between the control you get in training a reward model and then training a policy because essentially everything you want your reward model to do might not be everything that you train the policy to do in the RLHF step where you have, like, these two different prompt distributions.

487
01:08:11.600 --> 01:08:15.580
Mm-hmm. But with DPO, you're doing both at once, so you don't control that. Mm-hmm.

488
01:08:15.640 --> 01:08:27.720
And we don't know if you have fancy engineering abstractions and, like, test your reward model to do different things if that separation is really important, and I think that's where this, like, benefit at the absolute biggest scale and most investment could come from.

489
01:08:27.960 --> 01:08:37.340
But your DPO is one update. Like, it is one model. You can't separate that. So, like, that's the thing to know. Probably doesn't matter for most people, but it, it is very different.

490
01:08:37.360 --> 01:08:43.660
And, like, I was asking somebody who was on some of those earlier OpenAI papers that's not at OpenAI anymore, and they were like, "I wish we had thought of that."

491
01:08:43.860 --> 01:08:54.620
So, like, it is a really cool idea, and, like, that's the type of thing that academia still can do and- Mm-hmm... and can do really well and hopefully continues to do. Yeah.

492
01:08:55.040 --> 01:08:58.400
One thing I wanted to make sure I cover before, uh, we leave this topic.

493
01:08:58.720 --> 01:09:07.320
You know, o- one of the DPO models that were trained, apart from Zephyr and Mixtral, which is, uh, two of the more high-profile ones, is Tulu from the Allen Institute.

494
01:09:07.380 --> 01:09:15.280
And y- you want a few people maybe placed to explain- Yo, this is so funny. [laughs]... like, maybe, maybe, like, what's Allen Institute doing here- Yeah... and, like, you know, what's g- what's the backstory? Yeah.

495
01:09:15.340 --> 01:09:23.860
So the Allen Institute for AI is, I think, the 10-year birthday is in January. There's a special event for that. But also, like, people should know this is Paul Allen from Microsoft. Yeah. Yeah.

496
01:09:23.900 --> 01:09:30.300
Paul Allen owns everything in Seattle. [laughs] Not li- not literally. I mean, he's passed, and his estate is still operating in a lot of great ways.

497
01:09:30.360 --> 01:09:42.060
But the Allen Institute is mostly known as being, like, a super academic lab where they have more resources than academia and publish, like, hit after hit of research paper, and they're trying to move more in the direction of releasing models.

498
01:09:42.120 --> 01:09:48.320
And this is part of why I joined. It's like talking with the new CEO, Ali Farhadi. I don't know if I pronounced the last name right.

499
01:09:48.760 --> 01:10:04.096
But he's trying to move from a org that does papers Only to something that does papers, releases models, is active in policy, maybe is like helping work with these for-profit institutions that don't have like an established place where they could all go through to do things.

500
01:10:04.156 --> 01:10:06.216
So they're really trying to expand the scope.

501
01:10:06.276 --> 01:10:19.256
It's part of why I joined and like the Tool two model is the type of thing I joined and they were talking about this and I was like, "Okay, we should just train it and release it because no one has done this direct preference optimization at a scale of like a really like seventy billion parameter scale."

502
01:10:19.656 --> 01:10:24.156
And this experiment is hilarious. This is like classic of like everything kind of works right now in ML.

503
01:10:24.156 --> 01:10:29.956
[laughs] Like I showed up and the grad student, Hamish Ivison, and my- I need to learn how to pronounce last names better.

504
01:10:30.056 --> 01:10:38.396
But he had some JAX DPO code built on this easy LLM framework, and we have the TPUs that we could access for research purposes. So it's like, okay, we have a huge TPU.

505
01:10:38.456 --> 01:10:46.056
It's like, let's just try the Zephyr recipe on seventy billion parameters, and it's literally like the first run. It's like we did no ablations, didn't change any parameters.

506
01:10:46.076 --> 01:10:55.056
[laughs] We just copied them all over and like that's the model that people have been working with, is like that goes to show that there's a lot of runway and understanding and improving on this.

507
01:10:55.116 --> 01:11:05.796
It's like we took the same data and just took it to a different JAX implementation and scaled it up ten X and it still returned a model that was pretty good. It's like on benchmarks and in people using it.

508
01:11:06.456 --> 01:11:13.416
So let's say it's like th- twenty twenty-four- Mm... we'll be busy in the space as we do, like we're running data ablations to try to understand what's best.

509
01:11:13.456 --> 01:11:24.056
The Allen Institute is pre-training language models or pre-training like open language models where we'll be able to share like data code, everything like kind of horn that everyone likes to get annoyed about these days.

510
01:11:24.096 --> 01:11:32.356
It's like, well, I'm not releasing data. So that'll come in the new year and then things like Tool two or the recipes that we will apply to that. And we'll kind of keep doing both.

511
01:11:32.496 --> 01:11:42.036
As the pre-trained models get better, those will probably become more of a priority, but like starting pre-training is very hard. So it's like you still wanna learn from Llama two and Llama three. So that's fun.

512
01:11:42.436 --> 01:11:54.116
I think DPO releases are kind of becoming expected because Mistral released a DPO model as well. There's a ton. There's like Intel releases DPO models, Stability releases DPO models.

513
01:11:54.376 --> 01:11:58.976
At some point you just have to accept that that's where we're going, whether or not you care about the whole like DPO debate.

514
01:11:59.476 --> 01:12:06.316
And that's why I find it so funny because there's really interesting like debatable questions between DPO and other RL methods, but we just won't have the answer.

515
01:12:06.936 --> 01:12:14.236
And it'll look like there isn't a debate because everything that is published is with DPO, but that doesn't mean that anything is answered in the time being.

516
01:12:15.116 --> 01:12:24.536
Yeah, and the kind of last of the stuff is evaluation, and these slides were prepared kind of last minute, but I think the question is how do you evaluate these models and what you should be doing?

517
01:12:24.596 --> 01:12:28.596
I think the PSA is like, don't trust your numbers and actually talk to models.

518
01:12:28.736 --> 01:12:38.736
It's very hard to do if you're an engineer or a researcher because you have your specific thing that you're zoomed in on, and it feels like a waste of time to just go play with ChatGPT or go play with Chat Arena, but I really don't think it is.

519
01:12:38.796 --> 01:12:50.236
It's something that I... This is like me telling myself what I should be doing. But there's the question of like, is the Hugging Face leaderboard good for open source? Uh, and then what else can people do?

520
01:12:50.956 --> 01:12:53.516
The Hugging Face leaderboard came out of the team that I was on there.

521
01:12:53.576 --> 01:13:03.556
We were trying to build a framework to automatically evaluate the models that we were training and the models that people were releasing and then have them in a central place where it could be like, "Look, here's the evaluation score.

522
01:13:03.596 --> 01:13:12.476
Is this what we're competing with?" It obviously blew up. I think it's very good for companies trying to operate in the open LLM space to build businesses around it.

523
01:13:12.556 --> 01:13:21.116
I think it's bad for people building LLMs that they think are the best because it's easy to overfit if you're training and focusing them as-- on them as a developer.

524
01:13:21.156 --> 01:13:30.576
But it's good to have distribution of models when there's so many people training them. But it's like now it has six evaluation tools. I can't even name all of them off the top of my head.

525
01:13:30.576 --> 01:13:42.076
[laughs] It's like ARC, HellaSwag, MMLU. There was Drop on it at one point, but they dropped a Drop, which was pretty funny. [laughs] Truthful QA, and then I think maybe some other math. I don't know.

526
01:13:42.556 --> 01:13:50.076
This benchmark question is, uh, is something that everyone's talking about because there's a lot of gaming that it seems to be going on.

527
01:13:50.456 --> 01:13:56.956
Is there some discussion about sort of held-out benchmarks that Hugging Face could hold on to? Mostly is who's gonna pay for it?

528
01:13:57.256 --> 01:14:04.436
We're thinking about this at Allen AI too, is like we're specifically thinking about improving on a Paco eval, which is- Who's gonna pay for running the evals? Who's gonna pay for running the evals?

529
01:14:04.716 --> 01:14:11.856
Right now- And what models?... Hugging Face is just running every eval every day. Yeah. So they have like a thousand GPUs. At one point they were gonna do more training. It was gonna be used for that.

530
01:14:12.015 --> 01:14:17.856
But now they have less training and they do-- they run a good amount of GPUs. In one of their blog posts they said how much compute it was.

531
01:14:17.936 --> 01:14:25.276
I don't think it's a ton to run these, but it is a like- I mean- You have to have hundreds of GPUs to maintain this leaderboard. So, uh, one, one technical question.

532
01:14:25.316 --> 01:14:33.516
Uh, like some of these are open source models that they don't change, so you just have to run them once. Yeah. Okay. All right. So it's not that crazy, I don't think. No.

533
01:14:33.916 --> 01:14:44.276
It's tractable for- It's only the closed source models that need to be re-evaled. Yeah, so if you look at the like Chat Arena, they take specific dates. Yeah. So and then there's this whole controversy of like- Mm-hmm...

534
01:14:44.496 --> 01:14:47.696
is ChatGPT from March better than ChatGPT from June?

535
01:14:48.096 --> 01:14:59.636
So like on, like one of these future slides, it's slide fifty-eight, is like the Chatbot Arena leaderboard if you're looking later, which Chatbot Arena is this thing from LLM Sis that we were looking at.

536
01:14:59.656 --> 01:15:07.236
And then like on the X-axis is models and y- you can see [laughs] that GPT-4 from March has a higher score.

537
01:15:07.676 --> 01:15:13.996
Uh, it's like this is not a perfect comparison, but there are signs that are pretty funny there that like there are things- Oh. Yeah...

538
01:15:14.016 --> 01:15:19.996
there are things cooking and but you don't know who's collecting this data, what prompts they're doing. Okay, so- It's such a funny timeline...

539
01:15:20.016 --> 01:15:29.236
for those listening, uh, GPT-4 March 14th is forty ELO points higher than GPT-4 June 13th. Yeah. It's like outside of the error bars- That's pretty high... on the LM Sis thing.

540
01:15:29.696 --> 01:15:36.996
And, and the other piece of context is that GPT-4 Turbo is also notably ahead of the other GPT-4s, which- Yeah, that's weird...

541
01:15:37.056 --> 01:15:45.956
it kind of showed up immediately once they added it to the arena and I was like, all the GPT-4.5 memes aside, it seems like this is effectively a bump in the model.

542
01:15:46.216 --> 01:15:58.356
If you zoom into this, the leaderboard is very close for many like strata of models. So there are levels where you can get your model to, and it'll be really close to your peers.

543
01:15:58.416 --> 01:16:08.876
So in the open source, there's things like Mixtral Instruct, Tool two seventy B, which is effectively a hu-- that's a way bigger model than Mixtral. Give Mix- Mis- Mixtral's the mixture of expert model.

544
01:16:09.016 --> 01:16:17.144
Like I'll do credit, it's a very good model and that's gonna be like the next level Once people get better at fine-tuning it, like Yi-34b chat, like this is one level.

545
01:16:17.604 --> 01:16:27.944
And then there was like a level with like the alpacas and the vicunas. But all of these open source models, there's then another step up to GPT-4, and then there's another step up to GPT-4 Turbo.

546
01:16:28.004 --> 01:16:40.864
So it's like the difference from the GPT-4 Turbo to like the GPT-4 that was first released is bigger than the difference from Tulu 2 to GPT-4. So that's just like there's [chuckles] something good going on there.

547
01:16:40.904 --> 01:16:50.564
And I was like, "Okay, that's a new model by my standards, but they're not gonna tell us about it." Mm. Like they did in Dev Day. They said, "It's our new model," but they weren't like, "This is our- Mm...

548
01:16:50.604 --> 01:17:00.464
new best performing model," because it's like the benchmark scores are probably the same, but they've made it so that people like using it more. There's some hints that 4.5 might drop at some point.

549
01:17:00.564 --> 01:17:07.224
Uh, we don't actually know how true those things are, but- I don't think it really matters... I don't know. It's like they could call anything. [laughs] They're, they're retraining these models- Yeah, it's just a-...

550
01:17:07.244 --> 01:17:16.684
and they could call any of them-... marketing label... GPT 4.5. Yeah. Cool. I think, yeah, the last point's in, uh, you have a couple more extra slides here. There's a bunch on evaluation, I think. Yeah.

551
01:17:16.764 --> 01:17:29.624
There's- Both evals. I think the two tools that I talk about most in research domains on RLHF is like AlpacaVal and MT-Bench. They're two academic-maintained leaderboards for evaluating chat capabilities.

552
01:17:30.144 --> 01:17:42.184
Evaluating chat is really hard, and what they both do is they have GPT-4 provide some sort of feedback. MT-Bench is called MT for multi-turn, and they have a prompt and a follow-up question.

553
01:17:42.244 --> 01:17:51.684
So what they do is they ask GPT-4 to score both the initial response and the second response and provide the average. Kind of given up on following the slides. This is all on the slides if you look for it.

554
01:17:52.184 --> 01:18:01.084
And then AlpacaVal is a little bit different, where you're comparing a candidate model, so the model we've trained. So like when we're training Tulu, we compare the...

555
01:18:01.164 --> 01:18:13.824
We submit this, and what it's doing under the hood is comparing the new model to DaVinci 003, which is one of OpenAI's older instruction models, and calculating the win rate that GPT-4 sees between the new model and DaVinci.

556
01:18:14.224 --> 01:18:23.264
So that's kind of like it, it has many more prompts than MT-Bench. MT-Bench is custom prompts that they made to just kind of like take a stance on what is a good chat model.

557
01:18:23.664 --> 01:18:35.784
AlpacaVal sources theirs from Self-Instruct, which is a popular paper from AI2, Open Assistant, Vicuna, Koala, Anthropic's helpful harmful list. So like An- AlpacaVal is from sources that people know and love.

558
01:18:36.224 --> 01:18:45.324
MT-Bench is its own thing. We were more focused on MT-Bench at Hugging Face. At AI2, we're a little bit more focused on AlpacaVal, but it really can go either way.

559
01:18:45.904 --> 01:18:56.644
These are kind of like table stakes to saying that you have a good RLHF model, is like you should be able to have a pretty good score on both of these. And then the kind of proof is in people actually talking to it.

560
01:18:57.164 --> 01:19:06.504
So I think like the Zephyr model from Hugging Face was a kind of step change in people's perception of open models that got integrated into a bunch of products [chuckles] within a few weeks.

561
01:19:06.544 --> 01:19:14.864
Like You as- You.com was experimenting with it and, uh, someone else, like I saw some Substacker was using it as like a writing feedback bot as instead of ChatGPT.

562
01:19:14.944 --> 01:19:19.564
That- but like that's what happens when a good open release is there now.

563
01:19:19.644 --> 01:19:33.004
It's like if the evaluations are good and people pick it up, and the evaluations are just enough to like say like, "Okay, we're in the right ballpark," but you never really know if the model is the one or one of these big ones without talking to it.

564
01:19:33.184 --> 01:19:43.924
It's like no- however much you talk about evals, that's still where we're at, that you can't prove anything definitively. And Google seeing that, and like until Gemini Ultra comes out, like we don't know.

565
01:19:44.444 --> 01:19:51.664
It's probably a great model, but we, we don't know what- We don't know... what they have. Yeah. Gemini Pro didn't do so great on the o- other stuff too. Yeah.

566
01:19:51.724 --> 01:19:58.624
I wanna know if Gemini Pro is just like some intermediate checkpoint- Yeah, we don't know if it's exactly comparable... or, or if it was like a major deliverable for them or not.

567
01:19:59.164 --> 01:20:07.864
Which if it wasn't a major deliverable, it's probably a strategy headache for Google- [laughs]... but that's not my problem. [chuckles] You have a bunch of open questions here.

568
01:20:07.944 --> 01:20:18.044
One of our lightning round questions always was the- Yeah, we'll just do inverted lightning round. Yeah, yeah, exactly. It's like- You ask people open questions. [laughs] Oh, I mean, there, there's so much to do here.

569
01:20:18.084 --> 01:20:31.264
They're kind of like summarization of things that will be hinted at in the talk to this point, which is like I split it up in my work between like data training and model, which is essentially like how do we evaluate what's happening at the model level with RLHF.

570
01:20:31.384 --> 01:20:41.264
I think big labs are indexed on their own base models, so they don't know like what swapping between Claude Base or GPT-4 Base, how that- Mm... would change any notion of preference or what you do with RLHF.

571
01:20:41.344 --> 01:20:48.764
I think in the open we could do that. We could swap between Llama 2 and Mixed Draw and kind of see like does RLHF work the same for both of those.

572
01:20:48.824 --> 01:20:59.704
Do they both get AlpacaVal bumps when you use the same dataset and the same framework down the line? That'd be good to know if like how sensitive RLHF is. On the data, we talk a lot about aggregation.

573
01:21:00.144 --> 01:21:09.764
On the research side, there's a lot of interesting things as like does getting your data from scale or a Discord army change the quality of the data based on like professional contexts.

574
01:21:10.484 --> 01:21:18.924
And like- The results of this might really affect scale. [laughs] Yeah. [laughs] They probably should do it internally. They should do like internal market analysis on that line.

575
01:21:19.164 --> 01:21:31.824
We should also mention, uh, there has been a report that a lot of these labelers use ChatGPT to do their work. [laughs] Yeah. I mean, I'm not surprised. So it's like, it's, it's a lot of messy grounds in RL these days.

576
01:21:32.264 --> 01:21:36.704
And then there's more training questions, which is like what happens at the end of the day.

577
01:21:36.784 --> 01:21:44.004
I mentioned what I call a qualitative alignment earlier on, which is like do the models get better in ways matching the preference data preferences.

578
01:21:44.464 --> 01:21:53.644
So if you like collect two batches of preference data with different priorities, like what are the, what is [chuckles] the downstream model change? I don't know if it does anything. Should all data be equal?

579
01:21:53.684 --> 01:21:58.004
Like if you have like healthcare questions, should it be the exact same as like write me a joke?

580
01:21:58.064 --> 01:22:09.196
Like this is all implicit to deep learning, like deep learning just scales and aggregates and like I think- we are gonna be on that ride, but it's not necessarily what some people would call fair or good.

581
01:22:09.476 --> 01:22:18.096
And then the kind of last slide that I have is fun, which is just like John Schulman talks about this in his ICML talk. His ICML talk on proxy objectives for RLHF is public now.

582
01:22:18.176 --> 01:22:21.396
They pu- made it public like three months after the conference or some weird timeline.

583
01:22:21.856 --> 01:22:39.076
But he talks about things like ChatGPT being verbose and have self-doubt, refusals, things that are really, like, in vogue in the conversation right now, and, like, how those can emerge in the process of continually trying to adjust the RLHF process based on what users are seeing in the model.

584
01:22:39.616 --> 01:22:44.976
And this is, like, a sort of outer loop optimization that no one in the open is even remotely qualified to talk about.

585
01:22:45.016 --> 01:22:54.476
But OpenAI does monitor, and they'll, like, rerun RLHF and train a new reward model with a mixture of their curated data and user prompts to try to make it work better over time.

586
01:22:54.516 --> 01:23:01.976
And, like, that's the different model versions. And while there's a lot of critiques about this, they're definitely, like, intentional in trying to fix...

587
01:23:02.436 --> 01:23:05.936
I feel like it's probably Whac-A-Mole, where they're like, "Oh, there's this problem. We have the data. We can fix this."

588
01:23:05.976 --> 01:23:15.136
And then it, like, pops up some new problem after doing [laughs] RLHF, and they, they're studying this. And if you could really figure it out, this is where things start to look more like RL. You could automate it.

589
01:23:15.396 --> 01:23:27.196
Things are just, like, longer timeframe of optimizing the model. It would be cool. But we're... I feel like I'm years away from ever actually working on this, but we can try to get details from people who are.

590
01:23:27.216 --> 01:23:37.356
[laughs] Excellent. Awesome. Anything else that, that we missed? I think we covered a lot of it. I mean, I'm good. I would ask you guys about if you know companies that are doing this and things.

591
01:23:37.416 --> 01:23:47.536
But, like, I know some that are in the, like, the RLHF-as-a-service space will become busy, I think for good reason, just because, like- There's companies doing RLIF as a service? Yeah, both of them are.

592
01:23:47.756 --> 01:23:57.756
It depends if synthetic data is gonna win over human data. If human data is the real winning feature in the end, like, it's a big capital investment, so it kinda makes sense as a VC model anyways.

593
01:23:57.856 --> 01:24:05.476
But there's gonna be both of them for a while. It'll be cool. Do you see a lot of people... Because I know Luis Castrogado is starting a company.

594
01:24:06.096 --> 01:24:19.856
Is there a lot of ambition in this field to start companies, or is this more such a research-driven part of the stack that maybe it just stays there and- There definitely is, 'cause I know my, my former colleague, Nazanin Rajani- Mm-hmm...

595
01:24:19.896 --> 01:24:29.636
from Hugging Face is also starting a company in this space. The Falcon team who left Hugging Face I think is also working in this space. Mm-hmm. I don't, I don't really know. I d- like, I don't know exactly what...

596
01:24:29.716 --> 01:24:38.156
I haven't talked to them since, like, ICML, so I don't know what they're doing. Startups change a lot, but there are definitely a lot of people looking at this, this space. I mean, Scale's probably trying to do it.

597
01:24:38.176 --> 01:24:47.956
Mm-hmm. If I was Scale, they would wanna do it. I think they've historically had trouble keeping, like, technical ML talent, but they've started a new research lab, so that should help. It's, it's, it's a busy area.

598
01:24:48.536 --> 01:24:57.856
Cool. Lots going on. Um, yeah. Awesome, Nathan. Thank you so much. That was a masterclass. Yeah, that was awesome. I think this is the first 201 that we've ever had, and you set the bar very high. [laughs] Thank you.

599
01:24:57.876 --> 01:25:01.236
[laughs] All right. Bye, everyone. Bye.

600
01:25:01.696 --> 01:25:29.756
Bye-bye.

601
01:25:29.756 --> 01:25:30.156
[laid-back music]
