ML EngineerInterview Questions & Practice

ML Engineer interviews test the full lifecycle: data pipelines, model design, training infrastructure, evaluation discipline, deployment, and post-deployment monitoring. Beyond the core ML curriculum (linear models, deep networks, transformers, reinforcement-learning basics), engineering interviews probe the boundary between research and production. Expect questions on feature engineering, the bias-variance tradeoff, regularization strategies, training-loop bugs, learning-rate scheduling, mixed-precision training, distributed training (data parallel, model parallel, pipeline parallel, ZeRO sharding), gradient checkpointing, and the differences between PyTorch and JAX in practice. MLOps and production questions cover model serving (Triton, TensorRT, ONNX), latency budgets, batching strategies, A/B and canary deployment, drift detection, retraining triggers, and feature-store architectures. Signal-processing-aware ML roles (audio, speech, RF, sensor fusion) bring in DSP fundamentals: spectrogram generation, mel-filterbank features, matched filtering, and the implications of sampling and aliasing on learned features. System-design interviews ask you to architect a large-scale recommender, a real-time speech model, an on-device inference pipeline, or a continuous-training data flow. Day-one reality leans heavier on data pipelines, infrastructure debugging, and evaluation-protocol design than the interview format implies; strong candidates connect model choices to measurable production cost — latency, throughput, accuracy, drift, and the dollar amount each percentage point is worth.

Editorial review

Written by

CompoundLearn editorial team

Wireless / RF / hardware engineering

Reviewed by

CompoundLearn editorial team

Wireless / RF / hardware engineering

Last reviewed

Built from interview experience, editorial validation, and role-specific review so this prep stays aligned with what hiring teams actually ask.

Common interview rounds

  • ML coding (DSA plus building or debugging a model in PyTorch/NumPy)
  • ML fundamentals and theory (architectures, optimization, regularization)
  • ML system design (data, features, serving, monitoring, retraining)
  • Training infrastructure and scaling (distributed training, mixed precision)
  • Production MLOps (serving latency, drift detection, retraining triggers)

Sample interview questions

Q1. How do you tell whether a model is underfitting or overfitting, and what do you change first?

Strong answer: Compare training error against validation error. Both high means high bias (underfitting) — add capacity or features, train longer, or relax regularization. A low training error with a large validation gap means high variance (overfitting) — more data, stronger regularization (weight decay, dropout), or early stopping. A strong answer reaches for the cheapest lever first (early stopping, regularization) before adding data or parameters, and never tunes on the test set.

Weak answer: A weak answer reflexively reaches for a bigger model, or reports a number tuned on the test set so the gap is hidden rather than diagnosed.

Q2. When do you reach for layer normalization instead of batch normalization?

Strong answer: Batch norm normalizes each feature using statistics computed over the mini-batch, so it depends on batch statistics — it degrades with small or variable batches and is awkward for variable-length sequences and autoregressive inference, where the running statistics no longer match. Layer norm normalizes across features within each example, independent of batch size, which is why transformers (see /topics/transformer-architecture) use it. Reach for layer norm on sequence and attention models and small/variable batches; batch norm still wins in CNNs with large batches.

Weak answer: A weak answer treats the two as interchangeable normalization tricks and cannot say which dimension each normalizes over or why sequence models avoid batch norm.

Q3. Training loss spikes to NaN a few hundred steps in. How do you isolate the cause?

Strong answer: The usual causes are a learning rate too high for the post-warmup scale, numerical overflow in mixed precision, or bad data. Be forensic: locate the first non-finite tensor with finite checks (or an anomaly-detection hook) on the inputs, loss, activations, and gradients — that localizes overflow versus corrupt data versus an unstable op before touching hyperparameters. Then treat the cause: extend warmup and clip gradients for optimization instability, check for fp16 overflow to Inf (the dynamic loss scaler should catch it and skip the step) in mixed precision, and look for exploding activations from bad initialization or a missing normalization layer. Lowering the learning rate confirms instability but does not substitute for finding the first NaN.

Weak answer: A weak answer randomly lowers the learning rate without separating overflow from instability from corrupt data, so the same divergence returns under a different config.

Q4. When do you move beyond plain data-parallel training, and to what?

Strong answer: Data parallel replicates the whole model on every device and all-reduces gradients — it holds until the model plus optimizer states no longer fit in one device. Then shard in ZeRO stages (optimizer state, then gradients, then parameters); if a single layer still does not fit, tensor/model parallelism splits that layer across devices; if the stack of layers does not fit or device utilization is poor, pipeline parallelism splits layers across stages — each trades communication overhead for memory. A strong answer first buys activation-memory headroom with gradient checkpointing and mixed precision before paying the parallelism communication cost.

Weak answer: A weak answer jumps to model parallelism while the model still fits in memory, paying communication overhead that optimizer sharding would have avoided.

Q5. Design the serving path for a real-time recommender under a tight latency budget. Where does the budget go?

Strong answer: Split the problem across stages: precompute item embeddings and build the vector index offline (user embeddings too, but refresh them online when recent behavior matters), then run approximate-nearest-neighbor retrieval (see /topics/vector-databases-and-embeddings) and a light ranking model online per request. The budget goes to feature fetch (feature store), online retrieval, and ranker inference — so cache and batch aggressively, quantize the ranker, and precompute what you can. A strong answer names which stages are offline versus online, states where the milliseconds actually go, and includes monitoring plus a retraining trigger.

Weak answer: A weak answer runs one large model synchronously for every request and ignores feature-fetch latency, so the design cannot meet the budget at production scale.

Q6. How do you know a deployed model has degraded, and what should trigger a retrain?

Strong answer: Instrument two things: input drift (feature distributions shifting away from training) and performance drift (calibration now, and label-based metrics once ground truth arrives). A strong answer distinguishes covariate shift (inputs move) from concept drift (the input-to-label mapping moves) because they demand different responses, and makes the retrain trigger threshold-based on those signals rather than a purely fixed calendar (while still allowing scheduled retrains for seasonality or compliance) — and accounts for label latency that hides concept drift until it is expensive.

Weak answer: A weak answer retrains on a fixed schedule with no drift signal, or watches only accuracy and misses that labels arrive late so degradation is caught weeks after it started.

Q7. A stakeholder wants the model to "know" a set of internal company documents. RAG or fine-tuning?

Strong answer: Default to retrieval (see /topics/rag-retrieval-augmented-generation) when the knowledge is factual, changes often, or needs citations: index the documents and retrieve at inference, so an update is a re-index rather than a re-train. Fine-tune to change behavior, format, or a skill the base model lacks — not to inject volatile facts. A strong answer maps the requirement (facts vs behavior, freshness, attribution) to the mechanism and often uses both — see /topics/llm-fine-tuning-vs-rag-decision-guide.

Weak answer: A weak answer fine-tunes to add facts, then cannot update them without another training run and produces no citations, which is exactly what retrieval was for.

Q8. How do you evaluate an LLM feature that has no single correct answer?

Strong answer: Treat it as a rubric-and-dataset problem, not exact match: define task-specific criteria, build a labeled reference set, and combine graded human review with an LLM-as-judge calibrated against those human labels — reporting held-out scores, not in-sample ones. Add guardrail checks such as faithfulness or groundedness for retrieval features, and track regressions across versions. A strong answer refuses to trust a single accuracy number or an uncalibrated judge — see /topics/llm-evaluation-best-practices.

Weak answer: A weak answer eyeballs a handful of outputs or treats an uncalibrated judge model as ground truth, so the metric drifts with the judge and cannot catch regressions.

What strong answers include

  • Separates training from validation behavior before changing the model
  • Ties a model or serving choice to a measurable production cost (latency, drift, dollars)
  • Maps the requirement to the mechanism (RAG vs fine-tune, data- vs model-parallel)
  • Treats evaluation as a rubric-and-dataset problem, not a single accuracy number

Common weak-answer patterns

  • Reaches for a bigger model or more compute before diagnosing the bottleneck
  • Fine-tunes to inject facts that retrieval should serve
  • Retrains on a calendar with no drift signal
  • Reports in-sample metrics or trusts an uncalibrated judge as ground truth

Recommended topic sequence

  1. Neural Networks Explained for Engineers
  2. Transformer Architecture
  3. LLM Evaluation Best Practices
  4. RAG: Retrieval-Augmented Generation
  5. LLM Fine-Tuning vs RAG: Decision Guide
  6. Vector Databases and Embeddings
  7. DSP Fundamentals

Topics covered in this role

Essential AI-Native Skills for ML Engineer

Modern engineering work increasingly uses AI tools for design and code review, debugging, documentation, test and testbench generation, and workflow automation. The goal is not to let AI replace engineering judgment — it is to move faster while keeping verification discipline.

  • Use AI to explain unfamiliar code, logs, waveforms, datasheets, or test failures.
  • Break large problems into small, reviewable steps you can verify independently.
  • Ask AI for hypotheses, then validate them against tests, measurements, simulations, or lab data.
  • Version-control your analysis scripts, testbenches, and configs — keep changes small and reviewable.
  • Document your assumptions, design tradeoffs, and debugging decisions.
  • Verify AI output before trusting it: run the checks that fit the domain — unit tests, linters, simulations, or bench/lab measurements.
  • Review AI output for correctness, edge cases, and real-world consequences.
Start practice