Skip to content

[Bugfix][Kimi-VL] Set pad_token_id explicitly in KimiVLConfig - #65174

Merged
vllm-bot merged 3 commits into
vllm-project:mainfrom
kazutoiris:fix
Nov 3, 2026
Merged

vllm-bot merged 3 commits into
vllm-project:mainfrom
kazutoiris:fix

Conversation

@kazutoiris

@kazutoiris kazutoiris commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Overview

KimiVLConfig passed pad_token_id to super().__init__ as a keyword argument. With the dataclass-based PreTrainedConfig, pad_token_id is not a declared field.

Claims

  • Fixes the TypeError: __init__() got an unexpected keyword argument 'pad_token_id' raised when KimiVLConfig is constructed on a PreTrainedConfig base that does not forward unknown keyword arguments.
  • pad_token_id is now assigned explicitly on KimiVLConfig before the super().__init__ call, so the attribute exists regardless of how the base class handles unused kwargs.
  • No change to the public constructor signature: existing callers passing pad_token_id= continue to work.
  • No change to serialization behavior for the pad_token_id value itself; the fix only removes the reliance on an implicit setattr path.

Validation

  • Reproduction before the fix: construct KimiVLConfig on a base that rejects unknown kwargs (or monkeypatch the base __init__ to not forward extras); observe TypeError: __init__() got an unexpected keyword argument 'pad_token_id'.
  • After the fix: the same construction succeeds, and config.pad_token_id returns the supplied value.

Details

PreTrainedConfig is a dataclass, and pad_token_id is not a declared field on it; the field is only used by KimiVLConfig itself.

I've checked the code on huggingface and #16387, it can be confirmed that MoonshotAI has modified the base PreTrainedConfig.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

`KimiVLConfig` passed `pad_token_id` to `super().__init__` as a keyword
argument. With the dataclass-based `PreTrainedConfig`, `pad_token_id` is
not a declared field. It throws out:

    TypeError: __init__() got an unexpected keyword argument 'pad_token_id'

Signed-off-by: Kazuto Iris <hitomi@apache.org>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment /ci run for upstream CI or /amd-ci run for AMD CI only whenever CI signals are needed.

Once the PR is approved or has the ready label, the PR author can also use the corresponding /ci run, /ci retry, and /ci cancel commands, or their /amd-ci variants. New commits do not start upstream CI automatically.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

@mergify mergify Bot added kimi bug Something isn't working labels Nov 2, 2026
@kazutoiris

Copy link
Copy Markdown
Contributor Author

@DarkLight1337 Could you check it for me? It assigns with #16387.

@DarkLight1337 DarkLight1337 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@DarkLight1337

Copy link
Copy Markdown
Member

/ci run

@DarkLight1337
DarkLight1337 enabled auto-merge (squash) November 3, 2026 06:37
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #99474 for commit af3825172105.

ℹ️ This PR is 79 commits behind upstream main. Merged upstream main into this branch as af3825172105 before starting CI. Pull the branch before pushing more changes.

@DarkLight1337

Copy link
Copy Markdown
Member

/ci retry

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

✅ The previous CI build is still running: https://buildkite.com/vllm/ci/builds/99474

@vllm-bot
vllm-bot merged commit 2173d71 into vllm-project:main Nov 3, 2026
8 checks passed
@kazutoiris
kazutoiris deleted the fix branch November 3, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working kimi ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants