MetaJinfu LengProblem & solution
Turning Opportunistic AI Inference Capacity Into Better Ads Recommendations
Summary
Meta built a system that aggregates fragmented idle inference capacity from a globally constrained fleet into a shared opportunistic pool to enhance ads recommendations. Idle capacity arises from four mismatches: peak provisioning with demand variation, model development timing with capacity delivery, regional resource ratios, and accelerator types. Two elasticity levers exploit this preemptible, volatile capacity: Rank More Ads increases candidates evaluated by ranking stages, using both CPU and accelerator surplus, and Serve Better Models routes more requests to a more powerful model, using accelerator-only surplus. The system protects baseline serving through isolated routing, minute-scale feedback loops that adjust candidate volume and model coverage, and millisecond-scale value-aware load shedding that removes lower-value work during sudden preemption. This allows optional work to expand and contract with opportunistic capacity, driving better ad relevance and advertiser outcomes without requiring additional capacity orders.
Approach / What changed
The system aggregates fragmented idle inference capacity into a shared opportunistic pool. Two elasticity levers consume this capacity: Rank More Ads (RMA) increases the number of ad candidates evaluated by ranking stages, and Serve Better Models (SBM) routes more requests to a more powerful model. Physical and logical isolation protect baseline serving capacity. Separate feedback loops controlling RMA and SBM operate on the order of minutes to align work with available capacity. Value-aware load shedding at servers and clients reacts within milliseconds to sudden preemption, removing lower-value work to prevent overload of dedicated capacity.
Takeaways
Idle inference capacity arises from four mismatches: peak provisioning vs demand variation, model development vs capacity delivery timing, regional resource-ratio mismatch, and accelerator-type mismatch.
Rank More Ads (RMA) increases candidate volume using both CPU and accelerator surplus, while Serve Better Models (SBM) increases model coverage using accelerator-only surplus, enabling use of a broader range of opportunistic capacity.
The system protects baseline serving with isolated routing targets, minute-scale feedback loops for work regulation, and millisecond-scale value-aware load shedding at servers and clients.
FAQ
How does the system protect baseline traffic when opportunistic capacity is reclaimed?
It uses physical and logical isolation to separate optional work from baseline capacity. Separate feedback loops adjust work on the order of minutes, and value-aware load shedding at machines and clients reacts within milliseconds to sudden preemption, removing lower-value work first to minimize impact.
What are the two elasticity levers and how do they differ in resource use?
Rank More Ads (RMA) increases the number of ad candidates evaluated, requiring both CPU and accelerator surplus. Serve Better Models (SBM) routes more requests to a more powerful model, using accelerator-only surplus without substantially increasing upstream CPU demand.
What causes idle inference capacity even when the fleet is globally constrained?
Four types of mismatch: peak provisioning with demand variation, model development timing with capacity delivery, regional resource-ratio mismatch, and accelerator-type mismatch. These create temporary local idle pockets despite overall global constraint.
Source and freshness
- Source
- engineering.fb.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.