The Peterman Pod - Google DeepMind Pre-Training Lead: How To Land a Job at a Frontier Lab | Vlad Feinberg
Episode Date: June 15, 2026Vlad Feinberg is Google DeepMind’s pre-training area lead and I asked him all about how to land a job at a frontier lab like Google DeepMind, Anthropic or OpenAI.• My ergonomic keyboard project I ...mentioned, you can follow along here: https://read.compose.llc/• The Kickstarter page for it: https://www.kickstarter.com/projects/ryanlpeterman/compose-simple-ergonomics-beautifully-donePodcast links:• YouTube: https://youtu.be/cDyi91onoJ8• Apple: https://podcasts.apple.com/us/podcast/the-peterman-pod/id1777363835• Transcript: https://www.developing.dev/p/google-deepmind-pre-training-leadThank you to this episode's sponsor for supporting my work:• WorkOS: makes your app Enterprise Ready with easy to use APIs to add SSO, SCIM, RBAC, and more in just a few lines of code, check them out at https://workos.com/Timestamps:(00:00) Intro(00:33) Skills frontier labs need(08:45) The difference between AI research and engineering(21:41) Domains that matter for the frontier(30:50) Marketing yourself to frontier labs(35:13) Concrete steps engineers can take(38:29) Overview of pre-training areas(47:23) Jeff Dean spot bonus story(50:14) Favorite Gemini war story(58:59) Advice for his younger self(01:03:07) OutroWhere to find Vlad:• Personal Website: https://vladfeinberg.com/• Twitter/X: https://x.com/FeinbergVlad• LinkedIn: https://www.linkedin.com/in/vladimirfeinberg/Where to find Ryan:• Newsletter: https://www.developing.dev/• X/Twitter: https://x.com/ryanlpeterman• LinkedIn: https://www.linkedin.com/in/ryanlpeterman/• Threads: https://www.threads.com/@ryanlpeterman• Instagram: https://www.instagram.com/ryanlpeterman• TikTok: https://www.tiktok.com/@ryanlpetermanReferenced in this episode:• How to Land a Job at a Frontier Lab: https://vladfeinberg.com/2026/05/10/how-to-land-a-job-at-a-frontier-lab.html• ThunderKittens: https://github.com/HazyResearch/ThunderKittens• Deedy's doomer Tweet: https://x.com/FeinbergVlad/status/2056383124829872466?s=20• Jacob Steinhardt's "Research as a Stochastic Decision Process": https://cs.stanford.edu/~jsteinhardt/ResearchasaStochasticDecisionProcess.html• The Scaling Book: https://jax-ml.github.io/scaling-book/• Dwarkesh and Reiner's video: https://www.youtube.com/watch?v=xmkSf5IS-zw
Transcript
Discussion (0)
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 send me a video of yourself doing them, I would love to
to 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 research and product.
in ways that machine learning really hasn't been as connected to before.
And so 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 to be fully exhaustive.
And really the ones that I dive into have to do with kernel development
and a low-level engineering to accelerate the runtime for these LLMs in practice.
And so that was a particular skill that I see voracious demand for across all the different
labs and among different projects within the labs.
So that seemed like a very sharp one to call out as an overall need.
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 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 the inner loop of all of these different changes is creating software artifacts that can function at large scale.
with high throughput, low latency, and this is just fundamental work that's tied to classical
back-end engineering thinking.
So yeah, it seemed like a very open thing for people to specialize in.
My friends that work at Open AI and Anthropic, there's this distinction of an applied org
and I was wondering if Deep Mind has a similar distinction and if you could
speak about what that difference is. So we we have different focus areas and like you know for instance
within GDM there's a team that focuses on how 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 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, quite a lot of work goes into making sure
that these LMs are factual and can cite sources 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 standalone 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 pure research that we do, like the extent that it matters is the
extent to which we can realize it.
And so, you know, we're just as responsible with 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 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 noticed there's also another spectrum of software engineer to pure AI researcher.
And how do you think of that spectrum, like software engineering versus like AI researcher
roles?
So I guess in, in my case specifically, I think a lot of what we do and a lot of the new techniques that
we develop, the groundwork is laid in infrastructure investment. So 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
distillation, it's some way of 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. And when you're talking
about statistics derived from a massive LLM applied to trillions and trillions of tokens, you're talking about
a level of flops investment that is millions and millions of dollars. And that in turn,
means that you have to be able to think through how do you optimize the system to be as efficient as possible?
Because every operation that we're performing is multiplied by such a large factor that every second counts, every bite of storage counts.
And quite a bit of that work is, you know, good old-fashioned software engineering.
And so 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 the 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 understanding of distillation scaling laws.
that translates to really strong models.
So it really requires just work across the stack.
And 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 this scale, really classical distributed systems problems.
Yeah, I mean, it sounds like there's a lot of software engineering backend infra type problems
given just the scale of the compute 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 to, you had to be that.
you took an arbitrary back-end engineer and you placed them to, I don't know, adjust the model
architecture or something.
Like that is like a bit of a jump more than the infro work.
Like how do you see that distinction?
Yeah.
So I think there is a crossover point in terms of doing research where research is an endeavor
where the payoffs become a lot higher risk, high reward.
and we have this notion of kind of research taste, which is some high-level intuition about
what path you should be proceeding through the DAG of the multiple 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 have all of these intermediate artifacts that you want to hit in a software program
to get to the final result.
But in the software engineering case, the DAG is more or less deterministic where you build one service,
then a different service, than a third service, and you know, you figure out your storage infrastructure layer first,
that kind of thing, and you can just make monotone progress.
But in the research case, you have to kind of explore this DAG, which is now stochastic,
because some of the nodes, which might be some research ideas or some, you know, aspect of getting to a final goal,
may or may not work out. And I think that requires a bit of a mindset shift. And that kind of mindset
shift takes a while to learn and it takes specialized skills to learn. 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 professor, Jacobs-Stynhart. And 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.
It's, again, we have this high-level idea of a stochastic dependency graph
between different milestones and a research project
where you might need to have a certain kind of result
or prove a certain kind of theorem before you get to a certain kind of conclusion.
Similarly for a machine learning research project,
you might need to have this and that featureization working
before you can get this and that image net accuracy.
or something like that.
And expanding those nodes in this graph,
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 and 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 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 design for your software engineering project might be. And it's this skill
set 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 research taste notion.
But that's exactly the one that you need to build up in order to properly traverse this MDP.
For the research projects and just like generally the nature of the research work,
and it sounds like you're saying that there's a lot more uncertainty or I'm still trying to get a
sense of the nature of the work. If you through this backend engineer,
into a team that's doing research.
What are those concrete examples where they fall short?
I think 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 almost 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 so building up
a solid understanding of past work in a particular area and doing that
related literature review is maybe the first thing that I would imagine people might stumble on is
having read and having the skills to effectively traverse, you know, historical 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 what are the high value papers and what are the ways in which I can assess
of a paper is worth reading without fully reading it. That's like the first thing that comes to
to mind as the 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 some computer science, and depending on the paper
and depending on the domain, there might be all sorts
of prerequisites in terms of the underlying math
and coursework that you would want to have to properly understand.
So 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 I think I like mentioned earlier, one of the things that my team works on is
distillation. And in order to advance our understanding in distillation for large language models,
you have to have a good understanding of like what we're trying to do with LLMs.
And just to give a cursory overview here, the name of the game for LLM research is,
especially in pre-training is scaling laws.
And so what are scaling laws?
People focus a lot about like, you know, this power loss 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 do we care about this question?
Why do we care about predicting what our generalization error is?
In the classical machine learning world, like say we're trying to, you know, win ImageNet,
we have our test loss, which is our classification error for, you know, a thousand different classes
and you run your VG or your ResNet proposal to get that classification error.
That's an estimate of how well that model does at classifying amongst those thousand classes,
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 do a bunch of 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 through this process.
But what's different in an 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.
ever done before. So it's in some sense like a one-shot version of this image net problem. You never
get to see the full ImageNet training dataset. You have to practice on MNIST and then C-FAR and then
maybe based off of those, you try to come up with a method that just works right off the bat on
ImageNet. And if you were to just do that by itself, as I'm sure many people have tried,
certainly when I was learning how to do all of those different things, you get something,
it works really great on M-NIST, it maybe even works on C-FAR, 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.
And so much of what we do for LLMs is coming up with recipes.
A recipe is this function that goes from a number of flops you'd like to train onto a training
routine for this LLM.
And if you can couple this recipe with a prediction rule that can predict accurately what your
LM accuracy is going to be, then,
you're able to make decisions about how to improve your recipe because you can use that prediction.
That is all a ton of context on what LLM research looks like in general.
But that's like 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
a number of params and number of tokens that you train on that influence your prediction accuracy,
like number of unique tokens, for instance.
But like, I would say like those two foundational papers for LLMs,
those are informed by an even longer line of different scaling works,
going back to like say the original 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 that you kind of just need to build up by having gone through that literature review yourself.
If you were, for instance, if you were trying to pick someone that was going on your team
And 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 it's easy to read and understand those papers once you have mathematical maturity.
So I guess the ones I mentioned in particular nowadays.
their table stakes, so I would expect candidates to be familiar with them. I think the general
skill set is being able to dive into a paper of that level and then understanding it, you know,
being able to take a research idea from a paper and implementing it yourself. Like that's just
a very important skill set to be able to have. Like we get, you know,
know, all sorts of 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, 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, I guess, 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 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 quite powerful is 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 Thunder kittens is a really good example of this.
Like coming up with an abstraction that allows you to write kernels through four functions
instead of arbitrary globs of C++ code allows you to move really quickly.
in developing algorithms that fully utilize hardware.
So, like, at that point, it's not about the PL research itself.
It's about having a passion for, you know, these kind of programming language abstractions
and working with low-level hardware, you know, people who, you know, are interested in
and will try to work with, like, cute DSL, this kind of thing where,
There's a lot of hardware-specific, domain-specific languages.
One other thing that comes to mind besides PL and scaling law literature
would be reinforcement learning literature.
So in particular, ever since RLHF, I think we've seen that deep RL algorithms like PPO
do have a place in production systems.
And there was a time where that was in question,
but now it's pretty unanimous that we see these kind of algorithms applied to real production systems.
And the theory behind that, you kind of have to start with the basics for reinforcement learning and work your way up to, you know, the myriad value-based methods and policy gradient methods that we have today.
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 figuring out how to design neural net training algorithms that allow for training across
many GPUs.
There's all sorts of fun challenges
between asynchronicity,
how up-to-date your gradients are,
how pipelining affects the staleness,
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 those are things that can be analyzed
independently of the LLM setting
and have been for a while.
So, you know, especially if you're kind of more infer-inclined than having a good understanding of, like, how those different algorithms work is a really good place to start.
Do you see any difference between the demands of the different frontier lab?
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 there's maybe differences in like business strategy and, you know, the set of offerings that's a function of the specialties of the labs and like the kind of different, you know, customers that the labs could have.
But I would say that there's quite a lot of overlap between the labs in terms of what people look for.
And like, yeah, like when I posted my post, you would see like, you know, people from both open AI anthropic saying like, yeah, like we agree with this advice.
And so, you know, I think that that's just a little bit of evidence towards that.
I think one reason for the huge demand for wanting to go closer to AI research is because people are thinking, oh, software engineering is not going to be as important in the future.
Is there a similar thought in when it comes to research where L.
is also going to handle a lot of that work as well.
So there's no reason to favor AI research versus software engineering.
So I think the research skill set is going to become increasingly important.
So I would say like being able to handle stochastic components in the planning of your work
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.
Because these components aren't deterministic and thinking about how do I construct systems around these LLMs to do my job more effectively, that's going to be the thing that sets you apart in the future.
And I think that's true to 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.
And so I feel like people should really just focus on themselves and trying to be more productive themselves.
I don't think that 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 certain goals. And 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.
And that's simply because you can't hand off blame to AI.
So 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, 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 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 really think that the mindset that people should have is a constructive one.
And so there was a tweet that I saw, I think, by D.D., that was like some long form, you know,
fearmongering about, you know, AI permanent underclass or something like that.
And it's easy to get stuck in that loop.
But I think the important thing to think about is, like, we all have agency over our future
and we can start investing in skills that matter for tomorrow today.
And that's really the old.
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 in response to that because it was something that I could see
echoed, you know, I gave 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 deep mind? And it's something that like, 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, because, you know, if you think about getting a role,
there's obviously the skills, and we talked a lot about the skills and your fitness for the
role, but there's also kind of the 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 allelms that we have and 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 KV cache memory and deal with all sorts of like load balancing and request queuing and very common problems for backend servers.
and these projects are always looking for help.
So, you know, contributions to VLM or SGL or demonstrations with TensorFlow RT,
they have, I think, a distributed system called Dynamo that allows for disaggregated serving
where you could show that 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.
at 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 backend skill set, 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 Lids and he's amazing.
And now he owns so much of like what we do on my.
team in terms of inference co-design for like flash and flashlight and 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 in a organization that isn't directly generating these models, but in some way
trying to leverage them, there's a very big gap in terms of applying these LOMs 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 the, you know, specific business need for your org, which will definitely elevate you
in 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'd, you know, be happy to work with you.
but like at that point, I think you're already doing something that is cutting edge,
which is integrating this new technology into 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 leave this topic,
you had the concrete invitation because 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, how do I put my money
of my mouth is, how do I demonstrate, look, this is a good way to show that you have, you know,
at least some evidence of like 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. And, uh, sort of,
of willingness to pick up the kind of bread and butter, bread and butter math that we use every
day to size these LLMs. And, you know, I won't recall the full list of like the exercises that
I expected here, but like, you know, 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 New York office, I would love to, you know, interview you for. And 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. So yeah, it's quite a bit of work, but impressively, I got a response
within like, I think, a week of posting. So it's definitely doable. Yeah, I mean, I don't have unlimited
headcount. So, I mean, the offers on the table, but, 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 that not only is this
something that you should be doing for its own sake, regardless of whether or not you will get
a job at a deep mind specifically. But I think it'll be something that, you know,
lets you basically prepare for interviews in other places.
Certainly if you reach out to me with these exercises completed,
even if 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.
Open AI, Anthropic, Cursor, and Versel all use this product to make their lives better.
And the problem it solves is when you're building SaaS or an AI product,
and you want to sell to other companies,
there's all these requirements you need to meet.
There's SSO, there's SCM, there's Rback, 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
learn more and get started. And I appreciate them for supporting my work and sponsoring this podcast.
On the next topic, I mean, I saw you're the area lead for pre-training on Gemini. And I just thought
it might be interesting to hear you give kind of like a high-level overview of what pre-training
is or in your words. And maybe what are the high-level challenges in the area? We can talk
about that. Yeah. So there's quite a lot of work that we do in pre-training.
as an area lead for it, the specific things that my team is responsible for delivering
include the Flash model, the Flashlight model.
These are models that get used for AI overviews and AI mode in the search bar,
as well as some other 1P models that are used by different orgs like ads and YouTube.
Besides this, we're also key technical POCs for the Google Apple partnership.
and so we do technical work there.
Those are the actual, like, product-level deliverables from my team.
Beyond that, we do research to make sure that these deliverables are state-of-the-art,
and also we do general pre-training research that contributes to the Pro Series model as well.
And the nature of the research, I would say generally breaks down to three different verticals.
There's distillation, which I mentioned earlier.
There's what I like to call inference code design.
So creating neural architectures that are efficient to run inference on.
So coming up with the network topology, the shapes of the matrices that the mat matures that the mat malle's use inside of gating in linear layers for this transformer, as well as the attention shapes.
numb heads, that kind of thing, so that that is effectively utilizing the hardware that you're
serving on. And then the final pillar here is new quantization methods. And so quantization is just
something that's 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 for the first two.
So that's why, you know, furthering the state of the art in terms of how you can compress models is also a very important pillar in the research that my team does.
Generally, quantization refers to reducing, in some sense, the size that the neural nets take up in order to represent their weights.
So typically a neural net when you're training it is represented as a series of numbers that make up the matrices inside of the neural net that are stored in FP32-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 four bits.
So all of a sudden, this huge range of numbers
that we would take this float 32 to represent,
something that gets you down to like seven digits of precision,
can, you know, with somewhat high fidelity,
still be represented well by four bit ins,
which, you know, just cover this tiny range of like minus,
8 to 7. And 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 matmole 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 the 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
in terms of like serving more requests
and 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
which is just talking about MFU
and someone who's not in the space
or model flop utilization
someone who's not in the space
they see a number in the low tens
and they think wow they're waste
all of those GPU resources.
I'm 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.
Yeah, so 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.
And so in some sense, this is giving us the percent of time that we're usefully utilizing the flops rate of the accelerator.
And to get to 100 percent of a few, you would just need to be fully utilizing the matmole unit of whatever accelerator you're doing here.
So it would just have to be doing like a bunch of mat moles in a loop without reading any memory or doing any other operations.
That's not a very useful computation.
And in practice, neural nets have to apply activation functions or do attention or write intermediate
outputs back to HBM.
And all of those different operations will require utilizing the memory bus or utilizing
vector processing units.
Or simply, they might be a mathematical opportunity.
operations that the underlying hardware performs more slowly than they,
then it might perform a matmole.
And so all of those things contribute to not running at the full speed that the processor
is rated at.
And so that's why you might not see 100% MFU all the time is because, 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, you know,
fundamentally run slower than certain other units on your device.
And I think quite a bit of this inference code design work that I talked about earlier
is across all of the different capabilities of the chip.
So communication to other chips, memory bandwidth, the speed out,
which we can read parameters for memory.
Flops, of course, this can be mass.
Atmal flops, this could be flops for processing vectors, so things like doing activations.
All of these have different rates in the hardware.
And a given computation isn't going to match the natural hardware's rate of each of those
operations.
So 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 when you are doing 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 code design is how do we come up with neural architectures
that scale predictably, have a good prediction, so our high quality,
and still make the MFU as large as possible during inference.
And so this kind of joint optimization is what makes inference code design really fun.
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 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 a one-off lump sum of money as a thank you for
like good performance and 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 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,
very small contribution to a very, very large project at the time. I helped with SFT for one of the
first versions of supervised fine-tuning for one of the first versions of Bard that got released.
Like, right, you know, the biggest lesson out of that experience was, you know, at that time,
I was just doing like pure research in Google Brain and I was super focused on just how do I maximize the number of first author papers at Nureb's ICMLI Clear.
And I remember distinctly thinking like I had this instinct of like, oh like, you know, should I just keep my head down and try to write more papers?
And luckily at the time, my manager, Rohana Neal, like, he really encouraged all of us to get involved in, you know, this space.
And 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 this model running on some, like, really old TPUs to get some, like, really old TPUs to get some.
get some extra, you know, cycles in for, for SFT attempts. That very small initial engagement
that was recognized by Jeff Dean, I think blossomed into more and more investments on the LLM
side by me and ultimately led me to where I am today. So, yeah, I would say, you know, it's less so
about, you know, how much that, like, SFT helped the initial release. And it's much more about
recognizing that, like, there's quite a bit of work. Some of it, not glamorous. Some of it, just like,
you know, hyperparameter tuning and golfing the XLA compiler to make your program fit in a
certain memory amount that contributes to a wider business goal that is really quite important
for getting involved 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 incidents or war stories
that you've been involved in.
So I'm curious, you know,
what's your favorite war story when working on Gemini?
So I think my all-time favorite would have to be
flash 2.0.
So this one
This one was quite a challenge
And a very long journey to get there
But
One of the
Main things that we were optimizing for
Which Flash 1.5 established
Is this category of very fast
Low Latency model
That's still
Quite good
And you know
in particular, it has to be fast because it's used by search to serve responses in AI mode very quickly.
Because of that, for Flash 1.5 and before, we focused on dense models, which allow you to respond very quickly.
Even though at the time, we knew about MOE models and how they increased capacity.
And so I think one thing that like came up was, okay, like, we sure would like to use this new architecture, but it's difficult to just simply switch to an MOE because what happens with an MOE is 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 across multiple different chips.
So if you have, you know, whatever, N experts, then you might chart it across N chips or, you know, some factor of N.
And 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. And, you know, the challenge
with M-O-E's is they increase N. So that, that, 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 Shulto's like, oh, yeah, you're like so flop-bound.
And so pipelining is just not going to change your pre-fill profile.
And then he was right.
I tested it out and, like, then abandoned the idea.
But what's interesting is I had a very small team at the time.
And one of my reports, Gang Yan,
had a very nice idea.
He was working with Rahularia and a couple folks from the Israel team at Google.
And that was to apply pipeline pre-fill to MOEs.
And pipelining is a technique where instead of paralyzing those end machines, experts across those end machines, you paralyze 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.
does the computation for one subset of your pre-fill request and then hands off the process
tokens to the next machine to process the second layer and then the third layer and the fourth layer.
And all of the experts can then stay resonant to a single machine or a smaller set of
machines.
So 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. So 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.
And because of that, the communication overhead has gone down and all of a sudden,
MOUE latency looks really attractive now.
This, you know, the Gemini 2.0 report says like it's an MOUE CERR.
of models and the thing that made that possible is you know or one of the things that made that
possible is this uh uh you know serving time innovation d'orkesh 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 MEO 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, you know, we made the right call, but then we had to train it.
So 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 keeping the training job alive, which at the time was a very interactive thing, because
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 TPU time.
What about at nighttime 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, like, 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 DeepSeek v3 came out.
And the Wall Street Journal put out this article that was like this giant Red Scare article about how China is going to take over.
AI with open source models.
And I remember my friend sent me a screenshot of this table of the LMSIS
Arena leaderboard.
And, you know, all the way at the top right, you've got chat GPT and Deepseek right behind it.
And like, oh, deep seek was trained for whatever few million dollars, you know, and like,
they're right there.
And then my friend was like, oh, like, you know, Gemini is so behind.
because 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 as like, oh, that's really interesting.
I was just looking at this leaderboard because we just released a model.
And it definitely doesn't look like that when you go to the website.
So turns out there was kind of some elighted 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 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 got to chase the problems that people are facing, like, in the world today.
Like, go after the challenges that people see in everyday life and don't be afraid to 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,
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.
And it's this kind of, I guess, humility maybe in your problem approach
that you should really be chasing.
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 coworker that people would want to see succeed.
And so, like, what I mean by that is there's this, this, like, conception of, like,
workplace psychopath or Machiavellian leaders or whatever, people who, like,
will do anything at all costs to get the results they want.
And they might be able to squeeze people to get some short-term gain.
But, 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 probably a very dear friend and mentor of mine,
Todd Lipkin, who first got me into computer science, that are just so kind and like people that you
can learn from and, you know, someone that I can follow and be successful by following, that just
genuinely inspire me to want to help them succeed.
And so in particular, 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 to projects that you come up with in the future and in general will want to support you going forward.
And so, you know, people can get really cynical thinking about the game theory of how to interact at work.
But I found that this kind of more amicable approach generally, like, it creates like this deep sense of collaboration and, you know, willingness to help that like is so important to get very large projects that require multiple people and multiple.
skill sets over the line. And so, yeah, I think if I could give any kind of like inter, you know,
interpersonal feedback or professional feedback or whatever to earlier version of myself,
it's to be that guy, is 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 Dumer, you know, permanent underclass stuff. So 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 have 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.
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. This is in the case.
But yeah, we launched on Kickstarter and we hit our goal within eight hours of launching. I really appreciate it if you were one of the people who grabbed one of the early units.
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 video.
description thank you again for watching the podcast and I'll see you in the next
episode
