Skip to content

fix(qwen3_next/qwen3_5): repair gdn import after mamba.gdn package refactor - #208

Merged
RhizoNymph merged 1 commit into
feat/integrationfrom
fix/qwen-next-gdn-import
Jun 28, 2026
Merged

fix(qwen3_next/qwen3_5): repair gdn import after mamba.gdn package refactor#208
RhizoNymph merged 1 commit into
feat/integrationfrom
fix/qwen-next-gdn-import

Conversation

@RhizoNymph

Copy link
Copy Markdown
Owner

What

Repairs the import of GatedDeltaNetAttention in qwen3_next.py and qwen3_5.py. Both pointed at the flat module vllm.model_executor.layers.mamba.gdn_linear_attn, which the upstream mamba-attention refactor (vllm-project#41126) moved into the mamba.gdn package as mamba.gdn.qwen_gdn_linear_attn.QwenGatedDeltaNetAttention. The integration merge (#186) left these two files on the dead path, so Qwen3-Next and Qwen3.5 failed to import entirely.

Changes:

  • Both files now import QwenGatedDeltaNetAttention from mamba.gdn.qwen_gdn_linear_attn and use it for self.linear_attn (matches upstream/main's own qwen3_next.py/qwen3_5.py).
  • qwen3_5.py additionally dropped the create_in_proj_qkvz=... kwarg: the present QwenGatedDeltaNetAttention ctor (identical to upstream/main) does not accept it. Upstream's qwen3_5.py does not pass it either. The fork's steering wiring in this file is untouched.

Why this is not duplicating an existing PR

This is an internal feat/integration merge-skew repair; the corresponding files are already correct on upstream/main, so there is no upstream PR to duplicate.

Tests run

  • tests/model_executor/test_qwen3_5_quantization.py2 failed → 2 passed with this change (it imports qwen3_5, so it was failing on feat/integration; verified red without the fix, green with it).
  • Import smoke: import vllm.model_executor.models.qwen3_next, qwen3_5 now succeeds (previously ModuleNotFoundError).
  • With this fix applied on top of the mlp_in/mlp_out branch (feat(capture): wire mlp_in/mlp_out hooks for transcoder training #206), the previously-skipped test_qwen3_next_mlp_hooks runs and passes (5/5 in test_mlp_capture_hooks.py).

Known limitation

Dropping create_in_proj_qkvz means LoRA-on-Qwen3.5 reverts to the always-fused in_proj_qkvz path (same as upstream/main). Restoring the LoRA-aware split requires porting the newer QwenGatedDeltaNetAttention that accepts the kwarg; out of scope for this import repair.

Not validated here

End-to-end GPU inference (Qwen3-Next / Qwen3.5 weights on a GPU, mamba/linear-attn forward) — needs hardware + weights, not runnable in this environment.

AI assistance was used for this change.

@RhizoNymph
RhizoNymph merged commit f775434 into feat/integration Jun 28, 2026
@RhizoNymph
RhizoNymph deleted the fix/qwen-next-gdn-import branch July 11, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant