[NVBug: 6445613] handle nested vocab_size for multimodal configs (Gemma4) - #2040
[NVBug: 6445613] handle nested vocab_size for multimodal configs (Gemma4)#2040juhi10071998 wants to merge 1 commit into
Conversation
…mma4) Gemma4Config stores vocab_size under text_config.vocab_size rather than at the top level. The export path now falls back to text_config.vocab_size when model.config.vocab_size is absent. Fixes: NVBug 6445613 / GitHub TensorRT-LLM#16171 Signed-off-by: Juhi Mittal <juhim@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2040 +/- ##
==========================================
- Coverage 69.97% 66.80% -3.18%
==========================================
Files 519 519
Lines 59399 59401 +2
==========================================
- Hits 41565 39681 -1884
- Misses 17834 19720 +1886
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Gemma4Configstoresvocab_sizeundertext_config.vocab_sizerather than at the top level, causingAttributeErrorduring TRT-LLM checkpoint exporthasattrfallback so multimodal configs with nestedvocab_sizework correctly while all flat-config models (Llama, Mistral, etc.) are unaffectedRoot cause
torch_to_tensorrt_llm_checkpointinmodel_config_export.pyassumedmodel.config.vocab_sizealways exists. For multimodal HF models (Gemma4 and similar),vocab_sizeis nested undertext_config.Test plan
epic_banachcontainer withAutoConfig.for_model("gemma4")— correctly readstext_config.vocab_size = 262144vocab_sizedirectly — unchanged behaviorgoogle/gemma-4-E2B-it+ INT4 AWQ quantization pending model weightsReferences