InterviewStack.io LogoInterviewStack.io

Model Deployment and Inference Optimization Questions

Comprehensive coverage of designing, deploying, and operating systems that serve machine learning models in production while optimizing inference for latency, throughput, reliability, cost, and resource constraints. Topics include serving architectures such as batch processing, streaming, real time online serving, and edge inference, trade offs between precomputation and on demand computation, and deployment topologies for cloud, on premise servers, and edge devices. Discuss model versioning and rollout patterns including canary rollouts, blue green deployments, gradual rollouts, A B testing, and rollback strategies, and the infrastructure to support them such as containerization, orchestration, routing, traffic management, load balancing, and autoscaling. Cover inference optimization techniques including quantization, pruning, knowledge distillation, model compression, efficient architecture choices for computer vision and large language models, model format export and compatibility such as Open Neural Network Exchange and saved model formats, runtime optimizations, batching, request coalescing, caching, pipelining, and handling heterogeneous models and large model inference. Include hardware and infrastructure considerations such as graphics processing units, tensor processing units and other accelerators, memory and latency budgets, distributed and accelerated inference strategies, cost and energy trade offs, and edge device constraints. Operational and observability concerns include logging, metrics, latency and error tracking, model drift and data drift detection, profiling and benchmarking, performance regression alerts, debugging predictions in production, integration with continuous integration and continuous delivery pipelines, automated retraining and rollback policies, and practices to enable reliable, observable, and rapid iteration at senior and staff levels. For vision specific deployment, address image preprocessing pipelines, model input and output formats, and edge constraints such as energy and memory limits.

HardTechnical
34 practiced
Explain strategies for distributed inference of very large models using model parallelism across multiple GPUs with minimal inter-GPU communication. Compare tensor parallelism, pipeline parallelism, and 2D/3D hybrid approaches for inference (not training), and detail memory placement and activation handling to reduce cross-host latency.
EasyTechnical
22 practiced
Define data drift and model drift. For a deployed classifier, describe practical statistical tests and heuristics you would use to detect each over rolling time windows, including how to handle small sample sizes and noisy telemetry.
MediumSystem Design
17 practiced
How would you implement autoscaling for GPU-bound model-serving pods in Kubernetes? Describe metrics to scale on (custom metrics vs CPU), scheduler considerations for GPU allocation, how to handle slow startup (cold-start) times, and alternatives if horizontal scaling is insufficient.
MediumTechnical
18 practiced
After deploying a new model version you observe a sharp increase in inference latency. Describe a systematic debugging checklist to isolate whether the cause is the model (size/ops), container/runtime configuration, GPUs/CPUs, networking, or input data changes. List specific logs, metrics, and profiling tools you would use at each step.
MediumSystem Design
19 practiced
You need to serve multiple image models that each require different preprocessing steps (resize, normalize, color space). Propose a scalable preprocessing pipeline that avoids duplicated work, ensures consistency between training and inference, and supports caching/serialization of intermediate tensors. Describe components and where preprocessing should live (client, edge, inference node).

Unlock Full Question Bank

Get access to hundreds of Model Deployment and Inference Optimization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.