Contrib: Add Qwen3.6-27B (post-training update of Qwen3.5-27B)#140
Open
jimburtoft wants to merge 2 commits into
Open
Contrib: Add Qwen3.6-27B (post-training update of Qwen3.5-27B)#140jimburtoft wants to merge 2 commits into
jimburtoft wants to merge 2 commits into
Conversation
Qwen3.6-27B shares identical architecture with Qwen3.5-27B (qwen3_5 model_type, hybrid DeltaNet + GQA). Same NxDI implementation as PR aws-neuron#128 with updated documentation, Qwen3.6-27B benchmarks, and cross-references. Validated on trn2.3xlarge (TP=4, SDK 2.29): 7/7 quality tests passed, TPOT=54.2ms, 18.5 tok/s, TTFT=306ms. Performance within 2% of Qwen3.5-27B.
14 tasks
10 tasks
- Replace fused NKI kernel with v14: 8-block (16x16) forward substitution with 4-round Neumann per block. Fixes catastrophic cancellation in fp32 that the previous full-128x128 Neumann approach had for large decay values. - Fix concurrent BS>1 DeltaNet state: use seq_ids-based index_select (read) and scatter (write) for both conv_state_buffer and recurrent_state_buffer. Enables correct multi-slot concurrent serving via vLLM-neuron. - Add vLLM compatibility: add_derived_config() promotes text_config fields and extracts rope_theta from nested rope_parameters dict when loaded via vLLM's AutoConfig (multimodal-style config layout). - Default CTE to fused NKI kernel (USE_NKI_FUSED=1 by default). The v14 kernel is numerically stable and avoids PyTorch chunk_forward. - Replace manual conv1d loop with F.conv1d(..., groups=conv_dim). - Clean up nkilib loading: remove fork path hack, use installed package with graceful fallback. - Fix test_capital_of_france: increase max_new_tokens for thinking mode, strip <think> tags before assertion. Tested: 42/42 unit tests PASS, 8/8 integration tests PASS on trn2.3xlarge (SDK 2.29.1, NKI 0.3.0, TP=4).
jimburtoft
added a commit
to jimburtoft/neuronx-distributed-inference
that referenced
this pull request
May 21, 2026
- Fix concurrent BS>1 DeltaNet state: replace BS=1 shortcut with proper seq_ids-based index_select (read) and scatter (write) for both conv_state_buffer and recurrent_state_buffer. Enables correct multi-slot concurrent serving via vLLM-neuron. - Add vLLM compatibility: add_derived_config() promotes text_config fields and extracts rope_theta from nested rope_parameters dict when loaded via vLLM's AutoConfig (multimodal-style config layout). Consistent with Qwen3.5-27B (PR aws-neuron#128) and Qwen3.6-27B (PR aws-neuron#140).
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
qwen3_5model_type) -- improved agentic coding and thinking preservation, only weights differRelationship to PR #128 (Qwen3.5-27B)
This contrib uses the same
Qwen35*classes andmodeling_qwen35*.pyfilenames as the Qwen3.5-27B contrib (PR #128). The code is identical -- both models share theqwen3_5model_type. Only the HuggingFace model ID and weights differ.Config Compatibility
Qwen3.6-27B adds
output_gate_type="swish"totext_config. Investigation confirmed this field is completely unused by HF transformers (zero references across v4.57.6, v5.6.0, and GitHub main) and by this NxDI code. No code changes required.Test Results
Unit Tests (42/42 PASS, CPU only)
Architecture-level tests -- identical results to Qwen3.5-27B.
Quality Validation (7/7 PASS, trn2.3xlarge, TP=4, SDK 2.29)
Performance (trn2.3xlarge, TP=4, LNC=2, BF16, SDK 2.29)
* TTFT difference due to compilation config (256-token vs 128-token bucket), not model. Architectural performance is equivalent.
Files (15 files, ~6600 lines)
Checklist