Skip to content

Conversation

brb-nv
Copy link
Collaborator

@brb-nv brb-nv commented Aug 14, 2025

Description

This MR:

  1. adds a PSA note in Gemma3VL ctor so that users are aware of the requirements to run Gemma3 VLM successfully.
  2. adds docs for the same.
  3. removes an unused weight-loading util.

Test Coverage

N/A

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

Summary by CodeRabbit

  • Documentation

    • Added Gemma3 VLM docs and Quick Start for PyTorch: attention/mask behavior, runtime requirements (FlashInfer; disable chunked prefill and KV-cache reuse), supported variants (4B/12B/27B), and model-serving steps. (Note: Gemma3 docs were added in two places.)
  • Refactor

    • Removed a redundant internal weight-loading path to simplify internals.
  • User Notice

    • Initialization now prints an informational note about required attention/memory setup.

@brb-nv brb-nv requested review from a team as code owners August 14, 2025 01:10
@brb-nv brb-nv requested a review from yechank-nvidia August 14, 2025 01:10
Copy link
Contributor

coderabbitai bot commented Aug 14, 2025

📝 Walkthrough

Walkthrough

Removed a private weight-loading helper from the Gemma3 VLM PyTorch model and added Gemma3 documentation (duplicated) to the multimodal README; no other functional changes.

Changes

Cohort / File(s) Summary
Gemma3VLM weight-loading helper removed
tensorrt_llm/_torch/models/modeling_gemma3vl.py
Removed private helper _load_weights_into_hf_module that filtered and loaded HF weights and enforced missing-key checks; no other functional changes.
Docs: Gemma3 VLM README additions (duplicated)
examples/models/core/multimodal/README.md
Added Gemma3 entries to the TOC and inserted a Gemma3 VLM documentation block (attention semantics, requirements, quickstart, supported variants); the block appears twice (duplication).

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

Suggested reviewers

  • Wanli-Jiang
  • 2ez4bz
  • QiJune
  • venkywonka

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tensorrt_llm/_torch/models/modeling_gemma3vl.py (1)

150-161: Please ensure NVIDIA copyright header is present.

Per repository guidelines, prepend the current-year NVIDIA copyright header to all source files. If this file lacks it, add it at the top.

Example header (adjust to your repo’s standard if different):

# Copyright (c) 2025, NVIDIA CORPORATION.  All rights reserved.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d95742 and 161740d.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/models/modeling_gemma3vl.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code must target Python 3.8+
Python indentation: 4 spaces, no tabs
Maintain module namespace in imports (from package.subpackage import foo; then use foo.SomeClass())
Python file names use snake_case
Python class names use PascalCase
Python functions/methods and local variables use snake_case; variables starting with a number get k_ prefix (e.g., k_99th_percentile)
Global variables use G_ prefixed UPPER_SNAKE_CASE (e.g., G_MY_GLOBAL)
Constants use UPPER_SNAKE_CASE in Python
Avoid shadowing variables from outer scopes in Python
Initialize all externally visible members of a Python class in init
Prefer docstrings for interfaces used outside a file; comments for local code
Use Google-style docstrings for classes and functions (Sphinx-parsable)
Document attributes/variables inline with short docstrings
Avoid reflection when simple alternatives exist (e.g., prefer explicit parameters over dict(**locals()))
In try/except, catch the narrowest exceptions possible
For duck-typing with try/except, keep try body minimal and put logic in else

Files:

  • tensorrt_llm/_torch/models/modeling_gemma3vl.py
**/*.{cpp,cxx,cc,cu,h,hpp,hxx,hh,cuh,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

Prepend NVIDIA copyright header (current year) to all source files

Files:

  • tensorrt_llm/_torch/models/modeling_gemma3vl.py

@brb-nv brb-nv changed the title [None][chore]: Add note in Gemma3VL ctor [None][chore] Add note in Gemma3VL ctor Aug 14, 2025
@brb-nv brb-nv force-pushed the user/brb/psa-in-gemma3vl branch from 161740d to 43671ec Compare August 14, 2025 01:37
@brb-nv
Copy link
Collaborator Author

brb-nv commented Aug 14, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15205 [ run ] triggered by Bot

@brb-nv brb-nv requested a review from a team as a code owner August 14, 2025 04:04
@brb-nv brb-nv requested review from chzblych and nv-guomingz August 14, 2025 04:04
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
examples/models/core/multimodal/README.md (5)

356-367: Tighten wording, fix capitalization, and clarify FlashInfer exclusivity.
Minor copyedits improve precision and readability.

Apply this diff:

-## Gemma3
-
-**NOTE: We only support Gemma3 VLMs in Pytorch workflow.**
-
-Gemma3VL decoder requires a custom attention mask while processing images. During the context phase:
+## Gemma3
+
+**NOTE: Gemma3 VLMs are supported only in the PyTorch workflow.**
+
+The Gemma3VL decoder requires a custom attention mask while processing images. During the context (prefill) phase:
 - Text tokens attend to other tokens in a causal fashion (standard autoregressive behavior)
 - Image tokens attend to other tokens in a causal fashion AND attend to other tokens from the same image in a bidirectional manner
-
-**Reference:** [Gemma3 Model Documentation](https://huggingface.co/docs/transformers/en/model_doc/gemma3)
-
-We support this custom mask with FlashInfer attention backend.
+
+**Reference:** [Gemma3 Model Documentation](https://huggingface.co/docs/transformers/en/model_doc/gemma3)
+
+This custom mask is supported only with the FlashInfer attention backend.

370-374: Make the “chunked prefill” requirement actionable.
Call out the actual flag users should not enable to avoid confusion.

Apply this diff:

-To ensure expected behavior with Gemma3VL, the following configurations are **required**:
-- **Attention Backend**: Use the FlashInfer attention backend
-- **Chunked Prefill**: Must be disabled
-- **KV Cache Reuse**: Must be disabled
+To ensure expected behavior with Gemma3VL, the following configurations are **required**:
+- **Attention Backend**: Use the FlashInfer attention backend
+- **Chunked Prefill**: Must be disabled (do not enable context chunking, i.e., do not pass `--enable_chunked_context`)
+- **KV Cache Reuse**: Must be disabled

388-396: Explicitly call out chunked prefill disabling in the Quick Start command.
Users may miss that this must remain off. Add a comment to prevent accidental misuse.

Apply this diff:

 python3 examples/llm-api/quickstart_multimodal.py \
     --model_dir ${MODEL_NAME}/ \
     --modality image \
     --image_format pil \
     --attention_backend FLASHINFER \
-    --disable_kv_cache_reuse
+    --disable_kv_cache_reuse
+    # Note: keep chunked prefill disabled (do NOT pass --enable_chunked_context)

402-417: Reinforce the chunked prefill requirement in the serving YAML.
Add a note to avoid enabling chunked context when serving Gemma3VL.

Apply this diff:

 cat > extra-llm-api-options.yaml << 'EOF'
 cuda_graph_config: null
 attn_backend: "FLASHINFER"
 kv_cache_config:
   enable_block_reuse: false
+# Note: keep context chunking disabled for Gemma3VL (do NOT set enable_chunked_context=true)
 EOF

356-423: Optional: Cross-reference runtime limitations.
Since Gemma3 is PyTorch-only, consider adding a one-liner that C++ (cpp) runtime isn’t supported to reduce support questions.

Proposed addition (outside of the selected lines, place after the NOTE line):

“C++ runtime (cpp) and mixed cpp_llm_only sessions are not supported for Gemma3 VLMs.”

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43671ec and caedd46.

📒 Files selected for processing (1)
  • examples/models/core/multimodal/README.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
examples/models/core/multimodal/README.md

[grammar] ~15-~15: There might be a mistake here.
Context: ...plot](#deplot) - Fuyu - Gemma3 - [InternLM-XComposer2](#internlm-xcomposer...

(QB_NEW_EN)


[grammar] ~360-~360: There might be a mistake here.
Context: ...essing images. During the context phase: - Text tokens attend to other tokens in a ...

(QB_NEW_EN)


[grammar] ~366-~366: There might be a mistake here.
Context: ...oc/gemma3) We support this custom mask with FlashInfer attention backend. ### Requ...

(QB_NEW_EN)


[grammar] ~370-~370: There might be a mistake here.
Context: ...llowing configurations are required: - Attention Backend: Use the FlashInfer ...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check
🔇 Additional comments (2)
examples/models/core/multimodal/README.md (2)

15-15: TOC entry for Gemma3 looks good.
Link target matches the added section header and follows existing TOC style.


421-422: Clarify which Gemma3 variants are supported (base vs. instruct).
If both base and instruct checkpoints are supported across 4B/12B/27B, consider stating that explicitly; otherwise specify the subset to avoid ambiguity.

Do you want me to update the line to “Currently supported Gemma3 variants: 4B/12B/27B (base and instruct)” or narrow it to the exact list you support?

@brb-nv brb-nv force-pushed the user/brb/psa-in-gemma3vl branch from caedd46 to 0de1e55 Compare August 14, 2025 04:16
@brb-nv
Copy link
Collaborator Author

brb-nv commented Aug 14, 2025

/bot run

@brb-nv brb-nv changed the title [None][chore] Add note in Gemma3VL ctor [None][chore] Add docs for Gemma3 VLMs Aug 14, 2025
@tensorrt-cicd
Copy link
Collaborator

PR_Github #15221 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15205 [ run ] completed with state ABORTED

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (6)
examples/models/core/multimodal/README.md (6)

358-359: Capitalize PyTorch and tighten wording.

Minor editorial polish for accuracy and consistency.

Apply this diff:

-**NOTE: We only support Gemma3 VLMs in Pytorch workflow.**
+**NOTE: We only support Gemma3 VLMs in the PyTorch workflow.**

360-363: Clarify the decoder mask behavior phrasing.

Slight reword to improve readability and remove redundancy.

Apply this diff:

-- Text tokens attend to other tokens in a causal fashion (standard autoregressive behavior)
-- Image tokens attend to other tokens in a causal fashion AND attend to other tokens from the same image in a bidirectional manner
+- Text tokens attend to other tokens in a causal fashion (standard autoregressive behavior)
+- Image tokens attend causally to preceding tokens and bidirectionally to tokens from the same image

366-367: Grammar/precision: add article and “only” qualifier.

This reads better and sets the expectation that other backends won’t work here.

Apply this diff:

-We support this custom mask with FlashInfer attention backend.
+We support this custom mask only with the FlashInfer attention backend.

370-374: Make the requirements actionable by mapping to exact flags.

You list three hard requirements, but only two are shown in the examples below. Consider adding the explicit flags/keys users must set, for both CLI and YAML, so they can copy/paste:

  • CLI (quickstart): pass the backend flag, explicitly disable KV cache reuse, and ensure chunked context is not enabled.
  • YAML (serve): set attn_backend, set kv_cache_config.enable_block_reuse: false, and explicitly disable chunked context if the option exists.

I’ve added concrete suggestions in the quickstart and YAML comments below; please verify exact option names in the codebase (script attached in a separate comment).


379-383: Align paths with the rest of the README, ensure LFS, and fix the backend flag name.

  • Consistently use tmp/hf_models for HF clones (used throughout this README).
  • Use git LFS for Gemma3 models to avoid partial clones.
  • In quickstart, use attn_backend (matches the YAML key and common CLI naming). Also point model_dir to the HF path used above.
  • In serve, point to the same HF path for consistency.

Please verify the quickstart flag spelling (attn_backend vs attention_backend) with the script in the next comment.

Apply this diff:

-```bash
-export MODEL_NAME="gemma-3-27b-it"
-git clone https://huggingface.co/google/${MODEL_NAME}
-```
+```bash
+export MODEL_NAME="gemma-3-27b-it"
+git lfs clone https://huggingface.co/google/${MODEL_NAME} tmp/hf_models/${MODEL_NAME}
+```

-```bash
-python3 examples/llm-api/quickstart_multimodal.py \
-    --model_dir ${MODEL_NAME}/ \
+```bash
+python3 examples/llm-api/quickstart_multimodal.py \
+    --model_dir tmp/hf_models/${MODEL_NAME}/ \
     --modality image \
     --image_format pil \
-    --attention_backend FLASHINFER \
+    --attn_backend FLASHINFER \
     --disable_kv_cache_reuse

-bash -# Serve the model -trtllm-serve ${MODEL_NAME}/ \ +bash
+# Serve the model
+trtllm-serve tmp/hf_models/${MODEL_NAME}/
--backend pytorch
--tp_size 1
--port 8000
--max_batch_size 4
--extra_llm_api_options extra-llm-api-options.yaml

Also applies to: 389-395, 411-417


402-409: Call out chunked prefill disabling directly in the YAML example.

If a dedicated option exists, include it; otherwise, add a comment to prevent misconfiguration. Below adds a non-invasive comment line.

Apply this diff:

 cat > extra-llm-api-options.yaml << 'EOF'
 cuda_graph_config: null
 attn_backend: "FLASHINFER"
+# Chunked prefill must be disabled for Gemma3VL
 kv_cache_config:
   enable_block_reuse: false
 EOF
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between caedd46 and 0de1e55.

📒 Files selected for processing (2)
  • examples/models/core/multimodal/README.md (2 hunks)
  • tensorrt_llm/_torch/models/modeling_gemma3vl.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tensorrt_llm/_torch/models/modeling_gemma3vl.py
🧰 Additional context used
🪛 LanguageTool
examples/models/core/multimodal/README.md

[grammar] ~15-~15: There might be a mistake here.
Context: ...plot](#deplot) - Fuyu - Gemma3 - [InternLM-XComposer2](#internlm-xcomposer...

(QB_NEW_EN)


[grammar] ~360-~360: There might be a mistake here.
Context: ...essing images. During the context phase: - Text tokens attend to other tokens in a ...

(QB_NEW_EN)


[grammar] ~366-~366: There might be a mistake here.
Context: ...oc/gemma3) We support this custom mask with FlashInfer attention backend. ### Requ...

(QB_NEW_EN)


[grammar] ~370-~370: There might be a mistake here.
Context: ...llowing configurations are required: - Attention Backend: Use the FlashInfer ...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check
🔇 Additional comments (2)
examples/models/core/multimodal/README.md (2)

15-15: TOC entry looks good; anchor matches the section header.

No functional concerns.


356-374: Good, high-signal PSA for Gemma3VL runtime requirements.

The section clearly states scope (PyTorch-only) and mask semantics, and it enumerates hard requirements up front. With the small edits suggested above, this becomes immediately actionable and less error-prone.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15221 [ run ] completed with state SUCCESS
/LLM/release-1.0/L0_MergeRequest_PR pipeline #101 completed with status: 'SUCCESS'

@brb-nv brb-nv force-pushed the user/brb/psa-in-gemma3vl branch from 0de1e55 to ffeec77 Compare August 14, 2025 15:44
@brb-nv
Copy link
Collaborator Author

brb-nv commented Aug 14, 2025

/bot run

@brb-nv brb-nv enabled auto-merge (squash) August 14, 2025 15:45
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
examples/models/core/multimodal/README.md (1)

421-422: Update supported variants to match what’s wired and set expectations (-it only)

Repo usage currently references instruction-tuned Gemma3 VLMs only, and prior verification indicated support for 1B and 27B IT variants. Listing 4B/12B is misleading.

Apply this diff:

-Currently supported Gemma3 variants: 4B, 12B, 27B
+Currently supported Gemma3 variants: 1B, 27B (google/gemma-3-1b-it, google/gemma-3-27b-it)
+Note: Only instruction-tuned Gemma3 VLMs (the “-it” HF variants) are supported in this workflow.
🧹 Nitpick comments (3)
examples/models/core/multimodal/README.md (3)

358-366: Fix capitalization and tighten wording around attention mask

  • Capitalize PyTorch.
  • Clarify "context phase" to "prefill (context) phase" for precision.
  • Add missing article before "FlashInfer attention backend."

Apply this diff:

-**NOTE: We only support Gemma3 VLMs in Pytorch workflow.**
+**NOTE: We only support Gemma3 VLMs in PyTorch workflow.**
@@
-Gemma3VL decoder requires a custom attention mask while processing images. During the context phase:
+Gemma3VL decoder requires a custom attention mask while processing images. During the prefill (context) phase:
@@
-**Reference:** [Gemma3 Model Documentation](https://huggingface.co/docs/transformers/en/model_doc/gemma3)
-
-We support this custom mask with FlashInfer attention backend.
+**Reference:** [Gemma3 Model Documentation](https://huggingface.co/docs/transformers/en/model_doc/gemma3)
+
+We support this custom mask with the FlashInfer attention backend.

370-374: Surface PyTorch-only requirement in the “Requirements” bullets

You call this out above, but it should also be explicit in the Requirements list, since it’s actionable.

Apply this diff:

 To ensure expected behavior with Gemma3VL, the following configurations are **required**:
+- **Backend**: Use the PyTorch workflow (C++ runtime is not supported)
 - **Attention Backend**: Use the FlashInfer attention backend
 - **Chunked Prefill**: Must be disabled
 - **KV Cache Reuse**: Must be disabled

389-395: Make chunked prefill disabling explicit in quickstart

To avoid confusion, explicitly remind users not to enable chunked context during prefill.

Apply this diff:

 python3 examples/llm-api/quickstart_multimodal.py \
     --model_dir ${MODEL_NAME}/ \
     --modality image \
     --image_format pil \
     --attention_backend FLASHINFER \
-    --disable_kv_cache_reuse
+    --disable_kv_cache_reuse
+# Note: Do NOT enable chunked prefill (omit any --enable_chunked_context flag)
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0de1e55 and ffeec77.

📒 Files selected for processing (2)
  • examples/models/core/multimodal/README.md (2 hunks)
  • tensorrt_llm/_torch/models/modeling_gemma3vl.py (0 hunks)
💤 Files with no reviewable changes (1)
  • tensorrt_llm/_torch/models/modeling_gemma3vl.py
🧰 Additional context used
🪛 LanguageTool
examples/models/core/multimodal/README.md

[grammar] ~15-~15: There might be a mistake here.
Context: ...plot](#deplot) - Fuyu - Gemma3 - [InternLM-XComposer2](#internlm-xcomposer...

(QB_NEW_EN)


[grammar] ~360-~360: There might be a mistake here.
Context: ...essing images. During the context phase: - Text tokens attend to other tokens in a ...

(QB_NEW_EN)


[grammar] ~366-~366: There might be a mistake here.
Context: ...oc/gemma3) We support this custom mask with FlashInfer attention backend. ### Requ...

(QB_NEW_EN)


[grammar] ~370-~370: There might be a mistake here.
Context: ...llowing configurations are required: - Attention Backend: Use the FlashInfer ...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check
🔇 Additional comments (1)
examples/models/core/multimodal/README.md (1)

15-15: TOC entry for Gemma3 looks good

Anchor and casing are consistent with the section header.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #15315 [ run ] triggered by Bot

Signed-off-by: Balaram Buddharaju <[email protected]>
@brb-nv brb-nv force-pushed the user/brb/psa-in-gemma3vl branch from ffeec77 to 8d552c7 Compare August 14, 2025 18:28
@tensorrt-cicd
Copy link
Collaborator

PR_Github #15336 [ run ] completed with state SUCCESS
/LLM/release-1.0/L0_MergeRequest_PR pipeline #122 completed with status: 'SUCCESS'

@brb-nv brb-nv merged commit a00ca11 into NVIDIA:release/1.0 Aug 15, 2025
4 checks passed
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 22, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 22, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 22, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 23, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 24, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 25, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 25, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 25, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 26, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 27, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 27, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 27, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 27, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 28, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 28, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 28, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 28, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 28, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 28, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 29, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 29, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 29, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 29, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Aug 30, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
joyang-nv pushed a commit that referenced this pull request Sep 1, 2025
Signed-off-by: Balaram Buddharaju <[email protected]>
Signed-off-by: Wangshanshan <[email protected]>
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.

5 participants