This question sprawls in every direction and I underestimated how much ground it actually covers.
Start by clarifying assumptions about the model (e.g., size, architecture) and usage patterns (e.g., requests per user per day, peak-to-average ratio). Then systematically walk through each layer of the system: traffic estimation, resource requirements, hardware selection, latency optimization, and failure handling, using concrete numbers and trade-offs. Emphasize that this is a back-of-the-envelope design, and iterate on numbers as needed.
Pro tip: Always state your assumptions explicitly and show your math—interviewers care more about your reasoning than exact numbers. Also, proactively discuss trade-offs between latency, cost, and reliability, as Waymo values safety-critical system design.
Ask about model size, architecture, input/output, latency SLA, and usage patterns (e.g., requests per user per day, peak traffic multiplier). State assumptions clearly to ground your calculations.
Calculate average and peak QPS based on 100M DAU and assumed requests per user per day. Consider diurnal patterns and peak-to-average ratio (e.g., 2-5x).
Estimate model weight memory (e.g., number of parameters × bytes per parameter), activation memory, and cache sizes (e.g., KV cache for transformers). Calculate network bandwidth for input/output and accelerator memory bandwidth needed for inference.
Choose accelerators (e.g., GPUs, TPUs) based on compute and memory needs. Discuss batching, quantization, model parallelism, and caching to meet latency SLA. Consider edge vs. cloud deployment.
Propose strategies to handle out-of-memory (OOM) errors: graceful degradation, request shedding, dynamic batching, memory pooling, and monitoring. Discuss redundancy and failover for high availability.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.