Skip to content

docs(flash): load volume-backed models via VolumeCache - #899

Merged
deanq merged 4 commits into
mainfrom
docs/flash-volume-cache
Oct 16, 2026
Merged

deanq merged 4 commits into
mainfrom
docs/flash-volume-cache

Conversation

@deanq

@deanq deanq commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Why

The Flash storage page's model example loads the weights straight from /runpod-volume/models/.... The best-practices page says to "use network volumes for large models". Neither mentions VolumeCache, so every cold start reads the weights over the network mount.

In a forced-cold benchmark on Flash (deanq/flash-model-cache-bench, RTX 4090, EU-RO-1, medians), loading in place from the volume was about 2.4× slower than hydrating with VolumeCache and loading locally. Qwen2.5-3B took 17.5s vs 7.2s, and 7B took 37.6s vs 15.5s.

What changed

  • flash/configuration/storage.mdx: new Load large models from local disk section after the existing access example. It has a class-form @Endpoint that sets HF_HUB_CACHE to container disk, wraps the load in VolumeCache, and adds runpod>=1.12.0 to dependencies. It also covers the gotchas from the VolumeCache page: errors fall back silently by default, symlinks aren't copied so Hub access must stay on, and the volume must be sized for the mirror.
  • flash/configuration/best-practices.mdx: the network-volume bullet links to the new section.

The existing access example stays, since reading arbitrary files from the volume is still valid.

Checks

Model Store

For a Hugging Face model on a GPU endpoint, the guidance now points to Model Store (cached models) before VolumeCache. It needs no volume or handler code, and the download isn't billed. Flash users attach the model after flash deploy with runpodctl serverless update <endpoint-id> --model-reference … and set HF_HUB_CACHE=/runpod-volume/huggingface-cache/hub.

Model Store isn't framed as the default. In the forced-cold benchmark it had the fastest load once a worker was running (2.3s / 14.2s for 3B / 7B), but the slowest whole cold request (106s / 81s), because the worker waited 69–99s for a host that already held the model. So the guidance says to time the whole cold request, and to use the volume with VolumeCache when that wait is too long.

Verified live on 2026-10-14 (no jobs sent, so no workers ran): attached a model to a runpod-flash 1.20.1 endpoint with runpodctl 2.14.0, then ran flash deploy with a changed env. GraphQL modelReferences still held the reference afterward, and the env change landed. runpodctl serverless get doesn't print modelReferences; the update output does.

Live check

Live-verified on 2026-10-14. I deployed the documented pattern with runpod-flash 1.20.1: a class @Endpoint with HF_HUB_CACHE=/opt/hf-cache, runpod>=1.12.0 in dependencies, and the load wrapped in VolumeCache. It ran on a 24 GB GPU in EU-RO-1 with a 20 GB volume and Qwen2.5-0.5B-Instruct. I forced a real cold start between the two calls, then deleted the endpoint and volume.

worker runpod imported hydrated from volume fetched from Hub hydrate from_pretrained
cold start 1 (empty mirror) z2ev… 1.12.0 from /app/runpod (bundled) 0 B 988 MB n/a 21.5s
cold start 2 (new worker) n479… 1.12.0 from /app/runpod (bundled) 988 MB 147 B (snapshot re-link) 1.4s 1.1s

The runpod that Flash bundles from dependencies takes precedence over the image's SDK. The 147 B on the second cold start is the Hub metadata call that re-links snapshots/, which confirms the "keep Hub access on" rule.

The Flash storage page showed loading weights straight from
/runpod-volume, which reads them over the network on every cold start.
Add a section that keeps the HF cache on container disk and wraps the
load in VolumeCache, and point the best-practices bullet at it.
@mintlify

mintlify Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
runpod-docs 🟢 Ready View Preview Oct 14, 2026, 10:53 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

Copilot AI 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.

🟢 Approval recommended

The focused documentation changes align with existing VolumeCache guidance, with no unresolved findings.

0 open findings

What changed in this PR

Documents how Flash endpoints can use VolumeCache to load model weights from local disk rather than directly from network storage.

Changes:

  • Adds a model-loading example with SDK requirements and cache caveats.
  • Links the pattern from production best practices.
File Description
flash/​configuration/​storage.mdx Adds the VolumeCache example and operational guidance.
flash/​configuration/​best-practices.mdx Links to local-disk model-loading guidance.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@deanq
deanq merged commit 86152e1 into main Oct 16, 2026
2 checks passed
@deanq
deanq deleted the docs/flash-volume-cache branch October 16, 2026 00:21

This branch was successfully deployed

1 active deployment
staging — fa4db9fc Deployed Oct 14, 2026 by mintlify[bot]
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