[None][fix] Fix bugs related with nemotron-nas model#13968
Conversation
📝 WalkthroughWalkthroughThis PR introduces a new Hugging Face weight mapper for the Nemotron NAS model (DeciLMForCausalLM) that handles per-layer KV-head configurations, exports it from the checkpoints module, enables previously-waived tests, and includes a defensive fix for KV cache transfer buffer handling with zero-sized buffers. ChangesNemotron NAS Weight Mapper & Test Enablement
KV Cache Transfer Manager Empty Buffer Handling
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
tests/unittest/llmapi/test_llm_pytorch.py (1)
620-620: LGTM — tighteningmax_tokenshere is a reasonable stabilization fortest_nemotron_nas_lora.QA note: this is unittest-only scope (
tests/unittest/...), so notests/integration/test_lists/qa/*update is needed in this PR.As per coding guidelines
tests/**: "If the PR only touches unittest/ or narrow unit scope, say explicitly whether QA list updates are unnecessary or optional."🤖 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 `@tests/unittest/llmapi/test_llm_pytorch.py` at line 620, This change tightens SamplingParams(max_tokens=3, add_special_tokens=False) in the unit test test_nemotron_nas_lora and is limited to tests/** unit scope; update the PR description (or PR body) to explicitly state that the change only touches unittest scope (tests/unittest/...), that QA list updates under tests/integration/... are unnecessary, and therefore no QA list changes are required for this PR so reviewers and QA know it's out-of-scope for integration QA updates.
🤖 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.
Inline comments:
In `@tensorrt_llm/_torch/models/checkpoints/__init__.py`:
- Line 10: Update this modified file to include the required NVIDIA source-file
header at the top of the file: add or update the standard copyright block (with
the current year and NVIDIA ownership) before any imports/definitions so the
file (which imports NemotronNasHfWeightMapper) conforms to the project's header
policy for Python files; ensure the header format matches other files in the
repo (same wording and year) and place it above the existing "from
.hf.nemotron_nas_weight_mapper import NemotronNasHfWeightMapper" line.
In `@tensorrt_llm/_torch/models/checkpoints/hf/nemotron_nas_weight_mapper.py`:
- Line 1: Add the repository-required NVIDIA copyright header to the top of the
new Python module nemotron_nas_weight_mapper.py (module:
tensorrt_llm._torch.models.checkpoints.hf.nemotron_nas_weight_mapper); insert
the standard NVIDIA header block used across the repo (with the appropriate
year) as the very first lines of the file before any imports (e.g., before "from
torch import nn") so the file complies with the coding guidelines for new .py
files.
---
Nitpick comments:
In `@tests/unittest/llmapi/test_llm_pytorch.py`:
- Line 620: This change tightens SamplingParams(max_tokens=3,
add_special_tokens=False) in the unit test test_nemotron_nas_lora and is limited
to tests/** unit scope; update the PR description (or PR body) to explicitly
state that the change only touches unittest scope (tests/unittest/...), that QA
list updates under tests/integration/... are unnecessary, and therefore no QA
list changes are required for this PR so reviewers and QA know it's out-of-scope
for integration QA updates.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: ec64ed26-ce60-4e44-9be0-f35606a37157
📒 Files selected for processing (5)
cpp/tensorrt_llm/batch_manager/kvCacheTransferManager.cpptensorrt_llm/_torch/models/checkpoints/__init__.pytensorrt_llm/_torch/models/checkpoints/hf/nemotron_nas_weight_mapper.pytests/integration/test_lists/waives.txttests/unittest/llmapi/test_llm_pytorch.py
💤 Files with no reviewable changes (1)
- tests/integration/test_lists/waives.txt
|
/bot run --disable-fail-fast |
|
PR_Github #47669 [ run ] triggered by Bot. Commit: |
|
PR_Github #47669 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
6b641f1 to
67e0a3a
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #47825 [ run ] triggered by Bot. Commit: |
|
PR_Github #47825 [ run ] completed with state
|
* https://nvbugs/6070857 * https://nvbugs/6140399 * https://nvbugs/5648522 * https://nvbugs/6163032 Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>
67e0a3a to
1b44911
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #48101 [ run ] triggered by Bot. Commit: |
|
PR_Github #48101 [ run ] completed with state
|
Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #48343 [ run ] triggered by Bot. Commit: |
|
PR_Github #48343 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #48524 [ run ] triggered by Bot. Commit: |
|
PR_Github #48524 [ run ] completed with state
|
Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #48668 [ run ] triggered by Bot. Commit: |
|
PR_Github #48668 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #48686 [ run ] triggered by Bot. Commit: |
|
PR_Github #48686 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #48815 [ run ] triggered by Bot. Commit: |
|
PR_Github #48815 [ run ] completed with state
|
|
/bot skip --comment "all related tests were passed" |
|
PR_Github #48842 [ skip ] triggered by Bot. Commit: |
|
PR_Github #48842 [ skip ] completed with state |
Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>
Bugs to be resolved:
Summary by CodeRabbit
New Features
Bug Fixes
Tests
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.