Repository navigation
[TRTLLM-16220][feat] Enable KVCacheManagerV2 by default for Nemotron multimodal models - #19140
Conversation
|
/bot run |
6e6a1ac to
e861485
Compare
|
/bot run |
|
/bot run --disable-fail-fast |
|
PR_Github #73232 [ run ] triggered by Bot. Commit: |
|
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 (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. Walkthrough
ChangesNemotron KV-cache preferences
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change consistently routes the affected NemotronH multimodal models to the intended V2 KV-cache manager and Python transceiver, with matching coverage and documentation. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 4 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #73234 [ run ] triggered by Bot. Commit: |
|
PR_Github #73235 [ run ] triggered by Bot. Commit: |
|
PR_Github #73234 [ run ] completed with state |
|
PR_Github #73232 [ run ] completed with state |
|
PR_Github #73235 [ run ] completed with state
|
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
…al models The NemotronH_Nano_VL_V2 class serves three registered architectures -- Nemotron Nano VL v2, Nemotron Nano Omni V3, and Nemotron 3.5 Super VL -- all hybrid Mamba, and all resolved use_kv_cache_manager_v2="auto" to V1. The preference is read off the registered architecture class, and this class composes NemotronHForCausalLM rather than inheriting it, so the backbone's V2 and Python-transceiver preferences never reached the resolver. Both hooks now delegate to the backbone, alongside the get_model_defaults delegation already there for the same reason. Neither inspects pretrained_config: at resolution time that is still the outer multimodal config, whose hybrid_override_pattern lives one level down under llm_config. Signed-off-by: Yueh-Ting Chen <yueh.ting.chen@gmail.com>
e861485 to
3d65425
Compare
|
/bot skip --comment "Ran CI. The sole failure in single-GPU pipeline is not related to the change of this MR. Multi-GPU pipeline should be skippable. I have tested multi-GPU runs with the Nemotron Super 3.5 VL,with dis-agg, plus MTP, plus reuse enabled and the runtime works fine. Skipping to land the MR." |
|
/bot skip --comment "Re-skipping. Whole justification mentioned above." |
|
/bot skip --comment "Ran CI. The sole failure in single-GPU pipeline is not related to the change of this MR. Multi-GPU pipeline should be skippable. I have tested multi-GPU runs with the Nemotron Super 3.5 VL,with dis-agg, plus MTP, plus reuse enabled and the runtime works fine. Skipping to land the MR." |
|
PR_Github #73627 [ skip ] triggered by Bot. Commit: |
|
PR_Github #73627 [ skip ] completed with state |
Description
Fix from #18885 now allows KVCacheManagerV2 to successfully deal with multimodal inputs. Nemotron multimodal models should safely allow v2_kvcm as default now.
Use KVCacheManagerV2 for Nemotron-H Nano VL — and its
NemotronH_Nano_Omni_Reasoning_V3/NemotronH_Omni_Reasoning_V3siblings, which share the class.Test Coverage
"auto"to V2?test_registered_models_prefer_v2—tests/unittest/llmapi/test_llm_args.py:740hybrid_override_pattern?test_nemotron_nano_v2_vl_prefers_v2_on_the_outer_config—tests/unittest/_torch/modeling/test_modeling_nemotron_nano_v2_vl.py:675test_registered_models_keep_v2_on_nixl—tests/unittest/llmapi/test_llm_args.py:776test_hybrid_models_prefer_v2_and_python_transceiver—tests/unittest/_torch/executor/kv_cache/test_mamba_cache_manager.py:767test_nemotron_nano_v2_vl_defaults_keep_block_reuse_opt_in—tests/unittest/_torch/modeling/test_modeling_nemotron_nano_v2_vl.py:651Existing coverage that guards the shared paths this PR touches:
TestNemotron_Nano_12B_V2_VL::test_auto_dtype[forced_chunked_prefill](tests/integration/test_lists/test-db/l0_h100.yml:413) — does not pin the flag, so it now exercises this family onMambaHybridCacheManagerV2.tests/unittest/_torch/executor/kv_cache/test_kv_cache_v2_vocab_size.py— thellm_confignesting fallback forresolve_vocab_sizeunder V2.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)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.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.Dev Engineer Review
NemotronH_Nano_VL_V2now selects KV cache manager V2 and the Python transceiver by default. The change applies to the shared NemotronH Nano VL and Omni reasoning model classes. Existing V1 selection and block reuse behavior remain opt-in.Documentation lists the affected multimodal models as V2 hybrid Mamba models. No unrelated API or configuration changes are introduced.
QA Engineer Review
Tests cover automatic V2 resolution, outer VL configuration handling, NIXL behavior, Python transceiver selection, and block reuse defaults. Registered-model coverage includes the NemotronH Nano and Omni reasoning architectures. Coverage verdict: sufficient.
Per-File QA Perspective
docs/source/features/kvcache.md: Documents the affected NemotronH multimodal models. QA should verify that the model list matches runtime support.tensorrt_llm/_torch/models/modeling_nemotron_nano.py: Adds wrapper-level preferences for V2 and the Python transceiver. QA should verify automatic, explicit V1, and NIXL paths.tests/unittest/_torch/executor/kv_cache/test_mamba_cache_manager.py: Covers V2 and Python-transceiver routing. This unit test has no integration test-list requirement.tests/unittest/_torch/modeling/test_modeling_nemotron_nano_v2_vl.py: Covers outer VL configuration resolution. This unit test has no integration test-list requirement.tests/unittest/llmapi/test_llm_args.py: Covers V2 preferences for NemotronH Nano and Omni architectures, including the NIXL/Python path. This unit test has no integration test-list requirement.