Repository navigation
Support Qwen3.8 vision and text graphs on HRX - #168
Draft
AaronStGeorge wants to merge 14 commits into
Draft
AaronStGeorge wants to merge 14 commits into
AaronStGeorge wants to merge 14 commits into
Conversation
Assisted-by: Codex
Assisted-by: Codex
Assisted-by: Codex
Assisted-by: Codex
Collaborator
Author
|
Final validation for
The PR description now records the design, exact validation revisions, measured limits, and existing failures in the additional MiniCPM/Mistral/Gemma projector checks. Those failures are not counted as passing image tests. PR160 remains a separate local testing base and is not included in this PR. |
Collaborator
Author
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.
Kernel support added
Add the HRX operator coverage needed by the Qwen3.8-27B text model and its vision encoder/projector for images and video. The implementation adds reusable Loom motifs and extends existing matmul and Flash Attention kernels. The validated model pair is the Q4_K_M text GGUF and BF16 projector.
New operator coverage
IM2COLUPSCALENORMCONT/CPYand castsExisting kernels extended and reused
Backend integration registers the operators and their parameters, advertises supported
IM2COLto GPU placement, and models cast destination self-reference correctly throughout graph indexing, traversal, dependency checks, and allocation. Internal cast results can use transient storage without inventing a read dependency on their own destination. The superseded grouped matmul, scalar attention fallback, and standalone masked softmax paths are removed.The supported scope is full GPU transformer layers and projector execution with Flash Attention on/auto. Explicit Flash Attention off, partial layer offload, and the removed fallback's extra irregular or aliased layouts are outside this scope; the README describes the attention boundary.
Validation
Validated source:
9f97957b48a1b18e3eaafc8fea9e2ad25552f49c; HRX:7a7f1fe53f14805cd8a9d5753279508e9eb6d9bb.qwen3.8-27bselected, tests and all benchmarks enabled: run 41360912282, benchmark/video report artifact.Shared regressions cover all 31 local text models with paired pre-change/candidate throughput and prefill/decode perplexity. All 62 reported PPL comparisons match exactly, with no compute errors. Five initial timing differences were repeated in reversed order with five samples; no slowdown beyond the observed sample variation remained. Mistral 24B and Qwen 27B used identical PR160 residency changes on both sides.
Local 24GB validation with PR160
The complete series is also applied locally on top of PR160, yielding test commit
6df3ce019. Use explicit--load-mode mmapto exercise PR160's imported-weight residency. The model and projector fit the 24GB gfx1100 device with this configuration. PR160 is not included in this PR's branch; the requestedhrx-graph-develop-v2base is retained.Local WikiText perplexity is HRX 5.5995 / 6.0650 versus Vulkan 5.6120 / 6.0614 for the same prefill/decode regimes. The paired pre-change HRX results are unchanged.
Freeform dog and Apollo 11 newspaper checks return identical answers on HRX and Vulkan. Additional paired projector checks retain the same pre-existing results: MiniCPM-V 4.6 and its Thinking variant reject the F16×F16 patch matmul with reduction width 588; Mistral Small rejects its F16×F32 patch matmul at width 588; Gemma 4's encoder executes but its image answers remain unusable on both revisions. These other projectors are not newly supported by this PR. Their text-only prefill/decode PPL is unchanged in the 31-model matrix above.
Automation companion draft: ROCm/ggml-staging-automation#118. This PR remains a draft.