Skip to content

[None][feat] Default Kimi K2.5 to KV cache manager V2 - #17125

Merged
liji-nv merged 1 commit into
NVIDIA:mainfrom
liji-nv:feat/kimi-k25-manager-v2
Aug 7, 2026
Merged

[None][feat] Default Kimi K2.5 to KV cache manager V2#17125
liji-nv merged 1 commit into
NVIDIA:mainfrom
liji-nv:feat/kimi-k25-manager-v2

Conversation

@liji-nv

@liji-nv liji-nv commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Use the C++ KV cache manager V2 as the model-specific default for Kimi K2.5. This keeps the default scoped to Kimi K2.5 without changing other Kimi implementations or the global LLM arguments.

The existing auto resolution remains responsible for transport compatibility: NIXL with the Python transceiver keeps ManagerV2, while non-NIXL or C++ transceiver routes fall back to the legacy manager unless the user explicitly requests V2.

Add a focused model registration test for the new default.

Validation:

  • pre-commit run --files tensorrt_llm/_torch/models/modeling_kimi_k25.py tests/unittest/_torch/modeling/test_modeling_kimi_k25.py

  • git diff --check

  • B200 clean sqsh build (Slurm 1569850)

Dev Engineer Review

  • Added KimiK25ForConditionalGeneration.get_model_defaults.
  • The method sets the C++ KV cache manager V2 as the Kimi K2.5 default.
  • The change is limited to Kimi K2.5.
  • No global LLM argument changes or changes to other Kimi implementations were reported.
  • Automatic transport compatibility remains unchanged.
  • Validation included pre-commit checks, git diff --check, and a clean B200 build.
  • CI still requires follow-up because reported runs failed or have no completion result.

QA Engineer Review

No test files are touched.

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)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in 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.

@liji-nv
liji-nv requested a review from a team as a code owner July 31, 2026 12:24
@liji-nv
liji-nv requested a review from 2ez4bz July 31, 2026 12:24
@liji-nv liji-nv changed the title [Kimi K2.5][feat] Default to KV cache manager V2 [None][feat] Default to KV cache manager V2 Jul 31, 2026
@liji-nv liji-nv changed the title [None][feat] Default to KV cache manager V2 [None][feat] Default Kimi K2.5 to KV cache manager V2 Jul 31, 2026
@liji-nv

liji-nv commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --add-multi-gpu-test

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4ab85d0a-6a5d-4093-8f26-7d490691b30f

📥 Commits

Reviewing files that changed from the base of the PR and between 4aea8b1 and f757d84.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/models/modeling_kimi_k25.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • tensorrt_llm/_torch/models/modeling_kimi_k25.py

Walkthrough

Kimi K2.5 now provides model defaults that enable the C++ KV cache manager V2.

Changes

Kimi K2.5 KV cache defaults

Layer / File(s) Summary
Configure KV cache defaults
tensorrt_llm/_torch/models/modeling_kimi_k25.py
Adds get_model_defaults, which enables the C++ KV cache manager V2 by default.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: 2ez4bz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format and clearly states that Kimi K2.5 now defaults to KV cache manager V2.
Description check ✅ Passed The description explains the change, compatibility behavior, focused test, validation steps, and checklist completion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
tensorrt_llm/_torch/models/modeling_kimi_k25.py (1)

1520-1523: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Align the override with the base type contract.

Line 1521 uses Any, and the return annotation is an unparameterized dict. Use the same TorchLlmArgs input annotation as tensorrt_llm/_torch/models/modeling_utils.py. Parameterize the return type for this nested configuration. If Line 616 intentionally passes None, confirm that None is part of the runtime contract or update the test to use a valid argument.

Suggested type alignment
-    def get_model_defaults(cls, llm_args: Any) -> dict:
+    def get_model_defaults(
+        cls, llm_args: "TorchLlmArgs"
+    ) -> dict[str, dict[str, bool]]:
🤖 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_kimi_k25.py` around lines 1520 - 1523,
Update KimiForCausalLM.get_model_defaults to accept TorchLlmArgs instead of Any
and annotate its nested configuration return with the appropriate parameterized
mapping type, matching the base contract in modeling_utils.py. Check the call at
line 616 and preserve None only if it is supported by the runtime contract;
otherwise update that test or caller to provide a valid TorchLlmArgs instance.

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.

Inline comments:
In `@tests/unittest/_torch/modeling/test_modeling_kimi_k25.py`:
- Around line 614-617: Register test_modeling_kimi_k25.py in the appropriate CI
or QA test list so
TestKimiK25AutoModelRegistration.test_defaults_to_kv_cache_manager_v2 is
included in automated coverage.

---

Nitpick comments:
In `@tensorrt_llm/_torch/models/modeling_kimi_k25.py`:
- Around line 1520-1523: Update KimiForCausalLM.get_model_defaults to accept
TorchLlmArgs instead of Any and annotate its nested configuration return with
the appropriate parameterized mapping type, matching the base contract in
modeling_utils.py. Check the call at line 616 and preserve None only if it is
supported by the runtime contract; otherwise update that test or caller to
provide a valid TorchLlmArgs instance.
🪄 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: 685036d2-737c-48dc-8acc-b83be74235f3

📥 Commits

Reviewing files that changed from the base of the PR and between d924d9f and c0b198e.

📒 Files selected for processing (2)
  • tensorrt_llm/_torch/models/modeling_kimi_k25.py
  • tests/unittest/_torch/modeling/test_modeling_kimi_k25.py

Comment thread tests/unittest/_torch/modeling/test_modeling_kimi_k25.py Outdated
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63037 [ run ] triggered by Bot. Commit: c0b198e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63037 [ run ] completed with state FAILURE. Commit: c0b198e
/LLM/main/L0_MergeRequest_PR pipeline #51141 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@liji-nv

liji-nv commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Depends on #16072 to resolve the perf issue.

@liji-nv
liji-nv force-pushed the feat/kimi-k25-manager-v2 branch from c0b198e to 81aa6b6 Compare August 5, 2026 10:01
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@liji-nv

liji-nv commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64025 [ run ] triggered by Bot. Commit: 81aa6b6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64025 [ run ] completed with state SUCCESS. Commit: 81aa6b6
/LLM/main/L0_MergeRequest_PR pipeline #51956 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@liji-nv

liji-nv commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64195 [ run ] triggered by Bot. Commit: 81aa6b6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64195 [ run ] completed with state FAILURE. Commit: 81aa6b6
/LLM/main/L0_MergeRequest_PR pipeline #52104 completed with status: 'FAILURE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@liji-nv

liji-nv commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64319 [ run ] triggered by Bot. Commit: 81aa6b6 Link to invocation

Use the C++ KV cache manager V2 as the model-specific default for Kimi K2.5. This keeps the default scoped to Kimi K2.5 without changing other Kimi implementations or the global LLM arguments.

The existing auto resolution remains responsible for transport compatibility: NIXL with the Python transceiver keeps ManagerV2, while non-NIXL or C++ transceiver routes fall back to the legacy manager unless the user explicitly requests V2.

Validation:

- pre-commit run --files tensorrt_llm/_torch/models/modeling_kimi_k25.py

- git diff --check

- B200 clean sqsh build (Slurm 1569850)

Signed-off-by: Jin Li <59594262+liji-nv@users.noreply.github.com>
@liji-nv
liji-nv force-pushed the feat/kimi-k25-manager-v2 branch from 81aa6b6 to f757d84 Compare August 6, 2026 11:38
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64319 [ run ] completed with state SUCCESS. Commit: 81aa6b6
/LLM/main/L0_MergeRequest_PR pipeline #52216 completed with status: 'SUCCESS'

CI Report

Link to invocation

@liji-nv

liji-nv commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64346 [ run ] triggered by Bot. Commit: f757d84 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64346 [ run ] completed with state FAILURE. Commit: f757d84
/LLM/main/L0_MergeRequest_PR pipeline #52240 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@liji-nv

liji-nv commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64457 [ run ] triggered by Bot. Commit: f757d84 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64457 [ run ] completed with state FAILURE. Commit: f757d84
/LLM/main/L0_MergeRequest_PR pipeline #52335 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@liji-nv

liji-nv commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --add-multi-gpu-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64551 [ run ] triggered by Bot. Commit: f757d84 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64551 [ run ] completed with state SUCCESS. Commit: f757d84
/LLM/main/L0_MergeRequest_PR pipeline #52415 completed with status: 'SUCCESS'

CI Report

Link to invocation

@liji-nv
liji-nv merged commit a9be9ec into NVIDIA:main Aug 7, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants