CrackML by @ml.with.umang
Interview questions / GenAI & LLM
GenAI & LLM interview question

How do continuous batching and paged attention improve LLM serving?

How do continuous batching and paged attention improve LLM serving?

hardconceptEvidence 41/1001 source reportNVIDIA

The 60-second answer

Break end-to-end latency into queueing, preprocessing, host/device transfer, kernel execution, synchronization, decoding, and post-processing before optimizing. Profile utilization, memory bandwidth, occupancy, batch shape, cache behavior, and p50/p95/p99 latency to identify whether the bottleneck is compute, memory, launch overhead, or scheduling.

Build the answer in this order

1
Define the mechanism

Break end-to-end latency into queueing, preprocessing, host/device transfer, kernel execution, synchronization, decoding, and post-processing before optimizing.

2
Explain the architecture

Profile utilization, memory bandwidth, occupancy, batch shape, cache behavior, and p50/p95/p99 latency to identify whether the bottleneck is compute, memory, launch overhead, or scheduling.

3
Compare trade-offs

Apply batching, kernel fusion, mixed precision, caching, layout changes, or paged/continuous-batching techniques only when profiling supports them.

4
Close with serving + evaluation

Validate under realistic concurrency and sequence-length distributions while tracking throughput, tail latency, memory headroom, and failure rate.

A useful interview mental model

This is the shape of a strong answer—not a script to memorize.

01Definition
02Mechanism
03Trade-offs
04Failure modes
05When to use

Senior-level signal

  • Design admission control and backpressure so throughput gains do not create OOMs or catastrophic tail latency.
  • Tie kernel-level wins to end-to-end request performance; microbenchmarks alone are not a production success metric.

What the interviewer is really testing

Understanding beyond prompting: architecture, retrieval, evaluation, inference, safety, latency, cost, and failure recovery.

Likely follow-up questions

What assumption makes this approach work?
When would you choose the strongest alternative instead?
What production or data failure mode changes your answer?

Common weak-answer patterns

  • Reciting a definition without mechanism or assumptions.
  • Claiming one technique is always better without a data regime.
  • Stopping before failure modes, validation, or deployment implications.