This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
Tag: CV
MSD0142 Video Captioning under a Compute Budget
Design the captioning system for a video platform with a billion-video catalog, where generating high-quality captions costs GPU time you do not have. This is the problem behind YouTube- and TikTok-scale auto-captioning. Captioning everything at max quality costs an order of magnitude more than the budget allows. Running the cheapest model on everything wastes budget on videos nobody watches and still fails on the content that matters. You must allocate a fixed daily compute budget across the catalog to maximize captioned value.
How would you design this system? Cover the prioritization policy (which videos get captioned, and in what order, based on predicted views, accessibility needs, and content risk), the model cascade (cheap draft vs expensive quality pass, and when to upgrade), incremental coverage as budget arrives and backfill for the long tail, quality measurement without human transcripts at scale, and how allocation adapts when a video unexpectedly goes viral.

The Problem: a billion videos with wildly skewed views, a daily GPU budget an order of magnitude too small for max-quality captions on everything, and viewers who need captions on whichever video they open.
Answer
Treat GPU time as a budget and every caption as a purchase. Each purchase is priced in GPU-seconds and valued as predicted watch-hours times the usable accuracy it adds, weighted for accessibility demand and content risk. An allocator buys actions in order of value per GPU-second until the daily budget clears, and the value ratio at that cut-off becomes a shadow price
for every later decision. The models form a two-tier cascade: a draft model at 3 GPU-seconds per audio-hour covers the likely-watched majority at upload, and a 60 GPU-second quality model is bought only for the head and for drafts the estimator expects to fail. The long tail is drafted lazily on first caption request and backfilled off-peak, while a streaming view-velocity re-scorer pulls a sudden viral hit into a reserved hot lane within 30 minutes.
(1) Value Model: score each video by predicted 7-day watch-hours times expected accuracy gain, multiplied by an accessibility weight (caption-on viewer share) and a risk weight (kids, news, medical).
(2) Shadow-Price Allocator: greedily buy actions by value per GPU-second until the budget clears, then re-solvehourly and pace spend through the day.
(3) Draft-Then-Upgrade Cascade: the cheap draft runs first and yields a confidence signal; a video upgrades to the quality pass only when its expected gain per GPU-second beats.
(4) Tiered Coverage: draft at upload for the top 60% of new audio-hours, draft lazily on first caption request for the rest, and backfill the catalog off-peak in predicted watch-time order.
(5) Reference-Free Quality: estimate WER from decoder confidence and draft-versus-quality disagreement on a short probe, calibrated on a small stratified human audit.
(6) Velocity Re-Scoring: a streaming job re-scores accelerating videos every 15 minutes and routes them through a reserved 5% hot lane.
Figure 1: One value score drives every lane: drafts go wide, the quality pass is bought only above the shadow price, and estimated WER plus view velocity feed back into the next decision.
Clarify Before Designing:
(1) Budget Shape: is the 1,500 GPU-hour daily budget a hard cap or a rolling average, and can backfill borrow off-peak or spot capacity?
(2) Popularity Skew: early YouTube measurements found the top 10% of videos drew about 80% of views; does a skew like that hold for our watch-hours?
(3) Accessibility Contract: are there legal caption mandates (for example, content that aired on TV), and is a caption that appears within a second of a viewer’s request acceptable?
(4) Quality Bar: what WER makes a caption usable, and is a wrong caption worse than none for some categories such as kids content?
(5) Language Mix: what share of audio is in low-resource languages or music-heavy, where a cheap draft model collapses?
(6) Downstream Consumers: do search, translation, and moderation also read the transcripts, which would raise the value of captioning unwatched but risky videos?Login to view more contentMSD0135 Video-Generation Serving on a Scarce GPU Pool
This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
MSD0089 Generative AV Simulation
This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.
MSD0078 AV Behavior Prediction
Design the behavior prediction module for an autonomous vehicle. Given the ego vehicle’s sensor history (multi-camera, LiDAR, radar) and HD map, predict trajectories for every surrounding agent (vehicles, cyclists, pedestrians) 3 to 8 seconds into the future.
The planner consumes these predictions at a fixed 10Hz cadence with a hard 50ms compute budget on the vehicle’s chip. It needs uncertainty, not just a point estimate: per-step covariance or a small set of discrete modes (go straight, turn left, yield). A missed rare maneuver (sudden lane change, jaywalker) is far worse than a slightly off average trajectory.
How would you design this system? Cover the scene representation (vectorized agents/lanes vs rasterized BEV), the prediction model architecture (how multimodality is expressed: anchors, diffusion, discrete modes), the uncertainty contract with the planner’s cost function, joint-vs-marginal prediction (agents interact), how you evaluate beyond average displacement error (miss rate on safety-critical maneuvers, calibration of the modes), and the on-vehicle latency budget split against the rest of the stack.

The Problem: four road users around one intersection each have several plausible futures (marked ?), and all of them must be forecast 3 to 8 s ahead for a planner that reads every 100 ms, inside a 50 ms compute slice.
Answer
The design is a vectorized, query-centric transformer: every tracked agent and lane segment becomes a token, local attention encodes the scene, and a decoder emits a handful of intention-anchored modes per agent. Each mode is a full 8 s trajectory with a per-step Gaussian covariance and a calibrated probability. Interaction is handled in two tiers, with marginal modes for every agent plus scene-level joint modes for the few groups whose futures actually conflict. The pivotal decisions are the planner contract (calibrated probabilities, honest covariance, a hard deadline with a stale-output fallback) and an evaluation regime gated on miss rate and calibration over safety-critical slices rather than average displacement error. Caching static map encodings and keeping attention local is what fits the nominal path into 40 ms of the 50 ms budget.
(1) Vectorized Query-Centric Scene: agents and lane, crosswalk, and stop-line polylines become tokens in their own local frames, so static map tokens are encoded once per tile and reused every cycle.
(2) Local Factorized Encoder: attention over time, agent-to-map, and agent-to-agent is restricted to each token’s 64 nearest neighbors, keeping cost linear in scene size.
(3) Intention-Anchored Decoder: 64 learned endpoint anchors per agent type emit Gaussian trajectories, and endpoint NMS keeps 6 diverse modes instead of the 6 most probable near-duplicates.
(4) Marginal Plus Joint: marginal modes for every agent, joint scene-level modes only for groups whose futures conflict, optionally conditioned on the planner’s candidate ego plans.
(5) Calibrated Planner Contract: per-mode probability and per-step covariance with stated calibration guarantees, published every 100 ms with a deadline watchdog and physics fallback.
(6) Rare-Maneuver Data Engine: mine and upweight cut-ins, jaywalks, and U-turns, and gate every release on miss rate for those slices.
Figure 1: The online path (scene tokens, local-attention encoder, anchored decoder, joint re-scoring) publishes the planner contract every 100 ms; offline, logged outcomes feed rare-maneuver mining and shadow-gated retraining.
Clarify Before Designing:
(1) Scene Density & Range: how many agents does the densest scene hold, and out to what range (80 m urban versus 200 m highway)?
(2) Planner Interface: does the planner consume one unconditional prediction set, or query predictions conditioned on its own candidate plans, and does it want modes or an occupancy grid?
(3) Compute Sharing: is the 50 ms on a dedicated accelerator partition or shared with perception, and does the chip run int8 transformers efficiently?
(4) Input Quality: tracked boxes only or also BEV sensor features, and how often do tracks switch IDs or drop occluded pedestrians?
(5) Safety Bar: which maneuver slices gate release at what miss rate, and how much over-caution (phantom braking) is acceptable in exchange?
(6) Data Supply: how many hours of fleet logs exist, and how many rare maneuvers arrive per month?Login to view more content










