Repository navigation
[Bugfix][Kimi-VL] Set pad_token_id explicitly in KimiVLConfig - #65174
Conversation
`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>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: 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. 🚀 |
|
@DarkLight1337 Could you check it for me? It assigns with #16387. |
|
/ci run |
|
✅ Triggered Buildkite CI #99474 for commit ℹ️ This PR is 79 commits behind upstream |
|
/ci retry |
|
✅ The previous CI build is still running: https://buildkite.com/vllm/ci/builds/99474 |
Overview
KimiVLConfigpassedpad_token_idtosuper().__init__as a keyword argument. With the dataclass-basedPreTrainedConfig,pad_token_idis not a declared field.Claims
TypeError: __init__() got an unexpected keyword argument 'pad_token_id'raised whenKimiVLConfigis constructed on aPreTrainedConfigbase that does not forward unknown keyword arguments.pad_token_idis now assigned explicitly onKimiVLConfigbefore thesuper().__init__call, so the attribute exists regardless of how the base class handles unused kwargs.pad_token_id=continue to work.pad_token_idvalue itself; the fix only removes the reliance on an implicitsetattrpath.Validation
KimiVLConfigon a base that rejects unknown kwargs (or monkeypatch the base__init__to not forward extras); observeTypeError: __init__() got an unexpected keyword argument 'pad_token_id'.config.pad_token_idreturns the supplied value.Details
PreTrainedConfigis a dataclass, andpad_token_idis not a declared field on it; the field is only used byKimiVLConfigitself.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-checklistskill. (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.