Repository navigation
Qwen3.8-27B on M5: the lane loop for one stream by default, and measured shared row prices (#1621) - #1726
Merged
Conversation
Admit 16, 32 and 64 rows on either Metal projection path, with costs measured through the active width and context copies beside the drafter tree. Wide tensor-unit requests use the priced lane loop. Add host policy and backend-fact checks and a complete 1-64-row timing sweep (#1621).
Keep the existing 16-row serial default. Explicit 32/64-row windows select lanes and enable context copies by default, with the existing opt-out. Pin the default choice in the host tests; the measured ordinary greedy cells favor the legacy loop (#1621).
A lone lane request explores up to 15/31/63 nodes from the same masked block and considers all sixteen retained candidate siblings. Choose the parent-closed prefix by expected accepted tokens per measured window cost. Keep shared grants, zero-grant pauses and the legacy serial loop bounded as before; the target verifier and keyed samples remain authoritative (#1621).
Retain the original lone price prefix. Price wider unfused row shapes without allocating another stream or changing served arithmetic. Restore the borrowed backend fields in place. Keep earlier-chip and one-slot timing unchanged. Refs #1621.
Use the existing shared reservation policy on tensor units. Count the proposed and granted nodes through actual native facts and the production lane engine, and preserve its plain target tokens. Keep lone drafting and sampling unchanged. Refs #1621.
ashhart
force-pushed
the
q27-m5-lane-loop
branch
from
October 31, 2026 00:28
9a7f2d6 to
81ee6fc
Compare
This was referenced Oct 31, 2026
This was referenced Oct 31, 2026
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.
Part of #1621. On M5 Macs one Qwen3.8-27B stream is served through the 16-row lane loop by default (
TF_QWEN27_LANES=0keeps the serial loop), and lane rounds shared by several streams price and fill their rows from measured costs instead of extrapolating from the lone window. Replies are token-identical: 1,644 replies and controls equal to serial, solo and"draft": false.Against main, alternating base/new/new/base, Qwen3.8-27B MLX 4-bit with DFlash2:
Wider 32- and 64-row lone windows stay opt-in (
TF_QWEN27_WINDOW,TF_QWEN27_COPIES).