-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Migrate KimiVLImagePixelInputs to TensorSchema #21769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 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. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a great improvement. Migrating KimiVLImagePixelInputs from a TypedDict to a TensorSchema enhances type safety and introduces runtime shape validation, which improves the robustness and debuggability of the multi-modal input processing. The implementation is clean, and removing the manual assertion in favor of the schema-based validation is a solid refactoring step. The code changes look correct and align well with the stated objectives. Well done!
|
@DarkLight1337 @Isotr0py Heads up (not related to this diff), but I came across some prior discussions around |
|
Let's wait for #21754 to be merged first so we can test the correctness without worrying about OOM |
|
Signed-off-by: Benji Beck <[email protected]>
Co-authored-by: Isotr0py <[email protected]> Signed-off-by: Benji Beck <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]> Signed-off-by: Jinzhen Lin <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]> Signed-off-by: Noam Gat <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]> Signed-off-by: Paul Pak <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]> Signed-off-by: Diego-Castan <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]> Signed-off-by: Xiao Yu <[email protected]>
Signed-off-by: Benji Beck <[email protected]> Co-authored-by: Isotr0py <[email protected]>
Purpose
This PR migrates KimiVLImagePixelInputs from a TypedDict-based definition to a structured TensorSchema model with runtime shape validation. This brings it in line with recent changes to Phi3VImagePixelInputs, and is part of a broader effort to improve input contract enforcement and debug-ability across multi-modal models.
Test Plan
Confirm validation works via standalone tests in tests/standalone_test/test_tensor_schema.py and rely on CI to check integration.
Test Result