Archived
arch/gemma4: the dense arm on the second lane beside the routed arm, in a step that runs whole
The two feed-forward arms of a Gemma 4 MoE layer read the same normed residual and meet only at the feed-forward join; issued one after the other, the dense arm's three launches -- gate_up, act_mul, down, ~36 us under --profile-ops at a 26B-A4B decode step on 4x R9700 -- wait behind the routed arm's ~120 every layer. At a few rows its GEMMs are latency-bound, nowhere near the bandwidth the experts' GEMMs take. In a step that runs whole -- every decode and verify step, and a prefill chunk too short to cut -- the dense arm now rides the second lane: issued behind a join from lane 0 (the attention join is its producer), beside the routed arm on lane 0, and joined back before the feed-forward reduction reads both. Its rows of the join buffer and the routed arm's are disjoint. No collective rides it, so the reductions keep lane 0 here and lane 1 in a cut prefill chunk, and a step's collectives are on one lane as before. h, gate_up, ffn and ff2 are named to rad_buf_concurrent. Off with the overlap's switch, RADIANCE_GEMMA4_OVERLAP=0, which now keeps every step on one stream; a startup note says which. arch_test: a decode step issues the dense arm's three launches a layer on lane 1 and every all-reduce on lane 0, two joins a layer, and nothing on the two lanes that touches a common element unordered; a 4095-token chunk the same; the cut chunks keep lane 1 for their reductions alone. GUIDE.md's switch and ARCHITECTURES.md say so. Not yet run on the cards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7a1ae22690
commit
c527863248
4 files changed
+64
-20
No files matched your search
@@ -520,8 +520,11 @@ are above every row band the sliced kernels have, so the step issues the same ke
|
||||
same rows and its output is the whole step's, bit for bit. On 4x R9700 the reductions were 47% of
|
||||
a 20K-token prefill under `--profile-ops`; a model of the measured times puts the overlap at up to
|
||||
a quarter off an unprofiled prefill. The per-op profile syncs every op, so it cannot show it --
|
||||
time a prefill without `--profile-ops`. `RADIANCE_GEMMA4_OVERLAP=0` runs every chunk whole, and the
|
||||
startup note says which. A decode step never takes the second lane.
|
||||
time a prefill without `--profile-ops`. A step that runs whole -- every decode and verify step --
|
||||
takes the second lane for the dense arm instead, beside the routed arm, which needs nothing of it
|
||||
until the feed-forward join: at decode the dense arm's GEMMs are a few rows, latency-bound and far
|
||||
from the bandwidth the experts take, and its reductions stay on lane 0. `RADIANCE_GEMMA4_OVERLAP=0`
|
||||
keeps every step on one stream, and the startup notes say which.
|
||||
|
||||
**The draft head in fp8.** The drafter's head is the widest read on the draft path: the target's
|
||||
bf16 table, 352 MiB a rank at tp 4, every draft pass. A container converted with the line
|
||||
|
||||
Reference in new issue
Block a user