---
title: "Meta’s Generative Ads Model (GEM): The Central Brain Accelerating Ads Recommendation AI Innovation"
description: "GEM is Meta's LLM-scale foundation model for ads recommendation, trained on thousands of GPUs and used as a teacher to improve hundreds of downstream vertical ranking models; it lifted ad conversions 5% on Instagram and 3% on Facebook Feed."
url: "https://swe.quest/articles/meta-s-generative-ads-model-gem-the-central-brain-accelerating-ads-5d5a24731a15c0eb"
canonical: "https://engineering.fb.com/2025/11/10/ml-applications/metas-generative-ads-model-gem-the-central-brain-accelerating-ads-recommendation-ai-innovation/"
source: "Meta Engineering"
published: "2025-11-10"
difficulty: "hard"
kind: "Case study"
reading_minutes: 10
tags: ["recommendation-systems","ads","model-training","ml-platform"]
---

# Meta’s Generative Ads Model (GEM): The Central Brain Accelerating Ads Recommendation AI Innovation

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2025-11-10, 10 min read, Case study. Original: [https://engineering.fb.com/2025/11/10/ml-applications/metas-generative-ads-model-gem-the-central-brain-accelerating-ads-recommendation-ai-innovation/](https://engineering.fb.com/2025/11/10/ml-applications/metas-generative-ads-model-gem-the-central-brain-accelerating-ads-recommendation-ai-innovation/)

## Summary

GEM is Meta's LLM-scale foundation model for ads recommendation, trained on thousands of GPUs and used as a teacher to improve hundreds of downstream vertical ranking models; it lifted ad conversions 5% on Instagram and 3% on Facebook Feed. The architecture handles non-sequence features with an extended Wukong design (stackable factorization machines), long user-behavior sequences with a pyramid-parallel structure, and cross-feature learning with InterFormer, plus multi-domain learning across surfaces, for 4x the efficiency of earlier ranking models. Knowledge reaches downstream models through direct and hierarchical transfer that combines distillation with a Student Adapter for stale supervision, representation learning and parameter sharing, which Meta reports as 2x as effective as standard distillation. A rebuilt training stack (HSDP for dense layers, 2D sharding of embedding tables, jagged-sequence kernels, FP8 activations, SM-free NCCLX collectives, compile caching) delivered 23x effective FLOPs with 1.43x MFU on 16x more GPUs.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md) (AI & ML)
- [Ads](https://swe.quest/tags/ads.md) (Domains)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)

## Prerequisites

- recommendation ranking models ([easy posts on Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md?difficulty=easy))
- knowledge distillation
- distributed GPU training ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- attention/transformers

## Keywords

GEM, Wukong, InterFormer, HSDP, NCCLX, PyTorch 2.0, FP8

## Related posts

- [Meta’s Generative Ads Model (GEM): Scaling the Central Model and Compute Engine for Frontier Ads AI](https://swe.quest/articles/meta-s-generative-ads-model-gem-scaling-the-central-model-and-compute-engine-588a45420da8f0cd.md): Meta Engineering · 2026-10-13 · Hard · 14 min read · Recommendations & ranking, Ads, Model training, Inference & serving, Scaling
  Meta's 2026 GEM replaces per-surface ads ranking models with a single central recommendation foundation model trained across Facebook, Instagram, Reels and deep-funnel conversion objectives, reporting 18.9% conversion and 12% CTR gains.
- [Meta Adaptive Ranking Model: Bending the Inference Scaling Curve to Serve LLM-Scale Models for Ads](https://swe.quest/articles/meta-adaptive-ranking-model-bending-the-inference-scaling-curve-to-serve-llm-b02b370caa05f2c4.md): Meta Engineering · 2026-03-31 · Hard · 9 min read · Recommendations & ranking, Inference & serving, Ads, Performance engineering, Hardware
  Meta Adaptive Ranking Model serves LLM-scale ads ranking models (O(10 GFLOPs) per token, O(1T) parameters) at O(100 ms) latency by routing each request to an appropriately complex model and computing user signals once per request instead of once per ad candidate.
- [GEM Training: How Meta Doubled the Efficiency of Its LLM-Scale Ads Foundation Model](https://swe.quest/articles/gem-training-how-meta-doubled-the-efficiency-of-its-llm-scale-ads-foundation-1bf8547a323404ba.md): Meta Engineering · 2026-08-03 · Hard · 21 min read · Model training, Recommendations & ranking, Performance engineering, Hardware, Ads
  Meta doubled end-to-end training efficiency of GEM, its LLM-scale ads recommendation foundation model, to 20–25% MFU while scaling training FLOPs 4x in a year, by co-designing kernels, precision, parallelism, networking and memory.
- [GenRecs Tokenization: Transforming Ads Recommendation at Meta with Stable Model Vocabulary](https://swe.quest/articles/genrecs-tokenization-transforming-ads-recommendation-at-meta-with-stable-model-e3f3b6ea2626a2c2.md): Meta Engineering · 2026-10-19 · Hard · 6 min read · Recommendations & ranking, Ads, LLMs, Machine learning
  Meta's ads recommender replaces per-item IDs with GenRecs Tokenization, a stable semantic vocabulary.
- [From User Sequences to Scaling Laws: A Multi-Stage Architecture for Meta’s Ads Ranking](https://swe.quest/articles/from-user-sequences-to-scaling-laws-a-multi-stage-architecture-for-meta-s-ads-3c689db90be36667.md): Meta Engineering · 2026-08-05 · Hard · 6 min read · Recommendations & ranking, Ads, Model training, Machine learning, Scaling
  Meta scales sequence learning for ads ranking by splitting it into two stages: an offline transformer user model processes thousands of user events asynchronously and caches user-level embeddings, and a lightweight online ranking model combines those embeddings with fresh signals and ad candidates under strict latency budgets.

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)
