Skip to content

[Doc] Add Gemma 4 to supported models list#39607

Merged
DarkLight1337 merged 6 commits intovllm-project:mainfrom
z1ying:docs/add-gemma4-to-supported-models
Apr 17, 2026
Merged

[Doc] Add Gemma 4 to supported models list#39607
DarkLight1337 merged 6 commits intovllm-project:mainfrom
z1ying:docs/add-gemma4-to-supported-models

Conversation

@z1ying
Copy link
Copy Markdown
Contributor

@z1ying z1ying commented Apr 12, 2026

Purpose

Gemma4ForCausalLM and Gemma4ForConditionalGeneration are already implemented and registered in vLLM (gemma4.py, gemma4_mm.py), but were missing from the supported_models.md documentation table. This PR adds the two missing entries.

Changes

Documentation only — docs/models/supported_models.md:

  • Text-only table: add Gemma4ForCausalLM — LoRA ✅, PP ✅, example model google/gemma-4-E2B-it.
  • Multimodal table: add Gemma4ForConditionalGeneration with modalities T + I⁺ + V + A*, PP ✅, no LoRA, example models google/gemma-4-E2B-it, google/gemma-4-E4B-it.
  • New legend entry: introduced * as a generic marker meaning "Only specific variants of the model support this modality", reusable for future models with variant-specific modalities.
  • New note block: clarifies that (a) audio input is only supported by the gemma-4-E2B and gemma-4-E4B variants, and (b) the model does not ingest videos directly, but vLLM's Gemma 4 implementation supports video inputs by handling video processing internally — users can send videos directly in the message structure.

Both Gemma 4 rows follow the same format as the existing Gemma 3 entries directly above them.

How the fields were verified

  • LoRA / PP: checked class declarations and MRO in gemma4.py and gemma4_mm.py.
  • Modalities: confirmed via discussion with the model author in this PR — text + image is universal across all variants; audio is gated on the presence of an audio tower (E2B / E4B only); video is not a native input but is achieved via an external video ingestor that feeds text + frames at 1 fps into the model.
  • Example HF model IDs: match entries in tests/models/registry.py.

Notes

The additional * legend is intentionally generic rather than Gemma-specific so it can be reused by future models that have modality support varying across checkpoints within a single architecture.

Test

pre-commit run --files docs/models/supported_models.md

No source code was changed. Existing Gemma 4 tests are unaffected.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 12, 2026

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

@mergify mergify bot added the documentation Improvements or additions to documentation label Apr 12, 2026
Copy link
Copy Markdown
Contributor

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

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 updates the documentation in docs/models/supported_models.md to include support for Gemma 4 models, specifically adding Gemma4ForCausalLM and Gemma4ForConditionalGeneration to their respective tables. I have no feedback to provide.

Comment thread docs/models/supported_models.md Outdated
@DarkLight1337 DarkLight1337 mentioned this pull request Apr 13, 2026
5 tasks
Address review feedback: remove video from native modalities, mark audio as variant-specific since only E2B/E4B include an audio tower, and add a note explaining these
constraints.

Signed-off-by: z1ying <tzzying@outlook.com>
@z1ying z1ying force-pushed the docs/add-gemma4-to-supported-models branch from 5cc6d7f to 1820810 Compare April 16, 2026 05:31
@z1ying z1ying force-pushed the docs/add-gemma4-to-supported-models branch from 4740c8f to d1b369e Compare April 16, 2026 16:13
@z1ying
Copy link
Copy Markdown
Contributor Author

z1ying commented Apr 16, 2026

Updated. Please let me know if this looks good now. @lucianommartins @ywang96

@z1ying z1ying changed the title [Docs] Add Gemma 4 to supported models list [Doc] Add Gemma 4 to supported models list Apr 16, 2026
Copy link
Copy Markdown
Member

@ywang96 ywang96 left a comment

Choose a reason for hiding this comment

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

Thanks for updating our doc!

@ywang96 ywang96 added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 16, 2026
@z1ying
Copy link
Copy Markdown
Contributor Author

z1ying commented Apr 17, 2026

Thanks for the review! @ywang96 Could you help merge this PR?

@DarkLight1337 DarkLight1337 merged commit bf45e6d into vllm-project:main Apr 17, 2026
9 of 10 checks passed
askliar pushed a commit to askliar/vllm that referenced this pull request Apr 17, 2026
Signed-off-by: z1ying <tzzying@outlook.com>
Signed-off-by: Ziying Tao <tzzying@outlook.com>
@z1ying z1ying deleted the docs/add-gemma4-to-supported-models branch April 17, 2026 16:03
lisp19 pushed a commit to lisp19/vllm that referenced this pull request Apr 20, 2026
Signed-off-by: z1ying <tzzying@outlook.com>
Signed-off-by: Ziying Tao <tzzying@outlook.com>
bnellnm pushed a commit to neuralmagic/vllm that referenced this pull request Apr 20, 2026
Signed-off-by: z1ying <tzzying@outlook.com>
Signed-off-by: Ziying Tao <tzzying@outlook.com>
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 ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants