[Model] Enable Qwen3.8-Flash-Next on MUSA - #200
Draft
Joey-gvwal wants to merge 1 commit into
Draft
Conversation
Collaborator
|
docker pull registry.mthreads.com/mcconline/inference/vllm/vllm-openai:qwen38-flash-next |
yeahdongcn
marked this pull request as draft
August 28, 2026 01:58
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
This PR enables BF16
Qwen3.8-Flash-Nextserving onvllm-musav0.28.0-dev.The implementation backports the upstream Qwen4Exp model family and adapts its
hybrid Qwen Sparse Attention (QSA), Gated DeltaNet recurrent state, packed KV
cache, FlashAttention, and MoE paths to MUSA.
Final validation used a clean source build and successfully completed TP8 +
expert-parallel startup, all 131 checkpoint shards, CUDA Graph capture,
/health,/v1/models, text completion, and chat completion.Code changes
1. Backport the Qwen4Exp model family
Qwen4ExpForConditionalGenerationconfiguration, registration, model,multimodal processor, MoE, QSA, and Gated DeltaNet implementations.
architecture on the vLLM 0.28 base.
2. Adapt QSA to MUSA
[K, V]cache layout directly instead of assuming NVIDIA'sconcatenated last-dimension layout.
tl.gatherrequest lookup with a vectorizedMUSA-compatible
cumsum + searchsortedwork-map implementation.frontend does not support the upstream tuple constexpr indexing form.
torch.topkfor sparse-block selection instead of the CUDA-only_C::persistent_topkextension. QSA score calculation, cache handling,MRoPE, and sparse attention remain on Triton/MUSA kernels.
3. Fix packed hybrid KV and recurrent-state layouts
attention.
stride.
own per-block state view.
The recurrent-state fix is required for semantic correctness. Before the fix,
prefill produced the correct first token, but all recurrent layers viewed state
from byte offset zero and overwrote one another; decode tokens were corrupted.
Using
(layer_offset, block_stride)to construct per-layer strided viewsrestores coherent decode.
4. Add compatibility and tests
Serving command
Test results
134 applied, 0 already-applied, 0 conflict1 passed in 0.21sResolved architecture: Qwen4ExpForConditionalGeneration131/131; approximately 43.12 GiB per rank/health/v1/modelsQwen3.8-Flash-Next/v1/completions/v1/chat/completionsStartup proof
Model-list check
The response reports:
Completion check
Result:
Chat check
The returned content is coherent and explicitly identifies Beijing as the
capital of China.