Repository navigation
Qwen3.5: one layer-pattern reader for every backend (#1863, part 2) - #2086
Merged
Merged
Conversation
6 of 9 tasks
ashhart
force-pushed
the
lead/1863-layer-pattern
branch
from
November 4, 2026 05:27
3e7fd88 to
e5bf420
Compare
ashhart
added a commit
that referenced
this pull request
Nov 4, 2026
ashhart
added a commit
that referenced
this pull request
Nov 4, 2026
ashhart
force-pushed
the
lead/1863-layer-pattern
branch
2 times, most recently
from
November 4, 2026 09:29
5d7ea7d to
1dfd9bd
Compare
ashhart
added a commit
that referenced
this pull request
Nov 4, 2026
…inst full_attention_interval An interval that is not a positive whole number is refused, even beside layer_types. That refuses one config every backend but Metal's 2B engine accepted: layer_types every fourth with "full_attention_interval": 4.5. Metal's 27B engine and CUDA ignored the interval beside a list, HIP truncated it to 4 and XPU read no config.json; Metal's 2B engine already refused it. It is now BadFullAttentionInterval. No real config has such an interval; 4.0 is still read as 4.
…the repo's Qwen3.5 configs
…m the shared reader
…der; an unset interval beside layer_types is no longer refused
…ader, so a config without layer_types reads the interval
…oad, as its comment said it did
… and the real configs against the shared reader
…schedule, unchecked
…nner is Linux-only)
…at HIP loads BF16 (#2046)
ashhart
force-pushed
the
lead/1863-layer-pattern
branch
from
November 4, 2026 11:12
3f00142 to
7331d04
Compare
ashhart
added a commit
that referenced
this pull request
Nov 4, 2026
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.
Part 2 of #1863, the last part: one reader for Qwen3.5's attention-layer pattern. Before this, the pattern was read four ways across backends.
What changes
zig/src/core/qwen35_layers.zig(111 lines, std only) readslayer_types,full_attention_intervaland their absence into one entry per layer. Metal (the 27B and 2B config readers), HIP, CUDA and XPU now call it, so the sameconfig.jsongets the same answer, or the same refusal, everywhere:layer_typesBadFullAttentionInterval)"layer_types": nulllayer_typesgiven, interval 0 / null / falselayer_typesas writtenlayer_typescontradicting the intervalLayerTypesContradictFullAttentionInterval(names both keys)BadLayerTypesorUnsupportedLayerTypeson every backend.sliding_attentionstays refused for targets, as all three backends already did.config.json's shape and layer pattern when the file is present, as its comment said it did. A folder without one, Hadamard-rotated or not, keeps today's fixed every-fourth schedule, so no existing XPU setup changes.use_sliding_window: true, every layersliding_attention).Exactness
zig build testpasses apart from the two HTTPS tunnel-count tests, which tests: the benchmark proxy-tunnel tests don't read the host's certificate store #2071 fixed on main.test-qwen35-layers-host,test-qwen27-config-xpu-host,test-qwen-dense-geometry-host(96, one new), the Qwen3.5 Metal, formats and draft-config steps, and-Dhip=trueall pass. Lean adds 0 problems against main.Host-only change: no kernel, no served token path, no device run needed.
Closes #1863.