[https://nvbugs/6058251][fix] Resolve top-level model_type for composite HF configs#14068
Conversation
…onfigs Composite HF configs (Qwen2_5_VLConfig, Qwen3_VLConfig, etc.) in newer transformers versions delegate the instance-level model_type attribute to their text_config sub-config, so model_config.model_type returns e.g. qwen2_5_vl_text rather than the top-level qwen2_5_vl that matches the MULTIMODAL_PLACEHOLDER_REGISTRY registration key. This caused trtllm-serve to reject multimodal chat requests with TypeError: Unknown modality: image. Prefer the class-level model_type attribute, which is the canonical AutoConfig registration key and is unaffected by this delegation. Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
|
Resolve conflict for PR #13855, since I can't push to trt bot's branch. |
|
/bot run --disable-fail-fast |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR introduces a helper function to correctly resolve top-level model types from composite HuggingFace configurations (avoiding nested delegation), then propagates its use through apply_chat_template and MultimodalDataTracker calls across the serving stack: chat_utils, openai_server, and responses_utils. ChangesResolve top-level model type across serving stack
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
PR_Github #48080 [ run ] triggered by Bot. Commit: |
|
PR_Github #48080 [ run ] completed with state
|
|
/bot run |
|
PR_Github #48163 [ run ] triggered by Bot. Commit: |
|
PR_Github #48163 [ run ] completed with state
|
|
/bot run |
|
PR_Github #48183 [ run ] triggered by Bot. Commit: |
|
PR_Github #48183 [ run ] completed with state
|
|
/bot run |
|
PR_Github #48287 [ run ] triggered by Bot. Commit: |
|
PR_Github #48287 [ run ] completed with state |
Composite HF configs (Qwen2_5_VLConfig, Qwen3_VLConfig, etc.) in newer transformers versions delegate the instance-level model_type attribute to their text_config sub-config, so model_config.model_type returns e.g. qwen2_5_vl_text rather than the top-level qwen2_5_vl that matches the MULTIMODAL_PLACEHOLDER_REGISTRY registration key. This caused trtllm-serve to reject multimodal chat requests with TypeError: Unknown modality: image.
Prefer the class-level model_type attribute, which is the canonical AutoConfig registration key and is unaffected by this delegation.
Summary by CodeRabbit
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.