Problem
Pinterest ads pass through a lightweight ranking stage. It cuts the candidate set before heavier ranking models see it. Until 2025 all its two-tower models were served on CPUs. The team wanted a more complex architecture without raising latency above the CPU baseline. A larger model also meant more training FLOPs and longer training on large datasets. The previous model covered standard and shopping ads together.
Example from the article: in 2025 Pinterest launched its first GPU-served two-tower model for ads engagement (CTR) prediction, replacing an MTMD (Multi-Task Multi-Domain) model.
Solution in brief
Keep the two-tower split, but swap the towers for a Multi-gate Mixture-of-Experts (MMoE) network whose experts are Deep & Cross Network (DCN) layers, and serve it on GPU to hold latency near the CPU baseline. Train standard and shopping ads as separate models, and speed up GPU training with data-loading, kernel and precision changes.
Questions this case answers
- How to raise the quality of a cheap first-stage ranking model that must keep the item side precomputed and the query side real time, without exceeding the old latency budget
- How to train a multi-task, multi-domain scoring model efficiently on GPUs when its compute grows several times over the previous model
- How to make a two-tower ads ranking model more complex without raising serving latency above the CPU baseline?
- How to cut the loss of a lightweight (first-stage) ads CTR model when one model serves very different ad types?
Tools and methods
- Two-tower model — Pin (ad) embeddings computed offline in batch, query (user) embeddings computed in real time.
- MMoE with MLP gating — shared experts plus per-task gates that replace domain-specific modules.
- Deep & Cross Network (DCN) — full-rank and low-rank cross layers inside each expert.
- KL divergence loss — trains the model to match downstream ranker scores.
- BF16 training, GPU prefetch, fused kernels — shorten training time.
Google or a one-time email code. No password.