Skip to content

train 1121012920: #3090 #3920 (CI only) - #4285

Closed
ashhart wants to merge 7 commits into
mainfrom
lead/train-1121012920
Closed

ashhart wants to merge 7 commits into
mainfrom
lead/train-1121012920

Conversation

@ashhart

@ashhart ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #3090 #3920 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

ashhart and others added 7 commits November 21, 2026 01:29
…stalls other streams' rounds

Qwen3.5-2B's Metal backend gains prefill_step and cancel_prefill (#3021).
prefill.run becomes open (main's restore of a kept prefix) and step (one
turn of main's loop), and the whole pass is open plus steps, so both
drivers run the same chunk body and replies are unchanged.

Each call runs one chunk at exactly the whole pass's cuts (the chunk cap,
the next planned start, the next kept mark); Qwen3.5 declares no chunk
invariance, so max_rows is ignored and the cuts never move. The GDN and
conv state live in the stream's cache, so a step carries only its next
row between calls. A cancel keeps the state at the last chunk's end; a
stream that leaves mid-pass is forgotten, its paged lane released.

Host tests on host-backed caches with a sentinel forward: stepped chunks
equal the whole loop's and leave the same state byte for byte, a resumed
pass cuts as main does, a cancel keeps the last chunk's end, and another
stream decodes between two chunks of a long prompt. The new step joins
the macOS host CI list.

Rebased onto main 038e4a2: main added a background-yield check inside
the loop this PR splits into open/step. It is ported into step() right
after the cancel check, keeping the last chunk's end and returning
error.Yielded, as cuda_prefill.zig's chunk() does; run() stays open plus
the step loop.
A new Qwen3.5-2B Metal prompt is filled a chunk at a time between other
streams' decode rounds, at the whole pass's cuts, so replies are
unchanged. Note it under Unreleased (#3090, part of #3021).

# Conflicts:
#	CHANGELOG.md
Add opt-in Metal DFlash2 drafting for GLM-5.3-Flash behind --drafter with --drafter-bits 4 (quantized at load) or 0 (bf16). Captures the target's five tapped layers into per-stream ring buffers, runs same-buffer GPU accept/follow and shared multi-stream draft passes in the target residency set, falls back to the target's MTP head past the context cap or when MTP outperforms DFlash2, and refuses --drafter beside --speed-up or unsupported --drafter-bits.

Register the five new DFlash2 GPU kernels and controls in the Metal kernel contract, document TF_GLM_DRAFT_CONFIDENCE's 0.5 Metal default, and update the optimization ledger.

Refs #3152
…and b4d4795

Main's cc17776 left zig/src/families/glm/forward.zig at 600 lines and b4d4795 (#2761) left
zig/src/native/metal.zig at 597, so this PR's DFlash2 taps and drafter wiring took them to 603 and 602. Three blank
lines after one-line declarations in forward.zig and two in metal.zig go; nothing else changes.
…t, trim comments

Count the tap-stage buffer beside drafter model bytes in heldBytes and load accounting, wire the self-referential core module into the GLM scheduling and restore host build steps so macOS/Linux host compile checks succeed, add heldBytes coverage to the DFlash2 host suite, and wrap comments to 120 columns.

Refs #3152
@ashhart

ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

Landed: #3090 #3920 as main 3025ce9. This PR only carried their CI.

@ashhart ashhart closed this Nov 21, 2026
@ashhart
ashhart deleted the lead/train-1121012920 branch November 21, 2026 03:27
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.

2 participants