Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 6 min read Case study easyNovice

How Meta trains large language models at scale

Training LLMs at Meta shifted workloads from many small recommendation jobs to a few enormous GPU jobs, forcing changes across hardware, data center layout, reliability, networking and storage. Meta adapted its Grand Teton H100 platform (700W TDP, HBM3, still air-cooled), repacked data halls for GPU density, and tracks common failure modes such as GPUs dropping off PCIe, DRAM/SRAM uncorrectable errors and network cable faults. Instead of choosing between fabrics, it built two 24K-GPU clusters, one RoCE and one InfiniBand, and tuned both to equivalent performance for Llama 3 training. The tuning relied on topology-aware placement of parallelism traffic, custom collectives such as recursive doubling/halving in place of rings, and load balancing to handle fat flows.

Assumes: GPU cluster training basicscollective communicationdata center networking

Related posts

  • Building Meta’s GenAI Infrastructure

    Meta Engineering easyNovice

    Meta built two 24,576-GPU NVIDIA H100 clusters for GenAI training, including Llama 3. One uses a RoCE fabric on Arista 7800 and OCP switches and the other uses InfiniBand, both with 400 Gbps endpoints, on Grand Teton servers. Storage combines a FUSE API over a flash-optimized Tectonic for synchronized checkpointing with a Hammerspace parallel NFS for interactive debugging. Large-cluster AllGather utilization initially ranged from 10% to 90%. Topology-aware job scheduling, routing changes and NCCL tuning brought it back above 90%, and PyTorch process-group startup dropped from hours to minutes.

  • Meta’s Infrastructure Evolution and the Advent of AI

    Meta Engineering easyNovice

    Meta's infrastructure grew from a LAMP stack with per-university databases to a global fleet of millions of machines. Along the way it added Memcache and TAO, edge POPs, a backbone network, cache-invalidation systems for cross-region consistency, and fleet systems such as Twine, Tectonic, ZippyDB, Shard Manager, Kraken, Taiji and Maelstrom. AI workloads changed those assumptions. Recommendation models brought GPUs into the fleet, and LLM training pushed synchronous jobs from 128 to thousands of GPUs, where one failure halts the whole job; Meta reports cutting the interruption rate by about 50x. It went on to build two 24k H100 clusters (InfiniBand and RoCE), a 129k-H100 cluster made by emptying five data centers, air-assisted liquid-cooled GB200 racks, AMD MI300 deployments, and its own MTIA silicon for ranking and ads inference.

  • Maintaining large-scale AI capacity at Meta

    Meta Engineering easyNovice

    Meta keeps its GPU training fleet, planned to reach 600,000 GPUs, current by rolling firmware, driver and network upgrades through "maintenance trains". These take one small maintenance domain offline at a time, so all capacity except that domain stays available. Lower-level components are upgraded gradually across hosts, while the job container, including CUDA, stays consistent for each job. Domain size is chosen by trading interruption cost against buffer capacity. The OpsPlanner orchestrator serializes overlapping operations, about a million per day, and enforces that hosts are upgraded before returning to production, with autostop and automatic offboarding as safeguards.

  • Inside multi-node training: How to scale model training across GPU clusters

    Together AI mediumAdept

    Multi-node GPU training spreads foundation model training across many 8-GPU servers by combining data, tensor and pipeline parallelism over NVLink within nodes and InfiniBand/RoCE between them, with periodic checkpointing to survive the near-daily hardware failures of 100-node clusters. A Qwen2.5-72B example on 16 nodes of B300 GPUs (TP=8, PP=2) reached 45-50% MFU and about 2,500 tokens/s/GPU, with PCIe errors, NVLink drops and gradient-sync congestion as recurring problems. Before a full run, verify NVLink and inter-node bandwidth with tools like ib_write_bw, set up NCCL and test checkpoint resume, then scale from 2 nodes upward while targeting over 80% scaling efficiency.

  • MTIA 300: Meta’s First Training Chip with Built-in NICs and Communication-Offloading Engines

    Meta Engineering hardMaster

    MTIA 300, Meta's in-house training accelerator for recommendation models, integrates two NIC chiplets with twelve 800 Gbps RDMA NICs on-package and adds 16 dedicated message engines, each with a RISC-V core, NIC interface and near-memory reduction block. Collectives therefore run without touching the compute grid. The co-designed HCCL library compiles each collective into dependency-linked work-queue subgraphs that execute autonomously on the device, and it integrates with torch.compile and c10d. Running GEMMs concurrently with collectives costs under 0.5% of compute throughput, versus over 20% on GPUs. Express doorbells save about 800 ns per operation, and on a 150B-parameter production model across 40 accelerators, total communication time is 3.9x faster than an equivalent GPU cluster.

The quest for software engineering knowledge.

Look:
Layout: