Artificial Intelligence1 min read

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

By · Published by Everything Blog

In short

Meta's ads ranking models require more than 20,000 features per ad request, which were historically compiled into a single merged computation graph that created severe deployment bottlenecks. F3 Lightning resolves this issue by isolating feature lifecycles so they can be validated and rolled back individually. Crucially, the system utilizes a shared memory buffer across all features alongside dense index mapping to eliminate CPU overhead. Consequently, production feature extraction deploys roughly 3.6 times faster while keeping infrastructure compute costs flat.

Key points

  • Engineering teams can deploy and roll back individual machine learning features independe…: Engineering teams can deploy and roll back individual machine learning features independently without waiting on pipeline-wide validation tests.
  • Shared memory buffers and dense index mapping preserve computational efficiency despite m…: Shared memory buffers and dense index mapping preserve computational efficiency despite moving away from bundled releases.
  • The acceleration of production releases allows for more frequent model iterations without…: The acceleration of production releases allows for more frequent model iterations without increasing infrastructure compute costs.

Sources checked by our analysis pipeline: 1

- Facebook Feature Framework (F3) is Meta’s framework for authoring, compiling, and serving the machine learning features underlying ads ranking models, where a single request can require more than 20,000 features. We first presented F3 at AI @ Scale 2020.

- F3 reduced execution computational costs by compiling all features into a single merged graph, but that graph also served as the release unit, so a single failure or invalid definition blocked the entire release pipeline.

- This post introduces F3 Lightning, an infrastructure layer built on top of F3 to resolve this challenge by decoupling feature releases from shared execution, so each feature is compiled, validated, deployed, and rolled back independently.

- The hardest part to solve was preserving F3’s efficiency improvements. Early per-feature release prototypes increased CPU usage because independent features no longer shared computation. We aimed to close this gap through four optimizations: stable computation identifiers, a single shared execution plan, one shared memory buffer across all features, and dense index mapping for direct array access.

- With F3 Lightning, comparable extraction features now reach production ~3.6x…

Artificial Intelligence