Repository navigation
qwen27 metal: M1-M4 size the default prompt frame to their 128-row passes, not 512 - #2797
Conversation
|
Status on this head (
|
003e3b7 to
d6f3153
Compare
Carry the pending default-frame fix onto current main at model load and serving. Pre-M5 dense Qwen uses 128 rows instead of unused 512-row scratch, while M5, routed defaults, valid environment settings and explicit caller minima keep their values. Admission may fit more streams with the smaller slabs. Pin each qualified GPU generation and deferred loading, and keep the executed attention width equal. Add a budget-boundary regression and document the M3 qualification required before landing. No kernel or arithmetic change. Refs #2089
…tions Follow main ab2c91d, which qualifies the shared prefix before M5 and changes the geometry argument from chip capability to the selected shared-prefix path. Model loading now asks the same sharedPrefix reader as the runner. Keep the qualified 512-row default before M5; the explicitly unshared path keeps the new 128-row frame. Retain exact row assertions for both geometries. Follow main b4d4795, which moves startup sizing into qwen27_reserve.zig. Its serving and info reservations now choose the incoming frame width using the actual shared geometry, and pass that geometry to the changed model promptRows API. Preserve main fit/shared-prefix handling and validated overrides. No kernel or token arithmetic changes.
d6f3153 to
89ff35c
Compare
On chips without tensor units (M1-M4), the dense Qwen3.8-27B and 9B attention geometry caps every prompt pass at 128 rows. The default prompt frame was still allocated at 512 rows, and the frame, attention and GDN scratch are all sized by that capacity, so three quarters of it was never used.
What changes
TF_PROMPT_ROWSvalues, a caller's explicit row count, routed defaults, and other families and backends keep their values.Checks
zig fmt --checkpasses and the lean checker finds nothing new.Still to run before landing: an M3 Ultra comparison against main. Each arm uses fresh processes in a balanced order, with cold 2K, 8K, 16K and 32K prompts and 256 greedy decode tokens. Replies must be token-identical with the same prompt cuts, and no prefill or decode cell may be slower.
This narrows #2089 but doesn't close it: the prompt GEMM rate and the plain-decode gap on M1-M4 are still open there.
Refs #2089