bailing_hybrid: Ling-3.0-flash on an IQ8R trunk

Flash clamps its SwiGLU in its last layers (routed 35-41, shared 34-41). The plugin and MoeFP8's
check for int8 activations refused a rotated int8 trunk over them, since the int8 gated products
had no clamped form. With the previous commit they have one, so both refusals go. MoeFP8
keeps the refusal for a W5NL down projection: no clamp writes its rotated E4M3 codes.

flash_iq8r_clamps_its_gated_products_then_quantises_them_rotated declares flash's IQ8R container
at one, two and four ranks, every rank: 15 swiglu_step, each followed by had_quant_act_i8g reading
its plane at group 128; against the same container without the clamp lists 15 ops more and 15
gated_had_quant_i8g fewer, and no unrotated int8 or E4M3 quantiser. The steps run lint-clean. It
fails without the previous commit. The graph hashes of the bf16 and four-bit containers stay the
same. bailing_hybrid_arch_test: 9 of 9 pass; ctest -LE 'gpu|oot': 181 of 181 (3 skipped).
This commit is contained in:
keptn42 authored and StillDeadcode committed 2026-11-17 18:26:13 +01:00
1 parent 2e558e2dcc
commit 33f9644701
5 files changed
+65 -29

No files matched your search

+9 -4
View File
@@ -1087,15 +1087,20 @@ inline int MoeFP8::declare(RadBuilder* b, Names& nm, const Geom& geom, int l,
const bool pair = w.eff.q8 && w.eff.s8 && w.eff.q8_rot && w.eff.g8 == RAD_FP8_BLOCK;
const bool down_supported = down_w5_fp8 ? (w.eff.q && w.eff.s && kServed[fmt[1]])
: kServed8[fmt[1]] != nullptr;
/* A clamped layer is served too: GateQuantFP8 clamps into the bf16 plane, then
* quantises it into the rotated codes. Not before a W5NL down projection, which reads
* rotated E4M3: no clamp writes those codes. */
const bool clamp_w5 = down_w5_fp8 && c.swiglu_limit > 0;
if (!pair || !c.expert_rot || !kServed8[fmt[0]] || !down_supported || c.calib ||
c.swiglu_limit > 0) {
clamp_w5) {
fprintf(stderr, "radiance: layer %d: int8 activations meet rotated experts (int8, "
"four-bit, or the codebook at E4M3 scales a 64 or 32 of K) through "
"rotated codes at one scale a 128 of K, unclamped, outside "
"calibration; these are %s / %s%s\n", l,
"rotated codes at one scale a 128 of K, outside calibration; these "
"are %s / %s%s%s\n", l,
kServed[fmt[0]] ? kServed[fmt[0]] : kServed8[fmt[0]],
kServed[fmt[1]] ? kServed[fmt[1]] : kServed8[fmt[1]],
pair ? "" : ", and the gated product's int8 pair is not that");
pair ? "" : ", and the gated product's int8 pair is not that",
clamp_w5 ? ", and a W5NL down projection is served unclamped only" : "");
return RAD_E_UNSUPPORTED;
}
}