Skip to content

[Feat][Helm] Add vllmConfig.revision for HuggingFace model version pinning#961

Merged
ruizhang0101 merged 4 commits into
vllm-project:mainfrom
robertobarreda:feat/vllmconfig-revision-pinning
Jun 25, 2026
Merged

[Feat][Helm] Add vllmConfig.revision for HuggingFace model version pinning#961
ruizhang0101 merged 4 commits into
vllm-project:mainfrom
robertobarreda:feat/vllmconfig-revision-pinning

Conversation

@robertobarreda

@robertobarreda robertobarreda commented May 26, 2026

Copy link
Copy Markdown
Contributor

Add a modelRevision field to the model spec that maps to vLLM's --revision flag, allowing operators to pin deployed models to a specific HuggingFace Hub branch, tag, or commit hash.

Without this, vLLM always pulls the latest commit on the default branch, which can silently change model behaviour across re-deploys.

modelRevision is a first-class field on each model spec entry (not nested under vllmConfig), making it discoverable and consistent with other model-level fields.

Changes:

  • helm/values.yaml + values.schema.json: add modelRevision field to model spec (empty string default = no pinning), remove old vllmConfig.revision
  • helm/templates/deployment-vllm-multi.yaml: emit --revision <value> when $modelSpec.modelRevision is set
  • helm/templates/ray-cluster.yaml: same for Ray cluster deployments
  • helm/tests/: positive and negative unit tests for both deployment paths
  • docs/source/deployment/helm.rst: document modelRevision instead of revision
  • .github/values-01-2pods-minimal-example.yaml: add llama3 example with pinned modelRevision

modelRevision for meta-llama/Llama-3.1-8B-Instruct obtained via:
curl -s https://huggingface.co/api/models/meta-llama/Llama-3.1-8B-Instruct | yq -p json '.sha'

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for pinning Hugging Face model versions using a new revision configuration parameter in the Helm chart. It updates the documentation, values schema, templates, and adds corresponding unit tests. However, the unit tests in helm/tests/ray-cluster_test.yaml contain incorrect document indices (using index 1 instead of 2) when asserting the contents of the vllm-entrypoint.sh script inside the rendered ConfigMap, which will cause the tests to target the wrong document.

Comment thread helm/tests/ray-cluster_test.yaml Outdated
Comment thread helm/tests/ray-cluster_test.yaml Outdated
ruizhang0101
ruizhang0101 previously approved these changes May 26, 2026

@ruizhang0101 ruizhang0101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ruizhang0101

Copy link
Copy Markdown
Collaborator

Could you fix the pre-commit issue when you have time?

@robertobarreda robertobarreda force-pushed the feat/vllmconfig-revision-pinning branch 2 times, most recently from 3f8cf23 to d4fdb98 Compare May 28, 2026 08:17
@robertobarreda

Copy link
Copy Markdown
Contributor Author

Could you fix the pre-commit issue when you have time?

Fixed, although I don't see them executing again.

@robertobarreda robertobarreda force-pushed the feat/vllmconfig-revision-pinning branch from d4fdb98 to 942f2fb Compare May 28, 2026 19:30
@robertobarreda

Copy link
Copy Markdown
Contributor Author

@ruizhang0101 it looks like the functionality test timeout for some reason

@ruizhang0101 ruizhang0101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi, could you put this in the model spec instead of vllm config?

modelSpec:
  - name: "llama3"
    repository: "vllm/vllm-openai"
    tag: "latest"
    modelURL: "meta-llama/Llama-3.1-8B-Instruct"
    modelRevision: <COMMIT_HASH>

@robertobarreda robertobarreda force-pushed the feat/vllmconfig-revision-pinning branch from 942f2fb to c766fd8 Compare June 25, 2026 06:53
robertobarreda and others added 2 commits June 25, 2026 08:56
…nning

Add a `revision` field to `vllmConfig` that maps to vLLM's `--revision`
flag, allowing operators to pin deployed models to a specific HuggingFace
Hub branch, tag, or commit hash. Without this, vLLM always pulls the
latest commit on the default branch, which can silently change model
behaviour across re-deploys.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Roberto Barreda <roberto.barreda@midokura.com>
Signed-off-by: Roberto Barreda <roberto.barreda@midokura.com>
@robertobarreda robertobarreda force-pushed the feat/vllmconfig-revision-pinning branch 2 times, most recently from 4c15218 to a827843 Compare June 25, 2026 21:02
Move revision pinning from vllmConfig.revision to modelRevision at the
model spec level, making it a first-class field on each model entry.

- Add modelRevision to modelSpec defaults and schema
- Update deployment-vllm-multi and ray-cluster templates to read
  $modelSpec.modelRevision
- Update tests to use modelRevision instead of vllmConfig.revision
- Update docs to reference modelRevision
- Add llama3 example entry to values-01 with pinned revision

modelRevision for meta-llama/Llama-3.1-8B-Instruct obtained via:
  curl -s https://huggingface.co/api/models/meta-llama/Llama-3.1-8B-Instruct | yq -p json '.sha'

Signed-off-by: Roberto Barreda <roberto.barreda@midokura.com>
@robertobarreda robertobarreda force-pushed the feat/vllmconfig-revision-pinning branch from a827843 to e7665f3 Compare June 25, 2026 21:03

@ruizhang0101 ruizhang0101 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ruizhang0101 ruizhang0101 merged commit 1e973a3 into vllm-project:main Jun 25, 2026
11 checks passed
@robertobarreda robertobarreda deleted the feat/vllmconfig-revision-pinning branch June 26, 2026 06:54
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.

2 participants