Skip to content

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

Open
tensorrt-cicd wants to merge 1 commit into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6293015
Open

[https://nvbugs/6293015][fix] Add a delegating `@property def vocab_size_padded(self) -> int: return…#15219
tensorrt-cicd wants to merge 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.

…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>
@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.

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.

2 participants