Repository navigation
fix(qwen3_5): integrated GPUs run the MTP head eagerly and draft one token by default (commits for #11) - #18
Open
BlivionIaG wants to merge 2 commits into
Open
BlivionIaG wants to merge 2 commits into
BlivionIaG wants to merge 2 commits into
Conversation
… first graph launch faults (gfx1033)
On the Steam Deck (gfx1033) a verify round of four rows costs much more than one of two, so three drafts a round decode slower than one on every text measured. Without --mtp-drafts the HIP engine now drafts one token on an integrated GPU (the HIP attribute) and keeps three on a discrete one; --mtp-drafts still sets any depth. Drafts never change a reply's tokens: drafted == serial holds at every depth.
BlivionIaG
pushed a commit
that referenced
this pull request
Oct 20, 2026
…d CUDA - #65's prompt-end entry follows kept message starts, and the decoder's entries view their rows; the 27B's tests expect entries one token early. - Ternary Bonsai 2 27B (prism-ml's 2-bit pack) as a lane family: Prism rotations, 2-bit lanes, exact widening before M5, with Qwen3.8-27B's DFlash2 drafts. Recipe: docs/recipes/ternary-bonsai-2.md. - --vision: up to four images a request (data URLs, or HTTPS links with --vision-urls) on the lane engine, MLX and CUDA. Image replies keep drafting and equal "draft": false ones; an image prompt keeps no prompt-end entry. - The --vision checks and options move to serve_options.py. Fixes #18, fixes #81.
This branch has not been deployed
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.
Commits for #11 (mirror of ashhart#631): based on
qwen35-engine(7f5fd5b), so the diff is only the two commits below. They change what an integrated GPU (an APU) runs and nothing on a discrete GPU.What this changes
fix(qwen3_5): the MTP head runs eagerly on integrated GPUs, where its first graph launch faults (gfx1033): on a Steam Deck the head's first replayed graph faults. The engine reads the HIPintegratedattribute it already has, and on an APU the head's chains run eagerly; the rounds keep their graphs.perf(hip): an integrated GPU drafts one MTP token by default: without--mtp-drafts, the HIP server drafts one token on an integrated GPU (Device.integrated, the HIP attribute) and keeps three on a discrete one. On the Deck a verify of four rows costs much more than one of two, so three drafts a round decode slower than one on every text measured.--mtp-draftsstill sets any depth from 0 to 3.Receipt
Environment: base
qwen35-engine7f5fd5b, head 317338f. Zig 0.17.0, HIP 7.14 (TheRock), Linux 7.1.7. GPUs: Radeon PRO W7800 (gfx1100), Radeon PRO V620 (gfx1030), Steam Deck LCD (gfx1033, 12 GiB GTT, 15 W).Discrete GPUs unchanged:
tf-qwen35-test logitsbyte-identical to the base for Qwen3.5-9B 4-bit MTP (decode 300 rounds, prefill 300 and 53 rows) and Qwen3.6-35B-A3B 4-bit MTP (decode 300 rounds, prefill 300 rows).mtp drafts 3.Steam Deck (gfx1033), 9B MLX 4-bit MTP, greedy, 256 tokens. Measured on the fork's Deck branch, which also carries the tile changes of perf(hip): the stream tile stages x in LDS and sizes its waves by compute units; RDNA2 64-row prompt tile (stacks on #7) #17. Each request starts at or below 70 C, because under minutes of load the APU drops to 200 MHz near 90 C.
tf-qwen35-test checkon the Deck: 46 passed, 0 failed, 1 skipped (radix memory: too few ids), including drafted == serial and solo == together. Without the eager head the first drafted round faults there.Break check: a default of three drafts on an integrated GPU fails the new policy test (
expected 1, found 3).Tests run:
hip-kernel-test62/62,hip-gpu-test38/38,hip-affine-test30/30.zig build test test-golden -Dcpu=apple_m1: 171/173 steps, 0 unexpected golden differences. The one failing step iscore.checkpoint_metal's split-checkpoint test, which fails the same way on the base.zig build testfrom the pushed head: 57/57 steps, 692/699 tests (7 skipped).zig fmt --checkclean.lean_check.py539, the same as the base.Not run, and why: other APUs (RDNA3.5 Strix Halo and the like: none here); the Deck's numbers come from its own branch, not from this head alone, because this head has no Deck build without perf(hip): the stream tile stages x in LDS and sizes its waves by compute units; RDNA2 64-row prompt tile (stacks on #7) #17's tiles.
Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Model check on the Deck; logits unchanged on a discrete GPU.)