[Model] Use explicit types in get_generation_prompt - #33551
Conversation
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
There was a problem hiding this comment.
Code Review
This pull request refactors the get_generation_prompt method across several multimodal models to use explicit prompt types like TextPrompt, TokensPrompt, and ExplicitEncoderDecoderPrompt instead of generic dictionaries with cast. This is a good change that improves code readability and type safety. The implementation is consistent and well-executed across all modified files. I have no further comments.
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…3551) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: Pai <416932041@qq.com>
…3551) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: Pai <416932041@qq.com>
…3551) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: felix01.yu <felix01.yu@vipshop.com>
…3551) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…3551) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…3551) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
|
I'm reviewing the whisper implementation and git blame points there. It seems that https://github.com/vllm-project/vllm/blame/main/vllm/model_executor/models/whisper.py#L848 REF #44662 |
|
This PR didn't introduce this change, you can check the diffs in this PR |
|
Oopsie |
Purpose
Improve code readability and make it easier to figure out what needs to be updated in case we change the prompt schema during Renderer refactor.
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.