MikhbarMIKHBAR
Artificial Intelligence

Meta Introduces F3 Lightning to Scale Ads ML Features

Meta has introduced F3 Lightning, a new infrastructure layer designed to accelerate the deployment of machine learning features for ads ranking models.

Meta Introduces F3 Lightning to Scale Ads ML Features

Background on the Facebook Feature Framework

The Facebook Feature Framework (F3) serves as Meta’s core framework for authoring, compiling, and serving machine learning features utilized by ads ranking models. As detailed by <a href="https://engineering.fb.com/" target="_blank">Meta Engineering</a>, a single request within these systems can demand more than 20,000 distinct features.

Meta initially presented F3 at <a href="https://atscaleconference.com/videos/ai-scale-2020-f3-next-generation-feature-framework-at-facebook/" target="_blank">AI @ Scale 2020</a>. By compiling all individual features into a single merged graph, the original architecture successfully reduced execution computational costs. However, that shared graph also acted as the primary release unit, creating significant operational bottlenecks.

The Bottleneck of the Shared Execution Graph

Production machine learning systems rarely consume raw data directly. Instead, feature-serving systems must read stored signals, filter events to specific time windows, perform summations, normalize values, and combine intermediate results before a model can generate a prediction.

To handle this efficiently, F3 represented feature extraction as a directed acyclic graph where duplicate operations were collapsed into a single node. While this eliminated redundant computations, it meant that a single malformed definition or unrelated error could hold back every other feature contained within the merged graph.

As the scale grew from a few hundred features to more than 20,000, build failures became increasingly frequent. Because different feature types required distinct validation checks based on their computational nature, new or modified features were subjected to varying testing bars, causing delays across the entire deployment batch.

Introducing F3 Lightning for Independent Releases

To resolve these deployment challenges, Meta developed F3 Lightning, a specialized infrastructure layer built on top of the original <a href="https://dl.acm.org/doi/10.1145/3677998.3678220" target="_blank">Facebook Feature Framework (F3)</a>. F3 Lightning successfully decouples feature releases from shared execution, allowing individual features to be compiled, validated, deployed, and rolled back independently.

Under this new architecture, isolation begins directly in the compiler, where each feature is compiled on its own into an individual configuration. If a specific feature encounters an issue, unrelated features can still ship smoothly without being blocked by errors elsewhere in the pipeline.

Achieving Efficiency Parity at Scale

Early prototypes that separated deployment alone caused CPU usage to spike because independent features no longer shared computational tasks. To close this gap, engineers implemented specific optimizations to preserve the performance advantages of the original framework.

By establishing stable computation identifiers, a single shared execution plan, a unified memory buffer across all features, and dense index mapping for direct array access, F3 Lightning restored shared execution without rebuilding a monolithic merged graph at runtime.

Production Impact and Faster Iterations

With the implementation of F3 Lightning, comparable extraction features now reach production approximately 3.6 times faster than they did under the prior iteration of F3. Crucially, this improvement occurs with no increase in overall infrastructure compute costs.

The shortened release cycle effectively empowers engineering teams to execute a greater number of model iterations within the exact same operational timeframe.

Sources

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

Continue chronologically

Related entity coverage