What it costs to look inside a served model
The serving overhead of vllm-lens, and how a fork reduces it
vllm-lens captures activations and steers them inside a vLLM server. These operations slow the server. This walkthrough starts from the cost of upstream vllm-lens, shows each change that the fork makes to reduce it, and then states what the fork still costs against unsteered requests and plain vLLM.
Five setups and four request shapes
In eager mode, Python runs each model layer. With CUDA graphs, the GPU replays a recorded graph, which is much faster for decode.
The table shows what each setup can do.
Upstream has two costs
How the fork reduces the overhead
The fork makes four changes that affect speed. This table shows each change before and after, and the sections below explain them.
Graphs stay on
Vectors are prepared once
Capture can return one row
Idle layers do no work
What the fork costs without steering
What steering still costs
The prefix cache
The copy of an inline vector
What capture still costs
What the fork gives up
Which setup to use
Method and limits
All measurements
Request rate of every setup and request shape, in req/s: unsteered / steered.
Memory and load time of every mode.
Memory of the fork and upstream on Laguna-XS.2.
Where each request’s time goes.