---
title: "F3 Lightning: How Meta Accelerates Ads ML Features to Production at Scale"
description: "F3 Lightning decouples feature releases from shared execution in Meta's ads ML feature framework, so each of 20,000+ features is compiled, validated, deployed and rolled back independently instead of shipping as one all-or-nothing merged DAG."
url: "https://swe.quest/articles/f3-lightning-how-meta-accelerates-ads-ml-features-to-production-at-scale-22b2343e1fb13d44"
canonical: "https://engineering.fb.com/2026/11/03/ml-applications/f3-lightning-how-meta-accelerates-ads-ml-features-to-production/"
source: "Meta Engineering"
published: "2026-11-03"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["ml-platform","recommendation-systems","performance","deployment","ads"]
---

# F3 Lightning: How Meta Accelerates Ads ML Features to Production at Scale

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2026-11-03, 10 min read, Case study. Original: [https://engineering.fb.com/2026/11/03/ml-applications/f3-lightning-how-meta-accelerates-ads-ml-features-to-production/](https://engineering.fb.com/2026/11/03/ml-applications/f3-lightning-how-meta-accelerates-ads-ml-features-to-production/)

## Summary

F3 Lightning decouples feature releases from shared execution in Meta's ads ML feature framework, so each of 20,000+ features is compiled, validated, deployed and rolled back independently instead of shipping as one all-or-nothing merged DAG. To recover the CPU efficiency lost when features stopped sharing computation, it uses content-derived stable node identifiers, a single startup-built execution plan flattened into an ordered list, one shared per-request memory buffer with a separate readiness vector, and dense integer slot indexing in place of hash lookups. Features reach production about 3.6x faster with no added compute cost. The broader lessons are to separate release boundaries from execution boundaries, to move request-invariant work to startup, and to treat memory layout and duplicate copies as costing as much CPU as redundant computation.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Ads](https://swe.quest/tags/ads.md) (Domains)

## Prerequisites

- directed acyclic graphs
- ML feature serving ([easy posts on Machine learning](https://swe.quest/tags/machine-learning.md?difficulty=easy))
- CPU cache locality ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- topological sort

## Keywords

F3, F3 Lightning, Meta

## Related posts

- [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.
- [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.
- [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.
- [Sequence learning: A paradigm shift for personalized ads recommendations](https://swe.quest/articles/sequence-learning-a-paradigm-shift-for-personalized-ads-recommendations-0f4eda06409ac7d5.md): Meta Engineering · 2024-11-19 · Hard · 7 min read · Recommendations & ranking, Ads, Machine learning, Inference & serving
  Meta replaced its DLRM ads ranking models, which depended on thousands of hand-engineered aggregated sparse features, with sequence learning over event-based features (EBFs).
- [Intelligent Delivery: Making Every Unit of Compute Serve Better Ads](https://swe.quest/articles/intelligent-delivery-making-every-unit-of-compute-serve-better-ads-e2f91280ba29b622.md): Meta Engineering · 2026-11-11 · Medium · 9 min read · Ads, Recommendations & ranking, Inference & serving, Capacity planning, AI agents
  Meta's Intelligent Delivery is an ML-driven layer that allocates serving compute across requests, models, hardware fleets and ranking stages by predicting the marginal utility of each unit of compute, adding about 10% ads ranking performance since 2017.

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)
