Skip to content

feat(hip): serve Qwen3.8-27B with its DFlash2 drafter - #3665

Merged
ashhart merged 11 commits into
ashhart:mainfrom
AbrahamCete:feat/hip-dflash2-5-serve
Nov 22, 2026
Merged

ashhart merged 11 commits into
ashhart:mainfrom
AbrahamCete:feat/hip-dflash2-5-serve

Conversation

@AbrahamCete

Copy link
Copy Markdown
Contributor

What this changes

Part 5 of the six chained PRs agreed in #1563: the wiring. serve <27B> --drafter <dir> now runs the DFlash2 drafter on the HIP engine, behind the lane core's lanes.drafted.Drafted, as the XPU engine does. Before, it was refused with "--drafter: the HIP engine runs no DFlash2 drafter yet; serve without --drafter".

  • feat(hip): serve Qwen3.8-27B with its DFlash2 drafter (56fbd2452):
    • The native HIP server wraps the dense qwen3_5 target with Drafted over part 4's drafter (native/hip_drafter.zig's attach).
    • Taps are set from the drafter's config before the streams are sized. The drafter's weights and per-stream contexts count in the memory plan beside the Clef joint head's bytes, and the target's timed window costs go to the drafter.
    • native/hip_drafter.zig (252 lines with its tests) holds the host side: the refusals, the drafter the family loads, the serving line's drafter, and attach and release. native/hip.zig stays at 600 lines. The shared serve options (hip_serve/options.zig) gain drafter: ?[]const u8 = null.
    • Refused before any load, after main's own family refusals:
      • --drafter with --tp {d}: the HIP engine runs its DFlash2 drafter on one rank; serve with --tp 1, or without --drafter
      • --drafter-bits {d}: the HIP engine runs the DFlash2 drafter at 4 bits; serve with --drafter-bits 4, for any value but 4.
      • --drafter: <model_type> checkpoints load no DFlash2 drafter on HIP; serve without --drafter, for the other HIP families (qwen3_5_moe, qwen4_exp and nemotron_h among them).
    • --drafter <dir> --no-drafts loads no drafter and is not refused, as on CUDA. A test pins it.
    • The serving line names the drafter, drafts: DFlash2 (<dir>) + copies; without --drafter it is unchanged, drafts: copies only. A host test pins both.
    • An absorb refuses kept rows past its features (BadDraftRows, beside part 4's FeaturesNotAtStart). features refuses an empty span, and serves a span only while the ring still holds its newest window of rows, the only rows the drafter reads. A rewind below a context's first row starts the context at the absorb.
    • benchmark --backend rocm passes a named --drafter to a qwen3_5 checkpoint and refuses one for other families: --drafter: the HIP engine runs a DFlash2 drafter over dense qwen3_5 checkpoints only, so a rocm run of this model takes none; --drafter none runs without it. --drafter auto still passes none on rocm; only its note changes, to "This run passes no drafter: on rocm only a named --drafter passes one."
    • Docs: the 27B recipe and community-benchmarks.md.
  • test(qwen35): check --drafter runs the lane invariants under DFlash2 (b7c781de3): tf-qwen35-test check <model> --drafter <dir> opens the drafter as the server does, so drafted == serial, solo == together, graph == eager, resumed and radix run for the 27B instead of skipping. The taps invariant (both its cases, the replayed one included) and the lanes session restore the taps they found.
  • test(hip): pin the DFlash2 drafter's attach paths (267b8c515): a loaded drafter is served behind Drafted with the model kept, and release frees the wrapper; a drafter that cannot attach frees the model once and says why.
  • fix(hip): a resumed stream's DFlash2 features start at its resume point (502ba54b6), for the question in feat(hip): tap a drafter's layers into each stream's ring #2314: a stream resumed from a kept prompt state taps no rows below its resume point, so features refuses them with RowsNotHeld, as Nemotron and Gemma4 do. Drafted absorbs from s.cached, so no served path asks for those rows; the drafter's context starts at the resume point, as on CUDA. A host test pins it.
  • test(qwen35): check --drafter compares a resumed drafted stream with a fresh one (683ddd16c): after the resumed invariant, the same prompts run drafted with every kept prompt evicted; the check requires equal tokens and prints each run's drafts kept, drafted and rounds.
  • fix(hip): --drafter refuses BF16 qwen3_5 checkpoints before they load (6e3748856): main now serves some BF16 qwen3_5 checkpoints (image towers the engine reads, and joint-head decisions), but the engine times no BF16 windows, so the drafter's rounds would go unpriced. --drafter: the HIP engine runs its DFlash2 drafter over quantized checkpoints only; serve this BF16 checkpoint without --drafter. A host test pins it.

On your part 5 note in #2726: the drafter sits behind lanes.drafted.Drafted (native/hip_drafter.zig attach), and the cells below are the ones asked for there.

Nothing changes in CUDA, Metal or core/lanes. Without --drafter, serve is unchanged; a test pins that a plain serve and --drafter <dir> --no-drafts load no drafter, and the decode logits and served replies below equal main's. serve without --drafter on a HIP build still pairs no drafter by itself (server/drafter.zig skips rocm), so the default serve keeps its behaviour; whether rocm should pair the cached DFlash2 by itself once this lands is your call, and would be a one-line change there. I left the CHANGELOG line to you, as with parts 3 and 4.

Size: 770 lines (+711/-59) in 18 files over six commits. #1563 sized it at about 450. The difference is native/hip_drafter.zig, which keeps the drafter's host rules and their tests out of native/hip.zig (600-line limit), the attach-path tests, the resume handling asked for in #2314, and the BF16 refusal.

Limits, as stated in #1563 and for this PR:

Checks on this head

  • Head commit: 6e37488, on main f0a54bd.
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 221 on the base and 221 on this head, 0 new (tools/zig/lean_new.py).
  • Tests run, with the command and pass, fail and skip counts (clean git archive trees of main and this head):
    • zig build test test-golden -Dhip=true --summary all: main 10565/10646 passed, 79 skipped, 2 failed; this head 10575/10657 passed, 79 skipped, 2 failed, 1 crashed. The two failures are main's own and fail the same way there: cli_config_test "serve --config: expand reads the file, passes other commands through and names what it cannot read" and stage_hip_test "every staged call on HIP memory equals the reference, whole and in parts". The crash was sessions/store_test.zig's "two split ranks make the same decisions on the same calls and each restores its own rows", which sat in a futex wait for 31 min and was stopped; it is not code this PR touches, and the suite run again passed it, with the same two failures and nothing else.
    • test-qwen35-hip-host, test-native-hip-host, hip-host-test, check-native-hip-host and test-draft-hip-host (6/6) with -Dhip=true: each exit 0.
    • New tests fail before their rule: with the kept-row check removed, test-qwen35-hip-host fails "an absorb's kept rows pick from its features' rows; a row past them is refused" (108/111, 1 failed); with the BF16 refusal removed, it fails "--drafter is refused over a BF16 checkpoint before it loads; a quantized one, or no --drafter, is not" (108/111, 1 failed). Both pass on this head. With the replayed taps case switching taps off again, check --drafter gives 31 passed, 6 failed (error.TapsMismatch in every lane check after it).
    • The hip-kernel-test binary (zig build hip-kernel-build, run directly): 219 passed, 6 skipped, 0 failed of 225, on main and at part 6's local head 5098bd3, which includes this PR. This PR adds no kernel.
    • native-hip, tf-qwen35-test and hip-kernel-build with -Dhip=true -Dhip-arch=gfx1151 -Doptimize=ReleaseFast: each exit 0 (28/28 steps).
    • tf-qwen35-test check <27B> --drafter <DFlash2> --only invariants: 51 passed, 0 failed, 2 skipped. The skips are radix memory: too few ids and head batches replayed: the model has no draft head, as without the drafter. The four drafted == serial checks (short and long prompts, greedy and seeded t=1) accept 126, 73, 88 and 72 drafts. Resumed drafted == fresh drafted: resumed 35/343 drafts kept in 153 rounds (1.25 tokens a round), fresh 122/197 in 66 (2.91); its resumed prompts restore all but their last rows.
    • tf-qwen35-test drafter <DFlash2> <27B>, which this PR extends: 12 PASS, 0 FAIL. Part 4's lines are unchanged: the first draft right 0.862 of 94 rounds, 4.98 tokens a round; seeded sampled 0.847 and 4.82, chain hashes 3361f284bee96ea8, ebde2d262ffde126, 88a8f3346c53861a. New: the refusals of features at another position and of a kept row past them; kept rows { 0, 5, 10, 15 } of 16 draft as those rows in order, not as the first rows, and a prefix as whole rows; a 3328-token prompt served through the lanes backend and Drafted, whose features serve the drafter window and refuse rows out of the ring, unwritten or none.
    • Without --drafter, tf-qwen35-test check --only invariants: the 27B 46 passed, 0 failed, 7 skipped (main 46/0/6; the extra skip is this PR's resumed drafted check, which needs a draft head), and the 35B-A3B 52/0/1 (main 51/0/1; the new check runs on its MTP head and passes). Run at part 6's local head 5098bd3, which includes this PR.
    • Decode logits without --drafter, byte-identical to main at part 6's local head 5098bd3: 27B 64-step decode 2b324aca4048, 27B 2,048-token prompt 22c3a0307913, 35B-A3B 64-step decode 994218009b56.
    • serve refusals on this head's build: the 35B-A3B with --drafter gets the qwen3_5_moe refusal; --drafter --tp 2 and --drafter-bits 0 are refused before any load, each with exit 1 and the messages above.
    • zig fmt --check build.zig zig and git diff --check: clean.
  • CI: runs on this pull request.
  • Not run, and why:
    • gfx1030, gfx1100 and gfx1201, because I have only gfx1151. On those chips, tf-qwen35-test check <27B> --drafter <dir> is the check to run.
    • benchmark --backend rocm with a named --drafter on this base; its host test pins the pass and the refusal. On the host, a rocm run stops when it parses the serve arguments, so no stand-in child starts.
    • A BF16 qwen3_5 checkpoint with --drafter served on the GPU: I have none here; the refusal is pinned by its host test.
    • hip-kernel-contract at this head, which adds no kernel and no record.
    • Metal and CUDA: untouched.

Receipt

  • Main against branch: the cells asked for in feat(hip): DFlash2 Draft engine for the qwen3_5 target #2726, on gfx1151 with Qwen3.8-27B and its DFlash2 drafter, greedy and at temperature 0.7, at 1 and 2 streams, plus 4. Arms main (M), this head without --drafter (P) and with it (D), each from a fresh server, alternated with part 6's drafted arm (local head 5098bd3) in the order M P D D6 D6 D P M. tools/bench_concurrent.py --tokens 256 --reps 3 --temperatures 0,0.7 --levels 1,2,4 --alone --serial, server --context 4096 --parallel 4 --prompt-cache-gib 0 --snapshot-dir none --max-snapshots 0. Aggregate tok/s, the median of the two runs an arm (their spread at most 1.4%, and 5.9% in one drafted cell):

    cell main this head, plain this head, --drafter drafted / plain
    code, t=0, 1 stream 14.4 14.4 32.5 2.25x
    code, t=0, 2 streams 27.2 27.2 37.0 1.36x
    chat, t=0, 1 stream 14.7 14.8 27.7 1.87x
    chat, t=0, 2 streams 27.5 27.5 31.9 1.16x
    code, t=0.7, 1 stream 14.4 14.4 33.2 2.31x
    code, t=0.7, 2 streams 27.1 27.0 43.8 1.62x
    chat, t=0.7, 1 stream 14.4 14.4 29.1 2.02x
    chat, t=0.7, 2 streams 26.6 26.5 31.9 1.20x
    code, t=0, 4 streams 46.2 46.2 47.3 1.02x
    chat, t=0, 4 streams 46.0 45.8 43.8 0.96x
    code, t=0.7, 4 streams 45.8 45.7 46.5 1.02x
    chat, t=0.7, 4 streams 44.5 44.3 41.6 0.94x
    • Token ids: in every cell every stream's token_sha256 is the same in all four arms and all eight runs (main, plain, drafted and part 6's drafted), greedy and seeded; every alone and serial check (each concurrent reply against its request alone, the alone runs against "draft": false) is equal, 0 unequal and 0 failed.
    • Without --drafter this head is within 0.7% of main in every cell.
  • Boxes it reaches: the HIP serve with --drafter on the dense qwen3_5 family; benchmark --backend rocm with a named --drafter.

  • New switch? No new switch. --drafter, --drafter-bits and --no-drafts already exist; this PR makes --drafter run on HIP for the dense qwen3_5 family and refuses it elsewhere by name.

  • Environment, with the TensorFold commit, Zig and backend toolchain, machine and GPU, checkpoint and revision:

    • Machine: Ryzen AI Max+ 395 (gfx1151), Ubuntu 26.04, Zig 0.17.0.
    • Builds and served runs: ReleaseFast, hipcc with HIP 7.1.52801 and Ubuntu clang 21.1.8.
    • Checkpoints: TensorFold/Qwen3.8-27B-MLX-4bit (revision 22d8d538) and Qwen3.6-35B-A3B-MLX-4bit-MTP. Drafter z-lab/Qwen3.8-27B-DFlash2 (model.safetensors sha256 67fc76d6...4bab65c).
    • Base main f0a54bd, head 6e37488; part 6's local head 5098bd3 (its code commit 13b3874) where a line says so.
    • Startup lines: without --drafter model 14.10 GiB; 4 streams at once, 0.40 GiB each at a 4096-token window, as on main, loaded in 15.3-15.4 s; with it model 15.12 GiB with its DFlash2 drafter; 4 streams at once, 0.59 GiB each at a 4096-token window, loaded in 18.3-18.5 s, serving drafts: DFlash2 (<dir>) + copies.
  • Paths and platforms the change reaches, which I ran and which I could not:

    • Every HIP serve: the drafter's refusals run after main's family refusals, and every HIP family's options carry the new drafter field, null by default.
    • The dense qwen3_5 family with --drafter: load, memory plan, taps, Drafted and the serving line.
    • benchmark --backend rocm: a named --drafter, and the auto note (host tests).
    • tf-qwen35-test check --drafter.
    • Without --drafter, the family loads no drafter, and attach serves the backend as it loaded.
    • I ran gfx1151 only.
  • Exactness, from tools/bench_concurrent.py --alone --serial or token_sha against "draft": false:

    • check --drafter: drafted == serial, greedy and seeded t=1, at 4 streams, as above.
    • Served, greedy and at temperature 0.7, 1, 2 and 4 streams: one token hash set a cell across main, plain and drafted; every alone and serial check equal, as above.
    • Decode logits without --drafter: byte-identical to main, as above.
  • Main against this branch, same machine and checkpoint, posted before asking for a run on our machines (or why you can't): the table above; raw files: a secret gist, https://gist.github.com/AbrahamCete/2de8efdc2df4a7df2d5b7b4120e9d1a2 (local paths read $LAB, $MODELS, $WT and $SCRATCH).

  • Decode speed before and after, from tools/bench_openai.py: the decode cells above come from tools/bench_concurrent.py, which times the same two prompts at each stream count; bench_openai.py was not run separately.

  • Resumed against fresh, the drafted cells asked for in feat(hip): tap a drafter's layers into each stream's ring #2314 (script and raw files in the same gist): chat requests at temperature 0, 256 tokens, one stream; fresh runs at --prompt-cache-gib 0, resumed at 4 GiB after a request that leaves the shared part kept. The text is the same fresh and resumed, and the same in main, plain and drafted, for every request. Decode tok/s (tensorfold.tokens_per_second), with tokens a round:

    request main, fresh / resumed plain, fresh / resumed --drafter, fresh --drafter, resumed resumed / fresh
    system prompt + fib (768 of 844 tokens restored) 15.1 / 14.9 15.0 / 14.9 28.3 (2.84) 26.7 (2.69) -5.7%
    system prompt + csv (768 of 840) 15.0 / 15.0 14.9 / 14.9 28.0 (2.81) 26.0 (2.59) -7.2%
    system prompt + sql (768 of 836) 15.1 / 15.0 15.1 / 15.0 30.0 (3.01) 26.5 (2.64) -11.5%
    second chat turn, code (64 of 284) 14.9 / 14.7 14.9 / 14.9 31.8 (3.20) 30.0 (3.01) -5.5%
    second chat turn, math (64 of 228) 15.8 / 15.7 15.7 / 15.7 36.8 (3.82) 35.2 (3.66) -4.2%
  • Prompt speed before and after: the drafter absorbs the prompt inside the prompt pass, before the first token. Cold first request ttft_s, lc-client.py cold (the request and clock of tools/bench_cache.py), 3 cold requests a server, two servers an arm in the order M P D D P M, --context 16384 --parallel 1 --prompt-cache-gib 0, every request with 0 cached tokens; medians of six: 2,048 tokens main 4.76 s, plain 4.77 (+0.2%), drafted 4.92 (+3.2%); 8,192 tokens 19.93, 19.92 (-0.1%), 19.99 (+0.3%).

  • Licence of any new weights or drafter: n/a. No new weights; the drafter's licence (Apache-2.0) is in feat(hip): DFlash2 drafter config and affine-4 weights for qwen3_5 #2477.

Checklist

  • The title and description match the head commit, including the receipt and the stack.

  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (The kept-row, BF16 and taps-restore rules each fail their test or check when removed, as above; check --drafter runs only when given a drafter.)

  • Comments and docstrings are one line. No measurements or history in the source.

  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off. (Drafted hands the drafter's chains to the round loop, and the target verifies every token.)

  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (check --drafter passes drafted == serial, solo == together, resumed == fresh, resumed drafted == fresh drafted and radix; served, one token hash set a cell across main, plain and drafted, with every alone and serial check equal.)

  • No precision traded for speed. If the bits change, the description says which sums change and why. (The target's bits do not change.)

  • Decode and prompt processing are no slower than main at one stream and the widest admitted; with --drafter, no slower than without it, greedy and sampled. Not by this PR alone: at 4 streams, chat with the drafter is 4.4% (greedy) and 6.2% (t=0.7) slower than without it; part 6 changes that. At 1 and 2 streams the drafter is faster in every cell, and without --drafter this head matches main in every cell.

@AbrahamCete

Copy link
Copy Markdown
Contributor Author

@ashhart one question for part 6 before I open it. The 4-stream chat cell in the table above, drafted slower than plain, comes from a cost the lane core does not charge, and the fix I can see touches core/lanes, so I'd like your call first.

What is not priced. A shared round that drafts runs the drafter's hold pass. For a chain drafter without chances, the allocator prices that round as overhead_ms + step_ms * steps + extra_step_ms * extra_steps + rowTerm with batched steps = deepest (core/lanes/allocate.zig:74-77); its cost record has no hold term (allocate.zig:20-29). So the hold pass shows up only as step_ms * deepest, never its fixed part. On gfx1151 the 27B's shared forward is priced in steps (82.4 ms at 4 rows, 112.4 ms at 5-8 rows), and part 6's price log at 4 streams shows 356 shared rounds: 207 drafted nothing, 118 one draft a stream and 23 three.

Why hold_costs alone does not reach it. core/lanes/hold_price.zig prices exactly this, but the core reads it only under granted depth (shared_drafts.zig:68, depth.zig:279, :288, :329), and Drafted turns granted depth on only for a drafter with Facts.chances and a chances function (drafted.zig:119-125). The HIP drafter reports no chances, so supplying hold_costs from it changes nothing.

Two ways I see:

  1. A small core change. The allocator's cost record takes hold_costs, and a drafted option adds holdMs(hold_costs, drafting streams, deepest) when a neural stream drafts (allocate.zig:20-29 and :77, passed from shared_drafts.zig:58-61 and the rule's own allocation at depth.zig:347-351). Lone rounds keep pricing by mtp_step_ms (depth.zig:133). Part 6 would time the hold pass at load for 1 to frame_streams streams at depths 1, 3 and 7, keeping step_ms as the marginal cost so nothing is counted twice.
  2. The HIP drafter opts into chances: a landing calibration like CUDA's tree.Landing, plus slack, plus timed hold_costs. Granted depth would then govern every round, lone streams included, so the 1- and 2-stream cells would change and need measuring again.

I'd go with 1, either as its own core change or inside part 6, whichever you prefer. Part 6 waits for your call. As it stands on its local head, it leaves chat at 4 streams 2.5% under plain (greedy) and faster than plain at temperature 0.7, with every token equal.

@ashhart

ashhart commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Hi @AbrahamCete, thank you. The HIP drafter now sits behind lanes.drafted.Drafted, and the 1- and 2-stream cells you posted are all faster with drafting, with one token hash set across main, plain and drafted in each cell and no unequal alone or serial checks. The refusals, the resumed-stream handling and the BF16 guard are pinned by host tests, and a plain serve is unchanged. We'll leave the CHANGELOG line to ourselves, as with parts 3 and 4. Your part 6 hold-cost question is for that PR and does not hold this one up; we'll answer it there. Nothing more is needed from you for part 5.

  • Synthena

@AIFlowML

Copy link
Copy Markdown
Contributor

At 767d3d75, trial-merging 6e374885 leaves one conflict in zig/src/native/hip.zig, in the same assertion block noted on part 6. I kept the branch's named refusal for a paired drafter and main's test for the three-draft MTP limit. The other files applied cleanly.

On M5 Max with Zig 0.17.0, the resolved part 5 tree passed 241 tests, with two skips, plus the native HIP compile check:

zig build test-native-hip-host test-qwen35-hip-host test-draft-hip-host \
  hip-host-test check-native-hip-host -Dhip=true -Dcpu=apple_m1 -j5 --summary all

I verified the named cases for the BF16 refusal, resumed feature positions and kept-row limits ran. This run uses host fixtures, so the existing gfx1151 receipt remains the device evidence.

Igor Lessio - AIFLOW LABS

@ashhart
ashhart force-pushed the feat/hip-dflash2-5-serve branch 3 times, most recently from 72ef4e2 to 09bbd1f Compare November 21, 2026 22:38
ashhart added a commit to AbrahamCete/TensorFold that referenced this pull request Nov 21, 2026
…nly test may name its engine

ashhart#3665 imports engine.zig as a module-level `engine` (for engine.tap_window); main's ed4e935 (Fixes ashhart#4061: price
copies-only HIP plain rounds) added a test whose local `var engine: Engine` shadows it, which Zig refuses
(hip_lanes.zig:537), so hip-host-test failed to compile. The import is renamed engine_mod; no other change.
@AIFlowML

Copy link
Copy Markdown
Contributor

The current part 5 head 09bbd1fb now trial-merges cleanly into #4467 at 3f9742cf9 (main 1eed88bb). The assertion conflict from the previous head is gone. The merged native test file retains both the paired-drafter refusal and the three-draft MTP limit.

On M5 Max with Zig 0.17.0, this passed 247 tests with 2 skips and compiled the native HIP target:

zig build test-native-hip-host test-qwen35-hip-host test-draft-hip-host hip-host-test check-native-hip-host -Dhip=true -Dcpu=apple_m1 -j4 --summary all

The gfx1151 token and timing measurements are from the author's device receipt.

Igor Lessio - AIFLOW LABS

AbrahamCete and others added 10 commits November 22, 2026 10:45
The native HIP server wraps the qwen3_5 dense target with the lane core's
Drafted over the HIP DFlash2 drafter: taps are set from the drafter's
config before streams are sized, the drafter's weights and per-stream
state count in the memory plan, and window costs go to the drafter.

- refuse --drafter under --tp > 1, at other --drafter-bits, and for
  HIP families without a DFlash2 drafter; benchmark --drafter on rocm
- an absorb refuses kept rows past its features; features serve only
  rows the ring holds for the drafter's window
- docs: the 27B recipe and community benchmarks

A test pins that --no-drafts with --drafter loads no drafter and is not
refused.
tf-qwen35-test check takes --drafter <dir>: the lanes session opens the
HIP DFlash2 drafter as the native server does and wraps the target with
Drafted, so drafted == serial, solo == together and graph == eager run
for Qwen3.8-27B instead of skipping. The taps invariant restores the
taps it found instead of switching them off.

The lanes session likewise restores the taps it found when it ends or
its drafter fails to open.
A stream resumed from a kept prompt state taps no rows below the resume
point, so its ring holds zeros there while features() counted them as
written. features() now refuses them with RowsNotHeld, as Nemotron and
Gemma4 do. Drafted already absorbs from s.cached, so no served path asks
for those rows.
…a fresh one

The resumed invariant compares a resumed drafted run with a serial one.
This adds the drafted run of the same prompts with every kept prompt
evicted first: it must resume nothing and give the resumed run's tokens,
and the check prints each run's drafts kept, drafted and rounds, so a
resume's effect on acceptance is visible.
main now serves some BF16 qwen3_5 checkpoints (image towers the engine
reads, and joint-head decisions), but the engine times no BF16 windows,
so the DFlash2 drafter would run its rounds unpriced. A BF16 checkpoint
with --drafter is refused by name before any load, as the drafter's
stated limit says; quantized checkpoints and serves without --drafter
are unchanged.

A host test pins the refusal on a BF16 chat config and its absence on
the same config quantized, or without --drafter.
… (six blank lines fewer)

Main's 2027e7a ("flashnext hip: one refusal test for --drafter and --mtp-drafts, so hip.zig stays within 600
lines") left hip.zig at 599 lines, and the DFlash2 drafter's group check put it at 606. Six blank lines between
adjacent tests at the end of the file go; no code changes.
…calls, after main's 1a10b0b

Main's 1a10b0b ("hip flashnext: opt-in --mtp-drafts up to 7 on a lone stream (ashhart#3053)") gave checkGroup a
comptime family parameter. The merged --drafter test's four calls pass qwen35.native, as main's own refusal
tests do; at --tp 1 that family drafts at most 3, so the test's --mtp-drafts case keeps its message.
…n's 1a10b0b (one blank line fewer)

Main's 1a10b0b ("hip flashnext: opt-in --mtp-drafts up to 7 on a lone stream (ashhart#3053)") added the
mtp_drafts_hip_test.zig import, and with the DFlash2 drafter hip.zig came to 601 lines. The blank line between
the group-flags test and the --drafter refusal test goes; no code changes.
…nly test may name its engine

ashhart#3665 imports engine.zig as a module-level `engine` (for engine.tap_window); main's ed4e935 (Fixes ashhart#4061: price
copies-only HIP plain rounds) added a test whose local `var engine: Engine` shadows it, which Zig refuses
(hip_lanes.zig:537), so hip-host-test failed to compile. The import is renamed engine_mod; no other change.
@ashhart
ashhart force-pushed the feat/hip-dflash2-5-serve branch from 09bbd1f to 75d15fd Compare November 22, 2026 10:45
@ashhart
ashhart merged commit 7ef2b42 into ashhart:main Nov 22, 2026
12 checks passed
ashhart added a commit that referenced this pull request Nov 22, 2026
…nly test may name its engine

#3665 imports engine.zig as a module-level `engine` (for engine.tap_window); main's ed4e935 (Fixes #4061: price
copies-only HIP plain rounds) added a test whose local `var engine: Engine` shadows it, which Zig refuses
(hip_lanes.zig:537), so hip-host-test failed to compile. The import is renamed engine_mod; no other change.
@ashhart

ashhart commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Thank you @AbrahamCete. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants