Scaling AI Infrastructure: From Training to Inference at Meta

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: hyperscale AI training and inference infrastructure

Meta needed to scale AI infrastructure from large training jobs to distributed inference while GPU counts, model sizes, power demands, failure rates, and time-to-market pressure were all increasing rapidly.

Constraints:

Architecture

Meta describes a full-stack AI infrastructure strategy spanning secure code-execution sandboxes, distributed inference, RAG/vector databases, graph RAG, a possible shift from SPMD to single-controller programming, faster restarts and checkpointing, huge GPU clusters, new data-center designs, nuclear-power procurement, and power-smoothing work. The architecture is guided by optionality, time to market, and innovation rather than a single fixed cluster pattern.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["GPU training clusters"] --> B["Checkpoint and restart layer"]
  B --> C["Single-controller programming model"]
  A --> D["Power management systems"]
  D --> E["Data centers"]
  F["Distributed inference scheduler"] --> G["Model partitions"]
  G --> H["GPU backend network"]
  I["RAG and vector database layer"] --> J["LLM serving layer"]
  K["Graph RAG layer"] --> I
  L["Secure code execution platform"] --> M["AI software stack"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
GPU training clusters Large-scale clusters used for Llama training and other AI workloads. Checkpoint and restart layer, Power management systems, Data centers
Distributed inference scheduler Routes requests to model partitions and places inference tasks with GPU-to-GPU backend network constraints. Model partitions, GPU backend network
Model partitions Pieces of large models distributed across multiple hosts because they do not fit on one host. Distributed inference scheduler, GPU backend network
GPU backend network Interconnect required for distributed inference tasks to communicate. Model partitions
RAG and vector database layer Retrieval layer for reducing hallucinations by providing external context. LLM serving layer
Graph RAG layer Early personalized-context retrieval technique for secure, privacy-safe LLM answers. RAG and vector database layer, LLM serving layer
LLM serving layer Production serving systems that combine model memory and retrieved context. RAG and vector database layer
Secure code execution platform VM-style code execution system that runs short-lived secure code instances. AI software stack
Checkpoint and restart layer Mechanisms for recovering training jobs and smoothing failures or power swings. GPU training clusters, Single-controller programming model
Single-controller programming model Proposed alternative to SPMD with centralized control over tensors spread across devices. Checkpoint and restart layer
Data centers Physical facilities supplying power, cooling, and space for AI compute. GPU training clusters, Power management systems
Power management systems Grid and utility-facing layer handling multi-megawatt power oscillations and larger clean-energy needs. Data centers, GPU training clusters

Data flow

AI workloads move through training, post-training, secure code execution, distributed inference, and retrieval-augmented response generation. Large models are partitioned across hosts, scheduled with GPU-to-GPU backend-network placement constraints, and served to products. Retrieval paths vectorize queries, retrieve personalized context from vector or graph stores, and feed it to LLMs. Training jobs use checkpoint/restart mechanisms and new control models to reduce the impact of host failures and power oscillations.

3 supporting quotes
“as the models have gotten larger, one of the very practical constraints we ran into is that they no longer fit into the GPU memory of a single host.”transcript, stated
“you represent it as a vector, then you go look up additional information from this external source and then the LLM can compose”transcript, stated
“As Suppa mentioned, we've implemented faster restarts for our jobs. We've implemented faster checkpointing. We are also moving from SPMD to a single controller model.”transcript, stated

Why this architecture

Meta's architecture keeps optionality at every layer because product requirements, model sizes, hardware, and power constraints are changing faster than traditional infrastructure cycles. Distributed inference addresses model-memory limits, RAG and graph RAG address hallucinations, checkpoint/single-controller work addresses failure and power oscillation costs, and new data-center/power strategies address compute growth.

3 supporting quotes
“So the first is optionality. Many of us here work in the bottom of the stack”transcript, stated
“That brings me to the second principle, which is around time to market.”transcript, stated
“failure is a norm and we don't want to spend all these GPU cycles just restoring from checkpoints.”transcript, stated

Models used: Llama 3 · Llama 4 · LLMs · vector databases · graph RAG

Scale

Alternatives considered (roads not taken)

Single-host inference

Rejected because: Large models no longer fit in one host's GPU memory.

“they no longer fit into the GPU memory of a single host.”transcript, stated

Pure SPMD programming model

Rejected because: A single host failure halts the entire pre-training job and forces costly checkpoint restore.

“when one GPU host fails during the pre-training step, while the entire pre-training operation grinds to a halt.”transcript, stated

Rely only on model memory for answers

Rejected because: Hallucinations remain a major problem and retrieval can provide additional context.

“retrieval augmented generation is one of the standard techniques that we've all been using in order to give the LLM some more information”transcript, stated

Continue one-size-fits-all 150 MW regions

Rejected because: AI scale pushed Meta toward new options such as two-gigawatt facilities and nuclear-power procurement.

“We stamp out these regions, they're about 150 megawatts in size, and we deploy these all around the US and all around the world.”transcript, stated

Patterns

rag-retrieval (retrieval)

Meta uses vector databases and graph RAG to retrieve external and personalized context for LLM responses.

“you take the query, you represent it as a vector, then you go look up additional information from this external source”transcript, stated
“we are pushing the boundaries with techniques like graph rag and others in order to provide the right amount of personalized context to LLMs”transcript, stated

privacy-preserving-processing (governance)

Meta frames personalized context retrieval as secure and privacy safe.

“provide the right amount of personalized context to LLMs in a secure and privacy safe way”transcript, stated

durable-execution (reliability)

Meta uses faster restarts, checkpointing, and single-controller exploration to reduce all-or-nothing training failures.

“we've implemented faster restarts for our jobs. We've implemented faster checkpointing. We are also moving from SPMD to a single controller model.”transcript, stated

latency-optimization (infrastructure)

Distributed inference adds routing and placement constraints so large model partitions can serve queries across hosts.

“we need to discover which model partition to route to and then route successfully there.”transcript, stated
“these different tasks, they need to talk to each other and they need to be connected via the GPU to GPU backend network.”transcript, stated

batch-offline-processing (infrastructure)

Meta's secure code execution system runs huge numbers of isolated code-execution instances for AI workflows.

“It has currently been able to run 250,000 of these code execution instances together”transcript, stated
“more than 40 billion plus code execution instances that have been executed since it was launched in January.”transcript, stated

Tradeoffs

Programming model

Chose single-controller exploration over remaining solely with SPMD.

Rationale: SPMD's all-or-nothing failures become more costly as clusters grow.

“So several of us in the industry have really been thinking about what we can do to not be stuck in this all or nothing model of SPMD.”transcript, stated

Hallucination mitigation

Chose RAG, vector search, and graph RAG over only relying on the LLM's own memory.

Rationale: External context can make answers more accurate while preserving secure personalized retrieval.

“the LLM can compose what it has in its own memory as well as from this external source and hopefully provide a more accurate response.”transcript, stated

Data-center strategy

Chose new facility shapes and energy procurement over only stamping out existing 150 MW regions.

Rationale: GPU growth changed power and time-to-market requirements beyond the old region template.

“we need to look for optionality. We need to optimize for time to market, and we need to innovate to meet the needs of tomorrow.”transcript, stated

Gotchas (what bit them)

Inference now has training-like placement constraints.

Root cause: Large models must be partitioned across hosts and those tasks need GPU backend-network connectivity.

Resolution: Meta treats distributed inference placement and routing as a scheduling-layer problem.

“we now have new placement constraints for inference because now these different tasks, they need to talk to each other”transcript, stated
“the lines between the inference workload and the training workload are starting to blur.”transcript, stated

SPMD failure semantics waste GPU cycles at large scale.

Root cause: A single host failure can halt pre-training and force expensive checkpoint restore.

Resolution: Meta is exploring single-controller programming plus faster restarts and checkpointing.

“failure is a norm and we don't want to spend all these GPU cycles just restoring from checkpoints.”transcript, stated
“one of the approaches we are considering is flipping the programming model on its head and introducing what we call single controller.”transcript, stated

Training jobs can stress the electrical grid.

Root cause: Job starts and stops create instantaneous 10-15 MW power changes rather than linear ramps.

Resolution: Meta combines faster restarts, faster checkpointing, and single-controller work to smooth peaks and valleys.

“not instantaneous, massive changes of 10 to 15,000 homes worth of power.”transcript, stated
“All of this adds up to something that actually smooths out these kind of peaks and valleys”transcript, stated

Physical infrastructure planning cannot keep a single old template.

Root cause: AI compute growth pushes facilities from 150 MW regions toward gigawatt-scale sites and new energy procurement.

Resolution: Meta explores two-gigawatt regions and one-to-four-gigawatt nuclear-power RFPs.

“This is a new two gigawatt facility that's physically about the size of Manhattan.”transcript, stated
“we came up with an RFP seeking one to four gigawatts of new nuclear power generation in the United States.”transcript, stated

Evaluation

Meta evaluates the infrastructure through scale, placement constraints, reliability/failure behavior, time to market, power behavior, and product-serving needs rather than a single model-quality benchmark.

Metrics: 256 GPUs to over 100,000 GPUs · 38,000% increase in just over two years · Over a million GPUs planned internally by year end · Two 24,000-GPU clusters · Two-gigawatt facility · One-to-four-gigawatt nuclear RFP · 250,000 code-execution instances together · 40 billion-plus code-execution instances · 10-15 MW power oscillations

3 supporting quotes
“That's a 38000% increase in just over two years.”transcript, stated
“It has currently been able to run 250,000 of these code execution instances together”transcript, stated
“It can be on the order of 10 if not 15 megawatts of power.”transcript, stated

Outcomes

The talk reports a shift from 256-GPU jobs to two 24,000-GPU clusters, then over 100,000 GPUs, a 38,000% increase, planned one-million-GPU internal capacity, two-gigawatt facilities, a one-to-four-gigawatt nuclear RFP, 250,000 secure code-execution instances together, 40 billion-plus instances, and 10-15 MW training-job power oscillations.

3 supporting quotes
“How many things do you know that are changing on that scale at that speed? Nothing.”transcript, stated
“this problem lends itself well to information retrieval techniques. And for here we are using vector dbs.”transcript, stated
“These kind of large spikes and massive power shifts, they can actually disrupt and take our data centers offline as well.”transcript, stated