Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Netflix TechBlog 7 min read Case study hardMaster

Integrating Netflix’s Foundation Model into Personalization applications

Netflix integrates its transformer-based personalization Foundation Model into production through three patterns: precomputed embeddings, embedding the model as a subgraph of downstream models, and fine-tuning it to power products directly. Embeddings come from the last-event hidden state and the item tower. A monthly pretrain plus daily fine-tune refreshes them, embedding stabilization maps each run into a consistent space, and the Embedding Store serves them. This is the cheap, default starting point, but it suffers from staleness. Subgraph integration removes staleness and allows end-to-end fine-tuning at the cost of heavier feature generation and inference, mitigated by running the subgraph once per profile per request. Fine-tuning gives the best task fit and a fast baseline for new applications but multiplies models to maintain, and Netflix is working on near-real-time embeddings and a distilled model to address the remaining tradeoffs.

Assumes: transformer modelsembeddingsrecommender systemsfine-tuning

Related posts

  • Safe and Efficient Multi-Epoch Embedding Training

    Pinterest Engineering hardMaster

    Fine-tuning large pretrained ID embedding tables for more than one epoch in Pinterest's Homefeed ranking model caused about a 6% offline save regression. Freezing the table and isolating gradient paths traced the overfitting to the embedding table. The best recipe was delayed adaptation: keep the table frozen for early epochs and co-train it only in the final epoch. Update timing correlated roughly linearly with quality, and the recipe beat both the one-epoch and fully frozen models, with gains such as +1.16% on a 20-day window. To make longer training affordable, a semi-synchronous pipeline overlaps sharded embedding all-to-all lookups with compute using bounded one-step staleness, alongside fused ID lookups and a specialized cuEmbed singleton-row gather that keeps torch.compile tracing intact.

  • Meta’s Generative Ads Model (GEM): Scaling the Central Model and Compute Engine for Frontier Ads AI

    Meta Engineering hardMaster

    Meta's 2026 GEM replaces per-surface ads ranking models with a single central recommendation foundation model trained across Facebook, Instagram, Reels and deep-funnel conversion objectives, reporting 18.9% conversion and 12% CTR gains. Its new Kunlun architecture uses block-sparse attention, a GDPA kernel that unifies attention-like ops, MoE-style cross interaction with expert parallelism, component skipping (43% fewer FLOPs) and unified user sequences. Together these support 2.5x model complexity and an LLM-like scaling law, with prediction quality following a power law in sequence length. Intelligence reaches latency-bound vertical models through LoopFM precomputed structured representations, which double transfer effectiveness over plain distillation, and through Solaris speculative precomputation of user-ad embeddings with hierarchical fallback. Custom low-precision kernels and 5D parallelism reach 20-25% MFU at 4x the training FLOPs.

  • User foundation models for Grab

    Grab Engineering hardMaster

    Grab built a transformer-based user foundation model that jointly learns from tabular user attributes and time-series clickstream data to produce general-purpose user embeddings, replacing siloed hand-engineered features. A universal key:value tokenisation with custom positional embeddings and attention masks treats tabular columns as an unordered set and events as an ordered sequence. Modality-specific adapters (pre-trained language models for text, embedding layers for IDs, custom encoders for locations and numbers) feed an alignment layer before the transformer. Pre-training is unsupervised, combining masked token reconstruction with next-action prediction across verticals, so the embeddings serve many downstream tasks such as ads, fraud detection and churn prediction, or the model can be fine-tuned directly.

  • Meta’s Generative Ads Model (GEM): The Central Brain Accelerating Ads Recommendation AI Innovation

    Meta Engineering hardMaster

    GEM is Meta's LLM-scale foundation model for ads recommendation, trained on thousands of GPUs and used as a teacher to improve hundreds of downstream vertical ranking models; it lifted ad conversions 5% on Instagram and 3% on Facebook Feed. The architecture handles non-sequence features with an extended Wukong design (stackable factorization machines), long user-behavior sequences with a pyramid-parallel structure, and cross-feature learning with InterFormer, plus multi-domain learning across surfaces, for 4x the efficiency of earlier ranking models. Knowledge reaches downstream models through direct and hierarchical transfer that combines distillation with a Student Adapter for stale supervision, representation learning and parameter sharing, which Meta reports as 2x as effective as standard distillation. A rebuilt training stack (HSDP for dense layers, 2D sharding of embedding tables, jagged-sequence kernels, FP8 activations, SM-free NCCLX collectives, compile caching) delivered 23x effective FLOPs with 1.43x MFU on 16x more GPUs.

  • Efficient Visual Representation Learning And Evaluation

    Etsy Code as Craft hardMaster

    Etsy compares EfficientNetB0 and the EfficientFormer-l3 hybrid vision transformer as backbones for image embeddings that power visual search and visually similar recommendations, fine-tuned with a four-task multitask setup on two 16GB P100 GPUs. Embeddings are evaluated after each epoch with brute-force nearest-neighbor Recall@K callbacks on intra-item, review-photo and ad-click datasets, plus an experimental set where Stable Diffusion turns text search queries into image queries. EfficientNetB0 (~5M params, 1.7ms on iPhone 12) offers the best latency, while EfficientFormer-l3 (~30M params, 2.7ms) gives up to +17% Recall@5 and +0.65% CTR in A/B tests. The Stable Diffusion pipeline was sped up with token merging and fp16 to about 500 images per hour on one T4.

The quest for software engineering knowledge.

Look:
Layout: