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
35 practiced
Implement a lightweight profiling tool (pseudo-code or real Python) that instruments a model's forward pass to measure per-layer latency and peak memory usage. The tool should export a timeline of layer latencies and identify top-3 hotspots (layers with highest time or memory). Explain how you'd integrate this into a CI benchmark to detect regressions.
MediumTechnical
19 practiced
Explain pipeline parallelism, data parallelism, and tensor/model parallelism. For inference serving of large models, which forms of parallelism are applicable, and how do they affect latency, memory usage, and operational complexity?
MediumTechnical
19 practiced
Compare pruning and quantization in terms of model size reduction, speedup on various hardware, ease of tooling, and accuracy impact. Explain when structured pruning is preferable to unstructured pruning, and summarize pitfalls when combining pruning with quantization in a production pipeline.
HardTechnical
22 practiced
Evaluate the cost and energy trade-offs of moving inference for parts of a popular mobile app from cloud GPUs to on-device inference across 10 million monthly active users. Describe the metrics and assumptions you would use, outline how to compute a break-even point (cost per request vs device battery impact, development and maintenance costs), and discuss privacy, UX, and regulatory considerations.
MediumTechnical
23 practiced
You must detect data drift and concept drift for a deployed binary classifier. Propose a practical monitoring and alerting solution: which metrics and statistical tests to use, sampling strategy, window sizes, thresholds to reduce false positives, and how you'd integrate human validation into the loop.

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.