Every single time you go up for a pre-training run, you're about to put in more flops into this run than you've.
Ever done before.
>> This is Vlad Feinberg. He's Google DeepMind's pre-training area lead, and I asked him all about how to get a job.
At a frontier lab. >> That was a particular skill that I see voracious demand for across all the different labs.
The research skill set is going to become increasingly important.
If you do the scaling book exercises.
And, you know, send me a video of yourself doing them, I would love to, you know, interview you.
>> Here's the full episode.
You wrote this post that was titled.
"How to get a job at a frontier lab."
What are the skills that are kind of in demand on frontier labs?
Maybe we can talk about the shape of the work.
There's.
Quite a range.
Of different things that frontier labs require.
At this point, LLMs.
Are.
Artifacts that are connected to,.
Uh, research and product in.
Ways that.
Machine learning really hasn't been as connected to before.
And so,.
It it really touches on so many different things.
The goal of my post was to propose.
Just a couple tangible directions.
In which.
Labs could require a certain set of skills not not to be fully exhaustive.
And really the ones that I I dive into.
Have to do with uh kernel development and low-level engineering to accelerate.
The runtime for these LLMs,.
Uh, in practice.
That that was a particular skill that I see.
Voracious demand for across all the different labs,.
Uh, and.
Uh among different projects within the labs.
So, that that seemed like a very sharp one to call out as, uh, uh an overall need.
Uh, and so.
Specifically.
Whenever.
We're doing a research project that involves.
Changing the architecture for the neural net in a particular way.
Or rethinking how we might do serving to.
Uh you know, do better KV caching or something like that.
Again, across the stack, you just need to be able to implement.
These new techniques in efficient ways.
And.
Uh.
The inner loop of all of these different changes is creating.
Software artifacts that can function at large scales.
With high throughput, low latency.
Uh and this is just fundamental.
Work that's tied to classical back-end engineering thinking.
Uh so, yeah, it seemed like a very.
Open thing for people to specialize in.
>> My friends that work at OpenAI.
And Anthropic,.
There's this distinction.
Of.
An applied org and the research org.
I was wondering if DeepMind has a similar.
Uh distinction and if you could speak about what that difference is.
>> Uh so,.
We we have different focus areas and like.
You know, for instance, within GDM, there's a team that focuses on how.
Uh we can use our Gemini.
LLMs to better inform search results.
And so, like that might be.
Some, you know,.
You know, in some way like an applied version of the LLMs, but I I.
Am hesitant to, you know, make a very sharp distinction here because there's so much.
Actual like hard research that has to go into.
This kind of level of product integration.
Like specifically for the one I mentioned,.
Uh quite a lot of work goes into.
Making sure that these LLMs are factual and can cite sources.
Uh to have very precise grounded answers,.
Assessing the quality of these sources.
To make sure that you're not referring to anything that's like sarcastic or a joke.
This is.
I guess a good example of how.
Even in like.
Product specific quote unquote applied AI verticals,.
You're still doing research.
That being said, there's definitely.
What I would say is like very classical LLM research teams, pre-training,.
Post-training.
These are things that are still stand-alone.
Teams inside of GDM that are focused on.
What I would say is like, you know, creating soda models, you know, pure research.
Again, the caveat is.
The.
The pure research that we do, like the extent that it matters is the extent to which we can realize it.
You know, we're just as responsible.
With uh.
Delivering these models and making sure they train stably.
And actually.
Being like the SREs of sorts for the training run to make sure that the model training is going smoothly.
As we are for coming up with the recipes to make these LLMs.
And you can't separate those two roles.
It's it's really crucial to kind of wear both of those hats.
So,.
Yeah, I think you can you can draw up a spectrum between research and applied,.
But.
No matter what in today's world, I think.
Everyone.
Needs to be fluid across that spectrum.
>> I notice there's also another spectrum of software engineer to.
Pure AI researcher and like how do you think of that spectrum?
Like software engineering versus like AI researcher roles?
>> So, I guess in.
In in my case specifically, I think a lot of.
What we do.
And a lot of the.
New techniques that we develop,.
Groundwork.
Is laid in infrastructure investment.
Um.
I can walk through what my team does a little bit more detail later, but.
One of the verticals is distillation.
And in order to do.
Uh distillation,.
It's it's some way of uh.
Transferring.
The knowledge.
Or some form of statistics.
About the underlying data set through a teacher model into the student model to make the student model better than if it.
Hadn't ever seen these auxiliary statistics from the teacher.
When you're talking about.
Statistics derived from a massive LLM.
Applied to trillions and trillions of tokens,.
Uh you're talking about.
A level of flops investment that, you know, is.
You know, millions and millions of dollars.
That in turn.
Means that you have to be able to think through.
How do you.
Uh optimize the system to be as efficient as possible because every operation that we're performing is is multiplied by such a.
Large factor that every second counts, every byte of storage counts,.
Quite a bit of that work.
Is.
You know, good old-fashioned software engineering.
Uh in particular,.
The infrastructure for distillation.
Has evolved.
Through.
Maybe.
Three to four generations at this point.
And in each one,.
We've taken a step back,.
Looked at what kind of research methods have we been applying for distillation holistically,.
Thought about how do we.
Broaden.
What.
The infrastructure is capable of, and.
There's definitely a couple discrete points where.
Rethinking.
System design of how we perform distillation.
Enables us to do research on distillation methods much more quickly.
And so it's this kind of investment that like okay, this like four-month or whatever rewrite of our distillation infrastructure.
Then results in.
A dramatically.
New and understanding of distillation scaling laws that translates to.
Really strong models. So.
It really just work across the stack and I you know, I can't.
Yeah, I can't imagine that we would have gotten results like flash 3.0.
Without having made those distillation infrastructure investments that are at the end of the day things that started with a good old-fashioned.
Design doc and thinking about what the right abstractions are for.
Generating these teacher statistics, coming up with the right storage system for them, thinking through what could support.
The reading and writing across.
Multiple different data centers at the scale.
Really classical distributed systems problems.
>> Yeah, I mean it sounds like there's there's a lot of software engineering back-end.
Infra type problems given just the scale of the computer at this point.
It still feels like though there at some point in that spectrum.
There's some crossover where there's these new skills like.
Somewhere where if you had you took.
Arbitrary.
Back-end engineer and you place them.
To I don't know, adjust the model architecture or something.
Like there that is like a bit of a jump more than the infra work.
Like how do you see that distinction?
>> Yeah, so I think there is a crossover point in terms of doing research where.
Research.
An endeavor where.
Payoffs become.
A lot higher risk higher reward.
We have this notion of uh kind of research taste, which is, you know, some high-level intuition about what.
Path you should be proceeding through the DAG of the multiple.
Uh different milestones that you need to accomplish in a particular project.
In some sense, we can view software engineering projects through a similar DAG where, you know, you have all of these intermediate.
Artifacts that you want to hit in a software program to.
Uh get to the final result.
But,.
In the software engineering case, the DAG is more or less deterministic.
Where you,.
You know, build one service, then a different service, then a third service, and you know, you figure out your storage infrastructure.
Layer first,.
Uh that kind of thing, and you can just make monotone progress.
But, in the research case, you have to.
Uh kind of explore this DAG, which is now stochastic, cuz some of the nodes,.
Which might be some research ideas or some, you know, aspect of getting to a final goal,.
Uh may or may not work out.
I think that requires a bit of a mindset shift.
And that that kind of mindset shift takes a while to learn, and it takes specialized skills to learn.
Uh this would be the kind of skills you pick up in a PhD, for instance.
One.
Succinct way I could put it,.
There's a really excellent post by.
This uh Professor Jacob Steinhardt, and I I love to frame a lot of the research work that I do in this.
Way, and it's research as an MDP.
So, MDP here, Markov decision process,.
Uh it's.
Again, we have this high-level idea.
Of a stochastic.
Dependency graph between different milestones in a research project where you might need to have a pertinent certain kind of result or.
Prove a certain kind of theorem before you get to a certain kind of conclusion.
Uh similarly, for a machine learning research project, you might need to have this and that featureization working before where can get.
This and that.
ImageNet accuracy or something like that.
And expanding those nodes in this graph, it it's this stochastic endeavor where.
These approaches may or may not work out, and whether or not.
One works out opens up a set of new possibilities for you.
And so.
The approach that you might have.
In.
The software engineering case where.
You could fully write out here are all the paths to the goal.
Across walking this graph, what's the shortest path to your goal?
That approach is not optimal in the research case because if all of a sudden.
The transitions between the edges in this graph become.
Unreliable,.
Uh some of the nodes you might not even.
Be aware of. It might be a hidden MDP.
Then,.
The way that you might approach this problem.
Would really differ. And in particular, you have to factor in the success rate and the time investment that you're going to.
Be putting into.
Uh these different research ideas,.
As well as.
A priori.
Estimating.
What those different rates are. And that's a very different exercise than.
Writing up what the, you know, design for your software engineering project might be.
And it's it it's this skill set of of building an intuition of how likely an approach is to work out without.
Having yet done that approach.
That I think people.
Often you know, correlate with this uh research taste notion.
But that's exactly the one that you need to build up in order to properly.
Uh traverse this MDP.
>> For the the research projects, and just like generally the nature of the research work, I mean, it sounds like you're.
You're saying that there's a lot more uncertainty here.
I'm still trying to get a sense of the the nature of the work.
If you threw this back-end engineer.
Into.
A team that's doing research.
Like, what are those like concrete examples where they fall short?
>> Like, I think the the very first thing that comes to mind is having the right context.
For.
The research landscape.
In which you're operating. So,.
Quite a bit of.
Research work.
Involves.
Like.
Almost.
Uh this kind of.
You have to take on this like very humble viewpoint of there's been quite a lot of investment.
In related work in the past.
And until I know.
The sum total of humanity's bleeding edge in this topic,.
I'm definitely not going to be able to further that bleeding edge.
Building up uh a solid understanding of of past work.
Uh in a particular area.
Uh and doing that related literature review.
Is maybe the first thing that I would imagine people might stumble on is uh having read and having the skills to.
Effectively.
Traverse,.
You know, historical.
Uh citation tree for a particular topic.
Because you don't have the time to read all of these different papers.
You need to build up a sense of uh what are the high value papers and what are the ways in which.
I can assess if a paper's worth reading without fully reading it.
That's like the first thing that comes to mind as the.
You know, skill that people need to build up.
Even to be able to read these research-level papers,.
You have to have a background in.
Machine learning, in.
Um some, you know, computer science,.
Uh you know, depending on the paper and depending on the domain, there might be all sorts of prerequisites in terms of.
Like the underlying math and.
Coursework that you would want to have to properly understand.
That's that's quite important to be able to.
Have a deep understanding of what methodology is available because you really won't have.
A lot of hope of improving upon the methodology if you don't understand what's there already.
So, so I think I like mentioned earlier, one of the things that my team.
Works on is is distillation.
And in order to.
Advance.
Our.
Understanding.
Uh distillation for large language models,.
You have to have a good understanding of like what we're trying to do with LLMs.
Uh just to give a cursory overview here, the name of the game for.
LLM research is.
Especially in pre-training is uh is scaling laws.
What are scaling laws? People focus a lot about like, you know, this power law structure and the fact that like you,.
You know, have this and that exponent, but like what matters is less so the functional form.
What matters is.
For a given.
Recipe of scaling up your LLM,.
So as you invest more and more flops into the pre-training run of an LLM,.
You have to be able to predict.
What the final.
Test loss of this LLM is going to be.
And why why do we care about this question?
Why do we care about predicting what our uh generalization error is?
The classical machine learning world, like say we're trying to, you know, win ImageNet.
We have our test loss, which is our classification.
Uh error for, you know, a thousand different classes and uh you run your VGG or your ResNet proposal.
To get that uh classification error.
That's an estimate of how well that model does at classifying.
Amongst those thousand classes.
Uh various different images.
We can estimate how good our method's going to be by taking a validation set and then whenever we have an architecture.
Idea for a neural net, we just.
Train it and then we.
Uh do a bunch of uh validation set runs and we get a cross-validation error that is itself an estimator of our.
Final test error. And so in this way you can just iterate on different ideas.
Uh through this process.
But what's different in LLM world is every single time you go up for a pre-training run, you're about to put in.
More flops into this run than you've ever done before.
So, it's in some sense like a one-shot version of this ImageNet problem.
You never get to see the full ImageNet training data set.
You have to practice on MNIST and then CIFAR and then maybe based off of those,.
You try to come up with a method that just works right off the bat on ImageNet.
If you were to just do that by itself,.
As I'm sure many people have tried, uh like certainly when I was learning how to do all of those different things,.
You get something, it works really great on MNIST, it maybe even works on CIFAR, and then all of a sudden it.
Breaks on ImageNet.
You'll find out that like things don't just generalize easily across scale like this.
So much of what we do for LLMs is coming up with recipes,.
Where a recipe is this function that goes from number of flops you'd like to train on to a training routine for.
This LLM.
If you can couple this recipe with a prediction rule that can predict accurately what your LLM accuracy is going to be,.
Then.
You're able to make decisions about how to improve your recipe cuz you can use that prediction.
That.
Is all a ton of context on what uh LLM research looks like in general, but that's like a an understanding that.
We got to,.
That we even thought was feasible, thanks to so much.
Initial LLM scaling work that we've seen.
Across.
The Kaplan paper,.
Across Chinchilla.
Since those two papers, there's been a lot more work in terms of like what other factors are there beyond.
Uh number of params and um.
Number of tokens that you train on that influence your prediction accuracy.
Uh like number of unique tokens for instance.
I would say like those two foundational papers for LLMs,.
Uh those are informed by.
Uh an even even longer line of uh different uh scaling works going back to like say the original.
Uh GPTs.
And then Google has had a ton of scaling work across its Palm papers.
This is just.
A set of works that have informed that viewpoint that I described earlier.
You you kind of just need to build up by having gone through that literature review yourself.
>> If you were for instance, if uh you were trying to pick someone that was going on your team and.
The the way that you would judge their fitness to help you push the frontier.
Is their understanding of the frontier including the existing literature.
Which requires all these prerequisite.
I think you called it mathematical maturity in your post.
>> Yeah, so I think I I.
I think it's.
Easy to read and understand those papers once you have mathematical maturity.
So.
I guess the ones I mentioned in particular nowadays they're table stakes.
So I I would expect candidates to be familiar with them.
I think.
The the general skill set is being able to dive in to.
Uh a paper of that level and then understanding it.
You know being able to take a research idea.
Uh from a paper.
And implementing it yourself.
Like that's that's just a a very important skill set to be able to have.
Like we get, you know,.
All sorts of uh uh different ideas presented, you know,.
They might not all directly apply to our domain, but if you can deeply understand them, then you can iterate on them,.
And you can improve them inside of.
Uh inside of our domain. And so, when we assess for people who.
Can.
Work with the mathematical concepts in these machine learning papers,.
That's that's I guess the the key skill there that would be evidence that you can go pick up this arbitrary paper.
And see to what extent.
These ideas carry over.
Uh in the Google setting.
>> This probably won't be exhaustive,.
But I'd be curious.
To hear other domains that maybe people could dig into to.
See what kind of matters in frontier AI research.
So, you'd mentioned.
Distillation, you also mentioned kernels, it sounds like kernels are helpful everywhere.
But are there other areas that come to mind if you were just raffle off areas that are not necessarily exhaustive?
>> One thing that I think is is quite powerful is uh actually.
Programming language research. So,.
By looking into how we can create abstractions at the programming language level, we could facilitate kernel development.
I think ThunderKittens is a really good example of this.
Like, coming up with an an abstraction that allows you to write kernels through four functions instead of arbitrary globs of C++.
Code.
Uh allows you to move really quickly.
Uh in.
Uh developing.
Algorithms that fully utilize hardware.
So, like,.
It it at that point it it's um.
It's not about the PL research itself, it's about having a passion for,.
You know, these kind of programming language abstractions and and working with uh low-level hardware.
Um you know, uh people who, you know,.
Are interested in and will.
Try to work with like cute DSL,.
The this kind of thing where there's a lot of hardware specific.
Domain specific languages.
Uh one other thing that comes to mind besides.
PL and.
Uh scaling law literature would be reinforcement learning literature.
Uh so in particular.
Ever since.
Uh RLHF,.
Uh I think we've seen that.
Deep RL algorithms.
Uh like PPO.
Do have a place in production systems and you know, there was a time where.
That was in question, but uh now it's you know,.
Uh pretty unanimous that we see these kind of algorithms applied to real production systems and.
Uh theory behind that uh you kind of have to start with the basics for reinforcement learning and work their way up.
To.
You know, the myriad.
Uh value-based methods and and uh policy gradient methods that we have today.
That's that's another domain that I think is just like a very rich literature tree to crawl.
And then for more of the back end engineer folks, just beyond just the kernels themselves,.
There's I think.
A pretty fun overlap between distributed systems and optimization work where.
Uh figuring out how to design.
Neural net training algorithms that allow for.
Training across.
Many.
GPUs.
All sorts of fun challenges between.
Asynchronicity,.
How up-to-date your gradients are,.
How.
Pipelining affects the staleness,.
Uh all of these system choices that you could make in your training algorithm design will impact convergence and the final quality.
Of your neural net. And uh those are things that can be analyzed independently of the LLM setting.
Uh and have been for a while.
Uh, you know, especially if you're kind of more infra-inclined,.
Then having a good understanding of like,.
Uh, how those different algorithms works work is a is a really good place to start.
>> Do you see any difference between the.
The demands of the different frontier labs?
So, for instance, if someone wants to work at DeepMind, is there like a particular area that you see DeepMind cares about.
More than Anthropic, for instance?
>> I think in terms of the skill set, it's probably pretty similar.
Yeah, I think I think there's maybe differences.
In like.
Business strategy.
And,.
Uh, you know, the set of offerings.
That's a function of,.
Uh, the specialties of the labs and,.
Uh, like the kind of different,.
Uh, you know, customers that the labs could have.
Uh, but.
Uh, I would say that there's there's quite a lot of overlap between the labs in terms of what people look for.
And like, yeah, like when I posted,.
Uh, my post, you would you would see like, you know, people from both OpenAI and Anthropic saying like, yeah, like we.
Agree with this advice. And so, you know, I think, um,.
That that's just a little bit of evidence towards that.
>> I think one reason for the the huge demand for wanting to go closer to AI research is because.
People are thinking of software engineering is not going to be as important in the future.
Is there a similar.
Thought in when it comes to research where LLMs is also going to handle a lot of that work as well, so.
There's no reason to favor.
AI research versus software engineering?
>>.
Um, so I think the the research skill set is going to become.
Increasingly important.
Uh, so.
I would say like being able to handle.
Stochastic components.
In the planning of your work.
Is is just going to.
Be a larger and larger part of.
How we approach our jobs.
Figuring out how to leverage AI.
In whatever.
Thing you work on, which doesn't even have to be software related,.
Is just an important muscle to start building right away.
Um because these components aren't deterministic and thinking about how do I construct systems around these LLMs to do my job more.
Effectively,.
Uh that's that's going to be the thing that sets you apart in the future.
And I think that's true no matter what you're going to be doing.
Look, I think I think there's there's fud everywhere,.
Especially with with some of the approach to marketing that some people have in terms of AI.
It's fud that is being intentionally leveraged.
I I feel like.
People should really just focus on themselves and and trying to.
Uh be more productive themselves.
I I don't think.
Like AI is going to replace all of our roles.
And so, the reason for that is that.
One of the important aspects of what we do as humans in an organization,.
Which is really this.
Web of trust,.
From.
Like, you know, this organization that is, you know, this pool of resources and this pool of people that manages these resources.
One of the important things that we do.
Is we allocate those resources towards cer- certain goals.
Even when.
We can accelerate.
Our execution,.
There's an element of making decisions around how we allocate these resources.
That will always be.
Something that needs to be attributable to a human making that decision.
Uh that's simply because.
You can't hand off blame to AI.
We at this point have LLMs that really deeply understand law.
And they could, you know, review your contract for you or something like that.
But, they can't represent you in court because they can't be disbarred.
And so, that's that's I think like a really, you know, sharp way that I might describe like, okay, this is why.
The legal profession will.
Go on even though LLMs are really good at recalling.
Precedent is.
You want to have someone who is responsible who can validate the output of AI.
To perform.
Uh legal work more effectively for you.
Rather than.
Hand off.
Your legal defense to an LLM.
>> Yeah, I think the FUD,.
That was actually the original motivation for your post.
>> Yeah, I mean, I I really think that the mindset that people should have.
Is is a constructive one. And so,.
There was a tweet that I saw, I think by Didi, that was like some long-form,.
You know, fear-mongering about, you know, uh uh.
AI permanent underclass or something like that.
And uh it's easy to get stuck in that loop, but I think the important thing.
Think about is.
Like we all have agency over our future and we can start investing in.
Uh skills that matter for tomorrow.
Today.
Um that's that's really.
The only thing you should be doing, right?
Like, you know, worrying about it is not going to not going to help you.
And so, part of why I wanted to write this post is is in response to that.
Uh because it it it was something that I could see echoed,.
You know, I gave the a lecture at Princeton a while back and, you know, a big question that came up is.
Like, you know, how do I work at DeepMind?
And And it's something that like uh yeah, just when people find out what I do, that's the top question people ask.
So, I figured it would be helpful to add a little bit more constructive.
You know, direction to the discourse here.
>> One last thing on the post cuz,.
You know, if you think about getting a role,.
Obviously the skills and we talked a lot about the skills and your fitness for the role, but there's also kind of.
Signaling.
For that role and like what is kind of valued if you were to be saying.
Marketing yourself to one of these frontier labs,.
What signals.
Matter most?
>> Actual evidence that you've created something.
Of use to other people.
Along the line of kernels, right?
Like you.
Can take any of the many open source LLMs that we have.
Optimize them. You don't have to make them better in every case.
You could show that oh, I have an improvement.
For this and that setting. It doesn't even have to be something that speeds up the model on GPU.
There's all sorts of open source stacks like vLLM.
There's a lot of other.
Things that you can do besides.
Accelerating.
The LLM inference on device. The serving stack that surrounds LLMs is a very sophisticated distributed system that has to maintain.
This KB cache memory and deal with.
All sorts of like load balancing.
Request queuing and and very common problems for for back-end servers.
These projects are always looking for help.
So, you know, contributions.
To vLLM.
Or SG Lang.
Or demonstrations.
With TensorRT.
They have I think a.
A distributed system called Dynamo that allows for disaggregated serving.
Where.
You could show that you you made a project using these components, you improved these components.
Like that would be an extremely positive signal.
For any candidate that I'm looking at.
And and a very welcome contribution to.
Open source.
>> I think also a lot of what we said is kind of assuming.
The path of external hire into.
Frontier Lab.
But a lot of these Frontier Labs have.
Large organizations that aren't necessarily doing the cutting edge.
Frontier work.
So let's say yeah, for instance, I mean, you know, Google DeepMind.
Versus.
Let's say there's some infrastructure eng that's working on search and they have the back-end skillset, maybe not as much domain context.
And they try to internal transfer to Google DeepMind.
Does any of your advice differ in that kind of case for like an internal transfer versus.
Someone who's coming from external?
>> There's someone who.
I worked with closely on the search side.
Who actually did transfer to my team.
Nate Lidzén and he's amazing and now he owns so much of.
Like what we do on my team in terms of.
Inference code design for.
Like flash and flashlight.
I would say like he's a really great example of this where.
His approach was, you know, how do I help my PA,.
My product area.
Adopt this technology as effectively as possible.
So I think there's, you know, definitely.
If you're.
Organization that.
Isn't directly generating these models, but in some way trying to leverage them.
A very big gap in terms of applying these LLMs effectively,.
Serving them effectively.
Within.
Your organization.
And becoming.
Someone who does that really effectively.
Not only creates a ton of value.
In terms of like.
Uh you know specific business need for your org which will definitely elevate you and your org.
But it'll also be.
The case that you're going to just naturally become the partner that we work with.
On the research side to make sure that our models are effective within your org and so at that point you know.
You may or may not want to transfer.
Definitely if you transfer we you know be happy to work with you but like.
At that point I think you're you're you're already doing something that is cutting edge which is.
Integrating this new technology into.
You know a real product that people use and so.
Yeah that'd be my advice there.
>> As it towards the end of this post as we as we leave this topic.
You had the concrete.
Invitation cuz I know you were hiring.
Do you want to say what that was?
>> Yeah so I was just trying to think of like you know you know how do I put my money where.
My mouth is.
Um how do I demonstrate look this is.
Good way to show that you have.
You know at least some evidence of of like the the skills that I called out as important you know intent mathematical.
Maturity grit.
And so I listed out a couple of exercises.
That demonstrate.
You know some initial knowledge of scaling laws some willingness to get into the weeds engineering wise in terms of implementing a.
Real transformer.
Sort of willingness to pick up the kind of bread and butter bread and butter math that we use.
Every day to size.
These LLMs.
You know I won't I won't recall the full list of like the exercises that I expected here but like.
You know if if you do the detailed like handwritten.
Version of the scaling book exercises.
And you know send me a video of yourself doing them along with the transformer exercise on my post.
Then that's something if you can work in the uh New York office, I would love to, you know, interview you for.
Quite a few people reached out to me about that.
I actually already have had a couple submissions and we're proceeding with the loop with those people.
Yeah, it's it's quite a bit of work, but uh impressively, I got a response within like, I think,.
A week of posting. So,.
Uh it's definitely doable.
Yeah, I mean, I don't have unlimited head count, so I mean, the offer's on the table, but the, you know,.
I can only hire so many people.
The good thing is, though, that is such a strong sign of,.
You know, self-development.
Uh not only is this a something that you should be doing for its own sake, regardless of whether or not you.
Will get a job.
At at DeepMind specifically,.
But I think it'll be something that's, you know,.
Lets you.
Basically prepare for interviews in other places.
Uh certainly, if you reach out to me with these.
Uh exercises completed, like,.
Even if, you know, I do all my hiring,.
There's tons of people who I know who are hiring as well, and I'd be happy to refer people as well.
OpenAI, Anthropic,.
Cursor, and Vercel.
All use this product to make their lives better.
And the problem it solves.
Is when you're building SaaS or an ad product,.
And you want to sell to other companies,.
There's all these requirements you need to meet.
There's SSL,.
There's SCIM, there's RBA,.
There's audit logs. These are all things that take time to integrate, but aren't the main focus of your app.
WorkOS is an API layer that lets you meet all of these requirements.
In just a few lines of code.
So, let's say you have a new SaaS product, and you want to sell to other companies,.
WorkOS will solve all of these critical feature gaps for you.
You can check them out at workos.com.
To learn more and get started.
And I appreciate them for supporting my work and sponsoring this podcast.
On the next topic, I mean, uh I saw you're the the the area lead for pre-training on Gemini,.
And I just thought it might be interesting to hear you give um.
Uh kind of like a high-level overview of what pre-training is or in your words, and maybe what are the the high-level.
Challenges in the area. I mean, we can talk about that.
>> Yeah, so.
There's there's quite a lot of work that we do in pre-training.
Um as an area lead for it,.
The specific things that my team is responsible for delivering.
Uh include.
Uh the flash model, the flashlight model.
These are models that get used for AI overviews and AI mode in the search bar,.
Uh as well as some other uh 1P models that are used by different orgs like ads and YouTube.
Besides this, we're also key technical POCs for.
The uh Google-Apple partnership,.
Uh and so we do technical work there.
Those are the actual.
Like product-level deliverables.
Uh from my team.
Uh beyond that,.
We.
Do research to make sure that these deliverables are state-of-the-art.
And also, we do general pre-training re- research that contributes to the Pro Series model as well.
Nature of the research,.
I would say generally breaks down into three different verticals.
There's distillation, which I mentioned earlier.
There's what I like to call inference co-design.
Uh creating.
Neural architectures.
That are efficient.
Uh to run inference on. So, coming up with.
The network topology,.
The shapes of the matrices that the matmuls.
Uh uh use uh inside of uh uh gating and linear layers for this Transformer as well as the attention shapes, num.
Heads, that kind of thing.
So, that that is effectively utilizing the hardware that you're serving on.
And then, the final.
Uh pillar here is new quantization methods.
Quantization is just something that's uh been near and dear to my heart that I've been working on the research side for.
Ever since I joined Google,.
And it really.
Changes.
What's feasible.
Uh the first two. So,.
Uh that's why,.
You know, furthering the state of the art in terms of how you can compress models is is also a very important.
Pillar in the research that my team does.
Generally,.
Uh uh quantization.
Uh refers to reducing,.
In some sense, the size that the neural nets take up uh in order to represent their weights.
So, typically,.
A neural net, when you're training it, uh is represented as a.
Uh series of numbers that make up the matrices inside of the neural net.
Uh that are stored in FP32, 32-bit floating-point weights.
It turns out that,.
When you do these computations,.
You don't need all of that extra precision to still maintain the quality of your neural net.
And you can, with pretty simple methods,.
Reduce the precision.
At which you store these weights down to 4-bits.
Uh all of a sudden, this huge range of numbers.
Uh that we would take, you know, this float 32 to represent,.
Uh something that gets you down to like, you know, seven digits of precision,.
Uh can,.
You know, with somewhat high fidelity,.
Uh still be um.
Represented well by.
4-bit ints, which, you know, just cover this uh tiny range of like minus eight to seven.
Um it's it's kind of a miracle that you can do this.
But what's even more of a miracle is that you can.
Apply these kind of quantization transforms to.
The runtime activations that the neural net processes.
And as soon as you do that,.
The actual math that you're performing,.
Because you're taking much smaller.
Operands to your matmul than what you were doing before,.
The amount of electricity that it takes to compute the neural net drops significantly.
And what's interesting is that.
Like 99%.
Of the total cost of operation for.
AI hardware.
Comes from.
Uh power that it takes to run these chips.
And so, if you can do these operations, you could just make neural nets run more cheaply, run more efficiently.
That helps.
Uh uh in terms of like serving more requests,.
And it helps in terms of latency.
So, the name of the game for quant research is how do we push the frontier beyond like this like four-bit range?
>> There's this take that I see on Twitter all the time,.
Um which is just talking about MFU, and someone who's not in the space, or model flops utilization.
Someone who's not in the space, they see a number.
In the low 10s, and they think, "Wow, they're wasting all of those GPU resources."
Um I was curious if you could just clarify that for people why a low MFU,.
Or I guess naively low, is actually not low at all.
And maybe also explain what MFU is.
When we compute.
MFU,.
You want to divide the actual number of flops that the neural net is performing here by the total number of flops.
That the accelerator could have done in the time of your request.
In some sense, this is giving us the.
Uh percent of time.
That we're usefully utilizing the flops rate of the accelerator.
And to get to 100% MFU,.
You would just need be need to be fully utilizing.
Uh the matmul unit of uh whatever accelerator.
Uh you're doing here. So, it would just have to be doing like a bunch of matmuls.
In a loop.
Uh without reading any memory or doing any other operations.
That's not a very useful computation.
Uh and in practice,.
Neural nets have to.
Apply.
Activation functions.
Or.
Do attention.
Or write intermediate outputs back to uh HBM.
And all of those different operations.
Will require utilizing the memory bus or utilizing vector processing units.
Uh or simply they might be.
A mathematical operations that.
The underlying hardware.
Performs more slowly than they.
Uh than uh it might perform a matmul.
>> >> And so, all of those things contribute to.
Not running at the full speed.
That the processor is rated at.
Uh and so, that's why you might not see 100% MFU all the time is cuz,.
You know, part of the time your neural net was, you know, reading and writing to memory or part of the time.
It was doing an operation that.
Uh you know, fundamentally runs slower than certain other units on your.
On your device.
I think quite a bit of this inference co-design work that I talked about earlier is.
Across all of the different.
Capabilities of the chip. So, uh communication.
To other chips,.
Um memory bandwidth, the the speed at which we can read parameters from memory,.
Flops, of course.
Uh this can be matmul flops.
This can be flops for processing.
Uh vectors. So, like things like doing activations.
Uh all of these have different rates.
In the hardware.
And a given computation isn't going to match the natural hardware's rate.
Uh of each of those operations.
When you design a neural net, you want to be able to choose shapes for this neural net that.
Fully saturate all of those hardware units to get you as high of an MFU as possible.
Um when you are doing uh inference here.
What makes this.
More than just an algebra problem.
Is that those choices translate.
To different quality outcomes when you actually train this neural net.
So, the process of this kind of inference co-design.
Is how do we.
Come up with neural architectures that.
Scale predictably.
Have a good prediction, so are high quality.
And still.
Make the MFU as large as possible during inference.
And so, this kind of joint optimization is what makes.
Inference co-design really fun.
Uh and also this kind of evergreen problem because as the hardware changes.
All of those relative constants of flops to memory bandwidth to communication bandwidth change.
And those will have different implications to what's the optimal neural net shape should be.
>> On another topic.
Google has this idea of a spot bonus where someone can kind of give you uh a one-off.
Lump sum of money as a thank you for like good performance.
And I I saw on your resume that Jeff Dean, the legend himself, gave you a spot bonus.
And you know, if you can tell that story, I'd love to hear why did he give you a spot bonus?
>> Yeah, so that one actually was at the very beginning.
Of the Gemini program.
Uh he gave out a spot bonus to people who.
Hopped on and launched the first version of Bard.
And like I had a you know a very small contribution to a very very large project at the time.
Uh I helped with uh SFT for.
Uh one of the first versions.
Uh of.
Uh supervised fine-tuning for one of the first versions of uh Bard that got released like right, you know.
The biggest lesson.
Out of uh that experience was.
You know, at that time.
I was just doing like pure research in.
Um uh Google Brain.
I was super focused on just how do I maximize the number of first author papers at uh NeurIPS, ICML, ICLR.
I remember distinctly thinking like I I had this instinct of like.
Oh like, you know, should I just keep my head down and try to write more papers?
Luckily at the time.
Uh my my manager Rohan Aneja, like he really encouraged all of us to get involved.
Uh you know, this space.
That was just the right motivation that I needed to like roll up sleeves,.
Do a bunch of hyperparameter tuning and engineering work to get.
Uh this uh model running on.
Uh uh some like really old TPUs to get some extra you know, cycles in for for.
Uh SFT attempts.
That very small initial engagement that was recognized by Jeff Dean, I I think blossomed into.
More and more investments.
On the LLM side by me and.
Ultimately led me to where I am today.
Uh so.
Yeah, I would say.
You know, it it's less so about.
You know,.
You know, how much that like SFT helped the initial release and it's much more about uh uh recognizing that like.
There's there's quite a bit of work, some of it not glamorous, some of it just like, you know, hyperparameter tuning and,.
Uh, golfing the XLA compiler to make your program fit in a certain memory amount.
That contributes to a wider business goal that.
Is is really quite important for.
Getting involved in in very high-value projects.
>> You've been working on Gemini for a while now, and because it's a top priority,.
There has to be some,.
You know, incidents or war stories that you've been involved in.
So, I'm curious,.
You know, what's your favorite,.
Uh, war story when working on Gemini?
>> So, I think my all-time favorite.
Would have to be.
Flash.
2.0.
Uh, so this one.
This one was quite a challenge and a very long journey to get there.
Uh, one of the.
Main things that we were optimizing for,.
Which which Flash 1.5 established, is this category of very fast, low-latency model.
That's still.
Quite good. Um, and, you know,.
In particular,.
It has to be fast because it's it's used by search to serve,.
Uh, responses in in AI mode, uh, very quickly.
Because of that,.
Uh, for Flash 1.5 and before, we we focused on dense models, which, uh, allow you to respond very quickly.
Even though at the time we we knew about MoE models and how they increase capacity.
I think,.
Um, one thing that like came up was,.
Okay, like.
We sure would like to use this new architecture, but it it's difficult to just simply switch to an MoE.
Because what happens with an MoE is it it uses a lot more parameters in general.
And because it uses more parameters, it takes up more HBM.
These chips that we serve on have a finite amount of HBM, so you have to shard the MOE.
Multiple different chips. So, if you have, you know, whatever NX birds then you might chart it across N chips or, you.
Know, some factor of N.
What this causes is a lot of communication.
In the middle of the model.
When you have a token that needs to be routed to an expert.
And that token might live on the first TPU, but it needs to go to the last TPU, that's a lot of.
Communication that you're inducing in the forward pass.
So, the latency.
Of this operation.
Like increases.
Dramatically with N.
You know, the challenge with MOEs is they increase N.
That that that like kind of really bottleneck this approach.
And one interesting thing that happened was.
We we definitely knew about.
Pipeline serving for a while.
It's just in the dense case.
It never really ended up mattering.
Like I distinctly remember a very early conversation I had with Sholto about it and Sholto's like, "Oh yeah, you're like so.
Flop bound and so pipelining is just not going to change your prefill profile."
And then he was right. I tested it out and like then abandoned the idea.
But what's interesting is.
I I had a very small team at the time and and one of my reports,.
Gangyan,.
Had a very nice idea. He was working with Rahul Arya and a couple folks from the Israel team at Google.
And that was to apply pipeline prefill to.
MOEs.
Pipelining.
A technique where instead of parallelizing.
Those N machines.
Experts across those N machines,.
You parallel.
Layers across those end machines.
So, instead of on a particular layer, you have to route tokens from machine to machine,.
Now.
One layer does the computation.
For one subset of your pre-fill request,.
And then hands off.
The processed tokens to the next machine to process the second layer, and then the third layer, and the fourth layer.
All of the experts can then stay resident to a single machine or a smaller set of machines.
What this does effectively.
Is it changes the communication.
Pattern from something that required.
A lot of token exchange.
On every single layer to.
Something that's.
Actually can be.
Hidden behind other computation because you can do this pipeline pre-fill.
Across different parts of your request.
While layer two is working on the.
First thousand tokens of your request,.
Layer one on the first chip is processing.
The second thousand tokens of your request.
So, it was a way of.
Breaking this HBM constraint.
By moving layers across the machines rather than moving experts across these machines.
Because of that, the communication overhead has gone down, and all of a sudden, MoE latency looks really attractive now.
This, you know, the the Gemini 2.0 report says like it's an MoE series of models, and the thing that made that.
Possible is, you know, or one of the things that made that possible is is this.
You know, serving time innovation.
Dwarak and Reiner have an amazing post about.
Exactly this.
Optimization.
That you can write up in the algebra of the scaling book.
And it's just a wonderful example of how.
This kind of.
Change can.
Uh have really dramatic implications on LLM quality.
What really made Flash 2.0 rewarding is.
This,.
You know, giant MoE decision. It sounds like a small technical decision at the time, but.
People were really worried about whether or not the latency of this MoE would actually be reasonable.
Luckily,.
I was able to run like a very transparent technical process to get to the bottom of this.
And by the end of it, uh uh uh you know, we we made the right call,.
Uh but then we had to train it.
This was.
A bigger model than we've ever trained before at the flash scale, and like we knew this would be the right call,.
But it was just going to be 40 days of grueling work for like a really, really small team.
Like we probably had like five people on the rotation for training this model.
I remember,.
You know, all of us just kind of like.
Rotated.
Day by day, handing off like, you know,.
All of this like SRE style work of uh keeping the training job alive, which at the time was was.
A very interactive thing cuz uh you had to make sure that everything was moving stably, that, you know, you have tuned.
Data iterators that aren't slowing down your job,.
That,.
You know, if there's like a gap in the data somewhere.
Or an indexing issue, you have to like really quickly put up a fix because it's, you know, wasting all of this.
GPU time.
Um >> What about at night time and on the weekends?
>> So, yeah, like I think, you know, for those 40 days, we did not do a lot of sleeping.
Like we had to.
Do like kind of these dual shifts across like the Paris office and Mountain View, and like the thing that makes it.
So rewarding.
Was when this model came out, like around the same time, uh DeepSeek V3 came out.
Uh the Wall Street Journal put out this article that was like this giant red scare article about how China's going to.
Take over AI with open source models and.
I remember my friend sent me a screenshot.
Of this table.
Of the LMSYS.
Arena leaderboard.
And you know, all the way at the top right you've got.
Chat GPT and.
And DeepSeek right behind it. And like, oh, DeepSeek was trained for whatever.
Few million dollars, you know, and and like they're right there.
And then my friend was like, oh, like.
You know, Gemini is so behind cuz they had, you know, a version of like I think 1.5 Pro or something in.
That table at the very bottom.
And then I looked at it and was like, oh, that's really interesting.
I was just looking at this leaderboard.
Cuz we just released a model.
It definitely doesn't look like that when you go to the website.
So, turns out there was kind of some ill-written rows on the Wall Street Journal.
Article.
And so now if you go to that article today,.
You can see,.
You know, what at the time was.
The state of the art model.
You know, Flash 2.0 thinking.
Up in the top right corner way far ahead of DeepSeek V3.
Might be messing with the open source narrative that they were trying to publish there, but it was a really important accomplishment.
For for the team.
>> Last question for you is if you could go back to.
Yourself when you just graduated college, I guess undergrad,.
And give yourself some advice knowing what you know now, what would you say?
>> You you got to chase.
The problems.
People are facing.
In the world today. Like like go after.
The challenges.
That people see in everyday life.
And don't be afraid.
Tackle a smaller part of this problem or maybe a more menial sounding part of this problem, even if it's not fancy.
Research math or something like that.
Like, trust that by working on what's important,.
Even if it's a smaller part of a larger project for what's important, you're going to get to see.
What really matters in terms of moving the frontier forward.
It's it's this kind of, I guess,.
Humility maybe in your.
Problem approach that that you should really be chasing.
Um that's one piece of advice.
I think the other bit that I would give, like maybe as professional advice, perhaps,.
Would be.
Be the kind of co-worker.
People.
Would want to see succeed.
Uh and so,.
Like what I mean by that is there's this this like conception of like.
Workplace psychopath or Machiavellian.
Leaders or or whatever,.
People who like will do anything at all costs to get the results they want.
And they they they they might be able to squeeze people to get some short-term gain.
You know, having interacted with a variety of people professionally for so long,.
What is interesting to me is there have been.
A select few,.
You know, one in particular is is probably.
A very.
Dear friend and and mentor of mine, Todd Lipkin, who first got me into computer science.
Are just so.
Like kind.
People that you can learn from.
Uh you know, someone that I can.
Follow and be successful by following.
That just genuinely inspire me to want to help them succeed.
If you.
Are the kind of person who.
Helps people succeed in their projects,.
Comes up with projects that can leverage other people's complementary skills.
In ways that help them shine,.
People will notice that. People will want to contribute.
Projects that you come up with in the future.
And in general will want to support you going forward.
You people can get really cynical thinking about the game theory of how to interact at work.
Uh, but I found that this kind of more.
Amicable approach.
Generally like.
It it creates like this this deep sense of collaboration.
You know, willingness to help that like.
Is so important to get very large projects that require multiple people and multiple skill sets.
Uh, over the line.
Yeah, I think if if I could give any kind of like inner you know, interpersonal feedback or professional feedback or whatever.
Earlier version of myself, it's it's to be that guy.
It's to to be the kind of person.
That other people want to see succeed.
>> I love that this advice combats the cynical.
Advice. And I also love that your original post combats the doomer,.
You know, permanent underclass stuff. So,.
Um, yeah, thank you so much for your time.
It's a lot of fun. Really appreciate it.
>> Thanks for having me, Ryan.
>> Hey, thank you for watching this podcast.
If you liked it and you want to see the show grow, please support with a comment or a like.
Also, if you Do you any recommendations.
For people you want me to bring on?
Please drop a comment.
Guests like Barbara Liskov,.
Mike Stonebreaker,.
Mark Brooker, these were all people that I brought on because someone left a comment.
On another note, aside from the podcast, I'm working on building the ergonomic keyboard that I wish existed.
Here's a glance at the prototype.
It's a split keyboard,.
So there's two sides.
Um this is in the case.
But yeah, we launched on Kickstarter and we hit our goal within 8 hours of launching.
I really appreciate it if you were one of the people who grabbed one of the early units.
Um we're now working on the long journey of building the tooling now.
And so, if you still want to pick one up, I've left the late pledges open on Kickstarter,.
So you can grab one there.
I'll put a link in the description.
Thank you again for watching the podcast, and I'll see you in the next episode.