Skip to content

[Docs] Rewrite the preload (ipc_cache) guide and add Docker/Kubernetes usage - #60006

Open
gaby wants to merge 1 commit into
vllm-project:mainfrom
gaby:ccr-c1211d57-8ja2ed
Open

gaby wants to merge 1 commit into
vllm-project:mainfrom
gaby:ccr-c1211d57-8ja2ed

Conversation

@gaby

@gaby gaby commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Rewrites docs/features/preload.md (the vllm preload / --load-format ipc_cache weight cache daemon) around the operator workflow and adds the missing Docker and Kubernetes guidance, plus pointers from the Docker deployment guide, the faster-startup list and the CLI reference. It also folds in the preload changes that landed on main while this PR was open: FlashInfer autotune preloading (#60085), warmup cache seeding between daemons (#63088) and the daemon's GPU memory handling (#62583).

Claims

  • Documents how to run the daemon and the engine in separate containers: a Docker run pair, a Docker Compose file gated on the daemon's health check, a scoped-namespace alternative (daemon started with --ipc=shareable, engine joining its IPC and PID namespaces), and the reason behind each requirement (--ipc=host, --pid=host, shared socket and autotune cache volume, same GPUs/UID/image tag, --entrypoint vllm).
  • Documents the Kubernetes pattern: GPU device plugins allocate a GPU to one container, so the daemon and a vllm serve restart loop run in one container with startup/liveness probes on the daemon's health port and readiness on the engine.
  • Documents previously undocumented behaviour: the /health readiness endpoint (--weight-cache-health-port/-host), the fallback: false wait, GPU memory accounting of daemon-held weights, the cold-start ordering pitfall, the daemon flags, and a troubleshooting table keyed on the actual error strings.
  • Keeps the guide in step with main: where the FlashInfer autotune cache must live in Docker, how to seed a new replica's autotune cache from a running one (start order, per-rank ports to publish, token), what the engine counts toward --gpu-memory-utilization, the full cache fingerprint, and that EPLB is not supported.
  • Corrects stale or wrong statements: pipeline parallelism was listed as rejected but the daemon plans PP ranks; copy mode was described as reusable per restart but the daemon releases its cache after the first handoff (the next restart falls back to disk only while fallback is enabled); the quantization support list now matches the supports_pre_processed_weights declarations (unquantized except MoE on the MoonEP all2all backend, fp8, ModelOpt NVFP4, MXFP4 except GPT-OSS).

Validation

Docs-only change (plus a one-word docstring fix in vllm/entrypoints/cli/preload.py), so no model evaluation applies. All checks below were re-run after the latest rebase onto main (94a29d3).

# markdownlint with the repo config: 0 errors
npx markdownlint-cli2@0.21.0 --config tools/pre_commit/.markdownlint.yaml \
    docs/features/preload.md docs/cli/README.md docs/deployment/docker.md docs/configuration/optimization.md

# ruff on the touched Python file: all checks passed, already formatted
uvx ruff@0.14.0 check vllm/entrypoints/cli/preload.py && uvx ruff@0.14.0 format --check vllm/entrypoints/cli/preload.py

# full docs build in strict mode: exit 0, no warnings
uv venv --python 3.12 .docs-venv && uv pip install --python .docs-venv/bin/python -r requirements/docs.txt
DISABLE_MKDOCS_2_WARNING=true .docs-venv/bin/mkdocs build --strict

The embedded Compose and Kubernetes YAML parse, every bash block passes bash -n, and every relative link and anchor resolves. Every statement about behaviour was checked against weight_cache/{daemon,ipc_loader,protocol,seed,warmup_cache}.py, cli/preload.py, warmup/{kernel_warmup,flashinfer_autotune_cache}.py, v1/worker/{gpu_worker,utils}.py and the supports_pre_processed_weights declarations of the quantization methods. As the contributing guide asks, three fresh agents limited to the checkout answered a user question each (seeding a new replica in Docker, the free-memory startup error, the two-container setup) from the guide, and the wording they found confusing was fixed.

Not validated: the Docker, Kubernetes and seeding examples were not executed on GPU hardware. The namespace requirements follow from the mechanism (legacy CUDA IPC handles are bound to the exporting process's PID namespace, see openucx/ucx#11978 and this NVIDIA forum thread; PyTorch's reference counters for shared CUDA tensors are shared-memory files, so /dev/shm must be shared). The seeding behaviour (listener start order, per-rank ports, fallbacks) is read from seed.py and warmup_cache.py, not observed. A two-container run on a GPU host would confirm both before merge.

Details

  • docs/features/preload.md: restructured into requirements, quick start with the expected log lines, autotune preloading and seeding between daemons, how it works, memory accounting, cache modes, health endpoint, Docker, Kubernetes, loader/daemon configuration tables, multi-node/DP, speculative decoding, security, lifecycle, troubleshooting. Upstream's own paragraphs on autotune preloading, seeding, multi-node/DP and security are kept as written.
  • docs/deployment/docker.md: new "Keep model weights in GPU memory across engine restarts" section with the two-container example, linking to the full guide.
  • docs/configuration/optimization.md: preload added as a fourth faster-startup mechanism.
  • docs/cli/README.md and the preload.py module docstring: supported-parallelism wording updated; the CLI summary now lists the health, socket-dir, master-port and seeding flags and the autotune pass.

Review history: the three Codex findings on the first revision (MoonEP exception, copy mode with fallback: false, --ipc=shareable for the scoped-namespace variant) were verified against the code and Docker's documentation and addressed; the threads are resolved. Maintainer comments on docs/features/preload.md are resolved: the overlap with #60085 was settled by integrating its text, and the text added here is not hard-wrapped.

Duplicate-work check (2026-10-25): no open upstream PR documents preload for Docker/Kubernetes; searching open PRs for preload and ipc_cache returns no docs PR other than this one; the matching PRs are fixes and features for the daemon itself. Open PRs that change facts this guide states and will need a one-line reconcile if they land first: #59648 (checkpoint fingerprint from sampled tensor bytes instead of safetensors headers), #63506 (MoE and linear kernel backends added to the fingerprint), and #63488 and #61841, which also edit docs/features/preload.md (engine memory budget after an IPC fallback; sharing FlashInfer autotune artifacts between daemons).

AI assistance (Claude Code) was used to draft this PR; the submitting human has to review every line and run the Docker example before upstreaming.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify

mergify Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--60006.org.readthedocs.build/en/60006/

@mergify mergify Bot added documentation Improvements or additions to documentation frontend labels Oct 5, 2026
@gaby
gaby force-pushed the ccr-c1211d57-8ja2ed branch from 3ebd504 to 1d2dc67 Compare October 5, 2026 11:44
@Isotr0py Isotr0py self-assigned this Oct 5, 2026
@Isotr0py
Isotr0py self-requested a review October 5, 2026 15:41
@gaby
gaby force-pushed the ccr-c1211d57-8ja2ed branch from 1d2dc67 to 8127981 Compare October 7, 2026 14:40
Comment thread docs/features/preload.md Resolved
@mergify

mergify Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @gaby.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Comment thread docs/features/preload.md Resolved
@gaby
gaby force-pushed the ccr-c1211d57-8ja2ed branch from 5811a65 to 04dffeb Compare October 11, 2026 03:09
@gaby
gaby force-pushed the ccr-c1211d57-8ja2ed branch from 04dffeb to 726750e Compare October 20, 2026 02:27
@gaby

gaby commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@Isotr0py Fixed merge conflicts and update docs since #60085 was merged.

@mergify

mergify Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @gaby.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Oct 21, 2026
@gaby
gaby force-pushed the ccr-c1211d57-8ja2ed branch from 726750e to 29f1de1 Compare October 21, 2026 04:29
@mergify mergify Bot removed the needs-rebase label Oct 21, 2026
@mergify

mergify Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @gaby.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Oct 25, 2026
@gaby
gaby force-pushed the ccr-c1211d57-8ja2ed branch from 29f1de1 to 3cd5a1e Compare October 25, 2026 14:05
@mergify mergify Bot removed the needs-rebase label Oct 25, 2026
@mergify

mergify Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @gaby.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Oct 25, 2026
@gaby
gaby force-pushed the ccr-c1211d57-8ja2ed branch from 3cd5a1e to 613c979 Compare October 25, 2026 15:35
@mergify mergify Bot removed the needs-rebase label Oct 25, 2026
@mergify

mergify Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @gaby.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Oct 30, 2026
…s usage

Restructure docs/features/preload.md around operating the weight cache
daemon and add the missing deployment documentation.

- Add Docker, Docker Compose and Kubernetes deployment: running the
  daemon and the engine as separate containers, the IPC and PID namespace
  requirements, the shared volume for the sockets and the FlashInfer
  autotune cache, and the probes.
- Document the /health endpoint, the loader and daemon configuration
  tables, the start order, GPU memory accounting and troubleshooting.
- Integrate the FlashInfer autotune preloading from vllm-project#60085. Readiness now
  includes tuning, and the engine finds the tuned configs through the
  autotune cache location.
- Integrate the daemon-to-daemon warmup cache seeding from vllm-project#63088: the
  seeding flags, the start order, the Docker ports, and what a mirror
  logs when it falls back to local tuning.
- Describe the daemon memory handling from vllm-project#62583 and vllm-project#63451: the engine
  counts only the exported weights, and the daemon releases its process
  groups and cached cuBLAS workspaces after loading and tuning.
- Describe how `vllm preload` stops every rank when one exits (vllm-project#63692),
  what a zero-copy engine does when its daemon exits (vllm-project#62734), and the
  kernel backends that vllm-project#63506 added to the fingerprint.
- Update the fingerprint description for the RoPE parameters, expert
  parallelism, KV cache dtype settings and dense data parallel keying,
  and document that EPLB is not supported.
- Correct statements that did not match the code: pipeline parallelism is
  supported, copy mode releases the daemon's cache after the first
  handoff, and the quantization support list now follows the code.
- Add pointers from the Docker deployment guide, the faster-startup list
  and the CLI reference.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZTcfM8JsFUMWPHCsoLsuE
Signed-off-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
@gaby
gaby force-pushed the ccr-c1211d57-8ja2ed branch from 613c979 to 137efc8 Compare October 30, 2026 23:22
@mergify mergify Bot removed the needs-rebase label Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants