Skip to content

[https://nvbugs/6293015][fix] Add a delegating `@property def vocab_size_padded(self) -> int: return… - #15219

Merged
sunnyqgg merged 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6293015
Jun 13, 2026
Merged

[https://nvbugs/6293015][fix] Add a delegating `@property def vocab_size_padded(self) -> int: return…#15219
sunnyqgg merged 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6293015

Conversation

@tensorrt-cicd

@tensorrt-cicd tensorrt-cicd commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause: KimiK25ForConditionalGeneration (multimodal wrapper around self.llm = DeepseekV3ForCausalLM) does not expose a vocab_size_padded property, unlike every other VLM wrapper.
  • Fix: Add a delegating @property def vocab_size_padded(self) -> int: return self.llm.vocab_size_padded to KimiK25ForConditionalGeneration, matching the pattern in modeling_qwen2vl.py, modeling_qwen3vl.py, etc.
  • Automated fix generated by repair-bot

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Summary by CodeRabbit

  • New Features
    • Exposed padded vocabulary size property, enabling external systems to query vocabulary padding information.

@coderabbitai

coderabbitai Bot commented Jun 10, 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: 753162c0-a0fb-4d79-bcc6-b5006c5ca4ff

📥 Commits

Reviewing files that changed from the base of the PR and between 9635f7d and 51a7963.

📒 Files selected for processing (1)
  • tensorrt_llm/_torch/models/modeling_kimi_k25.py

📝 Walkthrough

Walkthrough

KimiK25ForConditionalGeneration now exposes a vocab_size_padded property that forwards to the underlying llm.vocab_size_padded, allowing external code to query the padded vocabulary size through the VLM wrapper.

Changes

VLM wrapper vocabulary size property

Layer / File(s) Summary
VLM wrapper vocab size property
tensorrt_llm/_torch/models/modeling_kimi_k25.py
A vocab_size_padded property is added to KimiK25ForConditionalGeneration to expose the padded vocabulary size from the underlying llm model.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive Title is partially related to the changeset; it refers to adding vocab_size_padded property but is incomplete/truncated mid-word. Complete the title by finishing the truncated property return statement for clarity.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed PR description covers root cause, fix, and test plan but lacks the PR Checklist completion marker required by the template.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@zhaoyangwang-nvidia

Copy link
Copy Markdown
Collaborator

Hi @NVIDIA/trt-llm-torch-models-devs please help to review this PR, only a small fix for a NV bug.

@zhaoyangwang-nvidia

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53426 [ run ] triggered by Bot. Commit: 51a7963 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53426 [ run ] completed with state FAILURE. Commit: 51a7963
/LLM/main/L0_MergeRequest_PR pipeline #42596 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

@zhaoyangwang-nvidia

Copy link
Copy Markdown
Collaborator

/bot run

1 similar comment
@zhaoyangwang-nvidia

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53511 [ run ] triggered by Bot. Commit: 51a7963 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53511 [ run ] completed with state SUCCESS. Commit: 51a7963
/LLM/main/L0_MergeRequest_PR pipeline #42669 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

@xxi-nv

xxi-nv commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53535 [ run ] triggered by Bot. Commit: 51a7963 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53535 [ run ] completed with state SUCCESS. Commit: 51a7963
/LLM/main/L0_MergeRequest_PR pipeline #42687 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

@xxi-nv
xxi-nv force-pushed the repair-bot-bug6293015 branch from 51a7963 to f0b921c Compare June 11, 2026 10:26
@xxi-nv

xxi-nv commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53554 [ run ] triggered by Bot. Commit: f0b921c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53554 [ run ] completed with state SUCCESS. Commit: f0b921c
/LLM/main/L0_MergeRequest_PR pipeline #42704 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

@xxi-nv

xxi-nv commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

/bot run

1 similar comment
@xxi-nv

xxi-nv commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53579 [ run ] triggered by Bot. Commit: f0b921c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53580 [ run ] triggered by Bot. Commit: f0b921c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53579 [ run ] completed with state ABORTED. Commit: f0b921c

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53580 [ run ] completed with state SUCCESS. Commit: f0b921c
/LLM/main/L0_MergeRequest_PR pipeline #42727 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

…ditionalGeneration

The Kimi-K2.5 multimodal wrapper KimiK25ForConditionalGeneration holds the
text backbone as self.llm but does not delegate vocab_size_padded to it.
When guided_decoding_backend is set (e.g. xgrammar), py_executor_creator.py
reads model_engine.model.vocab_size_padded and raises AttributeError.

Add a delegating property matching the pattern used by every other VLM
wrapper (qwen2vl, qwen3vl, gemma3vl, llava_next, mistral, phi4mm, etc.).

Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
@xxi-nv
xxi-nv force-pushed the repair-bot-bug6293015 branch from f0b921c to 8129b65 Compare June 12, 2026 01:45
@xxi-nv

xxi-nv commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53748 [ run ] triggered by Bot. Commit: 8129b65 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53748 [ run ] completed with state FAILURE. Commit: 8129b65
/LLM/main/L0_MergeRequest_PR pipeline #42872 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

@zhaoyangwang-nvidia

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53801 [ run ] triggered by Bot. Commit: 8129b65 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53801 [ run ] completed with state SUCCESS. Commit: 8129b65
/LLM/main/L0_MergeRequest_PR pipeline #42919 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

@xxi-nv

xxi-nv commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53862 [ run ] triggered by Bot. Commit: 8129b65 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53862 [ run ] completed with state SUCCESS. Commit: 8129b65
/LLM/main/L0_MergeRequest_PR pipeline #42969 completed with status: 'SUCCESS'

CI Report

Link to invocation

@sunnyqgg
sunnyqgg merged commit ec47baa into NVIDIA:main Jun 13, 2026
7 checks passed
bo-deepinfra added a commit to deepinfra/TensorRT-LLM that referenced this pull request Jun 27, 2026
The rc18->rc19 rebase kept our rc18-based modeling_kimi_k25.py wholesale,
which missed rc19's own evolution of the (shared-lineage) file:
  - NVIDIA#13864 (EPD): get_prompt_token_ids() -> build_disagg_prefill_multimodal_inputs()
    returning DisaggPrefillMultimodalInputs. rc19's inputs/registry.py now
    REQUIRES this method for multimodal disagg; our old file only had the
    removed get_prompt_token_ids -> disaggregated multimodal Kimi would fail
    registry validation.
  - NVIDIA#14741: removed DI's lazy slow-tokenizer shim as redundant.
  - NVIDIA#15219: native vocab_size_padded delegating property.

Re-base our file on rc19's modeling_kimi_k25.py and re-apply only the DI
deltas that rc19 lacks:
  - tokenizer denylist discard ("kimi_k25") for correct gapped special-token
    ids (kept even though the slow-tokenizer shim was dropped; harmless no-op
    if upstream resolves the denylist entry);
  - root-logger filter silencing the per-encode "Calling super().encode" spam;
  - vision-tower MLP row chunking (TLLM_KIMI_VISION_MLP_CHUNK) to bound peak
    activation on large images;
  - keep MoonViT3d LayerNorm params in float32 (TRT-LLM LayerNorm.forward
    upcasts activations -> bf16 weights crash F.layer_norm);
  - data.image placeholder deficit top-up (drop the now-removed
    _ensure_k25_slow_tokenizer call);
  - spec-decode delegations rc19 lacks (spec_worker, spec_config,
    set_guided_decoder; rc19 already forwards the rest);
  - preserve original_input_ids across fuse_input_embeds for the Eagle3 drafter.

Net +110 lines over rc19 base. Aggregated and disaggregated multimodal paths
both supported now. Needs a vision smoke before prod.

Signed-off-by: Bo <bo@deepinfra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants