Interview questions in AI & ML, page 16
How the KV cache speeds transformer generation
Cache stores past keys and values so each new token only computes its own K, Q, V instead of recomputing all prior tokens, cutting per-step cost from quadratic to linear.
How text prompts guide Stable Diffusion
A frozen text encoder turns the prompt into token embeddings, which feed the U-Net via cross-attention at each denoising step so the prompt steers generation; classifier-free guidance amplifies the…
How do you programmatically promote a retrained model to production?
Compare on held-out data using significant metric uplift, schema, latency, and drift checks before shadow release.
What is Simpson's Paradox and how can it bias A/B tests?
Tests whether you recognize that aggregate trends can reverse within subgroups. A strong answer defines the paradox, gives an A/B example where treatment wins overall but loses in every segment due to skewed allocation, and prescribes stratified analysis.
Teacher-student knowledge distillation
A small student learns to mimic a large teacher's soft probability outputs, not just hard labels; goal is a compact model retaining most capability.
Unpaired image translation with CycleGAN
CycleGAN uses two generators and two discriminators with a cycle-consistency loss that forces translating to the other domain and back to reconstruct the input, removing the need for paired data.

Design concept drift detection with automated retraining safeguards
Baseline monitors raise CloudWatch alarms; EventBridge triggers retraining with cooldowns; model registry gates promotion.
How would you estimate causal impact using a quasi-experimental method?
DiD with Canada versus Australia; assert parallel trends; validate with pre-period plots and placebo tests.
PTQ versus QAT for INT8 quantization
PTQ quantizes a trained model with light calibration, fast and cheap but more accuracy loss; QAT simulates quantization during training, higher accuracy but costly.
Classifier-free guidance in diffusion models
Train one model jointly on conditional and dropped-condition inputs; at inference extrapolate from unconditional toward conditional prediction via a guidance scale, sharpening prompt adherence…
How would you architect dynamic training resource provisioning?
Routes jobs to right-sized instances, provisions managed jobs using spot, and auto-tears down on completion.
Explain Regression Discontinuity Design and propose a real-world scenario
Compare units just above and below a threshold for local effects; propose scenario with forcing variable.
Automated rollback for a failed model deploy
Detect failure via health and metric checks, automatically route traffic back to the last known-good version (blue-green or canary), keep the registry entry but unpromote, and alert.
What memory problem PagedAttention solves
Pre-allocating contiguous max-length cache per sequence wastes memory through internal and external fragmentation; PagedAttention stores KV in fixed non-contiguous blocks like OS paging.
DDPM versus DDIM sampling trade-offs
DDPM is a stochastic Markov chain needing many steps; DDIM is a non-Markovian, deterministic sampler that skips steps for far faster inference and reproducible, invertible latents, trading a…
Explain vanishing and exploding gradients and common mitigation techniques.
Why deep backpropagation causes diverging gradient magnitudes. Repeated multiplication across layers shrinks or explodes gradients; cite tanh [0,1] range; list ReLU, batch norm, and gradient clipping. Blaming activation choice alone without citing depth.
Tensor versus pipeline parallelism for large models
Tensor parallelism splits individual layers across GPUs needing fast interconnect; pipeline parallelism splits layers into stages across GPUs.
Designing a high-resolution photorealistic face generator
Weigh StyleGAN's fast, controllable style-based synthesis against diffusion's diversity and stable training; handle scale via progressive or multi-resolution synthesis; protect diversity to avoid mode…
What are the essential components of an end-to-end ML platform?
Tests mapping the ML lifecycle to infrastructure. A strong answer walks through six stages: data ingestion, feature store, training pipeline, model registry, deployment/serving, and monitoring with feedback loops.
What is overfitting and how does Dropout prevent it?
Tests generalization intuition: overfitting is low train error but high test error. Good answers say dropout randomly zeros hidden units during training to stop co-adaptation. Bad answers say dropout permanently deletes neurons or just reduces capacity.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles