[None][feat] Prefer V2 transceiver backend for Gemma and Llama#16787
[None][feat] Prefer V2 transceiver backend for Gemma and Llama#16787moraxu wants to merge 2 commits into
Conversation
|
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)
WalkthroughLlama and Gemma causal language model classes now declare Python as their preferred transceiver runtime. Tests cover automatic resolution, and the disaggregated KV-cache timing test explicitly selects UCX for metrics collection. ChangesTransceiver runtime preferences
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tensorrt_llm/_torch/models/modeling_gemma3.py (1)
279-284: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument both resolver-facing runtime-preference hooks.
Add matching Google-style docstrings documenting
pretrained_configand the returned runtime sentinel:
tensorrt_llm/_torch/models/modeling_gemma3.py#L279-L284: documentGemma3ForCausalLM.get_preferred_transceiver_runtime.tensorrt_llm/_torch/models/modeling_llama.py#L1137-L1142: documentLlamaForCausalLM.get_preferred_transceiver_runtime.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tensorrt_llm/_torch/models/modeling_gemma3.py` around lines 279 - 284, Add matching Google-style docstrings to Gemma3ForCausalLM.get_preferred_transceiver_runtime in tensorrt_llm/_torch/models/modeling_gemma3.py lines 279-284 and LlamaForCausalLM.get_preferred_transceiver_runtime in tensorrt_llm/_torch/models/modeling_llama.py lines 1137-1142, documenting the pretrained_config parameter and the returned "PYTHON" runtime sentinel while preserving the existing behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tensorrt_llm/_torch/models/modeling_gemma3.py`:
- Around line 279-284: Add matching Google-style docstrings to
Gemma3ForCausalLM.get_preferred_transceiver_runtime in
tensorrt_llm/_torch/models/modeling_gemma3.py lines 279-284 and
LlamaForCausalLM.get_preferred_transceiver_runtime in
tensorrt_llm/_torch/models/modeling_llama.py lines 1137-1142, documenting the
pretrained_config parameter and the returned "PYTHON" runtime sentinel while
preserving the existing behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 71444888-d1ad-47d4-8c6b-dcf66b86a774
📒 Files selected for processing (3)
tensorrt_llm/_torch/models/modeling_gemma3.pytensorrt_llm/_torch/models/modeling_llama.pytests/unittest/llmapi/test_llm_args.py
|
Could you please check whether any existing tests need to be adjusted, similar to the changes made in PR 16482? |
I checked this, and the situation is slightly different from PR 16482. The existing Kimi test used DEFAULT, which caused the test harness to fall back to UCX/CPP, so it had to be explicitly changed to NIXL + PYTHON. Llama and Gemma already have corresponding NIXL + PYTHON disaggregated accuracy tests, so I don’t think similar test changes are needed here. |
Signed-off-by: Michal Guzek <mguzek@nvidia.com>
97231af to
3b8aeaa
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #61293 [ run ] triggered by Bot. Commit: |
Signed-off-by: Michal Guzek <mguzek@nvidia.com>
I only updated one test using |
|
/bot run --disable-fail-fast |
|
PR_Github #61343 [ run ] triggered by Bot. Commit: |
|
PR_Github #61293 [ run ] completed with state
|
|
PR_Github #61343 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #61484 [ run ] triggered by Bot. Commit: |
|
PR_Github #61484 [ run ] completed with state
|
|
I think my modified test errors here: |
Dev Engineer Review
Gemma3ForCausalLM) and Llama (LlamaForCausalLM) via newget_preferred_transceiver_runtime(...)classmethods, both returning"PYTHON"with return typeOptional[Literal["CPP", "PYTHON"]].Any,Literal)."auto", and adjusted an integration disaggregated KV-cache timing test to exercise the “legacy C++ DataTransceiver CSV format” path by forcing UCX cache transceiver selection.QA Engineer Review
tests/unittest/llmapi/test_llm_args.pyTestTransceiverRuntimeAutoResolution.test_llama_and_gemma_model_preferences_adopted(self, model_cls)to assert_resolve_transceiver_runtime_auto(...)mapscache_transceiver_config.transceiver_runtime == "auto"to"PYTHON"for bothLlamaForCausalLMandGemma3ForCausalLM.tests/integration/defs/disaggregated/test_disaggregated.pytest_disaggregated_kv_cache_time_outputto force UCX cache transceiver selection (setsTRTLLM_USE_NIXL_KVCACHE=0andTRTLLM_USE_UCX_KVCACHE=1) while validating the legacy C++ DataTransceiver CSV format behavior.tests/integration/test_lists/(CI/QA lists): Not applicable—no test-list files were modified in this PR (no direct evidence available here).Description
Prefer V2 transceiver backend for Gemma and Llama
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)
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.