Archived
libxe2, arch/common: silu_mul for 4-bit down projections, float exp at the tie rule; head-row norms vectorized; attention SLM by gqa
- Under Geom::plain_norm a down projection that reads the bf16 plane and no codes (w4a16 / w4a8i8 quantise their own activation) takes `silu_mul` instead of gated_quant_fp8 (the E4M3 pass nobody read: 17 us a call, 64 a round). - silu_mul: float exp, libref's double chain again only near a bf16 tie (near_bf16_tie, as the gdn activations): op oracle 300/300 bit-identical at tolerance 0. - rmsnorm's bf16 head rows (n = 128..512): a lane its contiguous slice by 16-byte loads (16 us -> a few us a q / k norm call). rad-kbench rmsnorm 240/240. - the flash kernel's staged queries sized for gqa <= 8 (24 of 64 KiB a work-group). Greedy decode proxy (depth 5, mtp4, draft vocab 131072): 74.3 -> 81.2 tok/s. KL against the exact reference 0.00231 (was 0.00239), top-1 96.70%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2d2356ad4b
commit
f26eec2633
4 files changed
+63
-7
No files matched your search
@@ -124,6 +124,9 @@ inline int MlpFP8::declare(RadBuilder* b, Names& nm, const Geom& geom, int l, co
|
||||
const char* down_base = nm.f("blk.%d.ffn_down", l);
|
||||
RAD_ARCH_TRY(down.probe(b, nm, g, down_base, { src.down }));
|
||||
gq_ffn.fuse_clamped = swiglu_quant;
|
||||
/* Under Geom::plain_norm a down projection that reads the bf16 plane and no codes (a 4-bit
|
||||
* one, which quantises its own activation) takes the plain product: `silu_mul`, no E4M3 pass. */
|
||||
if (g.plain_norm && down.codes_free && down.reads_x && swiglu_limit <= 0) gq_ffn.silu_only = true;
|
||||
RAD_ARCH_TRY(gq_ffn.declare(b, g, w.gate_up, w.ffn, g.n_ff, "silu", 0,
|
||||
down.reads_x && !(w.ffn.q8_fed && down.probed_i8), false,
|
||||
swiglu_limit));
|
||||
|
||||
Reference in new issue
Block a user