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.

MediumTechnical
22 practiced

Write a SQL query (for PostgreSQL or similar) that computes per-model-version latency percentiles (p50, p95, p99) from an 'inference_logs' table with columns (model_version TEXT, request_ts TIMESTAMP, latency_ms DOUBLE PRECISION, status_code INT). Compute results for the last 7 days grouped by model_version and order by model_version.

MediumTechnical
20 practiced

Describe step-by-step how to convert models from scikit-learn, XGBoost, and PyTorch to ONNX. Explain runtime options such as ONNX Runtime and TensorRT, how to test converted models for numerical parity, and how quantization interacts with ONNX. Mention common pitfalls and how to validate conversions before deployment.

MediumTechnical
23 practiced

Scenario: Mobile image classification app reports increased battery drain after a model update. Provide a structured troubleshooting checklist across model design, runtime, OS interaction, and user-behavior, and propose a mitigation for each suspected cause you identify.

MediumTechnical
16 practiced

Explain the different types of quantization commonly used for model inference: post-training static quantization, post-training dynamic quantization, and quantization-aware training (QAT). For each type describe: how it works, required calibration/data, typical accuracy impact, hardware support differences (CPU/GPU/TPU/NPU), and production use-cases where you would choose one over the others.

HardTechnical
20 practiced

You need to serve explainable predictions for a credit-risk model at runtime (per-request explanation under 200ms). Propose an architecture that provides explanations fast without degrading production latency significantly, and justify the approach you chose over the alternatives you considered.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.