From ccfdc2ebefbccc0cd11760f763da6881fc8489a3 Mon Sep 17 00:00:00 2001 From: jollyroger1480 Date: Tue, 6 Oct 2026 13:24:46 +0200 Subject: [PATCH] native dense: run the architecture guard only on the first shard of a split A splitter may copy general.architecture into EVERY shard of a split while the qwen4exp.* hyperparameters live only in shard 1 (seen with the Huihui abliterated re-split of the UD-Q4_K_XL GGUF: general.architecture in shards 2-4, no qwen4exp.* there). NativeDense::load then ran check_architecture on shard 2 and failed with 'missing qwen4exp.block_count'. Run the full guard only when the shard is the first of the split (no split.no, or split.no == 0); later shards take the existing split-metadata consistency check whether or not they carry the architecture key. Verified end to end: with this change the engine loads the re-split GGUF (previously: refused), pack built with iq_pack.py --compat-bf16, coherent greedy output. (PR #648) --- src/core/native_dense.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/native_dense.cpp b/src/core/native_dense.cpp index ffa9bdae..e760e5d3 100644 --- a/src/core/native_dense.cpp +++ b/src/core/native_dense.cpp @@ -155,7 +155,8 @@ bool NativeDense::load(const std::vector& shards, WeightTable& tabl const auto* count = gguf.get("split.count"); const auto* number = gguf.get("split.no"); const auto* tensors = gguf.get("split.tensors.count"); - if (gguf.get("general.architecture")) { + if (gguf.get("general.architecture") && (!number || number->u == 0)) { + // splitter may copy general.architecture into every shard (Huihui abliterated re-split) err = strata::check_architecture(gguf); if (!err.empty()) return false; have_architecture = true;