From 2355265fdc970c56783b0aa8b122effda9c4bcdc Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Wed, 21 Oct 2026 08:24:45 +0200 Subject: [PATCH] dsv41: pack_gguf --tq-layers (a subset of the converted layers) --- tools/dsv41/pack_gguf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/dsv41/pack_gguf.py b/tools/dsv41/pack_gguf.py index 82348ca1..9c7e4796 100644 --- a/tools/dsv41/pack_gguf.py +++ b/tools/dsv41/pack_gguf.py @@ -333,6 +333,7 @@ def main() -> int: "checkpoint's vision.* / aligner.* (default: the first mmproj*.gguf in /..)") ap.add_argument("--tq-experts", nargs="+", help="folders tq_convert.py wrote (tq.json + tq-L.bin): the routed experts of the layers " "listed there are read from it as trellis types (TQK5X ..), the others keep their MXFP4") + ap.add_argument("--tq-layers", help="only these layers (comma list) of the --tq-experts folders") ap.add_argument("--drafter", help="the DSpark drafter's .json (drafter_pack.py's; default /../dspark/dspark.json)") ap.add_argument("--engram", help="the folder of the Engram tables' GGUF set, for a quant that leaves them out " "(default: /../Engram, when it is whole)") @@ -561,6 +562,9 @@ def main() -> int: raise SystemExit("tq.json: %s is not a layer's expert role" % key) by_layer.setdefault(int(m.group(1)), {})[m.group(2)] = ent tq_dirs[(int(m.group(1)), m.group(2))] = tqd + if a.tq_layers: + keep = {int(x) for x in a.tq_layers.split(",")} + by_layer = {il: r for il, r in by_layer.items() if il in keep} TQTYPES = {v[0]: k for k, v in TYPES.items()} for il, roles in sorted(by_layer.items()): if sorted(roles) != ["w1", "w2", "w3"]: