vllm - 💡(How to fix) Fix [Bug]: vLLM attempts to download Hugging Face cache file during inference despite local model path (Gemma 4) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#39039Fetched 2026-04-08 02:52:53
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Code Example

hf download google/gemma-4-31B-it

---

vllm serve /mnt/models/google/gemma-4-26b-it
RAW_BUFFERClick to expand / collapse

Your current environment

Environment: vLLM version: 19.0.0 Python: 3.12 Envoirement: Kube

When I allow downloads, vLLm tries to trigger HuggingFace download, which is not desired here

🐛 Describe the bug

I'm trying to run Gemma 4 (google/gemma-4-31B-it) with vLLM in a strictly air-gapped environment where downloads and inference must be completely separated.

Expected behavior

After downloading the model locally via hf, vLLM should load entirely from the local path without any network requests to Hugging Face.

Actual behavior

When starting inference with vLLM, it suddenly attempts to download a cache file from Hugging Face. This breaks my offline setup. I have never observed this behavior with other LLMs (Llama, Mistral, etc.) or previous Gemma versions.

Steps to reproduce

Download model (on machine with internet):

hf download google/gemma-4-31B-it

Move to air-gapped environment and run

vllm serve /mnt/models/google/gemma-4-26b-it

vLLM initialization triggers attempted download instead of using local files only (with export HF_HUB_OFFLINE=1 it simply crashes and says it could not find the files).

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

Set the HF_HUB_OFFLINE=1 environment variable and ensure the local model path is correctly configured to prevent vLLM from attempting to download files from Hugging Face.

Guidance

  • Verify that the HF_HUB_OFFLINE=1 environment variable is set before running vllm serve to prevent online requests.
  • Check the local model path /mnt/models/google/gemma-4-26b-it for completeness and correctness, ensuring all required files are present.
  • Confirm that the model version used for downloading (google/gemma-4-31B-it) matches the version used for serving (google/gemma-4-26b-it), as version discrepancies might cause issues.
  • Review the vLLM documentation and configuration options to ensure that offline mode is properly supported and configured for the specific model being used.

Example

No specific code snippet is provided due to the nature of the issue, but setting the environment variable can be done using:

export HF_HUB_OFFLINE=1

before running the vllm serve command.

Notes

The issue seems to be related to the specific model version and the configuration of vLLM in an air-gapped environment. Ensuring that all dependencies and configurations are correctly set up for offline use is crucial.

Recommendation

Apply workaround: Set HF_HUB_OFFLINE=1 and verify the local model path to prevent online downloads, as this directly addresses the reported behavior of vLLM attempting to download files from Hugging Face despite being in an air-gapped environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

After downloading the model locally via hf, vLLM should load entirely from the local path without any network requests to Hugging Face.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING