From 4ca02f18dddfafa7f6acea8d45ec17848c2b83af Mon Sep 17 00:00:00 2001 From: gearwave00001 Date: Thu, 22 Oct 2026 21:05:10 -0500 Subject: [PATCH] minimaxh3: the full-form ada declare must tell rad_fp8 it was pre-mapped The LoRA-runtime refactor moved DenseFP8::declare's `mapped` from a struct member to a trailing parameter -- the body now gates its map_linear on the parameter, and rad_builder refuses a COPY name map declared twice. minimaxh3 kept setting the (now-ignored) member, so every full-form container died at boot on `name map for 'dit.blk.0.ada0.weight': declared twice`. The ada rows are mapped by map_rows above for both modulation branches; pass the flag so declare() reads through that map. Curve-form (adaln_t_table) never reaches DenseFP8 and kept booting, which is why only the ref2va containers failed. Co-Authored-By: Claude --- arch/minimaxh3/minimaxh3.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/minimaxh3/minimaxh3.cpp b/arch/minimaxh3/minimaxh3.cpp index d1801d03..73da86f3 100644 --- a/arch/minimaxh3/minimaxh3.cpp +++ b/arch/minimaxh3/minimaxh3.cpp @@ -1225,9 +1225,10 @@ static int declare_tables(RadBuilder* b, const RadModelMeta* meta, Model& m) { RAD_WEIGHTS(B.ada_w[md], B.ada_b[md])), { m.a_temb.x }, { m.b_ada }); } else { - B.ada[md].mapped = true; + /* The map_rows above made `.weight` for both branches, so declare() must not + * map it again -- a COPY map declared twice is refused (rad_fp8.h's `mapped`). */ RAD_ARCH_TRY(B.ada[md].declare(b, nm, base, m.Ws, td, acc, RAD_SHARD_ROW, - grp_layer(grp), { src_w })); + grp_layer(grp), { src_w }, {}, true)); B.op_ada[md] = rw(b, RAD_OP(b, "gemm_nt_q_bias", RAD_PARAMS(RAD_RANGE("M", 1, S), RAD_INT("N", m.Ws), RAD_INT("K", td),