Scaling LLM Infrastructure: Building and Operating 24K GPU Clusters for LLaMA Training

meta · Tech · 2024 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: large-scale LLM training infrastructure

Meta needed to build and operate 24K-GPU clusters capable of training LLaMA 3 models for months despite hardware failures, thermal issues, network bottlenecks, and synchronized training dependencies.

Constraints:

Architecture

Meta adapted existing GPU chassis for higher-power training, built two 24K-GPU clusters using RoCE/Rocky and InfiniBand, organized the RoCE cluster as eight 3K-GPU domains, mapped tensor/pipeline/data parallelism to different network topology layers, tuned collective communication algorithms and load balancing, and measured training efficiency after checkpoint/failure overhead.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["LLaMA training job"] --> B["Parallelism planner"]
  A --> C["24K GPU cluster"]
  C --> D["3K GPU domains"]
  D --> E["GPU racks"]
  E --> F["Power and cooling system"]
  D --> G["Aggregation switching layer"]
  B --> H["Network topology-aware scheduler"]
  G --> H
  H --> I["Collective communication libraries"]
  F --> J["Hardware failure detection"]
  J --> K["Checkpoint and recovery system"]
  K --> C
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
LLaMA training job Large synchronous training workload using tensor, pipeline, and data parallelism. Parallelism planner, 24K GPU cluster
Parallelism planner Maps model and data parallel communication to the network topology. LLaMA training job, Network topology-aware scheduler
24K GPU cluster Overall GPU training cluster composed from eight 3K-GPU domains. LLaMA training job, 3K GPU domains, Checkpoint and recovery system
3K GPU domains Small-cluster building blocks with full bisection bandwidth within the domain. 24K GPU cluster, Aggregation switching layer, GPU racks
GPU racks Racks with 16 GPUs split across two servers. 3K GPU domains, Power and cooling system
Power and cooling system Chassis, row, rack, fan, and thermal management for 700W-class GPUs. GPU racks, Hardware failure detection
Aggregation switching layer Network layer connecting the eight 3K-GPU domains into a 24K cluster. 3K GPU domains, Network topology-aware scheduler
Network topology-aware scheduler Teaches schedulers, distributed ML layers, and collective libraries how to use network topology. Parallelism planner, Aggregation switching layer, Collective communication libraries
Collective communication libraries Optimized all-reduce and collective communication implementations. Network topology-aware scheduler
Hardware failure detection Detects thermal throttling, GPUs falling off the bus, driver stuck states, and memory errors. Power and cooling system, Checkpoint and recovery system
Checkpoint and recovery system Restores training and accounts for lost time after hardware failures. 24K GPU cluster, Hardware failure detection

Data flow

Training data is split across data-parallel groups while model tensors and pipeline stages are partitioned across GPUs. Jobs run over 24K-GPU clusters composed of 3K-GPU domains, with tensor parallelism staying within servers, pipeline parallelism within small clusters, and data-parallel operations across small clusters. Checkpointing, failure detection, host removal, and recovery keep long-running synchronous training moving.

3 supporting quotes
“we had pipeline parallelism where the model is split into different stages Each of which can be processed on different devices concurrently”transcript, stated
“we map tensor parallelism to stay within the server pipeline parallelism stays within the same small cluster data parallel operations goes across the small clusters”transcript, stated
“creating checkpoints restoring from checkpoints time lost from the last checkpoint to the time of failure”transcript, stated

Why this architecture

The architecture follows the physical and communication shape of giant synchronous training: fit power/cooling, map parallelism to network topology, and reduce failure/recovery overhead because the whole job waits for slow devices.

3 supporting quotes
“the synchronization point I mentioned earlier we'll keep the entire training job waiting on the slowest GPU until it finishes assigned computation”transcript, stated
“all of these systems software layers make respective decisions based on network topology awareness”transcript, stated
“Hardware reliability and fast recovery on failure”transcript, stated

Models used: LLaMA 3 · LLaMA 3 70B · PyTorch

Scale

Alternatives considered (roads not taken)

Use only one network fabric design

Rejected because: Meta built both RoCE/Rocky and InfiniBand clusters to learn from operational differences and inform future fabric direction.

“our intent was to build and learn from the operational experience these learnings will inform future direction of our gen Fabrics”transcript, stated

Map parallelism without network topology awareness

Rejected because: Tensor, pipeline, and data parallel traffic have different bandwidth/latency needs and should align to server/small-cluster/cross-cluster layers.

“the collective Communications corresponding to each of these parallelisms have different bandwidth and latency requirements”transcript, stated

Use the previous 500W ranking/recommendation chassis unchanged

Rejected because: Training required higher compute density, power, memory bandwidth, and thermal/mechanical changes.

“we changed the compute from 500 wats to 700 wats to extract more computational props then we changed the hbm CU”transcript, stated

Patterns

observability-tracing (production-operations)

Meta monitors training efficiency, thermal throttling, GPU failures, and network variability to identify root causes at cluster scale.

“the issue was eventually found to be caused by GPU number six on a host 535 which was feeling hotter than others”transcript, stated

durable-execution (workflow)

Checkpointing and recovery are central to keeping long training jobs productive despite failures.

“creating checkpoints restoring from checkpoints time lost from the last checkpoint to the time of failure”transcript, stated

latency-optimization (infrastructure)

Network topology-aware placement maps communication patterns to the lowest-latency/highest-bandwidth layers available.

“tensor parallelism to stay within the server pipeline parallelism stays within the same small cluster data parallel operations goes across the small clusters”transcript, stated

cost-aware-routing (infrastructure)

Power, cooling, density, and network choices are tuned to extract usable compute from 24K-GPU clusters.

“figuring out how the highest density cluster can be built”transcript, stated

Tradeoffs

Network fabric strategy

Chose build both RoCE/Rocky and InfiniBand clusters over standardizing immediately on one fabric.

Rationale: Meta wanted operational experience from both to inform future generative-AI fabrics.

“we optimize the rocky clusters for quick time to build while infin band cluster for lowest latency and full bisection pwid”transcript, stated

Chassis design

Chose adapt a ranking/recommendation chassis for higher-power GPUs over waiting for a fully new platform.

Rationale: The fast-moving GenAI race required urgent adaptation, but it created power/cooling/mechanical work.

“we had to do this as soon as possible because this area is evolving so much that we had to get it all done as fast as possible”transcript, stated

Topology mapping

Chose map parallelism types to network layers over treating the 24K cluster as uniform bandwidth.

Rationale: The 24K cluster has different bandwidth/latency regions, so communication patterns need placement awareness.

“highest bandwidth is between the gpus in the same server connected bya scaleout nvlink domain”transcript, stated

Gotchas (what bit them)

One thermally throttled GPU cut training performance by 50%.

Root cause: Synchronous all-reduce made the whole job wait for the slowest GPU.

Resolution: Remove the host and tune automation thresholds.

“we saw 50% performance degradation the synchronization point I mentioned earlier we'll keep the entire training job waiting on the slowest GPU”transcript, stated

GPU failure incidence rises as job size grows.

Root cause: More GPUs reduce mean time between failures and can halt the whole synchronized job.

Resolution: Invest in hardware reliability, vendor mitigations, checkpointing, and fast recovery.

“as you increase the number of gpus the incidence of failures increases and the meantime between failures will reduce”transcript, stated

High-density GPU clusters create power and cooling constraints beyond the GPU itself.

Root cause: Moving from 500W to 700W GPUs required rack, row, fan, dB, and thermal design changes.

Resolution: Redesign chassis internals, supporting services placement, and data-center density layout.

“we had to adjust the power limits the cooling limits and other requirements for the chassis rack and row”transcript, stated

Large clusters performed poorly out of the box.

Root cause: Network bandwidth, latency, collective algorithms, and load balancing were not automatically aligned to training communication patterns.

Resolution: Optimize parallelism placement, collectives, load balancing, and topology-aware software layers.

“the outof boox performance was low and variable especially for large clusters compared to their smaller clusters”transcript, stated

Evaluation

Meta evaluates the cluster by training efficiency over rolling windows, performance degradation, failure incidence, checkpoint/recovery overhead, network benchmarks, roofline proximity, and application performance.

Metrics: training efficiency · 24-hour rolling effective time · performance degradation · failure incidence · time lost from last checkpoint · network bandwidth · latency · roofline performance

“we measure all of this by essentially creating an efficiency metric where we take the total training time and remove all the time needed”transcript, stated
“we were able to optimize the performance to be close to roofline Performance”transcript, stated

Outcomes

This is a training infrastructure case rather than inference or agent application, but its durable-execution, observability, and topology lessons recur in large agent platforms.

“thanks to the great work done by the team and it's a testament to the engineering effort and to all the support that we've gotten from our vendors and partners”transcript, stated
“we build two 24K clusters to satisfy all of these requirements we run into multiple problems highlighted by Hardware reliability and performance variability”transcript, stated