AI Engineering · Engineering area
Model and Inference Engineering
Reason through model training, post-training, multimodal evidence, and inference when quality, compute, memory, and latency compete.
203 questions · Staff + Principal
Browse questions
203 questions in 12 subtopics
End-to-end serving and modalities
13 questions- How would you locate the cause of pauses in a streamed model response?
- What does aggregate token throughput reveal about an inference service’s user-visible performance?
- How should video inputs change capacity planning and admission for a multimodal model service?
- Why can first-token latency rise while GPUs are underused, and how would you find the bottleneck?
- Why must a model release pin its tokenizer, chat template and tool parser as well as its weights?
- What should model readiness guarantee when rare input shapes still pay cold-start costs?
- How should image detail and visual processing enter a model request’s admission budget?
- How would you diagnose shape-dependent inference fallbacks and choose which execution paths to optimize?
- How would you diagnose wrong-request outputs during CUDA graph replay?
- How would you distinguish tensor-parallel correctness bugs from floating-point sensitivity in greedy decoding?
- What does a sampling seed guarantee when a model moves between inference engines?
- How can distributed top-p sampling preserve one probability distribution over a sharded vocabulary?
- Why can merging a LoRA adapter into low-bit weights change the adapted model’s answers?
KV cache and capacity
23 questions- How would you investigate rising inference latency when KV cache usage increases but GPU utilization stays flat?
- How does a transformer KV cache grow, and what can prefix caching share?
- Why can prefix-cache hit rate improve while first-token tail latency gets worse?
- When should a service accept million-token contexts for interactive model requests?
- When is swapping a live sequence’s KV cache cheaper than recomputing it?
- How would you evaluate a quality regression after quantizing only the KV cache to FP8?
- What compatibility contract is required when prefill and decode exchange a KV cache?
- How would you explain rising cost per completed agent task despite more prompt-cache hits?
- How should inference cancellation release KV ownership without corrupting other requests?
- How should a hybrid model’s attention layers determine which KV history can be evicted?
- How can repeated attention-cache preemption waste GPU work while aggregate throughput rises?
- How should shared prefix-cache blocks survive cancellation of one active request?
- Why must a conversation rebuild or pin its attention cache when model weights change?
- How would you bound pending attention-cache transfers and decoder reservations in split inference?
- How should speculative decoding invalidate rejected-token state before continuing target generation?
- Why can increasing tensor parallelism stop reducing attention-cache memory per GPU?
- How should prefix-cache identity change when a tenant updates its LoRA adapter?
- How does block-based attention-cache allocation waste space for short active requests?
- Why can prefill run out of GPU memory even when the attention-cache budget fits?
- How should beam search share KV cache safely when decoding branches diverge?
- How would you budget KV cache for six concurrent 32K-token conversations?
- How do you diagnose low GPU compute utilization during language-model decoding?
- Why can CUDA graph capture retain GPU memory while an inference server is idle?
Parallelism and placement
7 questions- When should prefill and decode run on separate GPUs if attention state must cross a slow link?
- How would you combine tensor, pipeline and data parallelism across eight GPUs on two nodes?
- How would you diagnose and rebalance hot MoE experts without changing the model’s router?
- How would you diagnose a tensor-parallel straggler when every GPU reports collective wait?
- Why can base-model swapping cause poor p99 despite low average GPU memory use?
- Why can expert-parallel MoE serving become slower even with balanced sparse expert compute?
- When can adding tensor-parallel GPUs make decode slower, and how would you choose a better layout?
Quality and decoding trade-offs
11 questions- What evidence would justify deploying a quantized model that regresses on rare enterprise queries?
- How would you decide whether speculative decoding improves fleet cost per successful task?
- Why can schema-constrained JSON tool arguments still be factually wrong or unauthorized?
- How does speculative decoding preserve the target model’s sampling distribution?
- Why can a text stop string truncate schema-constrained JSON inside a quoted value?
- Why can four-bit weight-only inference use less memory but produce fewer tokens per second?
- How would you detect and prevent duplicate beginning-of-sequence tokens in a chat-serving pipeline?
- Why is high speculative-token acceptance insufficient to prove a decode speedup?
- How would you investigate rare quality regressions after FP8 weight-and-activation quantization?
- Why can applying temperature before top-p change the sampling distribution?
- How can speculative decoding preserve target probabilities when draft and target vocabularies differ?
Routing, tenancy and rollout
5 questions- How would you route 50,000 requests per second across unequal models while honoring pins and provider quotas?
- How would you serve tenant-specific LoRA adapters and update them safely during active requests?
- How would you roll out and roll back a larger model with no spare GPU capacity?
- How should a serving fleet enforce tenant adapter deletion across resident weights and active requests?
- How should a quality-aware model router behave when premium capacity runs out?
Scheduling and workload mix
9 questions- When can continuous batching improve throughput and make a short request slower?
- How would you allocate a shared GPU fleet between interactive inference and elastic batch work?
- Can scale-to-zero inference meet a two-second first-token target for unpredictable arrivals?
- How should inference admission reserve attention-cache memory when output length is unknown?
- Why can faster first tokens still make a multi-turn agent task slower?
- How would you prevent long prompts from starving under decode-priority chunked prefill?
- How should a gateway enforce output-token quotas as an admitted response grows?
- How should batched decoding stop one completed sequence without ending or corrupting the others?
- How should inference autoscaling respond when token demand grows but request rate stays flat?
Training and model lifecycle
5 questions- How would you decide whether a partially written distributed training checkpoint is safe to restore?
- How can adding duplicated training data improve average loss while degrading rare customer workflows?
- What must remain equivalent when a training checkpoint is resharded onto fewer GPUs?
- Why can changing the tokenizer during training invalidate an otherwise loadable checkpoint?
- How would you qualify teacher-generated examples before using them to fine-tune a smaller model?
Transformer and model mechanics
33 questions- Why can full-attention prefill remain expensive after FlashAttention removes the quadratic score tensor?
- How do you pack independent training examples without leaking attention or targets across boundaries?
- Why does reducing KV heads with grouped-query attention not guarantee proportionally faster inference?
- How would you validate long-context reasoning after extending rotary position embeddings?
- Why can a mixture-of-experts layer overflow despite enough aggregate expert capacity?
- How does LayerNorm placement change gradient flow when scaling a transformer to more layers?
- What can an attention heatmap establish about whether a model used the correct evidence?
- How does using model width instead of head width change scaled dot-product attention?
- How do active expert parameters differ from resident weight memory when serving an MoE model?
- How should logical positions remain consistent when decoder requests enter padded batches?
- Why is swapping the gate and up projections in a fused SwiGLU kernel not algebraically equivalent?
- How can an RMSNorm epsilon or reduction-precision mismatch change a trained model’s output?
- Why does future-token attention leakage lower training loss while breaking autoregressive generation?
- How can grouped-query attention preserve cache shape but map query heads to the wrong shared heads?
- How must tiled softmax rescale earlier attention accumulators when a later score raises the maximum?
- Why can removing a residual-branch scale destabilize a deep transformer or invalidate a checkpoint?
- How should a checkpoint conversion preserve rotary-position coordinate pairing?
- How should attention handle a query row with no permitted keys without creating NaNs or leaking masked content?
- Why can an MoE router change model outputs while selecting exactly the same experts?
- How should tensor-parallel attention combine row-sharded output-projection results?
- When does RMSNorm require cross-rank reduction in a tensor-parallel model?
- How would you investigate changed outputs after splitting a prompt into prefill chunks?
- What must be validated when converting a trained model from MHA to grouped-query attention?
- How should a sliding-window attention mask align short queries with a longer cached key sequence?
- How would you detect an MoE dispatcher returning correct expert outputs to the wrong token positions?
- Why do multi-token prediction drafts still need verification before streaming?
- What does an MLA cache store, and how do you account for its separate positional key?
- How can expert-load balancing reduce mixture-of-experts model quality even without token drops?
- How do you match the parameter budget when replacing a GELU feed-forward block with SwiGLU?
- How can mismatched RoPE cache conventions corrupt incremental decoding?
- Why can expanding the output vocabulary change old prompts even when their token IDs stay identical?
- Why does masking attention heads fail to guarantee faster inference, and what must structural pruning change?
- How can a mismatch between grammar masks and stop-token IDs produce incomplete JSON?
Post-training and alignment
34 questions- How would you investigate rising reward scores when people prefer an earlier policy checkpoint?
- Why does changing the frozen reference model change the DPO training objective?
- How can incorrect supervised-training targets teach a model to fabricate tool results?
- How would you prevent a coding policy from increasing its training reward by modifying the verifier?
- How should preference training handle unresolved disagreement about a safety boundary?
- When can asynchronous reinforcement learning safely use trajectories from older policy checkpoints?
- How would you tell whether a reward model values useful detail or merely longer answers?
- Why must both responses in a DPO preference pair share the same effective context?
- Why can a small average KL divergence coexist with severe regressions on rare tool-calling prompts?
- How do stale reference probabilities from a different chat template invalidate a DPO comparison?
- Why can rescaling reward change an RL policy even when every answer ranking stays the same?
- How should reinforcement learning label verifier timeouts that do not establish solution correctness?
- Why do equal-reward groups provide no task-learning signal during GRPO post-training?
- How does averaging token log probabilities change a DPO objective based on whole-response probabilities?
- How would you diagnose a coding policy that passes fixed training tests but fails unseen cases?
- Why must an agent’s RL action loss exclude tool observations it did not generate?
- How can a preference-data export reverse the learning signal while DPO loss still improves?
- When can a reward model’s scores be compared across unrelated prompts?
- Why can a low full-transcript training loss hide poor assistant-response learning?
- How should RL reward and evaluation distinguish a completed proof from generation stopped by a token cap?
- How would you verify that a reward score covers an entire answer when evaluator inputs are truncated?
- How does per-group reward normalization magnify small score differences in GRPO?
- What does DPO learn when truncation removes the only difference between preferred and rejected answers?
- How can changing beta in the sigmoid DPO loss alter which preference pairs drive learning?
- How should an RL verifier grade a final answer when an earlier discarded candidate contains the correct value?
- Why can a frozen DPO reference produce different log probabilities on identical inputs?
- How should a reward-modeling system handle persistent cyclic preferences for the same prompt?
- What can a terminal reward teach an agent about which earlier tool decisions contributed to success?
- Why must PPO keep rollout log probabilities fixed across optimization epochs?
- When can historical agent trajectories remain valid training data after tool semantics change?
- How can mixing different prompts into one GRPO group reverse advantage signs?
- How should preference-data splits distinguish ranking new candidates from generalizing to unseen prompts?
- How should GRPO handle a timed-out candidate when computing group-relative advantages?
- Can DPO reduce pair loss while lowering the preferred answer’s probability?
Training execution and recovery
26 questions- How should distributed training handle a nonfinite gradient when some ranks may already have updated?
- How do pipeline depth and microbatch count affect training throughput and idle time?
- When does preserving global batch size fail to preserve the effective training objective?
- How can a stale FP8 scaling factor corrupt a training update, and how would you locate the first error?
- How would you restore a training data cursor without replaying or skipping samples?
- Why is clipping a running gradient accumulator different from clipping the final accumulated gradient?
- How should learning-rate progress behave when mixed-precision overflow skips an optimizer update?
- Why can a LoRA adapter have nonzero gradients but receive no optimizer update?
- How can checkpoint conversion preserve embedding values while breaking tied-weight training?
- How would you verify that restored optimizer moments still belong to the correct parameters?
- How can changing AdamW parameter groups alter training without causing a numerical error?
- What random state must activation checkpointing preserve to reproduce the original dropout gradient?
- How would you synchronize asynchronous gradient reduction before the optimizer reads its result?
- How should gradient-norm clipping account for parameters sharded across workers?
- How do you compute exact cross entropy when the vocabulary logits are sharded?
- Why must a pipeline backward pass use the parameter version from its matching forward pass?
- Why must Adam step counters be restored together with their moment tensors?
- How does increasing LoRA rank change adapter scaling and training dynamics?
- When is activation checkpointing worth its recomputation and FSDP communication cost?
- Why can zero gradients still change supposedly frozen base weights during LoRA training?
- Why can longer training contexts require more computation under the same token budget?
- How should a learning-rate schedule account for changing valid tokens per optimizer update?
- Why must loss-scaled gradients be unscaled before norm clipping?
- Which FSDP parameter representation belongs in a resumable mixed-precision training checkpoint?
- Why might Megatron-style sequence parallelism fail to solve a long-context attention OOM?
- How do you estimate full-parameter Adam training memory beyond model weights?
Training data and objectives
13 questions- How can a 20 percent code-document mixture produce nearly half of the optimized training tokens?
- When should distributed training share a random seed, and when does it need distinct augmentation streams?
- How should distributed training normalize losses when ranks contribute different valid-token counts?
- How can padding masks prevent a fine-tuned assistant from learning its response terminator?
- Why does URL-level deduplication fail to control repeated training text, and what should replace it?
- Why does gradient accumulation fail to preserve the negative set in an in-batch contrastive loss?
- How can in-batch negatives train a retriever to reject other valid answers?
- When can out-of-order data loading change the training mixture rather than only throughput?
- How does averaging loss per example change the weight of short and long answers?
- How do you compare language-model loss after changing tokenizers without confusing the measurement units?
- Why can a distributed sampler repeat examples even when every training rank receives equal work?
- What distribution does finite-buffer shuffling produce from a source-ordered training stream?
- How can a double shift of causal-language-model labels train the wrong prediction task?
Multimodal evidence and voice
24 questions- How do you map image citation boxes back through crops, resizes and source revisions?
- How should a voice agent handle a provisional transcript that reverses intent before an external action?
- How would you diagnose incorrect event order in a sampled-video summary?
- How should an assistant report conflicting audio and slide numbers when the user asks what was approved?
- Why is low transcription error insufficient for extracting a speaker’s approval from overlapping speech?
- What evidence can sparse video sampling support about a brief event’s absence?
- How should timestamps map back to original media after multiple silence cuts?
- How can mixing call-recording channels remove evidence before speech recognition?
- How should a transcription pipeline handle a call that changes language after its opening?
- How would you diagnose a vision assistant misreading a tiny error code in a desktop screenshot?
- Why must a voice-activity timeout be separate from authorization for a money transfer?
- How would you distinguish genuine user barge-in from a voice agent hearing its own playback?
- How should a video assistant map sampled frames to reliable citation timestamps?
- How should a voice payment workflow detect and prevent a fifteen-versus-fifty amount error?
- Why does relabeling 16 kHz audio as 48 kHz shorten recognition time, and how should it be repaired?
- How can a stereo-to-mono downmix cancel speech that is audible in either channel?
- How should a meeting assistant handle a missing objection during overlapping speech?
- How would you find and fix clipped first syllables in a live speech pipeline?
- How would you verify who wore a visible badge when a video tracker switches identities during occlusion?
- How should typed monetary values produce matching screen and spoken confirmations?
- What can playback acknowledgments prove when a voice confirmation is cleared before the caller hears it?
- How would you diagnose audio-video synchronization drift that grows during a live session?
- How would you diagnose a vision model missing a small footnote on a high-resolution source page?
- How would you locate caller speech lost between microphone capture and recognition during barge-in?
Learn the systems behind these decisions in Topics.