179 questions
No questions match those filters.
The product team wants a 2x speedup and has forbidden q...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansBatching is the instinctive answer, but it improves aggregate throughput across many users — it doesn’t make a single user’s generation faster, which is what was actually asked for.
The lever that does is exploiting the asymmetry between the two phases of generation: prefill (processing the prompt) is parallel and compute-bound, while decoding (generating tokens one at a time) is sequential and memory-bandwidth-bound — that sequential bottleneck is what makes generation feel slow per-token.
Speculative decoding attacks exactly that: a small, fast draft model proposes several tokens ahead, and the large model verifies all of them in a single parallel forward pass — verification is prefill-shaped, so you get multiple tokens for roughly the cost of generating one. And it’s lossless: the large model accepts or rejects every proposed token, so output quality is unchanged even though nothing was quantized or pruned.