Meta Andromeda: Powering the Next Generation of Ads Retrieval Through Model-System Co-Design
Meta's next-generation Andromeda ads retrieval engine co-designs model, system and GPU hardware to score every eligible ad with near ranking-level quality at over one billion ads per second per GPU server, a 100x lift over the 2024 system. A retrieval mixture-of-experts architecture (ensemble of user-tower experts plus an ad-aware attention gating router) cuts inference FLOPs ~300x. A single fused kernel keeps per user-ad intermediates in registers and shared memory to avoid HBM traffic, reaching over 10B ads/sec on one GH200. Co-locating index matching, scoring and top-K on the same GPU cuts network traffic ~100x. NVIDIA-optimized kernels hit ~85% of peak HBM bandwidth, and INT8 adds up to 2x throughput at FP16-equivalent accuracy.
Related posts
- Meta Andromeda: Supercharging Advantage+ automation with the next-gen personalized ads retrieval engine
Meta Engineering hardMasterAndromeda is Meta's ML-based ads retrieval engine that narrows tens of millions of ad candidates to a few thousand per request. It replaces rule-based, multi-stage retrieval with a deep neural network that is jointly trained with a hierarchical ad index, giving sublinear inference cost and outperforming two-tower or ANN approaches. Co-designed with NVIDIA Grace Hopper, it keeps precomputed ad embeddings in local memory, uses GPU feature extraction and fused kernels, and adjusts model complexity to available resources. Meta reports 10,000x more model capacity, +6% recall, +8% ads quality on selected segments, 100x faster feature extraction and over 3x inference QPS.
- Meta Adaptive Ranking Model: Bending the Inference Scaling Curve to Serve LLM-Scale Models for Ads
Meta Engineering hardMasterMeta 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. Key techniques include in-kernel broadcast of request-level embeddings, the Wukong Turbo architecture refinements, GPU-offloaded feature preprocessing, selective FP8 post-training quantization, operator fusion with grouped GEMM, and multi-GPU embedding sharding, reaching 35% MFU across heterogeneous hardware. Launched on Instagram in Q4 2025, it delivered +3% ad conversions and +5% CTR for targeted users.
- How Meta animates AI-generated images at scale
Meta Engineering hardMasterMeta made its Meta AI image-animation feature fast enough for billions of users by stacking model optimizations. These include bfloat16 precision, expanding temporal-attention context after the cross-attention projections, DPM-Solver sampling down to 15 steps, and combined guidance and step distillation that turned 32 multi-pass teacher steps into 8 single-pass student steps. TorchScript freezing came first, followed by a move to PyTorch 2.0 compile with context and sequence parallelism. In serving, a load-aware routing table keeps requests in-region and offloads to progressively farther regions as load nears capacity. Because each GPU accepts only one request at a time, retry-based probing for free GPUs started to cascade until execution delay and exponential backoff were added.
- Meta’s Generative Ads Model (GEM): Scaling the Central Model and Compute Engine for Frontier Ads AI
Meta Engineering hardMasterMeta'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. Its new Kunlun architecture uses block-sparse attention, a GDPA kernel that unifies attention-like ops, MoE-style cross interaction with expert parallelism, component skipping (43% fewer FLOPs) and unified user sequences. Together these support 2.5x model complexity and an LLM-like scaling law, with prediction quality following a power law in sequence length. Intelligence reaches latency-bound vertical models through LoopFM precomputed structured representations, which double transfer effectiveness over plain distillation, and through Solaris speculative precomputation of user-ad embeddings with hierarchical fallback. Custom low-precision kernels and 5D parallelism reach 20-25% MFU at 4x the training FLOPs.
- From User Sequences to Scaling Laws: A Multi-Stage Architecture for Meta’s Ads Ranking
Meta Engineering hardMasterMeta 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. Dense tokenization folds sparse features into a single vocabulary, and target-aware multi-head attention weighs past behavior against the ad being scored, so feature interactions are learned rather than hand-engineered. The system shows LLM-style log-linear scaling of normalized entropy with compute. Scaling works best when depth, width and sequence length grow together, and diverse action-type sequences beat homogeneous ones. Together with other model work it contributed to 6% more conversions on Instagram and 3% on Facebook.