Archived
arch/gemma4: the drafter's residual add, norm and quantiser in one rmsnorm_quant_fp8 launch
Every input of a drafter layer was three launches after its all-reduce: `add` (x += h), `rmsnorm` (x -> h) and `quant_act_fp8` (h -> hq | hs), ~8 us each under --profile-ops on 4x R9700 and a few unprofiled, twice a layer -- thirty a draft pass, every decode step. libr4d's `rmsnorm_quant_fp8` is that chain in one pass where it takes the residual operand (the fused_add_rms_norm form): the norm of the bf16-rounded sum, the codes of the bf16-rounded norm, which its row states is the chain's function. The drafter now issues it for both inputs of every layer, the attention input of layer 0 with no residual -- x as the embedding left it -- and the last layer's trailing add stays, ahead of the final norm, which no quantiser follows. Nineteen launches fewer a draft pass. Where nothing serves the op the chain is declared and issued as before. A draft is verified whatever it is, so this cannot change what is accepted. arch_test: a draft pass issues ten rmsnorm_quant_fp8 and one add, the residual operand x and the delta h past layer 0 and x alone at it; refused, the chain's ten adds and fifteen quantisers. Not yet run on the cards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
34ee08ea5e
commit
efff69be1d
3 files changed
+93
-10
No files matched your search
@@ -545,9 +545,11 @@ four, eight ranks) -- plus `pair_argmax` and the fusions: the two sandwich-norm
|
||||
(`norm_add_norm`, `join_add_scale`), `expert_scale`, and `attn_paged_qrow`, the sliding layers'
|
||||
attention reading q where the fused qkv projection left it. The plugin declares each one's unfused
|
||||
form where nothing serves it -- the rmsnorm / add chain, `embed_lookup` + `mul`, a `cast` lifting q
|
||||
for `attn_paged` -- and the startup notes say which were taken. libr4d has h256/gqa2 and h512/gqa8
|
||||
rows as well, written for the dense 31B; with gemma4k first the 26B-A4B runs on the kernels it was
|
||||
measured with.
|
||||
for `attn_paged` -- and the startup notes say which were taken. The drafter's residual add, norm
|
||||
and fp8 quantiser of x are one libr4d `rmsnorm_quant_fp8` launch an input (ten a draft pass), and
|
||||
the `add` / `rmsnorm` / `quant_act_fp8` chain where nothing serves it. libr4d has h256/gqa2 and
|
||||
h512/gqa8 rows as well, written for the dense 31B; with gemma4k first the 26B-A4B runs on the
|
||||
kernels it was measured with.
|
||||
Without `gemma4k` at all, the full layers have no kernel at four and eight ranks, and a drafter head
|
||||
sharded over more than one rank has no `pair_argmax`.
|
||||
|
||||
|
||||
Reference in new issue
Block a user