Step 1 — install Tensormesh Operator
Follow Install with HelmIf you already run your own vLLM Deployment, do not replace it with this demo manifest.
Use Modify an Existing Deployment for the
minimum patch set instead.
Step 2 — deploy vLLM connected to the engine
The chart creates a ConfigMap named<engine>-connection holding the
kv-transfer-config.json that tells vLLM how to reach the engine over the MP connector.
Read the connector config from the engine’s ConfigMap
Create the Deployment
Paste that line as the--kv-transfer-config value in vllm-demo.yaml:
vllm-demo.yaml
Step 3 — fire two identical requests, see the cache work
The simplest possible “is LMCache working?” test is to send two identical long prompts. The first populates the cache; the second should reuse the stored KV blocks. Port-forward the service in one terminal:If port
8000 is already in use locally, forward to a different local port — e.g.
... 8001:8000 — and use that port in the requests below.PAYLOAD variable (rather than inlining $(jq …) inside a multi-line
curl) makes it safe to copy-paste and guarantees both calls send the identical
prompt:
Stored N tokens after call 1 and
Prefetch request completed ... prefix hits=N during call 2.
What a successful run looks like
What a successful run looks like
Sample output from a Qwen3-0.6B install on a single A100 40 GB, prompt repeated 30 times
for ~514 tokens:Call 2 was ~2.7× faster than call 1 (1.466 s → 0.548 s). The engine reports (The counter is cumulative across both calls: call 1 hit 0 of 514 tokens, call 2 hit 512
of 514, so 512/1028 = 49.8%. For a two-call test ~50% is the ceiling, not a partial hit.)
2/2 prefix hits from L1, meaning the second request reused the KV blocks stored during the first.
vLLM’s own metrics line confirms the same number from the inference side:Step 4 — run the benchmark
For a more realistic measurement than two curls, usevllm bench serve to compare a cold
pass against a warm pass. Run two passes with the same --seed so the prompts repeat
and the second pass hits the cache.
Rather than installing the vLLM CLI locally, run it inside the cluster as a Job — the
vLLM image already ships the CLI, talks to the inference Service directly (no
port-forward), and a Job runs it once to completion and stops. The benchmark is a pure
HTTP client, so it needs no GPU.
Save as benchmark-job.yaml:
benchmark-job.yaml
Serving Benchmark Result blocks. A working cache shows pass 2 with
much lower TTFT (mean/p50/p99). The speedup scales with --random-input-len: with a fixed
--seed, both passes send the same 20 prompts, so each unique body is prefilled on the cold
pass and served from cache on the warm pass — bigger --random-input-len → bigger delta.
Example result from a working run with --num-prompts 20, --random-input-len 20480, and
--seed 32:
Keep
num_prompts × random-input-len of KV under engine.spec.l1.sizeGB (else pass 1’s
entries evict before pass 2 reads them — warm misses), and random-input-len + random-output-len ≤ --max-model-len (32768 in the Deployment above).ttlSecondsAfterFinished):
Next steps
Install with Helm
Full chart reference, install modes, every tunable value.
Configuration
Every
values.yaml key, with example overlays.Observability
Metrics, dashboards, and performance tuning.
Troubleshooting
Pending pods, image pull, hung uninstall, ownership conflicts.
