Skip to content

docs(guides): one flow and one recipe pattern for the 0.2 guides - #658

Merged
danbar2 merged 25 commits into
release/0.2from
docs/0.2-guides
Oct 20, 2026
Merged

danbar2 merged 25 commits into
release/0.2from
docs/0.2-guides

Conversation

@ozbarshalom

@ozbarshalom ozbarshalom commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • documentation

What this PR does / why we need it:

Backports the reworked usage guides to the 0.2 line, so 0.2.0 users get the same flow as main and every command in it works against the 0.2.0 chart: README → guides index → framework guide → checkpoint → restore, and eight recipes (vLLM, SGLang and TensorRT-LLM × Qwen3 0.6B, GLM 5.3 and DeepSeek V4.1 Flash) that follow one naming, model-cache, deadline and probe scheme.

It is the 9 commits of #456 and #656 cherry-picked onto release/0.2, plus twelve 0.2-only commits and one review-feedback commit shared with #656.

The one behavior that differs from main: 0.2.0 has no restore proxy. The proxy binary ships, but the NRI plugin that makes it PID 1 and the no-proxy fallback are main-only. A restore Pod therefore has to run an inert placeholder (/bin/sh -c "exec sleep infinity") and the agent restores the workload beside it. With the main profiles, which keep the source command, SGLang crash-loops on 0.2.0 (engine_args required) and vLLM only passes by winning a race. The 0.2 commits:

  • docs(guides): restore with the inert placeholder command that 0.2 requires changes the six restore profiles, restore.md and vllm.md.
  • test(e2e): keep the 0.2 inert restore placeholder in the framework manifest tests keeps the manifest tests asserting the placeholder, and keeps the e2e files free of main-only helpers (restore_proxy_on and friends).
  • docs(install): install chart version 0.2.0 on the 0.2 line bumps the install command in README.md and docs/operations/install.md from 0.1.0 to 0.2.0, the chart these guides were tested against.
  • docs(guides): download the example files without installing envsubst rewrites step 2 of the guides index so it says what the example files are and clones the release/0.2 branch (a plain clone would give main's guides, whose restore profiles do not work on 0.2.0), and replaces the four envsubst commands with sed, which every Mac and Linux machine already has. The output is identical to the commands it replaces.
  • docs(guides): drop the clean-up and failure sections from the guides index removes the "Clean up and run again" and "If a step fails" sections of the guides index, and the link to the first from restore.md, which keeps its pointer to the troubleshooting page.
  • docs(guides): call the eight-GPU section Multi-GPU recipes and shorten it renames that section of the guides index, because nothing in it is specific to eight GPUs, cuts it to the agent-image command and the first-run timing, and updates the five links to it.
  • docs(guides): turn the guides index into one flow you follow top to bottom rewrites docs/guides/README.md so you choose a recipe once, by setting FRAMEWORK, MODEL and GPUS, and every later command (prepare, checkpoint with a PodSnapshot or a SnapshotJob, restore, request) uses that choice, instead of selecting again in each stage and translating from vLLM-only examples. It adds a closing "Use your own engine or image" section that points to the workload contract, and retargets the links from the other pages to the new headings. The engine, checkpoint and restore pages still describe the same steps in more detail and are not reworked here.
  • docs(guides): call the workload namespace WORKLOAD_NAMESPACE renames SNAPSHOT_NAMESPACE, which read as the namespace Snapshot is installed in (snapshot) but is the namespace the replicas run in, across the six guide pages, and says so in step 3 of the guides index.
  • docs(guides): show the recipe table's variable names as plain column titles is a one-line formatting fix to the new recipe table.
  • docs(guides): confirm a restore by its condition instead of an inference request removes the port-forward and /generate request from the guides index and the restore page; a restore is confirmed by the Deployment becoming Ready and the pod's nvidia.com/Restored condition.
  • docs(guides): apply the source manifest directly unless the recipe is multi-GPU makes Option A a plain kubectl apply for single-GPU recipes; the sed that fills in the agent image is now a marked replacement command for multi-GPU recipes only.
  • docs(guides): tell readers which manifest line to edit instead of piping through sed replaces the remaining sed commands (agent image for multi-GPU source manifests, checkpoint name for restore profiles) with a step that says to open the manifest, shows the exact line to change, and then applies the file as it is. This covers the guides index, the restore page and the three engine pages.
  • docs(guides): raise the TensorRT-LLM Qwen3 KV-cache fraction and drop redundant settings addresses review feedback on the TensorRT-LLM single-GPU recipe: TRTLLM_MAX_NUM_TOKENS and TRTLLM_MAX_BATCH_SIZE repeated app.py's defaults and are removed, and TRTLLM_FREE_GPU_MEMORY_FRACTION goes from 0.10 to 0.75, as in the GLM recipes, in both the Deployment and the SnapshotJob. It was run through both options (checkpoint, restore, Restored=True) on an install of the main build, not on a 0.2.0 install.

Which issue(s) this PR fixes:

Refs #627

How was this tested?

On a B200 node, against chart ghcr.io/ai-dynamo/snapshot/snapshot 0.2.0 (agent, operator and PageBroker v0.2.0), following the guide's commands with the guide manifests: source Deployment + PodSnapshot, and SnapshotJob, then restore with the 1-gpu/2-gpu profile, check nvidia.com/Restored=True, and send a /generate request to the restored replica. That request was my own end-to-end check; the guides no longer include it. Every restored replica answered "The capital of Italy is Rome…".

Qwen3 0.6B 1 GPU PodSnapshot 1 GPU SnapshotJob 2 GPU PodSnapshot 2 GPU SnapshotJob
vLLM pass pass pass pass
SGLang pass pass pass pass
TensorRT-LLM pass pass pass pass

The new flow, run from the page, on a 0.2.0 install (chart 0.2.0, agent v0.2.0 with no NRI plugin). A fresh clone of this branch, the commands extracted from the guides index and run in its order, with the "edit this line" steps done by changing the line the page names. Two environment deviations, both in my clone of the repository and not in any step: the model-cache claim points at an existing PVC, because this cluster's Kyverno policy rejects a private PVC named model-cache, and the ConfigMaps are named ozbarshalom-<engine>-app, because the namespace already held incompatible ones. vLLM Qwen3 0.6B at one GPU:

  • Option A (Deployment + PodSnapshot): pass, nvidia.com/Restored=True.
  • Option B (SnapshotJob): pass, nvidia.com/Restored=True.

Also checked: every relative link and anchor in docs/ and the READMEs resolves, and the e2e unit tests that run offline pass (335; the 2 that need a live cluster were not run).

Not run, so not claimed:

  • the eight-GPU recipes (GLM 5.3, DeepSeek V4.1 Flash): no node with 8 free GPUs was available. The two-GPU runs used a tensor-parallel-2 copy of the Qwen3 recipe generated from the 8-GPU manifests, which exercises the same multi-GPU path (annotation, snapshot-cuda-install init container, cuinterpose-launch) but is not those recipes;
  • the model-download init container: the model was already in the cache;
  • the new single-flow index for SGLang and TensorRT-LLM, and at two GPUs. It was run from the page only for vLLM at one GPU (below); the rest of the plan was stopped. Its commands were syntax-checked, and the three values were checked to derive the right manifests and names for all eight recipes in bash and zsh;
  • make check test (macOS host, no Linux toolchain) and the GPU e2e suites.

Special notes for your reviewer:

Does this PR introduce an API change?

NONE

Additional documentation, e.g. enhancement proposals, usage docs:

docs/guides/ (index, vllm, sglang, tensorrt-llm, checkpoint, restore)

Checklist

  • Commits are signed off (git commit -s), per CONTRIBUTING.md
  • make check test passes locally (not run; macOS host. Offline e2e unit tests and a link check were)
  • Documentation is updated where behavior changed

Prepared with help from Claude Code.

🤖 Generated with Claude Code

galletas1712 and others added 11 commits October 19, 2026 23:38
Add multi-GPU capture recipes for GLM 5.3 NVFP4 on vLLM, SGLang, and
TensorRT-LLM, and DeepSeek V4.1 Flash on vLLM and SGLang, with separate
Deployment and SnapshotJob capture manifests and per-GPU-count restore
profiles.

Keep the guides one flow. Each engine guide notes its multi-GPU
differences, the checkpoint guide shows single-GPU and multi-GPU capture
side by side, and restore differs only by profile. Use the
nvidia.com/snapshot-multi-gpu annotation. Restore profiles keep the
source's command for the restore proxy.

Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
(cherry picked from commit be6ac1f)
Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
(cherry picked from commit b3e1714)
…odel cache

Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
(cherry picked from commit 2da387e)
With a kernel-mode driver older than the 615 user-mode requirement, both
the workload and PageBroker load a 615 or newer libcuda.so through
LD_LIBRARY_PATH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Schwinn Saereesitthipitak <schwinns@nvidia.com>
(cherry picked from commit cdd95ee)
The multi-GPU additions split the guides into parallel single-GPU and
eight-GPU paths from the first page, repeated prerequisites in several
guides, and left the restore stage without a concrete check. Restructure
so every recipe follows README -> guides index -> framework guide ->
checkpoint -> restore.

- Guides index: state the shared setup once (install, example files,
  namespace) and pick a recipe from one table that names each recipe's
  manifests and resources. Eight-GPU setup (single node, model cache,
  agent image) sits under the table.
- Framework guides: the same three steps for every engine (ConfigMap,
  model, deploy). The per-guide download blocks and the trailing
  Multi-GPU sections give way to callouts where an eight-GPU recipe
  differs.
- Checkpoint: Option 1 and Option 2 only. The multi-GPU pod shape moves
  to the workload contract.
- Restore: choose the profile, set the snapshot name, restore, and verify
  with a request. Fix the stale restore-deployment.yaml reference.
- Run every command from docs/guides so single-GPU and eight-GPU commands
  have the same shape.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
(cherry picked from commit 70378ea)
"Model cache" read like a Snapshot concept. It is an ordinary PVC that
some recipes mount for the model files, separate from the checkpoint
volume Snapshot installs. Say that where a recipe needs it, and stop
calling it a cache in the guide prose. Resource and file names are
unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
(cherry picked from commit 43e2b0d)
The model cache PVC was `snapshot-model-cache` in the eight-GPU recipes and
`sglang-model-cache` in the SGLang recipe, defined by two manifests, and the
prose described it in several ways. Use one name everywhere: a PVC named
`model-cache`, defined once in docs/guides/model-cache-pvc.yaml and described
in one "Model cache" section of the guides index that the framework guides
link to. This replaces the earlier "PVC for the model files" wording.

- SGLang's Qwen3 recipe now mounts the shared PVC, so it requests
  ReadWriteMany storage like the eight-GPU recipes instead of its own 20Gi
  ReadWriteOnce claim.
- e2e: SGLang uses the shared PVC manifest. The CI shared NFS claim now
  defaults to `shared-model-cache`, so a `model-cache` claim left behind by a
  run that downloaded through the guide cannot shadow it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
(cherry picked from commit 29486d0)
The eight recipes and their restore profiles had drifted apart in ways the GPU
count does not explain. Make them follow one scheme, so a 1 GPU and an 8 GPU run
differ only where the GPU count forces it.

- Every recipe reads its model from the model cache. The vLLM and TensorRT-LLM
  Qwen3 recipes gain the init container, offline env and PVC that the others
  already had.
- Names follow <framework>-<model>-source and -snapshot with hyphens only
  (deepseek-v4.1-flash becomes deepseek-v4-1-flash), and the restored
  Deployments are <framework>-1gpu-restored and -8gpu-restored.
- The restore profiles are 1-gpu.yaml and 8-gpu.yaml, and every one carries
  nvidia.com/restore-from: ${SNAPSHOT_NAME}, so no profile needs hand editing.
- Deployments use progressDeadlineSeconds 1800 (1 GPU) or 3600 (8 GPUs),
  SnapshotJobs activeDeadlineSeconds 3600 or 7200, and readiness probes
  failureThreshold 1800 or 3600. vLLM and SGLang had no deadline, and vLLM
  probed at 1200.
- The TensorRT-LLM SnapshotJobs set the same fsGroup as its Deployments and
  restore profiles.
- The benchmark engine drops the model cache plumbing from the vLLM pods it
  builds, because it sweeps models other than the one the recipe downloads and
  measures weights loaded from the container filesystem. The pods are otherwise
  unchanged apart from the renamed app label and the readiness threshold.
- e2e points every framework at the shared PVC manifest and the 1-gpu.yaml
  profile.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
(cherry picked from commit a505da4)
Bring the guides in line with the uniform recipes and fill the gaps a first run
on a real cluster would hit.

- The guides index makes the model cache a setup step for every recipe, states
  the download sizes and the need to reach Hugging Face, and adds one naming
  pattern under the recipe table.
- The framework guides use the same steps for every recipe: the model appears in
  the init container and in the engine arguments, and both change together.
- Restore sets SNAPSHOT_NAME and renders the profile with envsubst for every
  recipe, so 1 GPU and 8 GPUs take identical steps.
- Add "Clean up and run again": the names are fixed, a SnapshotJob keeps its
  PodSnapshot, and a PodSnapshot of the same name makes the next SnapshotJob fail
  with PodSnapshotNameConflict.
- Add "If a step fails" and point each stage at the troubleshooting page.
- Create the namespace when it does not exist, and name the tools the guides use.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
(cherry picked from commit ff09aad)
…nifest tests

Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…uires

Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ozbarshalom
ozbarshalom requested review from a team as code owners October 19, 2026 22:20
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 1
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: ai-dynamo/snapshot/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: 168572b2-d32e-4b6c-853a-03ede1609e22

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

The install command in the README and the installation page still pinned 0.1.0, so the guides that follow it ran against a chart without the 0.2 features.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
ozbarshalom and others added 11 commits October 20, 2026 00:32
Step 2 of the guides now says what the example files are and how to get them from the release/0.2 branch, and the four commands that filled in a name or the agent image use sed, which every Mac and Linux machine already has. The output is identical to the envsubst commands it replaces.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
…index

The index no longer has "Clean up and run again" and "If a step fails". restore.md drops its link to the clean-up section and keeps its pointer to the troubleshooting page.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
…n it

Nothing in the extra setup is specific to eight GPUs: it applies to any multi-GPU recipe, as the two-GPU runs on 0.2.0 showed. The section now says that, keeps the agent-image command and the first-run timing, and points to the workload contract for the why. Links to the old anchor are updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
…ottom

Choose a recipe once, by setting three values, and every later command uses that choice: prepare the ConfigMap, checkpoint with a PodSnapshot or a SnapshotJob, restore and send a request. This replaces the separate selections in the stages and the vLLM-only examples they translated from. Adds a closing section for people who bring their own engine or image, and points links from the other pages at the new headings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
SNAPSHOT_NAMESPACE read as the namespace Snapshot is installed in, which is a different one (snapshot). The guides use it for the namespace the replicas run in, so the variable is renamed and step 3 of the guides index says it is not the install namespace.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
…titles

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
…nce request

The guides no longer port-forward to the replica and send it a request. A restore is confirmed by the Deployment becoming Ready and by the pod's nvidia.com/Restored condition, in the guides index and in the restore page. The engine pages no longer say the restore page sends a request.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
… multi-GPU

Option A ran a sed over every recipe's source manifest, although only the multi-GPU manifests have a placeholder to fill in. A single-GPU recipe now applies its manifest as it is, and the agent-image substitution is a marked replacement command for multi-GPU recipes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
… hand

Under the agent-image and the restore commands, show the single manifest line that the sed replaces and say how to do it by hand: copy the manifest, replace the placeholder, apply the copy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
…dited by hand"

This reverts commit ccbc4e9.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
…ing through sed

The agent image (multi-GPU source manifests) and the checkpoint name (restore profiles) are placeholders in the manifests. The guides now say to open the manifest and replace the placeholder, show the exact line, and then apply the file as it is, in the guides index, the restore page and the three engine pages. No command in the guides rewrites text any more.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
Comment thread docs/guides/tensorrt-llm/capture/qwen3-0.6b-snapshotjob.yaml Outdated
Comment thread docs/guides/tensorrt-llm/capture/qwen3-0.6b-snapshotjob.yaml
ozbarshalom and others added 2 commits October 20, 2026 01:28
… redundant settings

Review feedback on the TensorRT-LLM single-GPU recipe. TRTLLM_MAX_NUM_TOKENS and TRTLLM_MAX_BATCH_SIZE repeated app.py's defaults (1024 and 1), so the manifests no longer set them. TRTLLM_FREE_GPU_MEMORY_FRACTION goes from 0.10 to 0.75, as in the GLM recipes, for a more realistic serving setup. Both manifests (the Deployment and the SnapshotJob) change together, and the guide says so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
…TensorRT-LLM guide

The manifests still set the fraction to 0.75; the guide no longer explains it, and its text is back to what it was before the review fix.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Oz Bar Shalom <oz.barshalom@gmail.com>
@danbar2
danbar2 merged commit ad0db4e into release/0.2 Oct 20, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants