This article from Meta Engineering details a multi-stage architecture for their ads ranking system, designed to scale sequence learning models efficiently. It decouples heavy offline user modeling from lightweight online ranking to manage high throughput and low latency requirements. The architecture also introduces dense tokenization and target-aware attention for improved feature interaction learning and exhibits LLM-style scaling laws.
Read original on Meta EngineeringMeta's ads recommendation platforms must process billions of user interactions daily, retrieving and ranking thousands of ads within milliseconds. Traditional hybrid sequence modeling approaches, which use separate models for user event sequences and sparse feature interactions, face significant challenges. These include lossy knowledge transfer, reliance on manual feature engineering, and scaling ceilings due to interference between ranking and sequence model components, particularly as sequence lengths and transformer models grow.
To address the tension between model complexity and serving efficiency, Meta developed a multi-stage sequence model. This architecture fundamentally decouples the computationally intensive user modeling from the latency-sensitive online ranking. This separation allows for significant scaling of model capacity and complexity in the offline stage without proportionally increasing online serving costs.
Architectural Principle: Decoupling Compute
The multi-stage design exemplifies a critical system design principle: decoupling compute-heavy, non-latency-critical tasks from real-time, latency-sensitive operations. This pattern is common in large-scale systems where complex pre-computation can optimize online serving performance and resource utilization.
The multi-stage model demonstrates predictable LLM-style scaling laws where performance improvements show a log-linear relationship with compute. This indicates a strong architectural fit for sequence learning, despite the differences from LLMs (e.g., integrating sparse ID features). Key levers for continued scaling include: