Skip to main content

Step 1 — install Tensormesh Operator

Follow Install with Helm
If 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

You should get one line like this:

Create the Deployment

Paste that line as the --kv-transfer-config value in vllm-demo.yaml:
vllm-demo.yaml
Apply and wait for the Pod to become Ready (5–10 min on first boot for image pull + model download):

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.
In a second terminal, build the request once into a variable, then fire it twice. Keeping the JSON in a 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:
Then check the engine logs for store and retrieve markers:
A working install logs Stored N tokens after call 1 and Prefetch request completed ... prefix hits=N during call 2.
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 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:
(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.)
Prompts must exceed the engine’s chunk_size (256 tokens by default) for any KV blocks to be stored. Short prompts produce no markers — that’s expected, not a failure.

Step 4 — run the benchmark

For a more realistic measurement than two curls, use vllm 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
Run it and stream the results:
The logs contain two 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:
In the healthy case above, pass 2 cuts TTFT substantially relative to pass 1 and nearly doubles request throughput.
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).
Clean up the Job (it also self-deletes after 1h via 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.