Serving Engine Internals
16 questionsDONEUNLOCKEDLOCKED
vLLM, SGLang & TensorRT-LLM Interview Questions
vLLM V1, SGLang, TensorRT-LLM and llama.cpp from the inside: the engine core loop, schedulers, KV managers, model runners, CUDA graph capture, detokenisation and streaming, and the configuration knobs whose defaults you must be able to defend.
Worked answers on inference mechanisms, with calculations, implementation details, and follow-up questions.
You have 5 free answers unlocked here.Sign in free for 5 more · 6 are premium.
01–07Foundationsthe physics and terms an interviewer will not stop to define0/7 done
08–13Core loopsthe standard questions of this round, worked end to end0/6 done
14–16Field scenariosproduction incidents and capacity problems with the inputs left incomplete0/3 done
The concepts behind Serving Engine Internals
The ideas these answers lean on. Foundation concepts are free to read; the advanced ones are Premium.
Foundational
The vLLM V1 Engine ArchitecturevLLM's V1 engine splits serving into an API-server process, an EngineCore process that owns the scheduler and the KV cache manager, and one worker per GPU. This page maps each component to its data structures in v0.31.0, works out the KV block pool for an 8B model on an H100, and explains why the split exists: Python overhead has to hide under a 4.8 ms decode step.Advanced
SGLang's Radix Cache and Overlap SchedulerSGLang stores every cached prefix in a radix tree keyed by token ids, so a hit can end at any token rather than at a block boundary, and its overlap scheduler prepares the next batch while the GPU runs the current one. This page walks both through the v0.5.21 source: matching, lock references, leaf-first LRU eviction, the 128-request cutoff on prefix-aware scheduling, and memory defaults.🔒 Premium
Advanced
Serving Engine Knobs and Their DefaultsA handful of engine settings decide how much KV fits, how long a step can get and how many requests run at once. This page lists the defaults in vLLM v0.31.0 and SGLang v0.5.21 as read from source, shows which knob binds first for Llama 3.3 70B on four H100s, and gives the order in which to tune them.🔒 Premium
Unlock all 16 answers · ₹2,000 / $25
Every worked answer and derivation in all 12 topics, every concept page, and the full practice-test bank.
6 months · One payment · No auto-renewal