Skip to content

[Feature]: Batch-invariant support for GDN_ATTN (Qwen3-Next / Qwen3.6 hybrid Mamba+GDN MoE models) #42960

Description

@timbmg

Your current environment

Versions
  • vLLM: 0.21.0 (Docker image vllm/vllm-openai:v0.21.0) and nightly (digest sha256:d1bd760bf6630f67378206c7945afb6ab9bc046064a51fe421461e91261dcd7b, pulled 2026-05-18)
  • PyTorch: 2.11.0+cu130
  • CUDA: 13.0
  • GPU: NVIDIA A100-SXM4-80GB (compute capability 8.0, SM80)
  • Model: cyankiwi/Qwen3.6-35B-A3B-AWQ-4bit (Qwen3-Next-style hybrid Mamba + Gated-Delta-Net + softmax-attention MoE; quantization: compressed-tensors)
  • TP: 1

🐛 Describe the bug / 🛠 Feature request

Setting VLLM_BATCH_INVARIANT=1 on a model that contains GDN (Gated-Delta-Net) linear-attention layers causes engine startup to abort with:

RuntimeError: VLLM batch_invariant mode is not supported for GDN_ATTN.

Source: vllm/v1/attention/selector.py:154 in _cached_get_mamba_attn_backend.

This is a hard incompatibility — no fallback, no partial mode. It blocks reproducibility work for all Qwen3-Next / Qwen3.6-style models (and any other hybrid Mamba/GDN architecture).

Reproduction

docker run --rm --gpus all --ipc host \
  -e HUGGING_FACE_HUB_TOKEN=... \
  -e VLLM_BATCH_INVARIANT=1 \
  vllm/vllm-openai:v0.21.0 \
  --model cyankiwi/Qwen3.6-35B-A3B-AWQ-4bit \
  --trust-remote-code \
  --max-model-len 20480

Both v0.21.0 and nightly (May 2026) fail with the same error. The check is triggered as soon as the engine selects the Mamba/GDN attention backend during init, before any AWQ-kernel logic runs — so it is independent of --quantization, --attention-backend, VLLM_ATTENTION_BACKEND (unrecognized in 0.21.0), and other workaround knobs.

Related

Happy to test patches on A100 + Qwen3.6-A3B if helpful.

Before submitting a new issue...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions