Latest / Agentic Conversations (formally mlops.community) / Meta GenAI Infra Blog Review // Special MLOps Podcast
Transcript
- 0:04At Meta, we handle hundreds of trillions of AI model executions
- 0:09per day, delivering these services at.
- 0:12A large scale requires. A highly advanced and flexible
- 0:16infrastructure custom designing much of our own hardware,
- 0:21software and network. Fabrics.
- 0:24Allows us to optimise the end to end experience.
- 0:28For our AI researchers. While ensuring our data centres.
- 0:33Operate efficiently. That was a quote from 1:00.
- 0:37Of the three blogs. That I want.
- 0:38To talk about today. And we get into so many
- 0:44different cool pieces of the meta, generative, AI and ML
- 0:50infrastructure that they have built.
- 0:52Out over the past. Year, year and a half.
- 1:03I want to talk about my observations first, then we will
- 1:08go into design pillars from metas.
- 1:10Blogs. And the learnings from the large
- 1:14training jobs that they're doing, AKA creating Lama Lama
- 1:20two, Lama 3, then we can get into their infrastructure stack.
- 1:25And last but not least, the maintenance.
- 1:28Of how they. Keep it up, been running
- 1:31continuously and reliably. The three different blog posts
- 1:36that I will be. Referencing.
- 1:37For this podcast or? How Mediterraneans large
- 1:42language. Models at scale.
- 1:43Maintaining. Large scale AI capacity.
- 1:47At meta and building metas Gen AI infrastructure.
- 1:52This is a. Synthesis and my.
- 1:54Key takeaways of all three of those blogs.
- 1:59I'll leave the link in the description to each one of these
- 2:02blogs in case you want to just go and read.
- 2:04It yourself. Which I highly.
- 2:05Encourage you to do. Let's get into it first.
- 2:09With my observations, one thing is clear.
- 2:12After. Scouring the meta blog Meta
- 2:16Engineering. Blog, I should say.
- 2:18For. The past 2-3 weeks.
- 2:21They are constantly thinking about future compatibility.
- 2:27They know that whatever size they are now is relatively small
- 2:33compared. To what they will.
- 2:35Be in the future, they're continuously planning for things
- 2:41to just balloon. That whether?
- 2:42That is their compute. Their.
- 2:44Storage or the number? Of developers.
- 2:46Will only grow in size and it seems.
- 2:49That they are always. Thinking about scale and how
- 2:53things will scale in the future now.
- 2:57Of course. Always thinking about scale for
- 3:00your company is. A great.
- 3:03Thing if you are. Meta but it.
- 3:06Reminds me. Of that classic blog post, that
- 3:11was. Referenced frequently in the MO
- 3:14OBS community, which is you are not Google.
- 3:18As. We are walking through.
- 3:20All of the cool. Stuff that Meta is doing, just
- 3:24try and pinch yourself every once in a while.
- 3:26And remember, you are not Google, so there's gonna be some
- 3:30actionable, tangible takeaways. And there's going to be some.
- 3:33Stuff that's just like, wow, that's cool.
- 3:35That they're doing it. Try to.
- 3:37Discern between the two and only you know what size and what
- 3:41scale. You are at.
- 3:43Next observation was. That the price.
- 3:47Of downtime for meta is expensive.
- 3:52They are constantly talking. About how they try very very
- 3:57very hard to keep all. The GPU's online and maximise
- 4:02networking speed. And why is that?
- 4:05Well, each. Millisecond that is not
- 4:10optimised or each minute of downtime.
- 4:13Costs a whole boatload of cash. To the company and the
- 4:18engineers. Are very aware of this So what
- 4:21do they do they're. Thinking about optimising Every
- 4:26sliver of optimization translates into dollar signs.
- 4:31Think about. If you could.
- 4:34Optimise something .0001% and that translated into millions of
- 4:40dollars. That's.
- 4:42What they're doing with at meta and it is very obvious when you.
- 4:45Read these blog posts. They know that, and even with.
- 4:49That. When in NVIDIA comes out with a
- 4:51new GPU, they as in Meta, not Invidia.
- 4:56They have to invest in tailoring it to their environment.
- 5:01To truly. Get all the benefits.
- 5:02There is a section that I'll go to later on about.
- 5:06How they're AB? Testing the different
- 5:10networking. Speeds.
- 5:13To find. Out which gives better results,
- 5:16They look at the whole stack. From top to bottom, as far deep
- 5:23as you can go and. They try to shave off little
- 5:27parts. On each.
- 5:28So they're optimising Pie Torch, they're optimising the
- 5:31scheduling, they're optimising the hardware.
- 5:33That means like networking, that means that it's the maintenance.
- 5:38Of the hardware they're. Optimising storage the data
- 5:42centre deployments where they. Deploy the GPUs.
- 5:45What the cooling? And the power capabilities are.
- 5:48All of these things they're keeping in mind and after
- 5:52reading. These blog.
- 5:54Posts. It may have been selection bias,
- 5:56so it might. Just be that these.
- 5:57Three blog posts mention it quite a bit.
- 6:00Or it may. Be because it is.
- 6:01Very front of mind. It seems like time and time
- 6:04again networking is the most important.
- 6:08Piece of the puzzle? They are constantly referring to
- 6:11how important networking. Is that's.
- 6:15The main character here and so I look at this and I think.
- 6:20At what cost are? They creating this incredible
- 6:28technology. The irony of rushing towards
- 6:32something like trying. To create AGI.
- 6:36And by the way. They say they are.
- 6:38Fully committed to open source, and I believe that they've done
- 6:42a lot of. Cool stuff.
- 6:43With their technology, like Grand Teton, they open.
- 6:47Source that obviously pie. Torch is fully open source, all
- 6:50the Llama models are open source and their long term ambition is
- 6:55to build open source. AGI, but that makes.
- 7:00Me roll my eyes. Let's.
- 7:02Put aside the fact. OK, what does?
- 7:04AGI even mean? Let's just disregard.
- 7:07That whole argument and let's focus on Meta creating AGI Meta
- 7:13the company. That is related.
- 7:15To selling user data. To the highest bidder.
- 7:18The company. That is related to.
- 7:20Helping genocide in Burma. The one who covered up internal
- 7:25studies on how Instagram causes mental health issues for teens.
- 7:30The one who rebranded to Meta, they're the ones that are
- 7:35dedicated to creating AGI. Lord help us, but if that's what
- 7:42they got to do, that's what they got to do.
- 7:43It's easy to judge, so I'll keep it at that.
- 7:46Let's go back to this At what? Cost question because as I'm
- 7:50reading this and I'm hearing about.
- 7:52These. Millions and millions that
- 7:54they're spending billions on their AI efforts and all this
- 7:59energy. It's just.
- 8:02Ironic because they may be using completely sustainable energy.
- 8:08Who knows all the energy that they get for their data centres.
- 8:11It might be coming from solar power.
- 8:13They don't really talk about it, or at least I didn't see a blog.
- 8:15About it. But it reminds me of a
- 8:18conversation. That I had with.
- 8:20Sasha Luccioni, who's now a researcher at Hugging.
- 8:24Face but. Back when I talked to her in
- 8:262021, she. Was a researcher at.
- 8:29A university and she mentioned. There are these great.
- 8:35Feats of computing or these incredible things that we've
- 8:40been able to make. Computers do.
- 8:42Like in that specific conversation she referenced a
- 8:47robot being. Able to put together a Rubik's
- 8:50Cube. But we are not having any type
- 8:54of conversation at how. Horrible.
- 8:58A waste. Of energy, that is to train a
- 9:01model we spent so much energy being able to.
- 9:06Create a robot. That can now put.
- 9:08Together a Rubik's Cube. Great job, but at what cost?
- 9:14And so those questions are not being raised.
- 9:16I have to raise them here in the observation section.
- 9:21Let's get into how Mediterraneans LLM's.
- 9:23At scale, so the. First thing that we have to note
- 9:27are the differences between looms and traditional machine
- 9:32learning at Meta, which was primarily recommender systems.
- 9:36Think about recommender systems and how you interact with Meta
- 9:39and they are pretty. Revolent across the whole.
- 9:45Platform, whether that is. Facebook.
- 9:47Ads or Instagram ads? Your home feed search
- 9:52marketplace search marketplace in general people you know.
- 9:56It's all recommender systems and now limbs are almost like a 180.
- 10:04Because they require way. More compute and it's fewer.
- 10:10Jobs. So Rexes.
- 10:13Needs to be like very fast and there's.
- 10:16A lot of small. Jobs that are constantly taking
- 10:19place like Boom show you an ad. Boom show you a person you might
- 10:23know. Boom, a new video on your feed.
- 10:26But now these LM's. When you're training something
- 10:30like Llama, you need way more compute and.
- 10:35So that creates. Lots of GPU problems.
- 10:40To solve. That the meta team has some
- 10:44performance design pillars when they built out their training
- 10:49infrastructure, these four design.
- 10:52Pillars are hardware reliability.
- 10:54Fast recovery on failure, efficient preservation of the
- 10:59training state and optimal connectivity between GPU's I
- 11:06think. It is pretty self.
- 11:07Explanatory what each one of. These are, but let's.
- 11:10Break them down a little bit more.
- 11:12Hardware reliability is. And I quote from the blog
- 11:15ensuring that. Our hardware is reliable.
- 11:18Is important. We need to minimise the chances
- 11:23of a hardware failure interrupting a training job.
- 11:26This involves rigorous. Testing and quality control
- 11:29measures and automation to quickly detect and remediate.
- 11:35Issues. Then you have fast recovery on.
- 11:38Failure despite our best efforts.
- 11:40Hardware failures can and do occur.
- 11:43When they do, we. Need to be able.
- 11:45To recover quickly. This involves reducing
- 11:48rescheduling overhead and fast training reinitialization.
- 11:56Next up is efficient preservation of the training
- 12:00state. In the event of a failure.
- 12:02We need to be able. To pick up where we left off.
- 12:04This means we need to regularly checkpoint our training state
- 12:08and efficiently store and retrieve training data.
- 12:11Last but not least, optimal connectivity between GPUs.
- 12:16Large scale model training involves transferring vast
- 12:19amounts of data between GPUs in a synchronised fashion.
- 12:23A slow data exchange between a. Subset of GPUs.
- 12:26Can compound and slow down the whole job.
- 12:29Solving this problem requires a robust and high speed network.
- 12:34Infrastructure as well as. Efficient data transfer
- 12:38protocols and algorithms so. Basically, if we walk through
- 12:42this step by step. They're saying.
- 12:45We're going to do our. Best to make.
- 12:47Sure that the hardware doesn't fuck up, but if it does fuck up.
- 12:50We're going to make sure that we can.
- 12:53Reboot it. Really.
- 12:54Really. Fast and.
- 12:56Hopefully we catch it as quickly as possible because.
- 12:59Again, each second of downtime is costing millions.
- 13:04And thirdly, we want to make sure that the training jobs can
- 13:09get back up and running as quickly as.
- 13:12Possible. If something does go down, so
- 13:15we're going to preserve the training state and last but not
- 13:18least, we want to optimise. The throughput of the GPUs
- 13:22because if you have the. Slightest amount of slowdown
- 13:27across the 24,000 or 54,000 or 128,000.
- 13:33GPU that they have. That's going to compound and be
- 13:37painful for everyone that's using the platform.
- 13:40Along this note of reliability. They call out clearly.
- 13:45That the number of failures increases.
- 13:48With the cluster size. It's an inevitable and some of.
- 13:52The top hardware failures. That happen are because.
- 13:57Of. GPU's falling off.
- 13:58The bus a GPU driver is stuck. You have.
- 14:03DRAM, UCE, SRAM, UCE, network cable failure.
- 14:09I mean there's a few things. Let's let's break these down 1
- 14:14by 1. GPU's falling off.
- 14:16In this case GPU are not. Detected by the host.
- 14:19On. PCI.
- 14:22There are several reasons. For this failure.
- 14:24But this failure mode is seen more in the early life and
- 14:29settles. As the server ages.
- 14:32So when you get those brand new H1 hundreds out, boom, you
- 14:36start. To see GP.
- 14:37'S falling off a little. Bit because it's like.
- 14:38What the hell is going on here? And after some time and the
- 14:43server settles, you don't see that as much when it comes to
- 14:46DRAM and SRAM. You see, uncorrectable errors
- 14:50are common in memories, and we monitor and identify repeat
- 14:56offenders, track against thresholds, and initiate RMA's
- 15:00when error rates exceed vendor. Thresholds.
- 15:04Last but not least. The good old.
- 15:05Hardware, network, cable. This is very interesting to me
- 15:10because. It's like I just.
- 15:12Envisioned someone in the data centre with some wire cutters
- 15:18cutting something and pissing. A few researchers off.
- 15:21But getting back on track that doesn't they do not say that.
- 15:24To be clear, they do not say that anywhere in the blogs.
- 15:27But that's just my vision when I read hardware, network cable
- 15:32failures in the general category of unreachable servers.
- 15:36These failures are also. Seen most often in the early
- 15:40life of a server. So when it comes to training
- 15:43LM's for meta performance and reliability is.
- 15:47Crucial they are. Focused on building end to end
- 15:52AI systems with a major emphasis on researcher and developer
- 15:57experience and productivity and the ways.
- 16:00That they do that are. Custom designing their own
- 16:04hardware, software and network fabrics.
- 16:07Speaking of networking, I told. You.
- 16:09It was the star. Player in these different blogs,
- 16:12they are testing two different systems and it is fascinating to
- 16:18me because both of these systems.
- 16:20Are like way bigger clusters. Than any.
- 16:24Of us will probably ever have access.
- 16:26To in our lives. But they just.
- 16:28Talk about it nonchalantly. These two.
- 16:32Different clusters are of 24,000.
- 16:36GPU S so they. Have in total 48,000 GPUs and
- 16:43there's one 24,000 GPU. Cluster that has one.
- 16:46Style of networking and another 24,000 that has.
- 16:51The other style, so the 1st. Style that I want to.
- 16:54Talk about is. On cluster remote direct memory.
- 16:59Access. Over converged Ethernet network.
- 17:04Fabric. Solutions ROCE and it's based on
- 17:08the Arista 7800 which is a data centre switch router.
- 17:14It also has the wedge. 400 and Mini.
- 17:18Pack two OCP rack switches. So for all you hardware geeks
- 17:23out there, I guess that's really cool.
- 17:25I don't know enough about it to say anything, but it's just
- 17:28breaking down all of. The physical pieces.
- 17:33In the rack, some of the highlights.
- 17:34Of the arista for. Those who want to know it has up
- 17:39to 96 billion packets per second and.
- 17:43Fully scheduled lossless architecture.
- 17:46Cell spraying fabric for 100% efficiency, fully scheduled
- 17:51credit control, high hardware availability, dual input grid,
- 17:56redundant power supplies, cloud grade routing.
- 18:01So the list kind of goes on and on and it's nice that they're
- 18:04giving them a little shout out that they're using that inside
- 18:07of the data centre. On the other hand, the other
- 18:0924,000 GPU cluster is using Nvidia's Quantum to InfiniBand
- 18:17fabric, and I think that's what most of us are probably more
- 18:21familiar. With because.
- 18:23That's the more popular one. Or at least.
- 18:26That's the one that I hear about more often in the blog post
- 18:30where they're going deep on their.
- 18:32Hardware. Architecture, and specifically
- 18:34their networking architecture and their.
- 18:37Choices they. Reference some of the trade-offs
- 18:40and some of the design decisions that they had to make when they
- 18:46were building out the networking and.
- 18:47Why they chose to create 2? Different 24,000.
- 18:53GPU clusters to A, B test what was better.
- 18:57So I'm going to read that right now.
- 18:58I'll read you. What they say.
- 19:00Meta had built. Roc, E Clusters.
- 19:04And I'm just going to pronounce. ROCE.
- 19:06If later somebody tells me that it's pronounced Rosie.
- 19:10I would love that. But for now, we're going to
- 19:11pronounce RCEP meta had. Built Roc E clusters for the
- 19:16past four years, but the largest of those clusters.
- 19:19Only supported 4000 GPUs we needed we Meta needed
- 19:24significantly larger Roc clusters.
- 19:28On the other hand, Meta had built research clusters with
- 19:31InfiniBand as large as 16,000 GPUs.
- 19:34However, those clusters. Were not tightly integrated into
- 19:37Metis production environment nor.
- 19:40Were they built for? The latest generation of GPU's
- 19:44networking. This made for a difficult
- 19:46decision. Of what fabric to build with.
- 19:50So we decided to build with both.
- 19:54Lucky them, they can just do that.
- 19:55That's incredible. Two. 24,000 GPU.
- 20:00Clusters one with RCEP. And another with InfiniBand.
- 20:04Our intent was to build and learn from the operational
- 20:08experience. More on testing and prod later.
- 20:11These. Learnings will inform the future
- 20:14direction of Gen AI fabrics. At Meta we optimise.
- 20:18The Roc cluster for. Quick build time and the
- 20:21InfiniBand cluster for full by sectional bandwidth.
- 20:25We used. Both InfiniBand and.
- 20:27Roc clusters. To train Loma.
- 20:29Three with the Roc. Cluster used for training the
- 20:33largest model. Despite the.
- 20:36Underlying network technology differences between these
- 20:40clusters, we were able to tune both of them to provide
- 20:44equivalent performance. For these.
- 20:46Large Gen AI workloads. This is really cool to see
- 20:51because. It's almost.
- 20:51Like they're curiosity. To know if they could be doing
- 20:55it better made them. Take the hard route.
- 20:58And say you know. What?
- 21:00It's probably easier. To do the InfiniBand, but let's
- 21:03see if there's something. Better out there Let's.
- 21:05Roll our own just in case we can shave off a few milliseconds for
- 21:11their Gen AI infrastructure. All of the.
- 21:14Computer is built with. The Open.
- 21:17Source project they created. Called Grand Teton, they've been
- 21:21openly designing. The GPU hardware.
- 21:24Platform beginning. With the big surf.
- 21:26Platform in 2015 and anyone that does not know the big surf
- 21:32platform, there's a whole blog post on Facebook to open.
- 21:36Source AI hardware. Design and this.
- 21:40Is the big serve. Platform.
- 21:42This was a 2015 initiative. So are they?
- 21:48Spending as much time, energy and resources on R and.
- 21:52D to keep this up to date this. Big surf platform or is this
- 21:58just a snapshot in time and it hasn't?
- 22:01Really evolved. Since 2015, they don't go into
- 22:04the detail, but that is one of the questions that I had.
- 22:07Is like. How much are they trying to
- 22:10optimise this piece? I imagine if they have engineers
- 22:14that are playing around with these two different types of
- 22:17networking, they've probably got engineers that are figuring.
- 22:21Out if the big. Serve Platform or Grand Teton
- 22:25can be optimised, but if not and I just gave them all.
- 22:29A great idea. To shave off some milliseconds.
- 22:33OK, that's their compute. We've talked about the
- 22:35networking. We've also talked about.
- 22:36Design pillars. Now let's go into.
- 22:39The. Storage for the Gen AI platform.
- 22:42One thing that is very clear, these folks are not using Duck
- 22:46DB for anything. The size of the storage.
- 22:51That they need. Holy smokes, it reminds me.
- 22:54Of a talk that I just. Saw from Chang from Lance DB and
- 23:00he was talking about how there has been this rise.
- 23:04Of. Data engineers saying big data
- 23:07is dead unless. You work with video or photos
- 23:12because if you work with video or photos, big data is alive.
- 23:17And well, so. All you out.
- 23:20There that are doing multimodal stuff you know big data is not
- 23:24dead yet and this is the Facebook team or the media team
- 23:28they. Know that so.
- 23:30Training these large models can be an absolute mess I want to
- 23:36reference. Two other podcasts that we've
- 23:39had where. We get into details about the
- 23:43way things can. Go wrong.
- 23:45Specifically, we. Had one all around checkpointing
- 23:50and how to checkpoint correctly or?
- 23:53What a headache. Checkpointing can be when you're
- 23:56training LLM's, and that was with Nebulous AI.
- 24:00Simon came on and talked to me all about it and his learnings
- 24:06as he was trying to checkpoint. Terabytes worth of data.
- 24:10I just saw Todd. Underwood, who is.
- 24:13Working on the researcher platform at Open AI at the AI
- 24:18Quality conference and one of the things.
- 24:20He said is. How?
- 24:22Difficult it is. To know when to checkpoint and
- 24:26how to checkpoint because it's not like you get some guide and
- 24:29it says checkpoint. Every three steps.
- 24:32And you'll be good because maybe sometimes you can go 500 steps
- 24:36and you're fine, and then other times you can go 2 steps and
- 24:40you're not fine. So it's varied.
- 24:42In the amount of steps that you can do and you always want to
- 24:47make sure that you don't checkpoint too often.
- 24:52But you do it. Enough so that if you're
- 24:55training for six hours and suddenly something crashes, you
- 25:01don't. Lose that six hours.
- 25:03Of training. So it's a bit of a dark.
- 25:06Arts I would say in the checkpointing and then the.
- 25:09Other. Episode that I'll reference to
- 25:11talk about how much of a mess training large language.
- 25:15Models can be is. The one.
- 25:17That we had with. Davis about building DB.
- 25:21RX the large. English model from the Mosaic
- 25:24team. Mosaic AKA Databricks team and.
- 25:28He talks all about how you try to.
- 25:30Debug code and maybe it's the. GPUs that are the.
- 25:34Bottleneck maybe? It's the data that's.
- 25:36Actually not clean. Or you're referencing a table
- 25:39that didn't get added into the data.
- 25:41Or maybe it's that there's a new version?
- 25:44Of Pytorch. But you haven't.
- 25:45Patched it yet? Or.
- 25:46You did patch it and then it's causing problems downstream.
- 25:49There's just so many things that can go wrong and.
- 25:52He. Explains them all eloquently.
- 25:56Now back to Meta and how they're doing the AI checkpoints and
- 26:02specifically how they're storing their checkpoints.
- 26:06What they decided to create was. A homegrown Linux file system
- 26:12in. Userspace.
- 26:14It's called FUSE. FUSE.
- 26:18And So what? They did is.
- 26:22There's an. API backed by a.
- 26:24Version of Metis Tectonic distributed storage solution and
- 26:30it's optimised. For.
- 26:32Flash media in this. Part of the blog they talk about
- 26:36how they're. Using a tool called Hammer Space
- 26:39and they give them a clear. Shout out.
- 26:41And one thing that I thought when I read.
- 26:46That was whoever was the. Salesperson that negotiated for
- 26:51media to give them a shout out in this blog needs a fucking
- 26:55trophy. Imagine Meta publicly stating
- 26:59that they partnered with you and you are the most reliable and
- 27:02fastest and bestest. I hope they're making a lot of
- 27:08money from that one so. Basically, it's very clear that.
- 27:13Most of what meta does is homegrown because of their.
- 27:17Scale but. They created and they.
- 27:21Worked. With Hammer Space on this one
- 27:23they Co created a networking file system for the developer
- 27:28experience what Hammerspace enables engineers.
- 27:32To do is. Perform interactive debugging
- 27:36for jobs using thousands of GPU. 'S.
- 27:39Has code changes are immediately accessible to all nodes within
- 27:44the environment, so it's instantaneous and.
- 27:50They got a. Huge shout out.
- 27:51So congratulations to him in. Space.
- 27:53That's awesome. On the performance side of
- 27:56things. To keep it.
- 27:59Reliable. I mentioned it before.
- 28:01They test in prod simulations only.
- 28:04Go so far, they just have to test and.
- 28:07Prod. They mentioned that they're
- 28:09continually evolving. Π torch for higher.
- 28:12Scale and. Larger AI workloads they have.
- 28:16Scaling issues in what works on a small cluster, quote unquote
- 28:20small cluster of 100. GPU's it just.
- 28:24Is not. So clear if it will work.
- 28:27As you start getting to 1000 GPUs or 10,000, they're
- 28:31constantly having to test in prod what that inevitably means.
- 28:36Is as we talked about before. There's going to be downtime
- 28:41they're planning and they're trying as hard as they can to
- 28:44make sure that there's not, but they're inevitably is.
- 28:48One way that they try to make sure there is not is.
- 28:52They have. Large scale maintenance and.
- 28:55So there's a whole blog post. On how they maintain these
- 29:01gigantic GPU clusters. So remember back when we said
- 29:07the? Majority of Facebook.
- 29:09'S money or Instagram's money? WhatsApp.
- 29:13I don't know if they make money but the majority of metas money
- 29:16is from traditional ML. It's from recommender systems,
- 29:20it's from serving you ads really, but they're
- 29:23transitioning to supporting these Gen AI.
- 29:27Workloads. It's like.
- 29:29R&D is happening. To see if.
- 29:31Anything can go from here and. As we said.
- 29:34They're committed to open. Source AGI what they saw is.
- 29:40They need to transform. The whole way they.
- 29:45Do things. Because of AI workloads.
- 29:48If you compare traditional ML and how that?
- 29:52Works versus the AI workloads. AI workloads.
- 29:55You're spending so much time training with traditional ML,
- 30:00you don't. Get that they?
- 30:02Have training jobs that can vary from a few hours, a few minutes.
- 30:08A few days. A few months and the training
- 30:12jobs can be as small as a single GPU running for a couple of
- 30:16minutes, or it can have trillions of parameters and
- 30:20often spanned thousands of hosts that need to work together and
- 30:25are very sensitive to interruptions.
- 30:28In this transition from the traditional ML to the Gen AI
- 30:33style of doing things and maintenance and infrastructure
- 30:38around it. What they saw was that there.
- 30:43Are a few main. Characteristics of GPU.
- 30:46Training and these. Characteristics are.
- 30:48Demanding so the team has to make.
- 30:52Sure to be aware of each one of. These these main characteristics
- 30:57are the capacity guarantees some jobs can be.
- 31:03Paused. But a lot of meta jobs are time
- 31:06critical and recurring or online.
- 31:10That means that they can't take large amounts of capacity
- 31:14offline on a default basis. Bad hosts.
- 31:19Are very, very bad. Many jobs require all hosts to
- 31:24be synchronised, especially when they're training these AI.
- 31:28Models. The bad hosts are a bit slower.
- 31:31And have some non. Fatal hardware.
- 31:34Or have networking issues and this is extremely damaging to
- 31:39not. Just that.
- 31:41Workload. But then like we mentioned
- 31:43before, things can domino and pretty soon it's clogging up the
- 31:49pipes. There's also low.
- 31:52Interruption rate since many. Hosts will work with each other.
- 31:57On a shared problem, AI training jobs are sensitive to
- 32:02interruptions. And a few other characteristics
- 32:05of. GPU training or rollout safety.
- 32:08This means the. AI software stack is deep.
- 32:11And problems are often hard to pinpoint.
- 32:14Remember when I was talking about Davis and the DB RX
- 32:19training? This is exactly that.
- 32:22We need to be careful when rolling out new components.
- 32:28AI training jobs are in general cross host and while.
- 32:32Outside of the CUDA. Versions.
- 32:35There are rarely hard. Incompatibilities.
- 32:39We have learned that cluster consistency is highly important
- 32:43to debugging. Maybe that'll.
- 32:45Take years off of. Someone's life, so hopefully you
- 32:49do not have to. Debug because of that, so to
- 32:51give you. An idea of what they're working
- 32:54with, especially when they're trying to maintain these
- 32:59gigantic GPU. Clusters they have. 30
- 33:03maintenance operations going. They have 50 different
- 33:06components. That are updated 3.
- 33:09Different host verification tasks to ensure optimal
- 33:12performance and stability. Thousands.
- 33:15Of disruptive AI host tasks every day.
- 33:20This is what they they just get. Thrown that on a daily basis,
- 33:24the team has to make sure. To keep it.
- 33:28Reliable as that shit's going on one.
- 33:31Difficulty that they deal with. Is upgrading firmware when
- 33:37they're training something like Llama Three?
- 33:39And imagine you're using a whole lot of those.
- 33:42GPU's except uh ohh. We got up Rd some firmware and
- 33:48this is constantly happening. They say.
- 33:50It's not just like once in a while that happens, it's
- 33:54continuously a thing that they're dealing with and the
- 33:57way. That they deal with it is.
- 33:59By using maintenance trains. Which is they?
- 34:03Shut down a small. Number of GPUs.
- 34:05In a cyclical fashion, so it's almost like a train that goes by
- 34:11it, shuts down it. Reboots.
- 34:12It gets that. Firmware update and then boom,
- 34:15it's back online. They have strict SLO.
- 34:18'S and it can get very complicated when they're
- 34:22upgrading CUDA versions. The lower level software.
- 34:26Is always consistent, which makes a tricky problem because
- 34:31you can't have. Half of the cluster.
- 34:33On one lower level software and then the other half on another.
- 34:37Otherwise the training job is going to be a mess.
- 34:40As if it wasn't complicated enough already.
- 34:43So they've added tooling for rare compatibility breaking
- 34:48upgrades, and one way to ensure optimal AI performance was to
- 34:53work. With.
- 34:54The AI teams to design the optimal size of maintenance
- 34:58domain. What does that mean?
- 35:01A maintenance domain is the percentage.
- 35:04Of capacity they take. Down in one go and they.
- 35:08Show a graph here which is. Basically on the.
- 35:13Y axis. You've got the maintenance cost
- 35:16and on the. X axis you've.
- 35:17Got the maintenance domain size and there is.
- 35:22A U-shaped graph. On the far.
- 35:26Left it says that. There's more interruptions and
- 35:30it's very high in cost and it's very low in maintenance domain
- 35:36size and as you go more towards the right and the maintenance
- 35:40domain. Size gets bigger.
- 35:43The maintenance cost goes down in this.
- 35:45U Shape but at a certain. Point you hit the rate of
- 35:51diminishing returns and then it starts going back up and later
- 35:56you have high maintenance domain size and high.
- 35:59Cost. So what they did is.
- 36:02They have something that they called an OPS planar work
- 36:06orchestrator. It can handle get this a million
- 36:11operations per day and what it focuses on or what it makes the
- 36:16engineers lives easier by doing is it works on overlapping
- 36:22scopes of operations and. It will correctly serialise.
- 36:27Them. So you have.
- 36:29One workload that's here and it'll serialise it and then it
- 36:32will make sure that OK when we're doing some kind of a
- 36:36update everything. With that.
- 36:40Workload is going to get done and it's.
- 36:43Serialised here. And then we can upload firmware
- 36:47in between the next. Workload if you have.
- 36:51To move to a new CUDA version, you may need.
- 36:55All of the. Capacity on a new driver
- 36:57version. This is really.
- 37:00Difficult in an environment with thousands of hosts.
- 37:03So it seems like the OPS planner.
- 37:05Is the silver bullet. That they've found to
- 37:09continuously keep these. GPU's.
- 37:13The fresh and going Burr as. The researchers like to.
- 37:18Say one thing that the UPS planner also does.
- 37:21Is they have this safety switch right there's.
- 37:25An auto stop of maintenance trains if maintenance or.
- 37:29Failure buffers are exhausted. And so that automatically off
- 37:35boards the failing upgrades. So you make sure that you only
- 37:41have well tested changes reaching the global system
- 37:46instead of one bug getting put into all 24,000.
- 37:52GPU's. And there you have it.
- 37:56That is the end of. These three blog posts.
- 37:59If you have any feedback or you have something that I did not
- 38:04include in here that you think is worth me talking about.
- 38:07Feel free to leave feedback. So that I can hear it and know
- 38:12what to make better for the next time.
- 38:15As usual, I'm your host Dimitrios, and this has been
- 38:19another edition of the ML OPS Community Podcast.
- 38:23I did this one because I got so much.
- 38:25Great feedback from the Uber podcast where I.
- 38:29Broke down. Their blog.
- 38:31Post so I wanted to make another one.
- 38:34Huge shout out to. Everyone that gave me feedback
- 38:38on that episode much? Appreciated, I always love.
- 38:41Hearing it. So if you've got anything to say
- 38:43on this episode, let me know.