InterviewStack.io LogoInterviewStack.io

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.

EasyTechnical
20 practiced

How would you validate model serialization/deserialization across different inference runtimes? Describe a test plan to ensure that exporting a TensorFlow SavedModel, converting to ONNX, and running in ONNX Runtime produces outputs within acceptable numerical tolerances, including test data selection, tolerance rules, and automation hooks for CI.

HardSystem Design
17 practiced

Design a model serving architecture capable of handling 1 million requests per second at peak for a stateless classification model with a p95 latency target of 10 ms globally. Consider options such as edge caching, regional model replicas, serverless versus provisioned instances, model sharding, network and CDN strategies, and cost-performance tradeoffs.

HardTechnical
18 practiced

You're optimizing matrix operations for a tight inner loop in C++ that will run on both CPU and GPU. Describe how BLAS/LAPACK libraries, memory layout (row-major vs column-major), cache blocking, and numeric precision choices affect performance and numerical behavior. Provide guidelines for interoperability with Python-based stacks.

MediumTechnical
18 practiced

List and explain techniques to reduce inference memory footprint: weight quantization, weight sharing, pruning, operator streaming, parameter offloading, model partitioning, and model architecture changes. For each technique describe typical memory vs accuracy trade-offs and where it is most applicable (edge vs server).

MediumTechnical
16 practiced

How would you ensure environment reproducibility for ML model deployment across development, staging, and production? Describe practices and tools for dependency pinning, lockfiles, conda versus pip, deterministic container builds, artifact stores, and hermetic builds to avoid 'it works on my machine' issues.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.