---
title: "How Meta trains large language models at scale"
description: "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."
url: "https://swe.quest/articles/how-meta-trains-large-language-models-at-scale-c827e36c67bd0ee6"
canonical: "https://engineering.fb.com/2024/06/12/data-infrastructure/training-large-language-models-at-scale-meta/"
source: "Meta Engineering"
published: "2024-06-12"
difficulty: "easy"
kind: "Case study"
reading_minutes: 6
tags: ["model-training","networking","hardware","datacenters","distributed-systems"]
---

# How Meta trains large language models at scale

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2024-06-12, 6 min read, Case study. Original: [https://engineering.fb.com/2024/06/12/data-infrastructure/training-large-language-models-at-scale-meta/](https://engineering.fb.com/2024/06/12/data-infrastructure/training-large-language-models-at-scale-meta/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)
- [Datacenters](https://swe.quest/tags/datacenters.md) (Infrastructure)
- [Distributed systems](https://swe.quest/tags/distributed-systems.md) (Distributed systems)

## Prerequisites

- GPU cluster training basics ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- collective communication
- data center networking ([easy posts on Datacenters](https://swe.quest/tags/datacenters.md?difficulty=easy))

## Keywords

Llama 3, RoCE, InfiniBand, Grand Teton, NVIDIA H100, PyTorch, HBM3

## Related posts

- [Building Meta’s GenAI Infrastructure](https://swe.quest/articles/building-meta-s-genai-infrastructure-47cf7d972b2561ce.md): Meta Engineering · 2024-03-12 · Easy · 8 min read · Model training, Datacenters, Hardware, Networking, Storage systems
  Meta built two 24,576-GPU NVIDIA H100 clusters for GenAI training, including Llama 3.
- [Meta’s Infrastructure Evolution and the Advent of AI](https://swe.quest/articles/meta-s-infrastructure-evolution-and-the-advent-of-ai-5db1ff27f9423ca7.md): Meta Engineering · 2025-09-29 · Easy · 17 min read · Datacenters, Model training, Hardware, Scaling, Distributed systems
  Meta's infrastructure grew from a LAMP stack with per-university databases to a global fleet of millions of machines.
- [Maintaining large-scale AI capacity at Meta](https://swe.quest/articles/maintaining-large-scale-ai-capacity-at-meta-239fd709265a559c.md): Meta Engineering · 2024-06-12 · Easy · 8 min read · Datacenters, Deployment, Model training, SRE, Hardware
  Meta keeps its GPU training fleet, planned to reach 600,000 GPUs, current by rolling firmware, driver and network upgrades through "maintenance trains".
- [Inside multi-node training: How to scale model training across GPU clusters](https://swe.quest/articles/inside-multi-node-training-how-to-scale-model-training-across-gpu-clusters-0a2389f46d13b933.md): Together AI · 2026-01-12 · Medium · 4 min read · Model training, Distributed systems, Hardware, Networking
  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.
- [MTIA 300: Meta’s First Training Chip with Built-in NICs and Communication-Offloading Engines](https://swe.quest/articles/mtia-300-meta-s-first-training-chip-with-built-in-nics-and-communication-f7d24d092d75bb12.md): Meta Engineering · 2026-08-24 · Hard · 5 min read · Hardware, Model training, Networking, Recommendations & ranking, Performance engineering
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
