Skip to content

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

Meta Engineering 16 min read Case study mediumAdept

Journey to 1000 models: Scaling Instagram’s recommendation system

Instagram scaled to over 1000 production ML ranking models across surfaces and funnel stages (retrieval, early- and late-stage ranking) by building three pieces of infrastructure. A model registry on Configerator records model type and GSI-style criticality tiers and drives automated monitoring and alerting. A launch platform uses offline load tests replaying recorded traffic plus a capacity formula, and enforces per-team quotas through virtual pools, cutting launch time from days to hours. A model stability metric measures prediction accuracy and backs SLOs for every registered model, giving a single view of ML health across product surfaces.

Related posts

  • Meta Adaptive Ranking Model: Bending the Inference Scaling Curve to Serve LLM-Scale Models for Ads

    Meta Engineering hardMaster

    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. 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.

  • Design Once, Deploy at Scale: Building a Template-Driven ML Ecosystem

    Meta Engineering easyNovice

    Meta standardized its fragmented ads ranking model fleet into a small set of Standard Model Templates (SMT). These are opinionated, composable bundles of architecture, feature logic, training settings and hardware-aware serving configs, so that new techniques are tuned once on representative models and propagated to every model on a template. Multi-model optimization weighs aggregate gain against regression rate, then validates on held-out models before a technique enters the next template version. Over two years this cut per-model engineering time by 92%, shipped 80 techniques across 5000+ technique-model combinations, and delivered 0.63% average offline quality gain at neutral serving capacity plus 0.86% cumulative online lift. The templates also give AI agents a bounded search space for automated model improvement.

  • Shopify's Playbook for Scaling Machine Learning

    Shopify Engineering easyNovice

    Shopify's approach to scaling machine learning grew out of its first ML product, an order fraud detector that replaced a rule-based system with a high false-positive rate. Teams should pick a problem users care about, confirm the data is trustworthy and accessible, account for downstream dependencies such as fulfillment, and optimize for product outcomes rather than raw model scores. Shopify shipped a simple logistic regression model, built in Python, serialized to PMML, scheduled with Airflow and served in real time from Rails. To scale to hundreds of models, Shopify relies on input/output reconciliation, shadow backtesting, drift monitoring, platform-enforced best practices and automated model operations.

  • How Meta Uses AI Agents to Scale ML Innovations Across Ads Ranking Models

    Meta Engineering easyNovice

    Meta uses AI agents to propagate proven ranking-model techniques (e.g. Wukong layers, Interformer, training optimizations) across a large, heterogeneous fleet of ads ranking models, where a technique rarely transfers without adaptation. Agents handle discovery (ranking technique-model candidates by expected transferability), generalization (template-level and bespoke per-model adaptation learned from engineers), and adoption (launching multi-day training runs, narrowing hyperparameter searches, diagnosing failures, reallocating GPU capacity). Each stage is evaluated separately: precision/recall for discovery, scaled-down screening then NE and guardrails for generalization, and human-intervention counts for adoption. Agents now drive over 60% of propagation, with reported 3x engineer productivity, a median 4x training-compute reduction on select combinations, and an estimated $45M+ in compute savings.

  • ML based ranking using Nrtsearch

    Yelp Engineering mediumAdept

    Yelp moved ML-based ranking out of a standalone scoring service and into Nrtsearch, its Lucene-based search engine, via an Inference Plugin that extracts features from indexed documents and request parameters and scores them in-process on replica nodes. The change removes the network transfer and feature-payload overhead that became a bottleneck with large candidate sets. MLeap models such as XGBoost and neural networks are stored in MLflow and loaded at replica bootstrap. Teams either implement a Java scorer interface or use a generic scorer that defines features with Lucene expressions. Models are hot-swapped node by node via Jenkins without restarts, scorer changes go through canary and rolling restarts, and Prometheus metrics track model latency and errors.

The quest for software engineering knowledge.

Look:
Layout: