WhoBuilt

Teaching Gemini to Speak YouTube: Adapting LLMs for Video Recommendations to 2B+DAU

Jul 16, 2025· 23 min· 19K views·Watch on YouTube

Speaker

Devansh Tandon of YouTube explains how the company adapted Gemini into a large recommender model for video recommendations at AI Engineer.

Why recommendations matter

Tandon argues that recommendations may become a larger consumer application for LLMs than search because they shape engagement across large apps. At YouTube, recommendations power Home and Watch Next, influence Shorts, and personalize some search results; much of the platform’s watch time comes from them.

Giving videos semantic IDs

To help a model reason over billions of videos, YouTube represents each video with a compact semantic ID. The IDs are built from features such as titles, descriptions, transcripts, audio, and sampled video frames, which are embedded and quantized using RQ-VAE. Shared ID prefixes capture related content, such as different volleyball videos.

Adapting Gemini for recommendations

YouTube continued pretraining a Gemini checkpoint to connect English with semantic IDs and learn from sequences of user watches. Training tasks link video IDs to titles and other details, and ask the model to predict masked videos in watch histories. The resulting large recommender model can generate candidate video IDs for tasks such as retrieval.

Making recommendations work at YouTube scale

Tandon says the model found useful recommendations for difficult cases, including suggesting women’s races to a viewer whose history and context pointed beyond the men’s races previously recommended. Serving the model was expensive, so YouTube reduced TPU costs by more than 95% and also used offline inference to build a lookup table of candidate videos for popular content. Freshness and scale remain central challenges: YouTube has 20 billion videos, and new releases may need to reach viewers within hours.

A recipe and future direction

Tandon’s recipe is to tokenize a domain’s content, train an LLM to connect those tokens with natural language, then use personalized prompts and task-specific models to generate recommendations. He expects users to eventually steer recommendations and ask for explanations in natural language, with search and recommendations becoming less distinct. He also describes generated, personalized content as a possible later step.

Takeaways

  • Create compact, meaningful tokens for domain content when a model must reason across a very large corpus.
  • Train the model to connect those tokens to language and to learn relationships from sequences of user behavior.
  • Measure serving costs early; offline inference and lookup tables can make expensive recommendations practical at scale.
  • For fast-changing catalogs, plan for frequent model updates and ways to surface new items quickly.
  • Use language interfaces to let users express recommendation goals and understand why items were suggested.

Mentioned in this talk

Search inside this talk

What was claimed 8

Related talks