Model Deployment and Inference Optimization Questions
Serving trained models efficiently in production. Covers deployment and containerization, real-time and batch serving, latency budgets, throughput and cost optimization, quantization and model compression, and online/real-time learning constraints. Emphasizes meeting production performance targets without sacrificing model quality.
Theoretical: discuss the trade-offs between ensembling multiple smaller models versus using one larger single model in production. Cover accuracy/robustness gains, inference latency, maintenance/ops complexity, calibration, and cost. Provide concrete situations where ensemble is the right choice and where it is not.
Scenario: You must choose between deploying a large pretrained model (500M+ parameters) or training a smaller model plus distillation for a search re-ranking task. Business constraints: P95 latency budget 20ms, limited serving cost per QPS, and desire for highest possible relevance. Describe how you would evaluate which approach to take, including offline proxies, latency/cost estimation, and rollout strategy.
Design an approach for deploying a small object-detection model to heterogeneous edge devices (ARM CPU, mobile GPU, NPU) with a memory budget under 200MB and batch size 1. Address model conversion, runtime selection, quantization, fallbacks for unsupported operators, and remote telemetry for model health while minimizing bandwidth usage for logs.
Design an autoscaling policy for a mixed-workload inference cluster that runs latency-sensitive and throughput-oriented jobs. Choose metrics to scale on (e.g., GPU utilization, request queue length, tail latency), describe cooldown and stabilization strategies to avoid oscillation, and explain how to prevent resource starvation and ensure fairness between workload classes.
Outline how to implement quantization-aware training (QAT) for a convolutional network in PyTorch. Include key code-level changes, how to handle batchnorm folding or freezing, where to insert fake-quant modules, and practical tips for fine-tuning hyperparameters to recover accuracy.
Unlock Full Question Bank
Get access to all Model Deployment and Inference Optimization interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.