[Model] Clean up and simplify Mamba2 Metadata Usage in both V0 and V1#24331
Merged
tdoublep merged 2 commits intovllm-project:mainfrom Sep 16, 2025
Merged
[Model] Clean up and simplify Mamba2 Metadata Usage in both V0 and V1#24331tdoublep merged 2 commits intovllm-project:mainfrom
tdoublep merged 2 commits intovllm-project:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the Mamba2 metadata handling to unify the logic for V0 and V1 APIs. The changes primarily involve renaming metadata fields to be consistent across both versions, which simplifies the code in mamba_mixer2 and plamo2 by removing duplicated logic. The change to how has_initial_states_p is calculated is also a good improvement for correctness and clarity. I've found one critical issue where attribute assignments were not updated after renaming, which could lead to a runtime error.
…code Signed-off-by: Chih-Chieh-Yang <7364402+cyang49@users.noreply.github.com>
Signed-off-by: Chih-Chieh-Yang <7364402+cyang49@users.noreply.github.com>
ed9781f to
1c9fc08
Compare
9 tasks
FeiDaLI
pushed a commit
to FeiDaLI/vllm
that referenced
this pull request
Sep 25, 2025
…vllm-project#24331) Signed-off-by: Chih-Chieh-Yang <7364402+cyang49@users.noreply.github.com>
choprahetarth
pushed a commit
to Tandemn-Labs/vllm
that referenced
this pull request
Oct 11, 2025
…vllm-project#24331) Signed-off-by: Chih-Chieh-Yang <7364402+cyang49@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR cleans up some naming inconsistencies in mamba2 metadata between V0 and V1. This affects models that use mamba_mixer2 or plamo2
Test Plan
Run e2e lm_eval on
ibm-granite/granite-4.0-tiny-previewandpfnet/plamo-2.1-2b-cptfor both V0 and V1Test Result
They passed and no significant accuracy differences observed.
granite-4-tiny-preview V1 (main 006e7a3)
granite-4-tiny-preview V1 (this PR)
granite-4-tiny-preview V0 (this PR)
Plamo2 V1 (main 006e7a3)
Plamo2 V1 (this PR)
Plamo2 V0 (this PR)
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.