KatInterview

Multimodal ML Systems: Deployment, Retrieval, and Core Concepts

Machine LearningModel answer
HardModel answerMachine Learningmultimodalretrievalnormalization

Last updated

Design and optimize a constrained multimodal serving system, build fast video retrieval, and explain dropout, normalization, overfitting, and RL-based LLM alignment.

Multimodal ML Systems: Deployment, Retrieval, and Core Concepts

You are being evaluated for a machine learning role at a large consumer technology company. The panel covers both practical system design and theoretical foundations. Answer all six parts; for each one, reason through trade-offs rather than just listing options.


Part 1 — Constrained Multimodal Serving

You must ship a production multimodal model (e.g., text + image, text + video, or speech + text) within hard limits on GPU memory, inference latency, and per-request cost. The current system is too slow and too expensive at scale.

Describe how you would reduce memory, latency, and cost while keeping quality within an acceptable range. Cover:

  • Model-level techniques (quantization, distillation, pruning, input simplification)
  • Serving-level techniques (batching, caching, kernel optimizations, tiered serving)
  • Modality-specific considerations
  • The trade-offs and failure modes of each approach

Part 2 — Large-Scale Video Retrieval

You have a corpus of millions of videos. Each video already has a text caption and one or more precomputed embedding vectors. You need to build a retrieval system that handles user queries with low latency and high recall.

Explain your full design, including:

  • Offline preprocessing and index construction
  • ANN index choice and configuration
  • How you would combine lexical and dense retrieval (hybrid search)
  • Reranking strategy
  • How you handle new videos and deletions (freshness)
  • The metrics you would track, both offline and online

Part 3 — Overfitting

Define overfitting precisely. How do you detect it during training? Walk through the most effective mitigation strategies for deep learning, ordered by impact.


Part 4 — Dropout and Inverted Dropout

Explain the intuition behind dropout as a regularizer. Then derive why inverted dropout keeps expected activations consistent between training and inference. When is dropout ineffective or actively harmful?


Part 5 — Normalization Layers

Compare BatchNorm, LayerNorm, GroupNorm, InstanceNorm, and RMSNorm across three dimensions: what statistics they normalize over, how training-time and inference-time behaviors differ, and why certain choices are preferred in transformers or small-batch settings.


Part 6 — Reinforcement Learning for LLM Alignment

Explain how reinforcement learning is used in post-training large language models — specifically the RLHF pipeline. Cover:

  • The role of supervised fine-tuning as a starting point
  • How a reward model is trained from human preferences
  • How the policy is optimized (PPO), including the role of KL regularization
  • Common failure modes
  • How you would evaluate the resulting model
  • How DPO differs from PPO-based RLHF and when you would prefer it

Hints

Hint 1

For Part 1, the biggest memory wins in vision-language models often come from reducing the number of visual tokens (via pooling or a resampler), not just from weight quantization — think about where the tokens actually come from and how many you really need.

Hint 2

For Part 2, think in two stages: a fast approximate recall stage (ANN + BM25) and a slower precision stage (cross-encoder reranking). Hybrid fusion with Reciprocal Rank Fusion is a practical default — know why it works without requiring score calibration.

Hint 3

For Part 6, the KL penalty is doing two distinct jobs at once — keeping the policy close to the SFT reference and preventing reward hacking. Understanding that dual role helps you explain both why it is necessary and what happens when it is set too low or too high.