From 7d746a088775813b44d8e5b2d33c74ed5f80aff2 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Thu, 1 Oct 2026 08:40:29 +0200 Subject: [PATCH] #283 follow-up: STRATA_PREFILL_BF16X2 defaults to 0 (off) - the prompt path's numbers stay 0.1.31's The second (remainder) GEMM changes what the prompt path computes, so it is opt-in: 2 = all but the hyper-connection's projections, 1 = all. With 0 every lo pointer is null: no extra buffers in carve()/bytes_needed(), the PLE batch size as before, and every kernel writes exactly the BF16 images it wrote before. --- src/prefill/prefill.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/prefill/prefill.cpp b/src/prefill/prefill.cpp index 6f53169a..bd8ae5e7 100644 --- a/src/prefill/prefill.cpp +++ b/src/prefill/prefill.cpp @@ -97,12 +97,12 @@ constexpr int DQ = 2; // dequantized-expert ring (FP16 gate/up + do // The BF16-weight projections (hyper-connection, SSM alpha/beta, indexer, router, shared gate, PLE key/value) take // BF16 activations here and FP32 ones in decode. STRATA_PREFILL_BF16X2=1 adds each activation's BF16 remainder as a // second GEMM (Y = W.hi + W.lo, ~16 mantissa bits): a router that picks its top 10 from the same x decode would. -// 2 (the default) = all but the hyper-connection's; 1 = the hyper-connection's too (its activations are 10240 wide -// and its up projection writes as much: slower); 0 = off. +// 2 = all but the hyper-connection's; 1 = the hyper-connection's too (its activations are 10240 wide and its up +// projection writes as much: slower); 0 (the default: opt-in, it changes the prompt path's numbers) = off. inline int bf16x2_mode() { static const int v = [] { const char* e = std::getenv("STRATA_PREFILL_BF16X2"); - return e != nullptr ? std::atoi(e) : 2; + return e != nullptr ? std::atoi(e) : 0; }(); return v; }