[Bugfix] Remove incorrect assertion in causal_conv1d_update for Qwen3.5 GDN layersfix: remove incorrect assertion in causal_conv1d_update for GDN index…#36324
Open
Rks2302 wants to merge 4 commits intovllm-project:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes an incorrect assertion in causal_conv1d_update that causes an AssertionError when running Qwen3.5 models with Gated Delta Networks (GDN) layers. The assertion assert num_cache_lines >= batch is invalid when conv_state_indices is provided, as conv_state is a shared cache pool in that scenario, and num_cache_lines represents the cache size, not a per-batch dimension. The removal of this assertion is correct as the necessary batch validation is already handled by other checks.
…on MI300x (vllm-project#36247) Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com> Signed-off-by: Rks2302 <rahulksharma2302@gmail.com>
…ed conv_state Signed-off-by: Rks2302 <rahulksharma2302@gmail.com>
70f1470 to
444783f
Compare
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.
Summary
Removes incorrect assertion in
causal_conv1d_updatethat causesAssertionErrorwhen running Qwen3.5 models with GDN (Gated Delta Networks) layers.
Root Cause
Line 1161 in
causal_conv1d.py:This assertion is incorrect when
conv_state_indicesis provided. In that case:conv_stateis a shared cache pool, not a per-batch tensornum_cache_linesis the state length (typically 4-6), NOT the batch dimensionThe correct validations are already present:
assert conv_state.size(0) >= batch✅assert batch == conv_state_indices.shape[0]✅The removed assertion is therefore redundant and incorrect.
Error Reproduced On
Related Issues