#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.
This commit is contained in:
Niko1221 committed 2026-10-01 08:40:29 +02:00
1 parent a86bc853f3
commit 7d746a0887
1 file changed
+3 -3
+3 -3
View File
@@ -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;
}