fix(draft): embed Qwen3.6 SWA metadata in Q8 converter - #562
Open
Amidwestnoob wants to merge 1 commit into
Open
Conversation
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
--qwen36-swaprofile to the Q8 draft converter[SWA, SWA, SWA, SWA, full]layer patternWhy
The draft GGUF loader already consumes these metadata fields, but
quantize_draft_q8.pydoes not emit them. Qwen3.6 Q8 draft artifacts therefore require the externalDFLASH27B_DRAFT_SWA=2048runtime override to select the correct attention layout.In a no-override negative control, the existing keyless artifact loaded without SWA metadata and matched only 6 of 12 deterministic outputs from the correctly configured reference. Prose and long-context outputs diverged.
This change makes newly converted Qwen3.6 Q8 drafts self-describing. It does not claim a new speedup; it reproduces the existing correct override-based configuration without relying on process environment.
Validation
python3 server/tests/test_quantize_draft_q8.pycmake --build server/build --target dflash_server -j2ctest --test-dir server/build --output-on-failure -R "server_unit" --no-tests=errorgit diff --checkReal Q8 artifact validation without
DFLASH27B_DRAFT_SWA:SWA layers: 4/5 (window=2048)The metadata-added validation artifact preserved all 58 tensor payloads byte-for-byte; only the two intended metadata fields were added.