diff --git a/CMakeLists.txt b/CMakeLists.txt index 2aad55cb..88a6d450 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.21) # VERSION is the server release that /version reports. The plugin ABI version is separate and is # read from abi/rad_abi.h below. -project(radiance VERSION 1.16.0 LANGUAGES C CXX) +project(radiance VERSION 1.17.0 LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/NOTICE b/NOTICE index 378474a8..a24ca03e 100644 --- a/NOTICE +++ b/NOTICE @@ -22,13 +22,21 @@ Written by Deadcode, with contributions from: through w4a16_asym, the Ornith-1.5-122B compose files, the Gemma 4 31B's asymmetric int5 linears (w5a8i8 and w5a16), the junctions at quant_act_i8g's grid (rmsnorm_quant_i8g, gelu_mul_quant_i8g and ar_rmsnorm_quant_i8g) with the prefill overlap on the i8a8, a4 and w5 - grids, and the 31B's i8g, heretic-ara-i8g and w5 compose files + grids, the 31B's i8g, heretic-ara-i8g and w5 compose files, and Ling-3.0-flash (bailing_hybrid: + KDA, dense latent attention, group-limited sigmoid routing, the clipped SwiGLU and its MTP layer as + a serial drafter) with mla_attn_paged, its w4a8 recipes and compose files, possessive quantifiers + in the tokenizer's patterns, the Grafana dashboard's first screen, and Gemma 4 12B (its picture + and audio embedders, a picture's placeholders read both ways on the sliding layers, the windowed + attention at head_dim 512, suppress_tokens) with its compose files - mechkbfan: the token embedding in the pinned host pool - Code000: the n-gram gather on the card and the MTP head's history-pass skip, and the MTP draft coupling with its cooperative verify (--draft-coupling), the W4A8 prefill's tail scale read, the ISA instruments' VGPR granule, back-edge count and fail-closed parse, scored steps (rad_declare_scores, RadBatch::score_only), the gated prefill fold, the short-prompt split row and - the rows forms of rmsnorm and rope, and LFM2's 8-bit trunk with the d1-3B recipe + the rows forms of rmsnorm and rope, LFM2's 8-bit trunk with the d1-3B recipe, the file tier's + routed reads with their own router's counts and its deposit wait, the stop-string hold-back, and + the sampler's planes by the step's token bound, its n-gram ban beside a drafter and no candidate + cut over a top-1 row - baKon: three-rank tensor parallelism, serving any world size from the shipped container, the request log, an uneven world's per-rank KV and weights split, --rope-scaling, the model entry's context length, root and capabilities, /props, the three-rank two-shot all-reduce and tiered-int8 @@ -110,7 +118,8 @@ Written by Deadcode, with contributions from: one-sequence KV floor over the live plan, and prefill staging paid by expert residency - Memoria: the dashboard's decode floor and recent window, the sparklines' percentile range, and the bringup time in /stats, the acceptance tiles' live figures and statsdump's size-capped - rotation + rotation, the dashboard's history line, session extremes, card-count changes and Requests-header + JSON export, with the page's JavaScript driven by tests/js - C_Tamas: control vectors, loaded when the deployment asks and applied as a per-layer residual projection, KV streaming for a context bigger than VRAM (--kv-resident), and the dashboard's request history, KV streaming traffic and one-unit KV meter @@ -123,7 +132,10 @@ Written by Deadcode, with contributions from: - gostar: snapshot-backed prefix KV kept across recomputes, and Tencent's Hy-Memory (HYV3) -- its BF16, FP8 and GGUF adapters, its KV scales, its native sectioned tool calls, and its W4 decode (the per-128 I4 expert packing, the one-row W4/W5 epilogue and the fused prologue and folds), - and the head-256 prefill softmax rescaled by row rather than by wave + and the head-256 prefill softmax rescaled by row rather than by wave, Spark 2.5 (spark25: bf16 and + rotated-int8 IQ8R checkpoints, tensor parallelism with exact collectives, reasoning and tagged + tool calls) with its DSpark drafter (exact attention and Markov walk ops), the prefill split keyed + by live KV bounds, and --gpu-memory-mib - launch80_assets: tuning collectives as the exchange they serve at the served configuration, the per-layer embeddings' read-ahead queue and gather regimes, and the step loop's stall watch - hugypufy: M2XFP4 -- its quantiser, its GEMMs and its linears in the Qwen3.8 trunk and the DFlash2 @@ -157,6 +169,8 @@ Written by Deadcode, with contributions from: hot VRAM cache with its deposits and copyless relabels, and GLM-5.3-Flash's experts read file-direct under expert parallelism -- the stall watch counting drive reads as progress, and the DMA lane's lists fenced so a stalled read pointer no longer fills its ring +- pokesjw: the n-gram reader refilling its reads as they land, and a decode gather waiting on the + other rank's read of a row instead of reading it again This product includes software from the following projects, each under the MIT License. The license text is in the file named beside each. diff --git a/README.md b/README.md index 0fbf3de8..c3506982 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ To support the development of radiance: [Patreon](https://patreon.com/StillDeadC | Qwen3.8-Flash-Next: 4-bit experts, int8 trunk, MTP, vision | `qwen3.8-next-flash-fp8-iq4r-moe.rad` (114 GiB) | [download](https://huggingface.co/StillDeadcode/qwen3.8-next-flash-fp8-iq4r-moe) | `flashnext.yaml` | | Qwen3.8-27B FP8, DFlash2 drafter, vision | `qwen3.8-27b-fp8.rad` (29 GiB) | [download](https://huggingface.co/StillDeadcode/qwen3.8-27b-fp8) | `qwen3.8-27b-fp8.yaml` | | Qwen3.8-27B MXFP4 (AMD Quark AWQ), DFlash2 drafter, vision | `qwen3.8-27b-mxfp4.rad` (19 GiB) | [download](https://huggingface.co/StillDeadcode/qwen3.8-27b-mxfp4) | `qwen3.8-27b-mxfp4.yaml` | +| Qwen3.8-27B IQR-V4, 2.5 to 8 bits a weight ([docs/IQR.md](docs/IQR.md)), DFlash2 drafter, vision | `qwen3.8-27b-iq2r-v4.rad` .. `qwen3.8-27b-iq8r-v4.rad` (10 to 28 GiB) | [download](https://huggingface.co/StillDeadcode/qwen3.8-27b-iqr-v4) | `qwen3.8-27b-iqr-v4.yaml` | | Qwen3.6-35B-A3B FP8, MTP | `qwen3.6-35b-a3b-fp8.rad` (35 GiB) | [download](https://huggingface.co/StillDeadcode/qwen3.6-35b-a3b-fp8) | `qwen3.6-35b-a3b.yaml` | | Ornith-1.5-35B-A3B FP8, MTP, vision | `ornith-1.5-35b-a3b-fp8.rad` (35 GiB) | [download](https://huggingface.co/keptn/ornith-1.5-35b-a3b-fp8) | `ornith-1.5-35b-a3b.yaml` | | Ornith-1.5-35B-A3B w4a8: 4-bit experts (GPTQ), MTP, vision, fits one card | `ornith-1.5-35b-a3b-w4a8.rad` (20 GiB) | [download](https://huggingface.co/keptn/ornith-1.5-35b-a3b-w4a8) | `ornith-1.5-35b-a3b-w4a8.yaml` | diff --git a/abi/rad_abi.h b/abi/rad_abi.h index 0337fe44..3e5653d9 100644 --- a/abi/rad_abi.h +++ b/abi/rad_abi.h @@ -61,7 +61,9 @@ typedef struct RadArgs { int rank; /* tensor-parallel rank and world size, for collectives */ int world_size; /* ABI 35: host-side maximum KV length represented by this exact launch operand (a seqused - * span or a supported one-sequence prefill boundary), or -1 when it cannot be proven. Plugins + * span or a supported one-sequence prefill boundary), or -1 when it cannot be proven. In a + * decode, verify or draft pass of an architecture with no rad_arch_pass_key it is instead the + * step's context bound plus its longest query, which the recorded pass's key holds. Plugins * must not infer it from a device pointer or synchronously read device memory to get it. */ int32_t kv_used_max_h; /* The current rank's WGP count (HIP multiProcessorCount on RDNA); lets split launchers use diff --git a/arch/common/rad_block_attn_gated_fp8.h b/arch/common/rad_block_attn_gated_fp8.h index ca9365d4..b93c49aa 100644 --- a/arch/common/rad_block_attn_gated_fp8.h +++ b/arch/common/rad_block_attn_gated_fp8.h @@ -450,8 +450,10 @@ inline int AttnGatedFP8::declare(RadBuilder* b, Names& nm, const Geom& geom, int if (g.w_bf16) { RAD_ARCH_TRY(gate_pair(w.gate)); } else { - if (rad_op_declared(b, "gate_quant_fp8")) - op_gq = rw(b, RAD_OP(b, "gate_quant_fp8", + /* Rotated int8 codes (ActFP8::q8_rot): gate_had_quant_i8g, had_quant_act_i8g's codes. */ + const char* gq = w.attn.q8_rot ? "gate_had_quant_i8g" : "gate_quant_fp8"; + if (rad_op_declared(b, gq)) + op_gq = rw(b, RAD_OP(b, gq, RAD_PARAMS(RAD_RANGE("M", 1, g.max_tok * g.n_head), RAD_INT("n", g.head_dim), RAD_INT("group", RAD_FP8_BLOCK), RAD_STR("dtype", g.dtype), RAD_STR("act", "sigmoid")), @@ -470,7 +472,7 @@ inline int AttnGatedFP8::declare(RadBuilder* b, Names& nm, const Geom& geom, int * and quantiser read, so one op merges, gates, rounds and quantises (byte-identical to the * pair). Declared only with a selection: the dense path also uses the prefill kernel, which * has no merge. */ - if (op_attn && qsa_sel && qsa_sequ && !g.w_bf16 && + if (op_attn && qsa_sel && qsa_sequ && !g.w_bf16 && !w.attn.q8_rot && rad_op_declared(b, "attn_paged_gate_quant")) { op_attn_gq = RAD_OP(b, "attn_paged_gate_quant", RAD_PARAMS(RAD_INT("q_len", 1), RAD_INT("head_dim", g.head_dim), diff --git a/arch/common/rad_block_gdn_fp8.h b/arch/common/rad_block_gdn_fp8.h index 5fa76c15..ffcead57 100644 --- a/arch/common/rad_block_gdn_fp8.h +++ b/arch/common/rad_block_gdn_fp8.h @@ -328,8 +328,10 @@ inline int GdnFP8::declare(RadBuilder* b, Names& nm, const Geom& geom, const Con RAD_WEIGHTS(w_a_log, w_dt_bias, w_out_norm)), {w.q, w.k, w.v, w.ab, w.in.x}, {w.o.x}); /* The epilogue's codes for an fp8 or int8 out-projection (int8 when ActFP8::q8_fed; the codes - * dtype picks the quantiser). A bf16 out-projection reads only `o.x` and these stay absent. */ - if (op_recur && w.o.cq()) { + * dtype picks the quantiser). A bf16 out-projection reads only `o.x` and these stay absent. + * Rotated int8 codes (ActFP8::q8_rot) only the conv fold writes (gdn_conv_recurrent_update_had); + * rows this update serves are quantised by q_o. */ + if (op_recur && w.o.cq() && !w.o.q8_rot) { const rad_buf oq[2] = { w.o.cq(), w.o.cs() }; RAD_ARCH_TRY(rad_op_writes(b, op_recur, oq, 2)); } @@ -337,7 +339,7 @@ inline int GdnFP8::declare(RadBuilder* b, Names& nm, const Geom& geom, const Con * tokens per sequence. Optional (no RAD_ARCH_TRY): without it the pair runs. */ { const int64_t hi = g.max_tok < 8 ? g.max_tok : 8; - op_cr = rw(b, RAD_OP(b, "gdn_conv_recurrent_update", + op_cr = rw(b, RAD_OP(b, w.o.q8_rot ? "gdn_conv_recurrent_update_had" : "gdn_conv_recurrent_update", RAD_PARAMS(RAD_RANGE("q_len", 1, hi), RAD_INT("head_k", cfg.head_k), RAD_INT("head_v", cfg.head_v), RAD_INT("conv_width", cfg.conv_width), @@ -518,8 +520,10 @@ inline void GdnFP8::step(RadCtx* c, const RadBatch* batch, bool own_ar, praw2(st_idx, RAD_I32, D, st_w), praw(batch->num_accepted, RAD_I32, D), praw(batch->cu_seqlens, RAD_I32, D + 1), bcol(w.in.x, conv_dim, v_dim, DT), RAD_W(w_out_norm), brows(w.o.x, DT), - w.o.cq() ? brows(w.o.cq(), DT) : RAD_NONE, - w.o.cq() ? brows(w.o.cs(), DT) : RAD_NONE); + w.o.cq() && !w.o.q8_rot ? brows(w.o.cq(), DT) : RAD_NONE, + w.o.cq() && !w.o.q8_rot ? brows(w.o.cs(), DT) : RAD_NONE); + /* Rotated codes come only from the fold; here the decode rows take the quantiser. */ + if (w.o.q8_rot) q_o.step(c, T, 0, DT); } /* The output a piece at a time where the caller takes the all-reduce that way (ArPieces): the diff --git a/arch/common/rad_block_mlp_fp8.h b/arch/common/rad_block_mlp_fp8.h index 8c7b4659..b187210b 100644 --- a/arch/common/rad_block_mlp_fp8.h +++ b/arch/common/rad_block_mlp_fp8.h @@ -124,9 +124,9 @@ inline int MlpFP8::declare(RadBuilder* b, Names& nm, const Geom& geom, int l, co swiglu_limit)); /* The fold: decl_gated_fold (an fp8a8 tile) for block-fp8 weights, decl_gated_fold_mx for plain - * MXFP4 at one to 16 rows (eight where K is short). Other gate_up encodings (M2XFP4 included), - * and a clamped (swiglu_limit) product, take the pair. Over int8 codes only a host kernel would - * take it, which would pin the layer's weights to the host. */ + * MXFP4 at one to 16 rows (eight where K is short), decl_gated_fold_iqr for an IQR weight + * whose input and output are the rotated int8 trunk's fed pairs, to 16 rows. Other gate_up + * encodings (M2XFP4 included), and a clamped (swiglu_limit) product, take the pair. */ const bool fold_ok = swiglu_limit <= 0 && !gate_up.f32_scale; if (fold_ok && !gate_up.bf16 && !gate_up.mx && !gate_up.m2x && !gate_up.paro5 && !gate_up.w4 && !gate_up.i8) @@ -136,6 +136,14 @@ inline int MlpFP8::declare(RadBuilder* b, Names& nm, const Geom& geom, int l, co ? std::initializer_list{ w.ffn.q, w.ffn.s, w.ffn.x } : std::initializer_list{ w.ffn.q, w.ffn.s }, &gated_rows, wide_fold); + else if (fold_ok && gate_up.iqr && w.h.q8_fed && w.h.q8_rot && w.ffn.q8_fed && w.ffn.q8_rot) + op_gated = decl_gated_fold_iqr(b, g.max_tok, gate_up.N, gate_up.K, gate_up.w, gate_up.ws, + { w.h.q8, w.h.s8 }, + gq_ffn.want_x + ? std::initializer_list{ w.ffn.q8, w.ffn.s8, + w.ffn.x } + : std::initializer_list{ w.ffn.q8, w.ffn.s8 }, + &gated_rows); else if (fold_ok && gate_up.mx && !gate_up.paro) op_gated = decl_gated_fold_mx(b, g.max_tok, gate_up.N, gate_up.K, gate_up.w, gate_up.ws, gate_up.wref, { w.h.q, w.h.s }, @@ -199,10 +207,11 @@ inline void MlpFP8::body(RadCtx* c, int64_t T, int64_t r0, int64_t rows) const { brow_slice(w.ffn.s, r0, rows, g.n_ff / RAD_FP8_BLOCK), gq_ffn.want_x ? brow_slice(w.ffn.x, r0, rows, g.n_ff) : RAD_NONE); } else if (op_gated && rows <= gated_rows) { - RAD_ISSUE_N(c, op_gated, rows, brow_slice(w.h.q, r0, rows, g.n_embd), - brow_slice(w.h.s, r0, rows, g.n_embd / RAD_FP8_BLOCK), RAD_W(gate_up.w), - RAD_W(gate_up.ws), brow_slice(w.ffn.q, r0, rows, g.n_ff), - brow_slice(w.ffn.s, r0, rows, g.n_ff / RAD_FP8_BLOCK), + /* The fp8a8 fold's E4M3 pairs, or the IQR fold's int8 ones (cq / cs: the fed pair). */ + RAD_ISSUE_N(c, op_gated, rows, brow_slice(w.h.cq(), r0, rows, g.n_embd), + brow_slice(w.h.cs(), r0, rows, g.n_embd / RAD_FP8_BLOCK), RAD_W(gate_up.w), + RAD_W(gate_up.ws), brow_slice(w.ffn.cq(), r0, rows, g.n_ff), + brow_slice(w.ffn.cs(), r0, rows, g.n_ff / RAD_FP8_BLOCK), gq_ffn.want_x ? brow_slice(w.ffn.x, r0, rows, g.n_ff) : RAD_NONE); } else { gate_up.step(c, w.h, w.gate_up, T, r0, rows); diff --git a/arch/common/rad_calib_full.h b/arch/common/rad_calib_full.h index 31e5dc85..8feb939a 100644 --- a/arch/common/rad_calib_full.h +++ b/arch/common/rad_calib_full.h @@ -25,7 +25,13 @@ * safetensors file per input, /.safetensors, holding `hessian_upper`, f32 * [k * (k + 1) / 2], row i's entries k2 = i .. k-1 after row i-1's, and metadata naming `k`, the * rows summed and the checkpoint linears that read the input. H is the raw sum; divide by `rows` - * for the mean second moment. */ + * for the mean second moment. + * + * An int8 trunk (site_i8, one rank only) is recorded from the codes and scales its GEMMs actually + * read, so H includes what the model's own quantisation did to the input -- the input a quantised + * model feeds each layer, for GPTQ against the error it inherits. Codes a rotating producer wrote + * are in the rotated domain; the file's metadata then names it (`domain`: the Hadamard width), as + * RADGRAM2's header does, and the reader converts. */ #pragma once #include @@ -52,6 +58,8 @@ struct CalibFull { rad_op op_gather = 0; /* the columns of every rank into `gathered`; 0 when replicated */ rad_op op_gram = 0; /* declared on the owner only */ bool owner = false; + rad_buf q8 = 0, s8 = 0; /* site_i8: the int8 codes and their f32 (row, 128) scales */ + uint32_t domain = 0; /* site_i8: the codes' rotation width, 0 for none */ std::vector tri; /* the owner's accumulator, upper triangle packed */ }; @@ -156,6 +164,32 @@ struct CalibFull { return RAD_OK; } + /* One input of layer `layer` from an int8 trunk's codes `q8` and scales `s8` (see the file + * comment): the whole input on one rank, `domain` the Hadamard width the codes were rotated by + * (0 for none). */ + int site_i8(RadBuilder* b, const Geom& g, int64_t layer, std::string stem, std::string linears, + rad_buf q8, rad_buf s8, int64_t K, uint32_t domain) { + if (world > 1 || !q8 || !s8 || K > kmax) return RAD_E_INVAL; + Site s; + s.stem = std::move(stem); + s.linears = std::move(linears); + s.K = s.k_local = K; + s.owner = true; + s.q8 = q8; + s.s8 = s8; + s.domain = domain; + (void)layer; + s.op_gram = rw(b, RAD_OP(b, "gram_accum", + RAD_PARAMS(RAD_RANGE("M", 1, g.max_tok), RAD_INT("n", K), + RAD_INT("group", 128), RAD_STR("dtype", "i8a8"), + RAD_INT("upper", 1)), + RAD_NOWEIGHTS), + { q8, s8, scratch }, { scratch }); + if (!s.op_gram) return RAD_E_INVAL; + sites.push_back(std::move(s)); + return RAD_OK; + } + /* Site `i` over a step's T rows: gather (every rank), then on the owner the Gram into the * scratch, copied to a free square, the scratch zeroed, and the square handed to the worker. */ void tap(RadCtx* c, size_t i, int64_t T) { @@ -186,7 +220,10 @@ struct CalibFull { } } const int64_t K = s.K; - RAD_ISSUE_N(c, s.op_gram, T, a, RAD_NONE, praw2(dev, RAD_F32, K, K)); + if (s.q8) + RAD_ISSUE_N(c, s.op_gram, T, brows(s.q8, T), brows(s.s8, T), praw2(dev, RAD_F32, K, K)); + else + RAD_ISSUE_N(c, s.op_gram, T, a, RAD_NONE, praw2(dev, RAD_F32, K, K)); /* `upper` 1 writes no entry below the diagonal, so only the upper triangle comes back: * band by band of kBand rows, each from its first row's diagonal on, about half the * square's bytes. The link is what a step's taps wait on, 25 GB a step on each rank of @@ -317,7 +354,9 @@ private: const uint64_t bytes = (uint64_t)s.tri.size() * 4; std::string hdr = "{\"__metadata__\":{\"k\":\"" + std::to_string(s.K) + "\",\"rows\":\"" + std::to_string(seen) + "\",\"layout\":\"upper triangle, row-major, packed\"," - "\"linears\":\"" + s.linears + "\"},\"hessian_upper\":{\"dtype\":\"F32\"," + "\"linears\":\"" + s.linears + "\"" + + (s.domain ? ",\"domain\":\"" + std::to_string(s.domain) + "\"" : std::string()) + + "},\"hessian_upper\":{\"dtype\":\"F32\"," "\"shape\":[" + std::to_string(s.tri.size()) + "],\"data_offsets\":[0," + std::to_string(bytes) + "]}}"; while (hdr.size() % 8) hdr += ' '; diff --git a/arch/common/rad_fp8.h b/arch/common/rad_fp8.h index 16637b79..f8c34fcd 100644 --- a/arch/common/rad_fp8.h +++ b/arch/common/rad_fp8.h @@ -141,8 +141,9 @@ inline int QuantFP8::declare(RadBuilder* b, const Geom& g, const ActFP8& act, in if (g.w_bf16) { op = 0; return a.x ? RAD_OK : RAD_E_INVAL; } if (!a.x || !a.cq() || !a.cs() || n <= 0) return RAD_E_INVAL; /* `dtype` is the input's (bf16); the op name gives the output format. An input fed at int8 - * codes is quantised by quant_act_i8g into its int8 pair. */ - op = rw(b, RAD_OP(b, a.q8_fed ? "quant_act_i8g" : "quant_act_fp8", + * codes is quantised by quant_act_i8g into its int8 pair, or by had_quant_act_i8g where they + * are rotated (ActFP8::q8_rot). */ + op = rw(b, RAD_OP(b, a.q8_fed ? (a.q8_rot ? "had_quant_act_i8g" : "quant_act_i8g") : "quant_act_fp8", RAD_PARAMS(RAD_RANGE("M", 1, g.max_tok), RAD_INT("n", n), RAD_INT("group", RAD_FP8_BLOCK), RAD_STR("dtype", g.dtype)), RAD_NOWEIGHTS), @@ -729,6 +730,13 @@ struct LinearFP8 { * writes E4M3. Read from the weight's encoding. */ bool i8 = false; rad_op op_q = 0; + /* An int8 weight stored rotated (i8a8h, or a rotated four- or five-bit one): its activation + * codes are in the 128-wide Hadamard domain, whoever wrote them (had_quant_act_i8g or a + * rotating producer). */ + bool i8_rot = false; + /* With i8_rot: an IQR weight (libr4d's r4d_iqr.h), whose codes decode where they are read: a + * u6 code under a zero, a table, a grid or a trellis. Read from the weight's encoding. */ + bool iqr = false; /* OCP-MXFP4 weight read by `gemm_nt_q` at dtype mxfp4a8 against the usual E4M3 activation pair: * e2m1 codes with one E8M0 exponent per 32 of K (libquant `codes=fp4_e2m1 group=32 * scale=e8m0`). libr4d folds each block's exponent into the e4m3 operand against a per-row @@ -1254,6 +1262,7 @@ inline int LinearFP8::declare(RadBuilder* b, Names& nm, const Geom& g, const cha const bool asym = known && linear_is_wnh(enc); const bool rot8 = known && (linear_is_w8h(enc) || asym); i8 = known && (linear_is_w8(enc) || rot8); + i8_rot = i8 && rot8; if (i8) { if (stored) { fprintf(stderr, "radiance: '%s' views '%s', which only a block-fp8 linear " @@ -1284,6 +1293,8 @@ inline int LinearFP8::declare(RadBuilder* b, Names& nm, const Geom& g, const cha const char* sn = nm.f("%s.scale", base); /* A narrower i8a8h weight's codes view takes the plane that decodes it too. */ const W8hForm form = linear_w8h_form(enc); + iqr = rot8 && !asym && (form == W8hForm::Zero || form == W8hForm::Table || + form == W8hForm::Grid || form == W8hForm::Trellis); const RadEncPlane* tpl = rad_enc_plane(&enc, "trellis"); const bool trb = form == W8hForm::Trellis && tpl && tpl->block[1] > 1; const char* cv = form == W8hForm::Zero ? "codes,zero" @@ -1912,6 +1923,27 @@ inline rad_op decl_gated_fold_mx(RadBuilder* b, int64_t rows, int64_t N, int64_t return 0; } +/* The same fold over an IQR [2n, K] gate_up weight under the rotated int8 trunk (`gemm_nt_q_gated` + * at i8a8h: the codes and scale views gemm_nt_q reads, the input's and the output's int8 pairs, both + * in the Hadamard domain), declared for M up to min(rows, 16): libr4d's gemm_iqr_gated serves its + * GEMV and 16-token tile, each byte-identical to the GEMM row of its band followed by + * gated_had_quant_i8g. Optional like decl_gated_fold, and asked for only when a loaded library + * declares the op at that dtype: a CPU-only engine takes the pair. */ +inline rad_op decl_gated_fold_iqr(RadBuilder* b, int64_t rows, int64_t N, int64_t K, rad_weight w, + rad_weight ws, std::initializer_list reads, + std::initializer_list writes, int64_t* gated_rows) { + if (rows <= 0 || N % 256 || K % 256) return 0; + const int64_t hi = rows < 16 ? rows : 16; + const rad_op op = rw(b, RAD_OP(b, "gemm_nt_q_gated", + RAD_PARAMS(RAD_RANGE("M", 1, hi), RAD_INT("N", N), RAD_INT("K", K), + RAD_INT("group", RAD_FP8_BLOCK), RAD_STR("dtype", "i8a8h"), + RAD_STR("act", "silu")), + RAD_WEIGHTS(w, ws)), + reads, writes); + if (op) *gated_rows = hi; + return op; +} + /* ================================================== a calibration tap */ /* One tap of the GPTQ calibration (calib_dir): the Gram of a linear's bf16 input, summed over the * corpus in a PERSIST [K, K] f32 buffer that calib_write() saves. */ diff --git a/arch/gemma4_bf16/gemma4_bf16.cpp b/arch/gemma4_bf16/gemma4_bf16.cpp index 27b964cd..d65b1d99 100644 --- a/arch/gemma4_bf16/gemma4_bf16.cpp +++ b/arch/gemma4_bf16/gemma4_bf16.cpp @@ -2604,12 +2604,10 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c /* Pictures read both ways where the model was trained so, on the sliding layers alone: the * global layers stay causal (transformers' create_masks_for_vision_model, "Gemma 4 explicitly * disables bidirectional attention on global attention layers"; KerasHub's Gemma 4 decoder - * block and vLLM agree). RADIANCE_MEDIA_BIDI=0 reads them causally on every layer. */ + * block and vLLM agree). */ const char* bidi_cfg = meta_text_gets(meta, "use_bidirectional_attention", ""); - const char* bidi_env = std::getenv("RADIANCE_MEDIA_BIDI"); const bool want_bidi = bidi_cfg && !std::strcmp(bidi_cfg, "vision") && ctx->max_enc_patches > 0 && - (Gemma4Vision::present(meta) || Gemma4UnifiedVision::present(meta)) && - !(bidi_env && !std::strcmp(bidi_env, "0")); + (Gemma4Vision::present(meta) || Gemma4UnifiedVision::present(meta)); m.layers.resize((size_t)m.n_main); for (int64_t l = 0; l < m.n_main; ++l) { Layer& lay = m.layers[(size_t)l]; diff --git a/arch/glm5next/glm5next.cpp b/arch/glm5next/glm5next.cpp index 39d514ed..1d570cfb 100644 --- a/arch/glm5next/glm5next.cpp +++ b/arch/glm5next/glm5next.cpp @@ -243,7 +243,12 @@ static int ffn_buffers(RadBuilder* b, Model& m) { mw.ids = decl_b(b, nm.f("expert_ids"), RAD_I32, { T, 8 }); mw.ew = decl_b(b, nm.f("expert_weights"), RAD_F32, { T, 8 }); mw.eoff = decl_b(b, nm.f("expert_offsets"), RAD_I32, { 289 }); - mw.ecnt = decl_b(b, nm.f("expert_counts"), RAD_I32, { 288 }); + /* PERSIST, as every other MoE here declares it: the router writes the counts and no declared + * op reads them (rad_route_report is a handoff), so as a transient a later buffer could share + * their bytes and an arena level would move them, while the core copies them at the block's + * end and the file stager reads them, through the address the last pass reported, at the + * layer's first expert op. */ + mw.ecnt = decl_b(b, nm.f("expert_counts"), RAD_I32, { 288 }, RAD_BUF_PERSIST); mw.sorted = decl_b(b, nm.f("expert_sorted"), RAD_I32, { T * 8 }); mw.inv = decl_b(b, nm.f("expert_inverse"), RAD_I32, { T * 8 }); // FE: the routed experts' WHOLE intermediate (2048). Under expert parallelism a rank owns diff --git a/arch/qwen35_fp8/qwen35_fp8.cpp b/arch/qwen35_fp8/qwen35_fp8.cpp index b9d80009..9c456f61 100644 --- a/arch/qwen35_fp8/qwen35_fp8.cpp +++ b/arch/qwen35_fp8/qwen35_fp8.cpp @@ -80,6 +80,7 @@ #include #include #include +#include #include #if QWEN35_MOE #include @@ -134,6 +135,9 @@ struct Layer { * beside the feed-forward's; 0 where none is declared. */ rad_op op_pf_gu = 0, op_pf_next = 0; rad_weight pf_gu_w = 0, pf_next_w = 0; + /* The layer's calibration inputs (rad_calib_full.h, site_i8), -1 where this run does not record + * it: the mixer's input and its output projection's, the feed-forward's and its down's. */ + int cs_in = -1, cs_o = -1, cs_mlp = -1, cs_down = -1; }; struct Model { @@ -206,6 +210,12 @@ struct Model { rad_op op_tap = 0; rad_weight w_tok = 0, w_out_norm = 0, w_lm_head = 0; + /* A vocabulary-weighted head (logits_gemm_vocab): its width classes' codes, scales and rows' + * vocabulary ids, and this rank's rows of each. */ + enum { MAX_VCLS = 4 }; + int n_vcls = 0; + rad_weight w_vw[MAX_VCLS] = {}, w_vs[MAX_VCLS] = {}, w_vi[MAX_VCLS] = {}, w_vrow = 0; + int64_t vcls_rows[MAX_VCLS] = {}; rad_op op_embed = 0, op_embed_ar = 0, op_final_norm = 0, op_gather = 0, op_logits = 0; /* Set by a plugin built over this one whose head answers a request from its words * (RadBatch::plugin_words): a `fill` of the logits rows that plugin declared. A step every @@ -222,6 +232,7 @@ struct Model { MediaRows mrows{}; std::vector layers; + CalibFull calib; /* --calib-dir over an int8 trunk (rad_calib_full.h) */ /* The pipelined prefill (step_pipelined): on where declare allowed it; the bounds buffer it * cuts a step by, rewritten by every pipelined step from the pinned table `pipe_tbl` of @@ -869,6 +880,13 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c (g.world != 2 || rad_op_declared(b, "ar_rmsnorm_had_quant_i8g"))) m.a_h.q8_fed = m.a_h.q8_rot = true; if (rad_op_declared(b, "gated_had_quant_i8g")) m.a_ffn.q8_fed = m.a_ffn.q8_rot = true; + /* The delta net's output likewise, from the decode conv fold's epilogue + * (gdn_conv_recurrent_update_had) and had_quant_act_i8g on the other rows (GdnFP8::q_o). */ + if (rad_op_declared(b, "gdn_conv_recurrent_update_had") && rad_op_declared(b, "had_quant_act_i8g")) + m.a_go.q8_fed = m.a_go.q8_rot = true; + /* And the gated attention's output, from its gate (gate_had_quant_i8g). */ + if (rad_op_declared(b, "gate_had_quant_i8g") && rad_op_declared(b, "had_quant_act_i8g")) + m.a_attn.q8_fed = m.a_attn.q8_rot = true; #endif m.b_hout = decl_b(b, nm.f("h_out"), g.act_dtype, {g.max_logit_rows, g.n_embd}); @@ -927,10 +945,45 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c } m.w_out_norm = decl_w(b, nm.f("output_norm.weight"), RAD_F32, {g.n_embd}, RAD_ACCESS_PER_TOKEN, RAD_SHARD_NONE, grp_model()); - /* Row-sharded with the vocabulary: g.n_vocab is this rank's share (rad_arch.h). */ - m.w_lm_head = decl_w(b, nm.f("output.weight"), - weight_codes_dtype(b, nm.f("output.weight"), RAD_BF16), - {g.n_vocab, g.n_embd}, RAD_ACCESS_VOCAB, RAD_SHARD_ROW, grp_model()); + /* A vocabulary-weighted head, where the model holds one in place of output.weight: the rows + * sorted by their token's probability into classes of one computed-trellis width each, + * `output.k.weight`, with `output.k.ids` [rows, 1] each row's vocabulary id, and + * `output.vrow` [n_vocab, 1] the inverse (each id's class width and row). Each class is + * row-sharded like any lm_head, the converter keeping an id's row among its rank's rows + * (libr4d's logits_gemm_vocab). */ + for (int B = 7; B >= 2; --B) { + const char* wn = nm.f("output.k%d.weight", B); + RAD_ARCH_TRY(map_copy(b, wn, nm.ckpt("lm_head.k%d.weight", B))); + RadEncoding e{}; + int64_t shp[RAD_MAX_RANK] = {}; + if (rad_weight_encoding(b, wn, &e, shp, nullptr) != RAD_OK) continue; + if (m.n_vcls == Model::MAX_VCLS || shp[0] % (256 * g.world) || shp[1] != g.n_embd) { + fprintf(stderr, "radiance: '%s' is not a head class this build reads (at most %d " + "classes, rows a multiple of 256 a rank)\n", wn, (int)Model::MAX_VCLS); + return RAD_E_SHAPE; + } + const int64_t n = shp[0] / g.world; + const int k = m.n_vcls++; + m.w_vw[k] = decl_view(b, wn, nullptr, "codes,trellis,trellis.mad", e.plane[0].dtype, + {n, g.n_embd}, RAD_ACCESS_VOCAB, RAD_SHARD_ROW, grp_model()); + m.w_vs[k] = decl_view(b, nm.f("output.k%d.scale", B), wn, + rad_enc_plane(&e, "scale.col") ? "scale,scale.col" : "scale", + RAD_F32, {n, g.n_embd}, RAD_ACCESS_VOCAB, RAD_SHARD_ROW, grp_model()); + const char* in = nm.f("output.k%d.ids", B); + RAD_ARCH_TRY(map_copy(b, in, nm.ckpt("lm_head.k%d.ids", B))); + m.w_vi[k] = decl_w(b, in, RAD_I32, {n, 1}, RAD_ACCESS_VOCAB, RAD_SHARD_ROW, grp_model()); + m.vcls_rows[k] = n; + } + if (m.n_vcls) { + RAD_ARCH_TRY(map_copy(b, nm.f("output.vrow"), nm.ckpt("lm_head.vrow"))); + m.w_vrow = decl_w(b, nm.f("output.vrow"), RAD_I32, {g.n_vocab, 1}, RAD_ACCESS_VOCAB, + RAD_SHARD_ROW, grp_model()); + } else { + /* Row-sharded with the vocabulary: g.n_vocab is this rank's share (rad_arch.h). */ + m.w_lm_head = decl_w(b, nm.f("output.weight"), + weight_codes_dtype(b, nm.f("output.weight"), RAD_BF16), + {g.n_vocab, g.n_embd}, RAD_ACCESS_VOCAB, RAD_SHARD_ROW, grp_model()); + } m.op_embed = rw(b, RAD_OP(b, "embed_lookup", RAD_PARAMS(RAD_RANGE("M", 1, g.max_tok), RAD_INT("n_embd", g.n_embd), @@ -1026,6 +1079,15 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c * unfolded: it is a separate chain over its own residual buffer and saves only two launches a * step. */ m.layers.resize((size_t)m.n_main); +#if !QWEN35_MOE + /* GPTQ calibration over the trunk's own int8 codes (rad_calib_full.h, site_i8): one rank, the + * serial step. The scratch is the widest input's square, the feed-forward's. */ + if (ctx->calib_dir && *ctx->calib_dir && g.world > 1) { + fprintf(stderr, "radiance: qwen35: --calib-dir records an int8 trunk at --tp 1 only\n"); + return RAD_E_INVAL; + } + RAD_ARCH_TRY(m.calib.begin(b, nm, g, ctx, m.n_main, 0, std::max(g.n_ff, g.n_embd))); +#endif for (int64_t l = 0; l < m.n_main; ++l) { Layer& lay = m.layers[(size_t)l]; lay.full = is_full_attention(l, interval) ? 1 : 0; @@ -1091,6 +1153,36 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c #endif RAD_ARCH_TRY(lay.mlp.declare(b, nm, g, (int)l, mw, ms, true, f.mlp_add, f.mlp_ar_in, f.mlp_ar_out)); +#if !QWEN35_MOE + if (m.calib.records(l)) { + /* The codes each int8 GEMM reads, in the domain its weight is stored in (i8_rot). */ + const ActFP8& ao = lay.full ? m.a_attn : m.a_go; + const LinearFP8& li = lay.full ? lay.attn.qg : lay.gdn.in; + const LinearFP8& lo = lay.full ? lay.attn.o : lay.gdn.out; + if (!m.a_h.q8 || !ao.q8 || !m.a_ffn.q8 || !lay.mlp.gate_up.i8 || !lo.i8) { + fprintf(stderr, "radiance: qwen35: --calib-dir records an int8 trunk; layer %lld " + "is not one\n", (long long)l); + return RAD_E_INVAL; + } + auto dom = [](const LinearFP8& w) { return w.i8_rot ? (uint32_t)RAD_FP8_BLOCK : 0u; }; + const std::string L = "model.language_model.layers." + std::to_string(l); + const std::string mix = L + (lay.full ? ".self_attn" : ".linear_attn"); + const std::string op = lay.full ? ".o_proj" : ".out_proj"; + lay.cs_in = (int)m.calib.sites.size(); + RAD_ARCH_TRY(m.calib.site_i8(b, g, l, L + ".input", mix, m.a_h.q8, m.a_h.s8, g.n_embd, + dom(li))); + lay.cs_o = (int)m.calib.sites.size(); + RAD_ARCH_TRY(m.calib.site_i8(b, g, l, mix + op + ".input", mix + op, ao.q8, ao.s8, lo.K, + dom(lo))); + lay.cs_mlp = (int)m.calib.sites.size(); + RAD_ARCH_TRY(m.calib.site_i8(b, g, l, L + ".post_attention.input", + L + ".mlp.gate_proj," + L + ".mlp.up_proj", m.a_h.q8, + m.a_h.s8, g.n_embd, dom(lay.mlp.gate_up))); + lay.cs_down = (int)m.calib.sites.size(); + RAD_ARCH_TRY(m.calib.site_i8(b, g, l, L + ".mlp.down_proj.input", L + ".mlp.down_proj", + m.a_ffn.q8, m.a_ffn.s8, g.n_ff, dom(lay.mlp.down))); + } +#endif } #if QWEN35_MOE /* Each routed layer predicts the next one's experts at its router input (MoeFP8::xp_next). */ @@ -1134,12 +1226,22 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c RAD_NOWEIGHTS), {m.a_h.x}, {m.b_hout}); - m.op_logits = rw(b, RAD_OP(b, "logits_gemm", - RAD_PARAMS(RAD_RANGE("M", 1, g.max_logit_rows), - RAD_INT("n_vocab", g.n_vocab), - RAD_INT("n_embd", g.n_embd), RAD_STR("dtype", g.dtype)), - RAD_WEIGHTS(m.w_lm_head)), - {m.b_hout}, {m.b_logits}); + m.op_logits = m.n_vcls + ? rw(b, RAD_OP(b, "logits_gemm_vocab", + RAD_PARAMS(RAD_RANGE("M", 1, g.max_logit_rows), RAD_INT("n_vocab", g.n_vocab), + RAD_INT("n_embd", g.n_embd), RAD_STR("dtype", g.dtype), + RAD_INT("vocab_offset", g.vocab_off), + RAD_INT("rows0", m.vcls_rows[0]), RAD_INT("rows1", m.vcls_rows[1]), + RAD_INT("rows2", m.vcls_rows[2]), RAD_INT("rows3", m.vcls_rows[3])), + RAD_WEIGHTS(m.w_vw[0], m.w_vs[0], m.w_vi[0], m.w_vw[1], m.w_vs[1], m.w_vi[1], + m.w_vw[2], m.w_vs[2], m.w_vi[2], m.w_vw[3], m.w_vs[3], m.w_vi[3], + m.w_vrow)), + {m.b_hout}, {m.b_logits}) + : rw(b, RAD_OP(b, "logits_gemm", + RAD_PARAMS(RAD_RANGE("M", 1, g.max_logit_rows), RAD_INT("n_vocab", g.n_vocab), + RAD_INT("n_embd", g.n_embd), RAD_STR("dtype", g.dtype)), + RAD_WEIGHTS(m.w_lm_head)), + {m.b_hout}, {m.b_logits}); /* ---- the multi-token-prediction head (rad_block_mtp_fp8.h). * @@ -1149,7 +1251,8 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c * * Also only when there is no DFlash2 drafter (`n_taps` == 0): a deployment drafts with one, * and DFlash2 (one forward per block rather than one per token) is the better one here. */ - if (nextn > 0 && g.max_spec > 0 && m.n_taps == 0) { + /* (A vocabulary-weighted head has no output.weight for the draft head to read.) */ + if (nextn > 0 && g.max_spec > 0 && m.n_taps == 0 && !m.n_vcls) { /* Sized at max_tok, not max_logit_rows: a draft round is one row per sequence, but the * history pass that fills the head's own K and V is one row per token over a whole prefill * chunk (26 MiB at a 512-token chunk, beside 477 MiB of head weights). */ @@ -1297,6 +1400,19 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c return RAD_OK; } +/* The lm_head over the gathered rows: the one weight, or a vocabulary-weighted head's classes. */ +static void issue_logits(RadCtx* c, const Model& m, int n) { + if (!m.n_vcls) { + RAD_ISSUE_N(c, m.op_logits, n, brows(m.b_hout, n), RAD_W(m.w_lm_head), + brows(m.b_logits, n)); + return; + } + auto w = [](rad_weight h) { return h ? RAD_W(h) : RAD_NONE; }; + RAD_ISSUE_N(c, m.op_logits, n, brows(m.b_hout, n), w(m.w_vw[0]), w(m.w_vs[0]), w(m.w_vi[0]), + w(m.w_vw[1]), w(m.w_vs[1]), w(m.w_vi[1]), w(m.w_vw[2]), w(m.w_vs[2]), w(m.w_vi[2]), + w(m.w_vw[3]), w(m.w_vs[3]), w(m.w_vi[3]), RAD_W(m.w_vrow), brows(m.b_logits, n)); +} + #if !QWEN35_MOE /* ============================== A prefill step in two pieces ============================== * @@ -1523,9 +1639,7 @@ static void step_pipelined(RadCtx* c, const RadBatch* batch, Model& m, const int RAD_ISSUE_N(c, m.op_gather, batch->n_out, brows(m.a_h.x, T), praw(batch->out_ids, RAD_I32, batch->n_out), brows(m.b_hout, batch->n_out)); - RAD_ISSUE_N(c, m.op_logits, batch->n_out, - brows(m.b_hout, batch->n_out), RAD_W(m.w_lm_head), - brows(m.b_logits, batch->n_out)); + issue_logits(c, m, batch->n_out); } } #endif @@ -1604,9 +1718,15 @@ static void step(RadCtx* c, const RadBatch* batch) { const Layer& l = m.layers[(size_t)li]; if (l.full) l.attn.step(c, batch); else l.gdn.step(c, batch); + /* The calibration taps read the codes the block's GEMMs just read, before the next block's + * norm rewrites the shared input planes. */ + if (l.cs_in >= 0) m.calib.tap(c, (size_t)l.cs_in, batch->n_tok); + if (l.cs_o >= 0) m.calib.tap(c, (size_t)l.cs_o, batch->n_tok); prefetch_beside(c, l.op_pf_gu, l.pf_gu_w, pf_h); dbg_resid(c, (int)li, "mix", m.g.n_embd, m.b_x, m.a_h.x); l.mlp.step(c, batch); + if (l.cs_mlp >= 0) m.calib.tap(c, (size_t)l.cs_mlp, batch->n_tok); + if (l.cs_down >= 0) m.calib.tap(c, (size_t)l.cs_down, batch->n_tok); prefetch_beside(c, l.op_pf_next, l.pf_next_w, pf_h); dbg_resid(c, (int)li, "ffn", m.g.n_embd, m.b_x, m.a_h.x); @@ -1619,6 +1739,8 @@ static void step(RadCtx* c, const RadBatch* batch) { } } + m.calib.after_step(c, batch->n_tok); + RAD_ISSUE(c, m.op_final_norm, brows(m.b_x, batch->n_tok), RAD_W(m.w_out_norm), brows(m.a_h.x, batch->n_tok)); @@ -1631,9 +1753,7 @@ static void step(RadCtx* c, const RadBatch* batch) { brows(m.a_h.x, batch->n_tok), praw(batch->out_ids, RAD_I32, batch->n_out), brows(m.b_hout, batch->n_out)); - RAD_ISSUE_N(c, m.op_logits, batch->n_out, - brows(m.b_hout, batch->n_out), RAD_W(m.w_lm_head), - brows(m.b_logits, batch->n_out)); + issue_logits(c, m, batch->n_out); } } diff --git a/core/config.cpp b/core/config.cpp index 071f0dd1..1c2de42b 100644 --- a/core/config.cpp +++ b/core/config.cpp @@ -645,7 +645,7 @@ int config_parse(int argc, char** argv, Config* c) { RAD_ERR("--embedding-placement takes ram or vram, not '%s'", v); return RAD_E_INVAL; } - std::string share_dir; + std::string share_dir, disk_dir; if (!emb && !std::strncmp(v, "ram=", 4)) { share_dir = v + 4; if (share_dir.empty()) { @@ -654,11 +654,23 @@ int config_parse(int argc, char** argv, Config* c) { return RAD_E_INVAL; } p = TablePlacement::Ram; + } else if (!emb && !std::strncmp(v, "disk=", 5)) { + disk_dir = v + 5; + if (disk_dir.empty()) { + RAD_ERR("--ngram-placement disk= needs a directory: disk=DIR, where the table " + "is read from its own file"); + return RAD_E_INVAL; + } + p = TablePlacement::Disk; } else if (!emb && !parse_table_placement(v, &p)) { - RAD_ERR("%s takes auto, vram, ram, ram=DIR or disk, not '%s'", a.c_str(), v); + RAD_ERR("%s takes auto, vram, ram, ram=DIR, disk or disk=DIR, not '%s'", a.c_str(), + v); return RAD_E_INVAL; } - if (!emb) c->ngram_share_dir = share_dir; + if (!emb) { + c->ngram_share_dir = share_dir; + c->ngram_disk_dir = disk_dir; + } (emb ? c->embedding_placement : c->ngram_placement) = p; if (emb) c->embedding_placement_given = true; } @@ -1354,7 +1366,8 @@ const ShowRow kShow[] = { { "--embedding-placement", [](const Config& c) { return std::string(table_placement_name(c.embedding_placement)); } }, { "--ngram-placement", [](const Config& c) { std::string v = table_placement_name(c.ngram_placement); - return c.ngram_share_dir.empty() ? v : v + "=" + c.ngram_share_dir; } }, + const std::string& dir = c.ngram_share_dir.empty() ? c.ngram_disk_dir : c.ngram_share_dir; + return dir.empty() ? v : v + "=" + dir; } }, { "--vision-tower-placement", [](const Config& c) { return std::string(table_placement_name(c.tower_placement)); } }, { "--weights-disk-tier", [](const Config& c) { return onoff(c.weights_disk_tier); } }, { "--prefix-cache-mib", [](const Config& c) { diff --git a/core/engine.cpp b/core/engine.cpp index f4719567..e08a85f2 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #ifdef RAD_ENABLE_KV_ROLLBACK_TEST_HOOK @@ -318,6 +319,8 @@ Engine::~Engine() { ranks_.clear(); for (TableCopy& c : table_copies_) table_copy_free(&c); table_copies_.clear(); + for (TableCopy& c : table_files_) ::munmap(c.base, c.bytes); + table_files_.clear(); for (void* p : card_copies_) rad_dev_free(p, RAD_MEM_HOST_MAPPED); card_copies_.clear(); for (TableShare& t : table_shares_) table_share_close(&t); @@ -374,6 +377,10 @@ int Engine::declare_sampler(int rank, RadBuilder* b, int64_t logits_width, bool } sc.max_seqs = cfg_.max_seqs; sc.max_spec = cfg_.n_spec; + /* The real step bound, not the sizing declare's level: the sampler's planes must be the same + * buffers in every declare of the program (plan_level compares them), and a step can sample + * no more rows than the real bound lets it carry tokens. */ + sc.max_tok = cfg_.max_tok; sc.rank = rank; sc.world_size = cfg_.tp; sc.draft_coupling = cfg_.draft_coupling; @@ -381,11 +388,14 @@ int Engine::declare_sampler(int rank, RadBuilder* b, int64_t logits_width, bool /* Where the chain writes the sampled ids. The engine declares it because rad-kbench drives the * same chain against its own buffer. PERSIST, since the step loop copies it back after the - * step, when a transient's storage may belong to another buffer. */ + * step, when a transient's storage may belong to another buffer. One id per sampler row, + * capped as the rows are (SamplerConfig::max_tok). */ RadBufDecl d{}; d.dtype = RAD_I32; d.rank = 1; d.shape[0] = cfg_.max_seqs * (cfg_.n_spec > 0 ? cfg_.n_spec + 1 : 1); + if (cfg_.max_tok > 0) + d.shape[0] = std::min(d.shape[0], std::max(cfg_.max_tok, cfg_.max_seqs)); d.kind = RAD_BUF_PERSIST; tok = rad_decl_buffer(b, "sampler.tokens", &d); return tok ? RAD_OK : RAD_E_STATE; @@ -3482,8 +3492,8 @@ int Engine::run_server() { in.decoder_max_area = pg.vgen_str.decoder_max_area; if (in.image_cond && in.image_crf > 0 && !mm::h264_roundtrip_available()) RAD_WARN("video: '%s' prepares a first frame with an H.264 round trip at crf %d, which " - "needs libx264; this build's libavcodec has none, so input_reference is " - "refused", in.name.c_str(), (int)in.image_crf); + "needs an H.264 encoder and decoder; this build's libavcodec lacks one, so " + "input_reference is refused", in.name.c_str(), (int)in.image_crf); in.max_lanes = vd.max_lanes; in.max_ref_images = vd.max_ref_images; in.max_ref_videos = vd.max_ref_videos; diff --git a/core/engine.h b/core/engine.h index 2e555ce7..c913d1c0 100644 --- a/core/engine.h +++ b/core/engine.h @@ -255,6 +255,11 @@ private: * copies are freed, because the holder that leaves last deletes the file. */ std::vector table_shares_; std::vector> table_copy_of_; + /* --ngram-placement disk=DIR: the table's own file, mapped read-only in place of the + * container's range (table_file_map); unmapped in ~Engine. */ + std::vector table_files_; + std::vector table_file_src_; /* the container address each of table_files_ replaces */ + int table_file_map(const uint8_t* src, int64_t n, int64_t foff, void** out, std::string* why); /* --expert-profile: the decode ranking loaded once, before any rank plans, and handed to every * rank's planner in place of the container's activation profile. */ std::vector expert_profile_; diff --git a/core/engine_bringup.cpp b/core/engine_bringup.cpp index d23cc0cc..3805b070 100644 --- a/core/engine_bringup.cpp +++ b/core/engine_bringup.cpp @@ -482,6 +482,35 @@ int Engine::copy_table(const uint8_t* src, int64_t n, int64_t foff, bool card, v return RAD_OK; } +/* --ngram-placement disk=DIR: the container's [src, src + n) at file offset `foff` read from its own + * file, DIR/ngram-.bin (the table's bytes and nothing else, the id table_share_id's: the + * container's path, size and mtime and the table's place in it). The first start fills it from the + * container through a temporary name and renames it, so a file under the real name is complete; a + * later start checks samples of it against the container. Mapped read-only in place of the + * container's range, which is all the disk gather needs: it finds the file behind the mapping and + * reads it directly (libavx avx_ngram.cpp, table_file). */ +int Engine::table_file_map(const uint8_t* src, int64_t n, int64_t foff, void** out, + std::string* why) { + const auto t0 = std::chrono::steady_clock::now(); + const std::string id = table_share_id(file_->path(), foff, n); + if (id.empty()) { + *why = fmt("the container %s cannot be stat'ed, which names the table's file", file_->path()); + return RAD_E_IO; + } + const std::string& dir = cfg_.ngram_disk_dir; + const std::string path = dir + (dir.back() == '/' ? "" : "/") + "ngram-" + id + ".bin"; + TableCopy c; + bool filled = false; + const int rc = table_file_open(*file_, src, n, foff, path, &c, &filled, why); + if (rc != RAD_OK) return rc; + table_files_.push_back(c); + RAD_INFO("placement: n-gram table read from %s (%s%s, %.1f s)", path.c_str(), humanb(n).c_str(), + filled ? ", filled from the container" : "", + std::chrono::duration(std::chrono::steady_clock::now() - t0).count()); + *out = c.base; + return RAD_OK; +} + /* When --ngram-placement auto chose a pinned copy for a card and it could not be made, move the * gather to the host. Every rank's n-gram weights take the host site, in both the WeightInfo * Ctx::init reads and the plan, so the gather and its scale move together; a copy already @@ -3056,6 +3085,26 @@ int Engine::load_weights() { "rows are read from the container%s", into, why.c_str(), card ? " by the host gather" : "")); } + /* --ngram-placement disk=DIR: the table's own file instead of the container. */ + if (cfg_.ngram_resolved == TablePlacement::Disk && !cfg_.ngram_disk_dir.empty() && + is_ngram_table(r->program, (rad_weight)i) && n >= kTableShareMin) { + void* m = nullptr; + for (size_t k = 0; k < table_files_.size() && !m; ++k) + if (table_file_src_[k] == w.host_ptr) m = table_files_[k].base; + std::string why; + if (!m) { + const int fs = table_file_map((const uint8_t*)w.ptr, n, (int64_t)p0.offset, + &m, &why); + if (fs != RAD_OK) { + RAD_ERR("--ngram-placement disk=%s: '%s': %s", + cfg_.ngram_disk_dir.c_str(), w.name.c_str(), why.c_str()); + return fs; + } + table_file_src_.push_back(w.host_ptr); + } + w.ptr = m; + w.host_ptr = m; + } /* No readahead on a mapped weight: a host kernel gathers a few rows from a table * too large to be resident, so the default 128 KiB readahead would read 32 pages * for a row of a few hundred bytes. MADV_RANDOM is per range, so the rest of the @@ -3913,10 +3962,15 @@ int Engine::start() { }, &r->ctx)); if (r->fstager.enabled() && r->index == 0) - RAD_INFO("file stager: %zu routed layers hold experts read from the container; each " - "pass reads a layer's (up to %s) into one of two VRAM buffers before its " - "first expert op, so every step is paced by the drive", - r->fstager.n_layers(), humanb(r->plan.file_layer_max).c_str()); + RAD_INFO("file stager: it covers %zu routed layers (a pool-cached unit of one may " + "be read from the container); each pass reads a layer's (up to %s) into one " + "of two VRAM buffers before its first expert op, so every step is paced by the drive%s", + r->fstager.n_layers(), humanb(r->plan.file_layer_max).c_str(), + r->fstager.whole_rows() > 0 + ? fmt("; a pass of %lld tokens or more reads its layers whole, each " + "while the card computes the one before", + (long long)r->fstager.whole_rows()).c_str() + : ""); if (r->stager.enabled() && r->fstager.enabled()) { r->stagers.set(&r->stager, &r->fstager); r->ctx.set_stager(&r->stagers); diff --git a/core/format/table_copy.cpp b/core/format/table_copy.cpp index 727fbde1..b6e37033 100644 --- a/core/format/table_copy.cpp +++ b/core/format/table_copy.cpp @@ -3,7 +3,10 @@ #include "../rad_internal.h" +#include #include +#include +#include #include #include @@ -91,6 +94,69 @@ int table_copy_make(const RadFile& file, const uint8_t* src, int64_t n, int64_t return RAD_OK; } +int table_file_open(const RadFile& file, const uint8_t* src, int64_t n, int64_t foff, + const std::string& path, TableCopy* out, bool* filled, std::string* why) { + if (!out || !filled || !why || !src || n <= 0 || path.empty()) return RAD_E_INVAL; + *out = TableCopy{}; + *filled = false; + struct stat st; + if (::stat(path.c_str(), &st) != 0 || st.st_size != n) { + const std::string tmp = path + ".part"; + const int fd = ::open(tmp.c_str(), O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0644); + if (fd < 0) { + *why = fmt("creating %s: %s", tmp.c_str(), std::strerror(errno)); + return RAD_E_IO; + } + void* m = MAP_FAILED; + if (::ftruncate(fd, (off_t)n) == 0) + m = ::mmap(nullptr, (size_t)n, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (m == MAP_FAILED) { + *why = fmt("sizing %s to %s: %s", tmp.c_str(), humanb(n).c_str(), std::strerror(errno)); + ::close(fd); + ::unlink(tmp.c_str()); + return RAD_E_IO; + } + int rc = table_copy_fill(file, src, n, foff, static_cast(m), why); + if (rc == RAD_OK && (::msync(m, (size_t)n, MS_SYNC) != 0 || ::fsync(fd) != 0)) { + *why = fmt("writing %s: %s", tmp.c_str(), std::strerror(errno)); + rc = RAD_E_IO; + } + ::munmap(m, (size_t)n); + ::close(fd); + if (rc == RAD_OK && ::rename(tmp.c_str(), path.c_str()) != 0) { + *why = fmt("renaming %s: %s", tmp.c_str(), std::strerror(errno)); + rc = RAD_E_IO; + } + if (rc != RAD_OK) { + ::unlink(tmp.c_str()); + return rc; + } + *filled = true; + } + const int fd = ::open(path.c_str(), O_RDONLY | O_CLOEXEC); + if (fd < 0) { + *why = fmt("opening %s: %s", path.c_str(), std::strerror(errno)); + return RAD_E_IO; + } + void* m = ::mmap(nullptr, (size_t)n, PROT_READ, MAP_SHARED, fd, 0); + ::close(fd); + if (m == MAP_FAILED) { + *why = fmt("mapping %s: %s", path.c_str(), std::strerror(errno)); + return RAD_E_IO; + } + if (!*filled) { + const int rc = table_copy_check(src, n, static_cast(m), why); + if (rc != RAD_OK) { + ::munmap(m, (size_t)n); + *why = fmt("%s does not match the container (%s); remove it and it is filled again", + path.c_str(), why->c_str()); + return rc; + } + } + *out = TableCopy{ m, (size_t)n }; + return RAD_OK; +} + void table_copy_free(TableCopy* c) { if (!c || !c->base) return; ::munlock(c->base, c->bytes); diff --git a/core/format/table_copy.h b/core/format/table_copy.h index ba490a04..6cff6222 100644 --- a/core/format/table_copy.h +++ b/core/format/table_copy.h @@ -37,6 +37,14 @@ int table_copy_fill(const RadFile& file, const uint8_t* src, int64_t n, int64_t * another process filled. */ int table_copy_check(const uint8_t* src, int64_t n, const uint8_t* buf, std::string* why); +/* --ngram-placement disk=DIR: [src, src + n) read from its own file `path` (the table's bytes and + * nothing else), mapped read-only in `out` (`bytes` = n). A missing file, or one of another size, is + * filled from the container under `path`.part and renamed, so a file under `path` is complete + * (`*filled` true); an existing one is checked as table_copy_check checks. The disk gather finds the + * file behind the mapping and reads it directly. Release with munmap(out->base, out->bytes). */ +int table_file_open(const RadFile& file, const uint8_t* src, int64_t n, int64_t foff, + const std::string& path, TableCopy* out, bool* filled, std::string* why); + /* Unlock and unmap; a no-op for a copy never made. */ void table_copy_free(TableCopy* c); diff --git a/core/mem/kvtier.cpp b/core/mem/kvtier.cpp index 3d1face9..1d779948 100644 --- a/core/mem/kvtier.cpp +++ b/core/mem/kvtier.cpp @@ -536,7 +536,10 @@ void IdleTiers::report(const TierJob& job, bool ok, uint64_t now_ns) { static bool chain_extends(const std::vector& shorter, const std::vector& longer) { if (shorter.size() > longer.size()) return false; - for (size_t i = 0; i < shorter.size(); ++i) if (shorter[i] != longer[i]) return false; + /* Hashes are chained, so the last block decides; it is compared first, and a chain that + * diverges anywhere rejects in one compare. */ + if (!shorter.empty() && shorter.back() != longer[shorter.size() - 1]) return false; + for (size_t i = 0; i + 1 < shorter.size(); ++i) if (shorter[i] != longer[i]) return false; return true; } @@ -546,7 +549,7 @@ void IdleTiers::note_session(uint64_t id, const std::vector& chain, i std::lock_guard lk(mu_); /* A session is a leaf of the prefix trie. Each turn arrives under a new request id, so the - * candidates are the sessions sharing this root (a handful at most): + * candidates are the sessions sharing this root (at most kRootSessions): * * - a chain this one extends is no longer a leaf and is absorbed; * - a chain that extends this one means this is not a leaf either (a preempted request @@ -590,6 +593,22 @@ void IdleTiers::note_session(uint64_t id, const std::vector& chain, i s.chain = chain; s.label = std::move(kept_label); at_root.push_back(id); + /* Rows under one root are pruned only when the root block goes, and a prompt every request + * shares (a decision model's instructions) never goes: the list grew by a row a request and + * each insert walked it under the lock the engine threads take (#375: prefill from 9k to + * 2.5k tok/s after 500K requests). Past kRootSessions the least recently used row is + * dropped; a row is bookkeeping, so its blocks stay cached. */ + if (at_root.size() > kRootSessions) { + uint64_t oldest = 0, oldest_ns = ~uint64_t{0}; + for (uint64_t sid : at_root) { + auto it = sessions_.find(sid); + if (it != sessions_.end() && it->second.last_used_ns < oldest_ns) { + oldest_ns = it->second.last_used_ns; + oldest = sid; + } + } + if (oldest) drop_session(oldest); + } } void IdleTiers::drop_session(uint64_t id) { diff --git a/core/mem/kvtier.h b/core/mem/kvtier.h index a42b7530..5bd9b244 100644 --- a/core/mem/kvtier.h +++ b/core/mem/kvtier.h @@ -404,6 +404,9 @@ private: * freed, so ticks do not spin on the queue. */ bool wb_stuck_ = false; std::unordered_map sessions_; + /* Rows kept under one root (sessions sharing a first block); past it the least recently used + * goes (note_session). */ + static constexpr size_t kRootSessions = 1024; /* Sessions by first block. A chain is reachable only from position zero, so once its first * block goes (forget(), or a drop here via drop_rooted) its rows go too; this keeps the table * bounded. Sessions sharing a system prompt share a root, hence a list. */ diff --git a/core/mm/media.cpp b/core/mm/media.cpp index 17559449..40c021a3 100644 --- a/core/mm/media.cpp +++ b/core/mm/media.cpp @@ -702,21 +702,41 @@ int decode_audio(const uint8_t* data, size_t n, int32_t rate, int64_t max_sample return RAD_OK; } +namespace { + +/* The H.264 encoder the round trip uses: libx264, the reference's, else libopenh264 (the published + * image carries libopenh264 and no libx264). Not any H.264 encoder: the hardware ones need a device + * context this path does not set up. */ +const AVCodec* h264_encoder() { + for (const char* name : { "libx264", "libopenh264" }) + if (const AVCodec* c = avcodec_find_encoder_by_name(name)) return c; + return nullptr; +} + +} /* namespace */ + bool h264_roundtrip_available() { - return avcodec_find_encoder_by_name("libx264") && avcodec_find_decoder(AV_CODEC_ID_H264); + return h264_encoder() && avcodec_find_decoder(AV_CODEC_ID_H264); } /* PyAV's single-frame round trip: VideoFrame.from_ndarray(rgb24).reformat("yuv420p") (plain * SWS_BILINEAR, BT.601 coefficients, limited-range output), libx264 with the given crf, then the - * decoded frame's to_ndarray("rgb24"), which to_rgb reproduces. */ + * decoded frame's to_ndarray("rgb24"), which to_rgb reproduces. Without libx264, libopenh264 takes + * the frame at a quantiser held at the crf, about the compression libx264's crf gives a single intra + * frame, so the first frame is close to the reference's but not exact. libopenh264 takes no side + * under 16, so a smaller picture is encoded with its last row and column repeated out to 16 and + * the decoded frame cut back. */ int h264_roundtrip(const Frame& in, int32_t crf, Frame* out, std::string* why) { std::string w; if (!why) why = &w; const int W = in.w & ~1, H = in.h & ~1; if (W <= 0 || H <= 0) { *why = "the picture is smaller than 2x2"; return RAD_E_INVAL; } - const AVCodec* enc = avcodec_find_encoder_by_name("libx264"); + const AVCodec* enc = h264_encoder(); const AVCodec* dcd = avcodec_find_decoder(AV_CODEC_ID_H264); - if (!enc || !dcd) { *why = "this libavcodec has no libx264 encoder or H.264 decoder"; return RAD_E_UNSUPPORTED; } + if (!enc) { *why = "this libavcodec has no H.264 encoder"; return RAD_E_UNSUPPORTED; } + if (!dcd) { *why = "this libavcodec has no H.264 decoder"; return RAD_E_UNSUPPORTED; } + const bool x264 = !std::strcmp(enc->name, "libx264"); + const int EW = x264 ? W : std::max(W, 16), EH = x264 ? H : std::max(H, 16); AVCodecContext* ec = avcodec_alloc_context3(enc); AVCodecContext* dc = avcodec_alloc_context3(dcd); AVFrame* yuv = av_frame_alloc(); @@ -733,8 +753,8 @@ int h264_roundtrip(const Frame& in, int32_t crf, Frame* out, std::string* why) { *why = "out of memory"; st = RAD_E_NOMEM; } else { - ec->width = W; - ec->height = H; + ec->width = EW; + ec->height = EH; ec->pix_fmt = AV_PIX_FMT_YUV420P; ec->time_base = AVRational{ 1, 1 }; ec->framerate = AVRational{ 1, 1 }; @@ -742,19 +762,26 @@ int h264_roundtrip(const Frame& in, int32_t crf, Frame* out, std::string* why) { * that many slices, which shapes the bitstream. */ ec->thread_count = 0; ec->thread_type = FF_THREAD_SLICE; - av_opt_set(ec->priv_data, "preset", "veryfast", 0); - av_opt_set(ec->priv_data, "crf", std::to_string(crf).c_str(), 0); + if (x264) { + av_opt_set(ec->priv_data, "preset", "veryfast", 0); + av_opt_set(ec->priv_data, "crf", std::to_string(crf).c_str(), 0); + } else { + /* libopenh264's rate control held between qmin and qmax: its "off" mode encodes at the + * layer quantiser FFmpeg leaves at the library's default and ignores both. */ + ec->qmin = ec->qmax = std::clamp(crf, 1, 51); + av_opt_set(ec->priv_data, "rc_mode", "quality", 0); + } int e = avcodec_open2(ec, enc, nullptr); - if (e < 0) fail("opening libx264", e); + if (e < 0) fail(x264 ? "opening libx264" : "opening the H.264 encoder", e); if (st == RAD_OK && (e = avcodec_open2(dc, dcd, nullptr)) < 0) fail("opening the H.264 decoder", e); if (st == RAD_OK) { yuv->format = AV_PIX_FMT_YUV420P; - yuv->width = W; - yuv->height = H; + yuv->width = EW; + yuv->height = EH; if ((e = av_frame_get_buffer(yuv, 0)) < 0) fail("allocating a frame", e); } if (st == RAD_OK) { - sws = sws_getContext(W, H, AV_PIX_FMT_RGB24, W, H, AV_PIX_FMT_YUV420P, SWS_BILINEAR, + sws = sws_getContext(EW, EH, AV_PIX_FMT_RGB24, EW, EH, AV_PIX_FMT_YUV420P, SWS_BILINEAR, nullptr, nullptr, nullptr); if (!sws) fail("no RGB to yuv420p conversion", 0); } @@ -765,14 +792,17 @@ int h264_roundtrip(const Frame& in, int32_t crf, Frame* out, std::string* why) { if (!rgb) fail("out of memory", AVERROR(ENOMEM)); else { rgb->format = AV_PIX_FMT_RGB24; - rgb->width = W; - rgb->height = H; + rgb->width = EW; + rgb->height = EH; if ((e = av_frame_get_buffer(rgb, 0)) < 0) fail("allocating a frame", e); else { - for (int y = 0; y < H; ++y) - std::memcpy(rgb->data[0] + (ptrdiff_t)y * rgb->linesize[0], - in.rgb.data() + (size_t)y * in.w * 3, (size_t)W * 3); - if (sws_scale(sws, rgb->data, rgb->linesize, 0, H, yuv->data, yuv->linesize) != H) + for (int y = 0; y < EH; ++y) { + uint8_t* row = rgb->data[0] + (ptrdiff_t)y * rgb->linesize[0]; + std::memcpy(row, in.rgb.data() + (size_t)std::min(y, H - 1) * in.w * 3, + (size_t)W * 3); + for (int x = W; x < EW; ++x) std::memcpy(row + x * 3, row + (W - 1) * 3, 3); + } + if (sws_scale(sws, rgb->data, rgb->linesize, 0, EH, yuv->data, yuv->linesize) != EH) fail("colour conversion failed", 0); } av_frame_free(&rgb); @@ -795,6 +825,19 @@ int h264_roundtrip(const Frame& in, int32_t crf, Frame* out, std::string* why) { st = to_rgb(dec, &back, out, why); sws_freeContext(back); got = st == RAD_OK; + if (got && (out->w != W || out->h != H)) { + if (out->w < W || out->h < H) { + fail("the round trip decoded to a smaller frame", 0); + got = false; + } else { + for (int y = 0; y < H; ++y) + std::memmove(out->rgb.data() + (size_t)y * W * 3, + out->rgb.data() + (size_t)y * out->w * 3, (size_t)W * 3); + out->rgb.resize((size_t)W * H * 3); + out->w = W; + out->h = H; + } + } } av_frame_unref(dec); } diff --git a/core/mm/media.h b/core/mm/media.h index 2a3adf06..61f83d35 100644 --- a/core/mm/media.h +++ b/core/mm/media.h @@ -90,9 +90,9 @@ int decode_audio(const uint8_t* data, size_t n, int32_t rate, int64_t max_sample /* `in` encoded as a one-frame H.264 stream at constant quality `crf` (libx264, preset veryfast, * yuv420p) and decoded back, as a video model's reference pipeline does to a conditioning * picture so it carries the compression of the footage the model was trained on. An odd width - * or height loses its last column or row first. Needs libx264. */ + * or height loses its last column or row first. Needs an H.264 encoder: libx264, else libopenh264. */ int h264_roundtrip(const Frame& in, int32_t crf, Frame* out, std::string* why); -/* Whether this build can run h264_roundtrip: its libavcodec has libx264. */ +/* Whether this build can run h264_roundtrip: its libavcodec has an H.264 encoder and decoder. */ bool h264_roundtrip_available(); } /* namespace mm */ diff --git a/core/place/mover.cpp b/core/place/mover.cpp index 5b5e634d..23ff49f2 100644 --- a/core/place/mover.cpp +++ b/core/place/mover.cpp @@ -334,6 +334,22 @@ int Mover::init(const Program& prog, const Plan& plan, const MoverConfig& cfg, P std::memset(calm_, 0, 8 << 20); } + /* ---- the file tier's cache cycle (stage_file_units) ------------------------------------- + * + * The stager covers the plan's file-tier units from the start; it may cover more + * (cover_file_units). Each layer's file-tier bytes start as the plan's, which the plan sized + * the stager's buffers for. */ + file_ok_.assign(plan.units.size(), 0); + layer_file_.assign((size_t)std::max(n_layers_, 1), 0); + file_cap_ = file_buf_bytes_; + for (size_t u = 0; u < plan.units.size(); ++u) { + const MoveUnit& mu = plan.units[u]; + if (mu.tier != Tier::SSD || mu.access != RAD_ACCESS_CONDITIONAL) continue; + file_ok_[u] = 1; + if (mu.layer >= 0) layer_file_[(size_t)mu.layer] += align_up(mu.bytes, RAD_ALIGN_UNIT); + } + victims_.assign(plan.classes.size(), VictimRank{}); + /* ---- streams, events, move records ------------------------------------------------------ */ RAD_TRY(rad_stream_create(&mover_, /*high_priority=*/0)); /* Every event here is local: they order the mover's queue against this card's compute queue @@ -664,18 +680,6 @@ int64_t Mover::stage_need(const std::vector& units, int64_t* largest) c /* ---- a routed layer read from the container (see mover.h) ---------------------------------- */ namespace { -/* One weight's bytes: where they are in the container and where they go. */ -struct FileExt { - int64_t foff = 0, bytes = 0; - char* dst = nullptr; - /* Into a hot-cache slot rather than the layer buffer: counted as - * ssd_promoted_bytes, and the copy leaves the unit resident. */ - bool hot = false; - /* Into a host pool slot rather than the layer buffer: counted as - * ssd_deposit_bytes, and the copy leaves the unit resident in RAM. */ - bool deposit = false; -}; - /* The largest gap a run reads through instead of starting another pread. A routed layer's * weights sit together in the container, each on RAD_ALIGN_UNIT, so a gap between two file-tier * weights is either alignment padding (cheaper to read than a second pread) or units on another @@ -685,36 +689,125 @@ constexpr int64_t kReadThrough = (int64_t)256 << 10; } /* namespace */ +bool Mover::on_file_tier(const std::vector& units) const { + for (int32_t u : units) { + if (u < 0 || (size_t)u >= unit_.size()) continue; + const UnitState& us = unit_[(size_t)u]; + if (us.tier == Tier::SSD && us.slab_slot < 0 && us.klass >= 0) return true; + } + return false; +} + +bool Mover::routes_any(const std::vector& units, const int32_t* ecnt, + int32_t n_expert) const { + if (!plan_ || !ecnt) return !units.empty(); + for (int32_t u : units) { + if (u < 0 || (size_t)u >= plan_->units.size()) continue; + const int32_t e = plan_->units[(size_t)u].expert; + if (e < 0 || e >= n_expert || ecnt[e] != 0) return true; + } + return false; +} + +void Mover::cover_file_units(const std::vector& more) { + /* A unit whose container bytes are not its kernel's layout cannot be read back. */ + for (int32_t u : more) + if (u >= 0 && (size_t)u < file_ok_.size() && plan_->units[(size_t)u].file_direct) + file_ok_[(size_t)u] = 1; +} + +/* A full pool's relabel victim for a deposit of class `klass`: its coldest pooled unit that the + * file stager reads back (Mover::file_ok_), with nothing in flight, outside the `protect` layers, + * and whose layer's file-tier part still fits the stager's buffer with it. -1 when none, or when + * that unit is not colder than `below` (the unit being read): trading a pooled unit for a colder + * one would only make the next step read the warmer one from the drive. + * + * The protected layers are the one being read and any whose ops are about to be issued: a + * relabelled unit's weights are published at the zero region at once, so taking one of theirs + * would hand the next GEMM zeros for a routed expert. Every other layer is safe: one already + * issued this pass read the pool slot, which the quarantine keeps until those kernels are done, + * and a later one is read back by its own trigger, since the stager covers the unit. The + * routing counts protect nothing here: they are the counts of the layer being read, and indexing + * them by another layer's expert number protected a random set while a whole-layer read (no + * counts) protected nothing at all. + * + * The cap keeps every read of a layer within the stager's buffer: the plan sized it for the + * largest layer's file-tier part, and a relabel adds to its victim's. */ +int32_t Mover::pick_victim(int32_t klass, const int32_t* protect, int n_protect, float below) { + if (klass < 0 || (size_t)klass >= victims_.size() || !heat_) return -1; + VictimRank& vr = victims_[(size_t)klass]; + if (vr.at != dispatch_) { + vr.at = dispatch_; + vr.by_heat.clear(); + for (int32_t v = 0; v < (int32_t)unit_.size(); ++v) { + const UnitState& vs = unit_[(size_t)v]; + if (vs.klass != klass || vs.tier != Tier::HostPinned || vs.pool_slot < 0 || + vs.slab_slot >= 0 || !file_ok_[(size_t)v]) + continue; + vr.by_heat.push_back({ heat_->heat(v), v }); + } + /* Hottest first; on equal heat the higher unit first, so the back is the coldest and, + * among equally cold ones, the lowest: the unit a scan keeping its first strict minimum + * would pick. */ + std::sort(vr.by_heat.begin(), vr.by_heat.end(), + [](const std::pair& a, const std::pair& b) { + return a.first != b.first ? a.first > b.first : a.second > b.second; + }); + } + for (size_t k = vr.by_heat.size(); k-- > 0;) { + const int32_t v = vr.by_heat[k].second; + if (v < 0) continue; + const UnitState& vs = unit_[(size_t)v]; + /* Within a dispatch a unit leaves the pool only by a relabel, so one that is not there any + * more is gone for the rest of it. A copy in flight or a protected layer only waits. */ + if (vs.klass != klass || vs.tier != Tier::HostPinned || vs.pool_slot < 0 || + vs.slab_slot >= 0) { + vr.by_heat[k].second = -1; + continue; + } + if (copying_[(size_t)v]) continue; + const int32_t layer = plan_->units[(size_t)v].layer; + bool held = layer < 0 || (size_t)layer >= layer_file_.size(); + for (int p = 0; p < n_protect && !held; ++p) held = protect[p] >= 0 && protect[p] == layer; + if (held) continue; + if (layer_file_[(size_t)layer] + align_up(vs.bytes, RAD_ALIGN_UNIT) > file_cap_) continue; + /* Every candidate further in is at least as warm. */ + if (!(vr.by_heat[k].first < below)) return -1; + vr.by_heat[k].second = -1; + while (!vr.by_heat.empty() && vr.by_heat.back().second < 0) vr.by_heat.pop_back(); + return v; + } + return -1; +} + int Mover::stage_file_units(const std::vector& units, char* dst, int64_t cap, - RadEvent after, RadEvent done, std::vector* staged, - std::vector* skipped, const int32_t* ecnt, - int32_t n_expert, std::vector* promoted) { - if (!plan_ || !dst || !staged || !done) return RAD_E_INVAL; - staged->clear(); - if (skipped) skipped->clear(); - if (promoted) promoted->clear(); + RadEvent after, RadEvent done, FileRead* rd, const int32_t* ecnt, + int32_t n_expert, const int32_t* protect, int n_protect) { + if (!plan_ || !dst || !rd || !done) return RAD_E_INVAL; if (!file_.ok() || !windows_ || n_windows_ <= 0) return RAD_E_STATE; - /* The layout in `dst`, unit by unit in the order given, and every weight's extent. */ - std::vector ext; - std::vector at; - std::vector pbases; /* hot-cache units' slot bases, in promoted order */ - int64_t off = 0, hot_bytes = 0; + /* The layout in `dst`, unit by unit in the order given after what earlier calls for the + * layer packed, and every weight's extent. */ + fext_.clear(); + fat_.clear(); + fbase_.clear(); + frec_.clear(); + const size_t staged0 = rd->staged.size(), skipped0 = rd->skipped.size(), + promoted0 = rd->promoted.size(); + const int64_t used0 = rd->used; + int64_t off = rd->used, hot_bytes = 0; for (int32_t u : units) { if (u < 0 || (size_t)u >= unit_.size()) return RAD_E_INVAL; UnitState& us = unit_[(size_t)u]; if (us.tier != Tier::SSD || us.slab_slot >= 0 || us.klass < 0) continue; - /* Routing-aware reads: the layer's router has run by the time the stager triggers - * (the trigger is the layer's first expert op), so `ecnt` holds this pass's counts. - * An expert counted zero has no sorted rows, so no GEMM run names it and nothing - * reads its weights: leave its bytes on the drive. The dummy publication below - * keeps every table entry valid for the pass. */ - if (ecnt && skipped) { - const MoveUnit& mu = plan_->units[(size_t)u]; - if (mu.expert >= 0 && mu.expert < n_expert && ecnt[mu.expert] == 0) { - skipped->push_back(u); - continue; - } + const MoveUnit& mu = plan_->units[(size_t)u]; + /* Routing-aware reads: `ecnt` holds the counts of the rows about to run, taken at the + * layer's trigger behind its router. An expert counted zero has no sorted rows, so no + * GEMM run names it and nothing reads its weights: leave its bytes on the drive. The + * dummy publication below keeps every table entry valid for the pass. */ + if (ecnt && mu.expert >= 0 && mu.expert < n_expert && ecnt[mu.expert] == 0) { + rd->skipped.push_back(u); + continue; } /* The hot VRAM cache: heat past the admission bar and a free * budgeted slot, and this pass's read lands in the slot and stays there. The read is @@ -722,7 +815,7 @@ int Mover::stage_file_units(const std::vector& units, char* dst, int64_ * bookkeeping (the container is ground truth), so a mistake costs one future * re-read. No free slot, no heat, or no move record: the buffer path below, as * before. */ - if (promoted && plan_->dynamic && heat_ && heat_->admit_hot(u) && !unit_in_flight(u)) { + if (plan_->dynamic && heat_ && heat_->admit_hot(u) && !unit_in_flight(u)) { ClassPools& cp = pools_[(size_t)us.klass]; const int rec = free_move_record(); int64_t slot = -1; @@ -730,7 +823,6 @@ int Mover::stage_file_units(const std::vector& units, char* dst, int64_ else slot = cp.slab.take_where([&](int64_t s) { return s < cp.n_fixed; }); if (slot >= 0 && record_gate() < 0) { cp.slab.add_free(slot); slot = -1; } if (slot >= 0) { - const MoveUnit& mu = plan_->units[(size_t)u]; char* const base = cp.slot_ptr(slot); Move& m = moves_[(size_t)rec]; m.state = Move::State::Copying; @@ -746,74 +838,58 @@ int Mover::stage_file_units(const std::vector& units, char* dst, int64_ for (size_t k = 0; k < mu.weights.size(); ++k) { const WeightInfo& w = prog_->weights[mu.weights[k]]; if (w.stored_bytes <= 0) continue; /* nothing to read, nothing to place */ - ext.push_back(FileExt{ (int64_t)w.file_offset, w.stored_bytes, - base + mu.offset[k], true }); + fext_.push_back(FileExt{ (int64_t)w.file_offset, w.stored_bytes, + base + mu.offset[k], true, false }); } - promoted->push_back(u); - pbases.push_back(base); + rd->promoted.push_back(u); + fbase_.push_back(base); + frec_.push_back((int32_t)rec); hot_bytes += us.bytes; continue; } } - /* A free pool slot and this read deposits the unit into the pool -- the O_DIRECT - * read's destination IS the slot, and the unit becomes a pool unit: the GEMM reads it + /* A free pool slot and this read deposits the unit into the pool: its window's copy list + * carries it into the slot, and the unit becomes a pool unit -- the GEMM reads it * zero-copy this step, heat promotes it at PCIe speed, and its demotion is a copyless - * drop. The pool is ALL cache: no free slot and the coldest idle pool unit -- native - * or deposited, the container is ground truth for both -- relabels back to the file - * tier, copyless. Its slot feeds a future deposit after the - * coldest idle pool unit -- native or deposited, the container is ground truth for both -- - * relabels back to the file tier, copyless. Its slot feeds a future deposit after the - * quarantine; this read takes the buffer path. */ - if (promoted && plan_->dynamic && heat_ && !unit_in_flight(u)) { + * drop. The pool is all cache: with no free slot, its coldest unit the stager covers is + * relabelled back to the file tier, copyless (the container holds every unit's bytes), + * provided it is colder than this one (pick_victim). The slot it gives up feeds a later + * deposit after the quarantine; this read takes the buffer path. */ + if (plan_->dynamic && heat_ && !unit_in_flight(u)) { ClassPools& cp = pools_[(size_t)us.klass]; const int rec = free_move_record(); int64_t g = -1; if (rec < 0) ++stats_.no_record; else if (record_gate() >= 0) g = cp.pool.take(); - if (g < 0 && heat_) { - /* The pool is full. Eviction is a copyless relabel: the - * container holds every unit's bytes, so the victim loses nothing but its slot -- - * it becomes a file-tier unit whose next read deposits again. The victim is the - * coldest idle unit of the class, however it got there: the cache adapts to the - * workload, not to where a unit started. The freed slot feeds a future deposit - * after the quarantine; this read takes the buffer path. */ - int32_t victim = -1; - float best = 0; - for (int32_t v = 0; v < (int32_t)unit_.size(); ++v) { - UnitState& vs = unit_[(size_t)v]; - if (vs.klass != us.klass || - vs.tier != Tier::HostPinned || vs.pool_slot < 0 || - vs.slab_slot >= 0 || copying_[(size_t)v] || unit_in_flight(v)) - continue; - const MoveUnit& mv = plan_->units[(size_t)v]; - if (mv.expert >= 0 && mv.expert < n_expert && ecnt && ecnt[mv.expert] > 0) - continue; /* routed this pass: still wanted */ - const float h = heat_->heat(v); - if (victim < 0 || h < best) { victim = v; best = h; } - } + if (g < 0 && rec >= 0) { + /* The deposit's own record is still free (nothing uses it this read), so the + * relabel may take the same one. */ + const int r2 = free_move_record(); + const int32_t victim = + r2 >= 0 ? pick_victim(us.klass, protect, n_protect, heat_->heat(u)) : -1; if (victim >= 0) { - const int r2 = free_move_record(); - if (r2 >= 0) { - UnitState& vs = unit_[(size_t)victim]; - const MoveUnit& mv = plan_->units[(size_t)victim]; - Move& m2 = moves_[(size_t)r2]; - m2.state = Move::State::Published; /* nothing to copy: the drive has it */ - m2.kind = Move::Kind::Evict; - m2.unit = victim; - m2.slab_slot = -1; - m2.pool_slot = vs.pool_slot; - for (size_t k = 0; k < mv.weights.size(); ++k) - res_.publish(mv.weights[k], calm_); - vs.tier = Tier::SSD; - vs.site = Site::DeviceStaged; - vs.pool_slot = -1; - heat_->set_tier(victim, Tier::SSD); - ++stats_.pool_evictions; - } + UnitState& vs = unit_[(size_t)victim]; + const MoveUnit& mv = plan_->units[(size_t)victim]; + Move& m2 = moves_[(size_t)r2]; + m2.state = Move::State::Published; /* nothing to copy: the drive has it */ + m2.kind = Move::Kind::Evict; + m2.unit = victim; + m2.slab_slot = -1; + m2.pool_slot = vs.pool_slot; + for (size_t k = 0; k < mv.weights.size(); ++k) + res_.publish(mv.weights[k], calm_); + vs.tier = Tier::SSD; + vs.site = Site::DeviceStaged; + vs.pool_slot = -1; + layer_file_[(size_t)mv.layer] += align_up(vs.bytes, RAD_ALIGN_UNIT); + heat_->set_tier(victim, Tier::SSD); + /* No pool slot to promote from until a read deposits it again, which makes + * it movable once more; its layer's trigger reads it meanwhile. */ + heat_->set_movable(victim, false); + ++stats_.pool_evictions; } } if (g >= 0) { - const MoveUnit& mu = plan_->units[(size_t)u]; Move& m = moves_[(size_t)rec]; m.state = Move::State::Copying; m.kind = Move::Kind::Deposit; @@ -824,20 +900,23 @@ int Mover::stage_file_units(const std::vector& units, char* dst, int64_ us.pool_slot = g; us.tier = Tier::HostPinned; us.site = Site::DeviceZeroCopy; + if (mu.layer >= 0 && (size_t)mu.layer < layer_file_.size()) + layer_file_[(size_t)mu.layer] -= align_up(us.bytes, RAD_ALIGN_UNIT); heat_->set_tier(u, Tier::HostPinned); heat_->set_movable(u, true); /* the slot makes it a PCIe-speed promotion candidate */ heat_->set_busy(u, true); ++stats_.ssd_deposits; + char* const slot = (char*)cp.pool_base + g * cp.stride; for (size_t k = 0; k < mu.weights.size(); ++k) { const WeightInfo& w = prog_->weights[mu.weights[k]]; if (w.stored_bytes <= 0) continue; /* nothing to read, nothing to place */ - ext.push_back(FileExt{ (int64_t)w.file_offset, w.stored_bytes, - (char*)cp.pool_base + g * cp.stride + mu.offset[k], - false, true }); + fext_.push_back(FileExt{ (int64_t)w.file_offset, w.stored_bytes, + slot + mu.offset[k], false, true }); } for (size_t k = 0; k < mu.weights.size(); ++k) res_.publish(mu.weights[k], (char*)cp.pool_dev + g * cp.stride + mu.offset[k]); + frec_.push_back((int32_t)rec); continue; } } @@ -847,42 +926,58 @@ int Mover::stage_file_units(const std::vector& units, char* dst, int64_ "the plan sized for the largest one", humanb(cap).c_str()); return RAD_E_SCRATCH; } - const MoveUnit& mu = plan_->units[(size_t)u]; for (size_t k = 0; k < mu.weights.size(); ++k) { const WeightInfo& w = prog_->weights[mu.weights[k]]; if (w.stored_bytes <= 0) continue; /* nothing to read, and nothing to place */ - ext.push_back(FileExt{ (int64_t)w.file_offset, w.stored_bytes, dst + off + mu.offset[k] }); + fext_.push_back(FileExt{ (int64_t)w.file_offset, w.stored_bytes, + dst + off + mu.offset[k], false, false }); } - staged->push_back(u); - at.push_back(off); + rd->staged.push_back(u); + fat_.push_back(off); off += need; } - /* Skipped units' table entries must not name their stale addresses either: point them - * into the layer buffer, whose base is a valid allocation no zero-count expert reads - * through (a dead row would read row 0 of a real expert's region and discard it). The - * caller nulls them again with the staged units. Published even when EVERY unit of the - * layer was skipped -- a decode step can route nothing to a layer -- because the kernels - * still issue the layer's table and a null entry fails the step. */ - if (skipped) { - for (int32_t u : *skipped) { - const MoveUnit& mu = plan_->units[(size_t)u]; - for (size_t j = 0; j < mu.weights.size(); ++j) - res_.publish(mu.weights[j], calm_); - stats_.ssd_skipped_bytes += (uint64_t)unit_[(size_t)u].bytes; - } - stats_.ssd_skipped_units += (uint64_t)skipped->size(); + rd->used = off; + + /* Publish before the reads: nothing resolves these addresses until the caller's layer op, + * which waits on `done` first. Skipped units' entries must not name stale addresses either: + * they point at the zero region, which no zero-count expert reads through (a dead row reads + * zeros and discards them). Published even when EVERY unit of the layer was skipped -- a + * decode step can route nothing to a layer -- because the kernels still issue the layer's + * table and a null entry fails the step. The caller nulls them again with the staged units. + * Hot-cache units publish at their slots and stay published: nothing unstages them, and + * retire() finishes their admission when the copies land. */ + for (size_t k = skipped0; k < rd->skipped.size(); ++k) { + const int32_t u = rd->skipped[k]; + const MoveUnit& mu = plan_->units[(size_t)u]; + for (size_t j = 0; j < mu.weights.size(); ++j) res_.publish(mu.weights[j], calm_); + stats_.ssd_skipped_bytes += (uint64_t)unit_[(size_t)u].bytes; } - if (ext.empty()) return RAD_OK; + stats_.ssd_skipped_units += (uint64_t)(rd->skipped.size() - skipped0); + for (size_t k = staged0; k < rd->staged.size(); ++k) { + const int32_t u = rd->staged[k]; + const MoveUnit& mu = plan_->units[(size_t)u]; + for (size_t j = 0; j < mu.weights.size(); ++j) + res_.publish(mu.weights[j], dst + fat_[k - staged0] + mu.offset[j]); + stats_.ssd_read_bytes += (uint64_t)unit_[(size_t)u].bytes; + } + for (size_t k = promoted0; k < rd->promoted.size(); ++k) { + const int32_t u = rd->promoted[k]; + const MoveUnit& mu = plan_->units[(size_t)u]; + for (size_t j = 0; j < mu.weights.size(); ++j) + res_.publish(mu.weights[j], fbase_[k - promoted0] + mu.offset[j]); + stats_.ssd_read_bytes += (uint64_t)unit_[(size_t)u].bytes; + } + if (fext_.empty()) return RAD_OK; /* Container order, so a window is one long run of the drive rather than a seek per weight. */ - std::stable_sort(ext.begin(), ext.end(), + std::stable_sort(fext_.begin(), fext_.end(), [](const FileExt& a, const FileExt& b) { return a.foff < b.foff; }); /* The dashboard's SSD panel and /stats ssd_reads read these: the file tier's container * reads are the expert SSD traffic the metric names. The scheduled prefetch path counted * its own link reads here; the file stager's were invisible, so the panels showed zero * however much the drive streamed. */ - stats_.ssd_reads += (uint64_t)ext.size(); - for (const FileExt& e : ext) { + stats_.ssd_reads += (uint64_t)fext_.size(); + for (const FileExt& e : fext_) { stats_.ssd_bytes += (uint64_t)e.bytes; /* The copies below move the same bytes from the windows to their destination, which * crosses the link either way: into the layer buffer when the unit is discarded at the @@ -902,8 +997,8 @@ int Mover::stage_file_units(const std::vector& units, char* dst, int64_ std::vector segs; std::vector cps; size_t i = 0; - int64_t piece = 0; /* bytes of ext[i] already placed */ - while (i < ext.size()) { + int64_t piece = 0; /* bytes of fext_[i] already placed */ + while (i < fext_.size()) { const int w = win_next_; win_next_ = (win_next_ + 1) % n_windows_; char* win = windows_ + (int64_t)w * W; @@ -921,8 +1016,8 @@ int Mover::stage_file_units(const std::vector& units, char* dst, int64_ * cannot finish across this window and the next. */ segs.clear(); cps.clear(); - while (i < ext.size()) { - const FileExt& e = ext[i]; + while (i < fext_.size()) { + const FileExt& e = fext_[i]; const int64_t fo = e.foff + piece, left = e.bytes - piece; int64_t wo; if (!segs.empty() && fo >= segs.back().fs && fo <= segs.back().fe + kReadThrough) { @@ -958,26 +1053,14 @@ int Mover::stage_file_units(const std::vector& units, char* dst, int64_ win_rec_[(size_t)w] = 1; } RAD_TRY(rad_event_record(done, mover_)); + /* The hot-cache admissions and deposits are copies like the staged units': their records + * land behind them, so retire() finishes a move when its bytes are in its slot. */ + for (int32_t rec : frec_) RAD_TRY(rad_event_record(moves_[(size_t)rec].ev, mover_)); + rd->copied = true; - for (size_t k = 0; k < staged->size(); ++k) { - const int32_t u = (*staged)[k]; - const MoveUnit& mu = plan_->units[(size_t)u]; - for (size_t j = 0; j < mu.weights.size(); ++j) - res_.publish(mu.weights[j], dst + at[k] + mu.offset[j]); - stats_.ssd_read_bytes += (uint64_t)unit_[(size_t)u].bytes; - } - /* Hot-cache units publish at their slots and stay published: nothing unstages them, and - * retire() finishes their admission when the copies land. */ - for (size_t k = 0; k < pbases.size(); ++k) { - const int32_t u = (*promoted)[k]; - const MoveUnit& mu = plan_->units[(size_t)u]; - for (size_t j = 0; j < mu.weights.size(); ++j) - res_.publish(mu.weights[j], pbases[k] + mu.offset[j]); - stats_.ssd_read_bytes += (uint64_t)unit_[(size_t)u].bytes; - } ++stats_.ssd_layers; - stats_.ssd_units += (uint64_t)(staged->size() + pbases.size()); - stats_.h2d_bytes += (uint64_t)(off + hot_bytes); + stats_.ssd_units += (uint64_t)((rd->staged.size() - staged0) + (rd->promoted.size() - promoted0)); + stats_.h2d_bytes += (uint64_t)(off - used0 + hot_bytes); return RAD_OK; } @@ -1809,6 +1892,7 @@ int Mover::retire(HeatEngine* heat) { break; case Move::Kind::Release: case Move::Kind::Drop: + case Move::Kind::Evict: /* published at issue, never Copying */ break; } /* Safe without synchronisation: both copies of the bytes are valid now (see diff --git a/core/place/mover.h b/core/place/mover.h index 9b32c84b..ea2f7df7 100644 --- a/core/place/mover.h +++ b/core/place/mover.h @@ -366,8 +366,9 @@ struct MoverStats { uint64_t ssd_layers = 0, ssd_units = 0, ssd_read_bytes = 0, ssd_preads = 0; uint64_t ssd_read_ns = 0, ssd_wait_ns = 0; /* Routing-aware reads: units of experts whose routing count was zero at the layer's - * trigger, not read (their weights are re-published to the layer buffer as a dummy - * address for the pass, and nulled again with the staged units). */ + * trigger, not read (their weights are published at the zero region for the pass, and + * nulled again with the staged units). Counted per read: a later slice of the layer's rows + * that reads some of them counts the rest again. */ uint64_t ssd_skipped_units = 0, ssd_skipped_bytes = 0; }; @@ -604,28 +605,58 @@ public: * and published there; afterwards unstage_units publishes them as null again. The plan * charges the two buffers to the weights pool (Plan::file_stage_vram). * - * stage_file_units reads every file-tier unit of `units` into `dst`, packed at RAD_ALIGN_UNIT - * in the order given, through the pinned read windows: container-order - * runs, each window draining to `dst` on the mover's stream while the next - * fills, behind `after` (if set), with `done` recorded last. Published - * settled. RAD_E_SCRATCH if the units exceed `cap`. The reads block this - * thread. + * stage_file_units reads the file-tier units of `units` into `dst`, packed at RAD_ALIGN_UNIT + * in the order given from `rd->used` on, through the pinned read windows: + * container-order runs, each window drained to its destinations by one + * copy list on the mover's stream while the next fills, behind `after` (if + * set), with `done` recorded last. Published settled, so the compute + * stream must wait on `done` before an op reads any of them; `rd->copied` + * says whether there is anything to wait for (a hot-cache admission or a + * pool deposit is a copy like a staged unit's). RAD_E_SCRATCH if the units + * exceed `cap`. The reads block this thread. Appends to `rd`, so a second + * call for another slice of the layer's rows adds what the first left out. + * + * Routing-aware reads: with `ecnt` (host, `n_expert` entries, the layer's per-expert routing + * counts for the rows about to run), a unit whose expert is counted zero is not read: it goes + * to `rd->skipped`, its weights are published at the zero region (valid memory a no-run + * expert never reads through), and the caller nulls it again with the staged units. Null + * `ecnt` reads every file-tier unit given. + * + * A read that finds the pool full relabels its coldest unit back to the file tier (see the + * definition). Units of the `protect` layers (plan layer numbers; the one being read and any + * whose ops are about to be issued) are never taken, whatever their counts. * - * Routing-aware reads: with `ecnt` (host, `n_expert` entries, the layer's per-expert - * routing counts for the current pass), a unit whose expert is counted zero is not read: - * it goes to `skipped`, its weights are published at `dst` (a dummy address inside the - * layer buffer, valid memory a no-run expert never reads through), and the caller nulls - * it again with the staged units. Null `ecnt` reads the whole layer. * file_buffer buffer 0 or 1 of the plan's two, or null when the plan has none. */ + struct FileRead { + std::vector staged; /* read into the layer buffer; nulled at release */ + std::vector skipped; /* counted zero; published at the zero region */ + std::vector promoted; /* read into hot-cache slots; they keep that address */ + int64_t used = 0; /* bytes of the buffer the staged units take */ + bool copied = false; /* `done` is behind copies an op will read */ + void clear() { + staged.clear(); skipped.clear(); promoted.clear(); + used = 0; + copied = false; + } + }; int stage_file_units(const std::vector& units, char* dst, int64_t cap, - RadEvent after, RadEvent done, std::vector* staged, - std::vector* skipped = nullptr, + RadEvent after, RadEvent done, FileRead* rd, const int32_t* ecnt = nullptr, int32_t n_expert = 0, - std::vector* promoted = nullptr); + const int32_t* protect = nullptr, int n_protect = 0); char* file_buffer(int i) const { return (file_vram_ && (i == 0 || i == 1)) ? file_vram_ + i * file_buf_bytes_ : nullptr; } int64_t file_buffer_bytes() const { return file_vram_ ? file_buf_bytes_ : 0; } + /* Whether any of `units` is on the file tier now (no slab slot, no pool slot): a layer with + * none has nothing to read, and its trigger skips the read and the drain it would cost. */ + bool on_file_tier(const std::vector& units) const; + /* Whether `ecnt` (as stage_file_units takes it) routes any of `units`. */ + bool routes_any(const std::vector& units, const int32_t* ecnt, int32_t n_expert) const; + /* The units the file stager reads back when they are on the file tier: every routed unit the + * plan put there, plus `more` (pooled and resident ones it also covers). Only a covered unit + * may be relabelled back to the file tier to make room for a deposit, since nothing else + * would ever read it again. Called once, at the stager's bring-up. */ + void cover_file_units(const std::vector& more); /* A snapshot by value: the counters are atomics read while the rank thread writes them. */ MoverStats stats() const { return stats_.snapshot(); } @@ -779,6 +810,34 @@ private: int win_next_ = 0; std::vector win_ev_; std::vector win_rec_; + /* stage_file_units' working lists, kept so a read allocates nothing once warm. A FileExt is + * one weight's bytes: where they are in the container and where they go -- the layer + * buffer, a hot-cache slot (`hot`, counted as ssd_promoted_bytes) or a pool slot + * (`deposit`, counted as ssd_deposit_bytes). */ + struct FileExt { + int64_t foff = 0, bytes = 0; + char* dst = nullptr; + bool hot = false; + bool deposit = false; + }; + std::vector fext_; + std::vector fat_; /* the staged units' buffer offsets */ + std::vector fbase_; /* the hot-cache units' slot bases */ + std::vector frec_; /* move records whose copies this read issues */ + /* The file tier's cache cycle. `file_ok_`: by unit, the file stager reads it back when it is + * on the file tier (cover_file_units). `layer_file_`: by plan layer, the bytes of its units + * that are on the file tier or in the hot VRAM cache (which hands them back to the file tier + * when evicted), at the stager's packing; a relabel keeps it within `file_cap_`, the stager's + * buffer, so any read of a layer fits. */ + std::vector file_ok_; + std::vector layer_file_; + int64_t file_cap_ = 0; + /* A full pool's relabel candidates per class, ranked once per dispatch like donors_: every + * covered pooled unit, hottest first, so the coldest is at the back. Heat does not change + * within a dispatch, so this picks what a scan of every unit at each read would. */ + struct VictimRank { int at = -1; std::vector> by_heat; }; + std::vector victims_; + int32_t pick_victim(int32_t klass, const int32_t* protect, int n_protect, float below); /* The lead gate's ring: one event a dispatch, and a host wait on the one from * max_lead_dispatches ago. */ diff --git a/core/place/stager.cpp b/core/place/stager.cpp index 20bccff2..aa3e50e7 100644 --- a/core/place/stager.cpp +++ b/core/place/stager.cpp @@ -380,7 +380,7 @@ int FileStager::init(const Program& prog, const Plan& plan, Mover* mover, if (!mover) return RAD_OK; /* Routing-aware reads. The source may still decline per layer (a layer that has not - * reported this pass is read whole). */ + * reported yet is read whole). */ routes_ = routes; routes_ud_ = routes_ud; scratch_ = nullptr; @@ -391,12 +391,38 @@ int FileStager::init(const Program& prog, const Plan& plan, Mover* mover, RAD_MEM_HOST_PINNED); if (!scratch_) { scratch_n_ = 0; routes_ = nullptr; } } + /* A pass's rows each route n_expert_used of the model's n_expert experts, so a pass of + * kWholeRows * n_expert / n_expert_used rows routes kWholeRows to an expert on average, on + * every rank: an expert-parallel rank holds fewer experts and gets their share of the rows. */ + whole_rows_ = routes_ && prog.meta.n_expert_used > 0 + ? (kWholeRows * prog.meta.n_expert + prog.meta.n_expert_used - 1) / + prog.meta.n_expert_used + : 0; + whole_ = false; - /* A unit declared and never read has no op span and is left out. */ - size_t c = 0; - layers_ = routed_layers(plan, [](const MoveUnit& mu) { + /* The plan's file-tier units, and under a dynamic plan every movable routed unit of a class + * that has some: a deposit can relabel those to the file tier (see stager.h, "which units"). + * A unit declared and never read has no op span and is left out. */ + auto on_file = [](const MoveUnit& mu) { return mu.tier == Tier::SSD && mu.access == RAD_ACCESS_CONDITIONAL; - }, &c); + }; + std::vector file_class(plan.classes.size(), 0); + for (const MoveUnit& mu : plan.units) + if (on_file(mu) && mu.slab_class >= 0 && (size_t)mu.slab_class < file_class.size()) + file_class[(size_t)mu.slab_class] = 1; + auto may_be = [&](const MoveUnit& mu) { + return on_file(mu) || + (plan.dynamic && mu.access == RAD_ACCESS_CONDITIONAL && mu.movable && + mu.expert >= 0 && mu.slab_class >= 0 && (size_t)mu.slab_class < file_class.size() && + file_class[(size_t)mu.slab_class]); + }; + size_t c = 0; + layers_ = routed_layers(plan, may_be, &c); + bool wide = !layers_.empty(); + if (c > 0) { + wide = false; + layers_ = routed_layers(plan, on_file, &c); + } if (layers_.empty()) return RAD_OK; /* A layer's copies stay published until the next one starts, so interleaved layers would need * a third buffer for the read-ahead; with no fallback address, such a plan is refused. */ @@ -423,6 +449,13 @@ int FileStager::init(const Program& prog, const Plan& plan, Mover* mover, if ((size_t)layers_[i].first_op < first_of_.size()) first_of_[(size_t)layers_[i].first_op] = (int32_t)i; mover_ = mover; + if (wide) { + std::vector more; + for (const Layer& L : layers_) + for (int32_t u : L.units) + if (!on_file(plan.units[(size_t)u])) more.push_back(u); + mover_->cover_file_units(more); + } for (int b = 0; b < 2; ++b) if (rad_event_create_local(&done_[b]) < 0 || rad_event_create_local(&free_[b]) < 0) { layers_.clear(); @@ -441,6 +474,7 @@ bool FileStager::begin_pass(const RadBatch* b) { first_op_ = true; pass_kind_ = b->draft_pass; last_issued_ = -1; + whole_ = whole_rows_ > 0 && b->n_tok >= whole_rows_; return true; } @@ -449,46 +483,101 @@ bool FileStager::will_issue(int32_t li) const { return it == pass_last_.end() || layers_[(size_t)li].first_op <= it->second; } -int FileStager::start(int32_t li, RadStream s) { +bool FileStager::counted(int32_t li) const { + if (!routes_ || whole_) return false; + int64_t n = 0; + const int32_t* dev = routes_(routes_ud_, layers_[(size_t)li].layer, &n); + return dev && n > 0 && n <= scratch_n_; +} + +/* Called only at the layer's trigger or a repeat of it, so the router of the rows about to run + * has been issued on `s` ahead of the copy. The drain costs far less than the read it decides. */ +int FileStager::counts(int32_t li, RadStream s, const int32_t** ecnt, int32_t* n_expert) { + *ecnt = nullptr; + *n_expert = 0; + if (!routes_) return RAD_OK; + int64_t n = 0; + const int32_t* dev = routes_(routes_ud_, layers_[(size_t)li].layer, &n); + if (!dev || n <= 0 || n > scratch_n_) return RAD_OK; + RAD_TRY(rad_memcpy_async(scratch_, dev, (size_t)n * sizeof(int32_t), s)); + RAD_TRY(rad_stream_sync(s)); + *ecnt = scratch_; + *n_expert = (int32_t)n; + return RAD_OK; +} + +/* Read layer `li` into its buffer: with this pass's counts when the source has them (only at the + * layer's trigger), whole otherwise. A layer with nothing on the file tier now is not held. */ +int FileStager::start(int32_t li, RadStream s, bool* resync) { const int b = li & 1; if (holds_[b] >= 0) return RAD_E_STATE; /* released before the next read, by construction */ - /* Routing-aware reads: the trigger (this call) runs at the layer's first expert op, - * after the layer's router on the same stream, so this pass's counts are ordered - * before the copy. The stream sync costs far less than a gigabyte-scale layer read; - * a source that declines (no report yet this pass) reads the whole layer. */ + const Layer& L = layers_[(size_t)li]; + if (!mover_->on_file_tier(L.units)) return RAD_OK; const int32_t* ecnt = nullptr; int32_t n_expert = 0; - if (routes_) { - int64_t n = 0; - const int32_t* dev = routes_(routes_ud_, layers_[(size_t)li].layer, &n); - if (dev && n > 0 && n <= scratch_n_ && - rad_memcpy_async(scratch_, dev, (size_t)n * sizeof(int32_t), s) >= 0 && - rad_stream_sync(s) >= 0) { - ecnt = scratch_; - n_expert = (int32_t)n; - } - } - const int rc = mover_->stage_file_units(layers_[(size_t)li].units, buf_[b], cap_, - free_rec_[b] ? free_[b] : nullptr, done_[b], - &staged_[b], &skipped_[b], ecnt, n_expert, - &promoted_[b]); - if (rc < 0) return rc; - if (!staged_[b].empty() || !promoted_[b].empty()) holds_[b] = li; + if (counted(li)) RAD_TRY(counts(li, s, &ecnt, &n_expert)); + /* The layer read, the one held in the other buffer, and the one whose ops are being issued + * (cur_: it may hold nothing on the file tier, and so be held by neither): their pooled units + * must keep their addresses. */ + const int32_t protect[3] = { L.layer, holds_[b ^ 1] >= 0 ? layers_[(size_t)holds_[b ^ 1]].layer + : -1, + cur_ >= 0 ? layers_[(size_t)cur_].layer : -1 }; + rd_[b].clear(); + holds_[b] = li; + *resync = true; + RAD_TRY(mover_->stage_file_units(L.units, buf_[b], cap_, free_rec_[b] ? free_[b] : nullptr, + done_[b], &rd_[b], ecnt, n_expert, protect, 3)); + pending_[b] = rd_[b].copied; + return RAD_OK; +} + +/* Another slice of the current layer's rows: its router has rewritten the counts, and an expert + * the earlier slices did not route is read now. The buffer is the layer's, and the new units are + * packed after the ones already there, so nothing is waited on before the copies. */ +int FileStager::top_up(int32_t li, RadStream s, bool* resync) { + const int b = li & 1; + if (holds_[b] != li || rd_[b].skipped.empty()) return RAD_OK; + const int32_t* ecnt = nullptr; + int32_t n_expert = 0; + RAD_TRY(counts(li, s, &ecnt, &n_expert)); + /* The earlier slices were read with counts, so the source has them; were it to decline, + * everything left is read. A slice that routes nothing new changes nothing. */ + if (!mover_->routes_any(rd_[b].skipped, ecnt, n_expert)) return RAD_OK; + again_.swap(rd_[b].skipped); + rd_[b].skipped.clear(); + rd_[b].copied = false; + const int32_t protect[3] = { layers_[(size_t)li].layer, + holds_[b ^ 1] >= 0 ? layers_[(size_t)holds_[b ^ 1]].layer : -1, + cur_ >= 0 ? layers_[(size_t)cur_].layer : -1 }; + *resync = true; + const int rc = mover_->stage_file_units(again_, buf_[b], cap_, nullptr, done_[b], &rd_[b], + ecnt, n_expert, protect, 3); + again_.clear(); + RAD_TRY(rc); + if (rd_[b].copied) pending_[b] = true; + return wait(b, s); +} + +int FileStager::wait(int32_t b, RadStream s) { + if (!pending_[b]) return RAD_OK; + RAD_TRY(rad_event_wait(s, done_[b])); + pending_[b] = false; + ++waits_; return RAD_OK; } int FileStager::finish(int32_t b, RadStream s) { + /* A read the pass never reached (a read-ahead past where it ended) still deposited into the + * pool or admitted into the hot cache, whose publications outlive it: order the stream behind + * those copies before anything later can read them. */ + RAD_TRY(wait(b, s)); RAD_TRY(rad_event_record(free_[b], s)); free_rec_[b] = true; - mover_->unstage_units(staged_[b]); - staged_[b].clear(); - if (!skipped_[b].empty()) { - mover_->unstage_units(skipped_[b]); /* the dummy publications go to null too */ - skipped_[b].clear(); - } - /* Hot-cache units are NOT unstaged: their publications name their slots, which outlive - * the buffer. The layer's copies into them landed before its ops ran (the done_ wait). */ - promoted_[b].clear(); + mover_->unstage_units(rd_[b].staged); + /* The skipped units' dummy publications go to null too. Hot-cache units are not unstaged: + * their publications name their slots, which outlive the buffer. */ + mover_->unstage_units(rd_[b].skipped); + rd_[b].clear(); holds_[b] = -1; return RAD_OK; } @@ -497,41 +586,34 @@ int FileStager::before_op(rad_op h, RadStream s, bool* resync) { *resync = false; if ((int32_t)h > last_issued_) last_issued_ = (int32_t)h; - /* Read the pass's first routed layer at its first op of any kind. */ + /* Read the pass's first routed layer at its first op of any kind, when it is read whole. */ if (first_op_) { first_op_ = false; const auto it = std::lower_bound(layers_.begin(), layers_.end(), (int32_t)h, [](const Layer& L, int32_t op) { return L.first_op < op; }); if (it != layers_.end()) { const int32_t li = (int32_t)(it - layers_.begin()); - if (will_issue(li)) { - RAD_TRY(start(li, s)); - *resync = true; - } + if (will_issue(li) && !counted(li)) RAD_TRY(start(li, s, resync)); } } if ((size_t)h >= first_of_.size()) return RAD_OK; const int32_t li = first_of_[(size_t)h]; - if (li < 0 || li == cur_) return RAD_OK; + if (li < 0) return RAD_OK; + if (li == cur_) return top_up(li, s, resync); /* Entering layer `li`: the layer before is behind every op issued so far on this stream. */ for (int b = 0; b < 2; ++b) if (holds_[b] >= 0 && holds_[b] != li) { RAD_TRY(finish(b, s)); *resync = true; } - /* A layer the read-ahead skipped (the learned bound said the pass ends before it) is read - * here rather than issued without addresses. */ - if (holds_[li & 1] != li) { - RAD_TRY(start(li, s)); - *resync = true; - } - if (holds_[li & 1] == li) RAD_TRY(rad_event_wait(s, done_[li & 1])); + /* Read here unless read ahead: a counted layer always, a whole one the read-ahead skipped + * (the learned bound said the pass ends before it). */ + if (holds_[li & 1] != li) RAD_TRY(start(li, s, resync)); + RAD_TRY(wait(li & 1, s)); cur_ = li; const int32_t next = li + 1; - if ((size_t)next < layers_.size() && will_issue(next)) { - RAD_TRY(start(next, s)); - *resync = true; - } + if ((size_t)next < layers_.size() && will_issue(next) && !counted(next)) + RAD_TRY(start(next, s, resync)); return RAD_OK; } diff --git a/core/place/stager.h b/core/place/stager.h index e2779258..5d1c21ce 100644 --- a/core/place/stager.h +++ b/core/place/stager.h @@ -214,47 +214,92 @@ private: * GEMM is handed every expert's pointer at issue. So on every pass, decode included, each routed * layer's file-tier units are read into one of the mover's two file buffers before the layer's * first expert op and published there, then published as null when the next routed layer starts. - * The router's picks are not known on the host without a round trip, so the layer's whole - * file-tier part is read; decode is then paced by the drive, which is the trade the flag makes. * - * the pass's first op read the first routed layer the pass issues - * a layer's first op release the layer before (record its buffer free on the stream, publish - * null), wait on this layer's copies, and read the next layer into the - * buffer just released -- its copies queue behind that free event + * ---- which experts ------------------------------------------------------------------------------- + * + * Only the experts the layer's rows route to are read. Their counts are known only once the + * layer's router has run, so a layer is read at its own trigger, its first expert op: the counts + * are copied back behind the router on the same stream (one drain of the stream), and a unit + * counted zero is published at the mover's zero region instead of being read. The read cannot + * start earlier: counts taken before the router are another layer's, or the last pass's, and a + * truly routed expert they count zero would be computed from zeros. The card waits for every + * read either way, so reading at the trigger costs what reading the next layer ahead behind the + * same drain did. + * + * A layer the count source cannot give counts for (the first pass, before any report) is read + * whole, and since that read needs no counts it goes ahead of time as before: at the pass's + * first op for the first routed layer, at a layer's trigger for the next one, into the buffer + * just released. + * + * So is every layer of a pass large enough that its rows route nearly every expert, kWholeRows + * rows an expert on average by the model's expert count and top-k (whole_rows()). An exact read + * takes the same bytes there, and each layer costs the card's work plus the drive's, since the + * card idles behind the drain while the drive reads. A whole read needs no counts, so nothing + * drains the stream, and the drive reads the next layer while the card computes the one before. + * At 64 rows an expert, one routed an eighth as often as the average is left out of about one + * pass in 3000, and read for nothing then. Smaller passes skip enough to pay for the drain: at + * decode nearly every file-tier expert. + * + * the pass's first op read the first routed layer the pass issues, if it is read whole + * a layer's first op release the layer before (record its buffer free on the stream, + * publish null), read this layer unless read ahead, wait on its + * copies, and read the next layer ahead if it is read whole -- its + * copies queue behind the free event of the buffer it takes + * a repeat of that op another slice of rows: read what its counts route that the earlier + * slices' did not, and wait on those copies * the pass's end release whatever is still held * * A layer is released when the next one starts, not at its own last op: a routed block that slices * a large step into passes of `rows` tokens issues its expert ops once per slice, so a release at - * the last op would leave the next slice reading null. Repeats of the current layer's first op do - * nothing. + * the last op would leave the next slice reading null. Each slice routes its own rows, which is + * why a repeat reads again. * - * The read blocks the issuing thread while the card runs what was issued before it. A layer's - * file-tier part is gigabytes against milliseconds of compute, so the step is drive-bound either - * way; a reader thread would gain little and add a second writer of the residency table. + * Every read that issued a copy is waited on, a hot-cache admission's or a pool deposit's as much + * as a staged unit's: all are published settled, so the wait is the only thing between the GEMM + * and the slot's previous bytes. + * + * The read blocks the issuing thread while the card runs what was issued before it; a reader + * thread would gain little and add a second writer of the residency table. * * A layer is read ahead only when the pass will issue it (a bound learned per draft_pass from the - * last pass of that kind), so a trunk pass does not read the MTP head's layer. */ + * last pass of that kind), so a trunk pass does not read the MTP head's layer. + * + * ---- which units ------------------------------------------------------------------------------- + * + * Under a dynamic plan the pool is a cache of the file tier: a deposit may relabel a pooled unit + * back to the file tier (Mover::stage_file_units). A pooled unit the plan put in the pool is then + * on the file tier too, so the stager covers every movable routed unit of a class with file-tier + * units, not only the plan's file-tier ones, and tells the mover so (Mover::cover_file_units); a + * trigger whose layer has nothing on the file tier skips the read and its drain. Where covering + * them would interleave two layers' spans, only the plan's file-tier units are covered, and the + * mover relabels none of the others. */ class FileStager final : public OpStager { public: ~FileStager() override; - /* Routing-aware reads: the engine binds a source of the layer's per-expert routing - * counts for the current pass (the router reports them to the Ctx before the layer's - * first expert op, which is the stager's trigger). Returns the device pointer of - * `n_expert` i32 counts, or null when the layer has not reported this pass — the - * caller then reads the whole layer. Null `routes` reads whole layers. */ + /* Routing-aware reads: the engine binds a source of a layer's per-expert routing counts + * (Ctx::route_counts_device). It returns the device pointer of `n_expert` i32 counts that the + * layer's router rewrites every pass before the layer's first expert op, which is the + * stager's trigger, or null when it has none (the layer has not reported yet) -- the stager + * then reads the whole layer. Null `routes` reads whole layers. */ using RouteCounts = const int32_t* (*)(void* ud, int32_t layer, int64_t* n_expert); /* Binds the routed layers with file-tier units and the ops that read them, over the mover's * two file buffers. Leaves enabled() false when no routed unit is on the file tier. Refuses a - * plan whose routed layers are read by interleaved ops, since a file-tier unit has no other - * address to fall back on. */ + * plan whose routed file-tier layers are read by interleaved ops, since a file-tier unit has + * no other address to fall back on. */ int init(const Program& prog, const Plan& plan, Mover* mover, RouteCounts routes = nullptr, void* routes_ud = nullptr); bool enabled() const { return !layers_.empty(); } size_t n_layers() const { return layers_.size(); } int64_t buffer_bytes() const { return cap_; } + /* Stream waits on the stager's copies so far, one per read that issued any. Tests read it. */ + int64_t waits() const { return waits_; } + /* The smallest pass, in tokens, whose layers are read whole and ahead (see "which experts"), + * or 0 when every pass is read exactly (no routing source, or the model's top-k unknown). */ + int64_t whole_rows() const { return whole_rows_; } + static constexpr int64_t kWholeRows = 64; bool begin_pass(const RadBatch* b) override; int before_op(rad_op h, RadStream s, bool* resync) override; @@ -262,7 +307,8 @@ public: private: using Layer = StagedLayer; - std::vector layers_; /* the routed layers with file-tier units, in first-op order */ + int64_t waits_ = 0; + std::vector layers_; /* the routed layers the stager covers, in first-op order */ std::vector first_of_; /* by op: the layer whose first op it is, or -1 */ Mover* mover_ = nullptr; @@ -272,16 +318,15 @@ private: void* routes_ud_ = nullptr; int32_t* scratch_ = nullptr; /* pinned, for the trigger's blocking counts copy */ int64_t scratch_n_ = 0; - std::vector skipped_[2]; /* per buffer: units not read, nulled at release */ - /* Per buffer: units the stager read into hot-cache slots. Unlike the - * staged ones they keep their publications when the buffer is released — the slot is - * their address from here on, until heat evicts one. */ - std::vector promoted_[2]; + /* Per buffer: what its layer's reads staged (nulled at release), skipped (likewise) and read + * into hot-cache slots (whose publications outlive the buffer -- the slot is their address + * until heat evicts one). */ + Mover::FileRead rd_[2]; + std::vector again_; /* a repeat's candidates: the layer's skipped units */ RadEvent done_[2] = { nullptr, nullptr }; /* behind a buffer's copies, on the mover stream */ RadEvent free_[2] = { nullptr, nullptr }; /* behind the ops that read a buffer's layer */ bool free_rec_[2] = { false, false }; - std::vector staged_[2]; - int start(int32_t li, RadStream s); + bool pending_[2] = { false, false }; /* copies no stream has waited on yet */ int32_t holds_[2] = { -1, -1 }; /* the layer a buffer holds, or -1 */ int32_t cur_ = -1; /* the layer whose ops are being issued */ @@ -290,9 +335,18 @@ private: int32_t pass_kind_ = 0; int32_t last_issued_ = -1; std::map pass_last_; /* by draft_pass: the last op such a pass issued */ + int64_t whole_rows_ = 0; + bool whole_ = false; /* this pass reads every layer whole (whole_rows) */ bool will_issue(int32_t li) const; - int start(int32_t li); + /* Whether layer `li` is read with counts, at its own trigger; otherwise it is read whole, + * and may be read ahead. */ + bool counted(int32_t li) const; + /* The counts of the rows about to run, copied back behind the router on `s`, or null. */ + int counts(int32_t li, RadStream s, const int32_t** ecnt, int32_t* n_expert); + int start(int32_t li, RadStream s, bool* resync); + int top_up(int32_t li, RadStream s, bool* resync); + int wait(int32_t b, RadStream s); int finish(int32_t b, RadStream s); }; diff --git a/core/rad_core.h b/core/rad_core.h index 2b5079c9..7ffa9dc4 100644 --- a/core/rad_core.h +++ b/core/rad_core.h @@ -905,6 +905,10 @@ struct Config { /* --ngram-placement ram=DIR: the pinned n-gram copy is the file DIR/ngram-.tab (a tmpfs), * mapped shared, so engines on separate cards hold one table. Empty: a private copy. */ std::string ngram_share_dir; + /* --ngram-placement disk=DIR: the table is read from its own file, DIR/ngram-.bin, filled + * from the container at the first start, instead of from the container (a faster drive than + * the model's). Empty: from the container. */ + std::string ngram_disk_dir; TablePlacement embedding_resolved = TablePlacement::Vram; TablePlacement ngram_resolved = TablePlacement::Disk; /* Set by the resolver: pinned host MiB per rank for the token embedding when it resolves to diff --git a/core/runtime/ctx.cpp b/core/runtime/ctx.cpp index fdb324b3..39e36c9c 100644 --- a/core/runtime/ctx.cpp +++ b/core/runtime/ctx.cpp @@ -782,13 +782,30 @@ const int32_t* Ctx::route_counts_device(int layer, int64_t* n_expert) const { if (n_expert) *n_expert = 0; if (layer < 0 || (size_t)layer >= route_.size()) return nullptr; const RouteSlot& s = route_[(size_t)layer]; - /* No step gate: route_report lands at the END of the block's passes (heat consumes it a - * step later), but the reported buffer is the block's own ecnt, whose CONTENT the router - * kernel rewrote this pass -- and the file stager's trigger runs after that router on the - * same stream, so a stream-ordered copy reads this pass's counts. The counts are indexed - * by the rank's local expert slot (the kernel subtracts expert_base), which is also what - * the mover's units carry. */ + /* No step gate: route_report lands at the END of the block's passes, so at the file stager's + * trigger (the layer's first expert op) the pointer is the one the last pass reported. That + * is right only for a buffer whose address is the same in this pass: the block's own counts + * buffer, which its router rewrites every pass -- and the trigger runs after that router on + * the same stream, so a stream-ordered copy reads the counts of the rows about to run. The + * counts are indexed by the rank's local expert slot (the kernel subtracts expert_base), + * which is also what the mover's units carry. */ if (!s.routing.expert_count || s.reported < 0) return nullptr; + /* A transient buffer is at another offset at another arena level, and liveness lets a + * later buffer share its bytes, since no declared op reads the counts (the report is a + * handoff, not an op): the bytes under the last pass's pointer may be anything. A whole read + * is slow but right; counts read there could name a routed expert zero and leave it + * unread. Every architecture here declares the counts RAD_BUF_PERSIST. */ + const char* p = (const char*)s.routing.expert_count; + const char* base = (const char*)arena_.base(); + if (base && program_ && p >= base + program_->arena_fixed_bytes && p < base + arena_.bytes()) { + if (!route_transient_noted_) { + route_transient_noted_ = true; + RAD_WARN("rank %d: layer %d reports its routing counts in a transient buffer, so the " + "file stager reads its routed experts whole; declare the counts " + "RAD_BUF_PERSIST", rank_, layer); + } + return nullptr; + } if (n_expert) *n_expert = s.routing.n_expert ? s.routing.n_expert : route_n_expert_; return s.routing.expert_count; } @@ -961,12 +978,11 @@ uint64_t Ctx::pass_key(const RadBatch* b) const { * issue the scatter only when they have some (and the second attention over a run read both * ways, n_bidi, only on such a pass). */ if (b->enc || b->n_mm_rows > 0 || b->n_bidi > 0) return 0; - /* Legacy architecture plugins have no pass-key callback. Only refuse them when the resolved - * program contains a launcher explicitly marked as using live prefill splits, and this batch - * can issue a prefill, mixed, speculative-verify or draft query through it. */ - if (!arch_pass_key_ && - (b->phase == RAD_PHASE_PREFILL || b->phase == RAD_PHASE_MIXED || b->draft_pass != 0 || - b->n_spec > 0)) { + /* A plugin with no pass-key callback cannot key a launch that splits its KV by the live + * context, so a prefill or mixed pass of a program holding such a launcher is not recorded. + * Its decode, verify and draft passes are: their launches get the keyed context bound in + * place of the live maximum (Ctx::issue_body). */ + if (!arch_pass_key_ && (b->phase == RAD_PHASE_PREFILL || b->phase == RAD_PHASE_MIXED)) { for (const IssuePlan& ip : issue_table_) if (ip.row && ip.row->info && (ip.row->info->capabilities & RAD_KERNEL_CAP_DYNAMIC_PREFILL_SPLIT)) diff --git a/core/runtime/ctx.h b/core/runtime/ctx.h index ee40bc0c..2ec9f8e1 100644 --- a/core/runtime/ctx.h +++ b/core/runtime/ctx.h @@ -332,10 +332,11 @@ public: /* Called by the drain, so the ring knows which banks are still unread. */ void mark_credited(int layer, int bank); const RadRouting* last_routing(int layer) const; - /* The device pointer of `layer`'s expert counts for the current step, with `n_expert` set, - * or null when the layer has not reported this step (a routing-aware file stager then - * reads the layer whole). The pointer is stream-ordered behind the router: a copy on the - * compute stream at the stager's trigger sees this pass's counts. */ + /* The device pointer of the buffer `layer`'s router writes its expert counts to, as the + * layer last reported it, with `n_expert` set; null when the layer has not reported yet, or + * when the buffer is a transient one (a routing-aware file stager then reads the layer + * whole). The router rewrites it every pass before the layer's first expert op, so a copy on + * the compute stream at the stager's trigger sees the counts of the rows about to run. */ const int32_t* route_counts_device(int layer, int64_t* n_expert) const; /* ---------------------------------------------------------- the placement seam */ @@ -778,6 +779,8 @@ private: std::vector route_; int64_t route_n_expert_ = 0; + /* route_counts_device has said once that a layer's counts are a transient buffer. */ + mutable bool route_transient_noted_ = false; /* A bank is one step's histograms for every layer: [kRouteBanks][n_layer][n_expert] in pinned * host memory. A report copies a layer's counts into its row of the card-side * [n_layer][n_expert] (an on-card copy that orders nothing else); the end of the pass copies diff --git a/core/runtime/issue.cpp b/core/runtime/issue.cpp index 3d326762..8d188036 100644 --- a/core/runtime/issue.cpp +++ b/core/runtime/issue.cpp @@ -916,6 +916,16 @@ int Ctx::issue_body(rad_op h, const RadOperand* opd, int n_opd, int64_t n) { * entry per schema operand, the trailing optional ones the issue left out null. */ ip.args.n_t = std::max(n_opd, (int)p.n_opd_schema); ip.args.kv_used_max_h = issue_kv_used_max_h(batch_, t, ip.args.n_t); + /* A plugin with no pass-key callback has its decode, verify and draft passes recorded + * (pass_key), and a played pass keeps the arguments it was recorded with, so a launch there + * must not read a bound the key does not: it gets the step's context bound plus its longest + * query, both keyed, which crosses a bucket every 1024 tokens or more (batch.cpp) instead of + * moving with every token. Its prefill and mixed passes are never recorded and keep the + * exact maximum. */ + if (ip.args.kv_used_max_h > 0 && !arch_pass_key_ && batch_ && + batch_->phase != RAD_PHASE_PREFILL && batch_->phase != RAD_PHASE_MIXED) + ip.args.kv_used_max_h = (int32_t)std::min( + INT32_MAX, (int64_t)batch_->max_ctx_len + batch_->max_q_len); p.issued = true; ++n_issues_; diff --git a/core/sample/sampler.cpp b/core/sample/sampler.cpp index 7facfde5..aad092ae 100644 --- a/core/sample/sampler.cpp +++ b/core/sample/sampler.cpp @@ -119,8 +119,13 @@ static RadOperand opd_none() { static int64_t rows_for(const SamplerConfig& c) { /* One row per sampled position: a verify samples n_spec+1 positions per sequence, each with - * its own RNG coordinate. Sized for the worst step, as the arena is (spec §3.1). */ - return c.max_seqs * (int64_t)(c.max_spec + 1); + * its own RNG coordinate. Sized for the worst step, as the arena is (spec §3.1). A step + * carries at most max_tok tokens and samples at most one row per token, so a deep drafter + * at the default 256 sequences no longer sizes every plane for 256 * (depth + 1) rows; a + * drafter's greedy pass stages one row per drafting sequence, so never below max_seqs. */ + const int64_t want = c.max_seqs * (int64_t)(c.max_spec + 1); + if (c.max_tok <= 0) return want; + return std::min(want, std::max(c.max_tok, c.max_seqs)); } /* ================================================================== declare */ @@ -331,8 +336,9 @@ int Sampler::declare(RadBuilder* b, const SamplerConfig& cfg) { RAD_TRY(stage_alloc()); declared_ = true; - RAD_INFO("sampler: %lld-token vocabulary (%lld this rank), %lld rows, %lld mask words " + RAD_INFO("sampler: %lld-token vocabulary (%lld this rank), %lld rows%s, %lld mask words " "(%s per row)", (long long)cfg_.n_vocab, (long long)nv, (long long)rows, + rows < cfg_.max_seqs * (int64_t)(cfg_.max_spec + 1) ? " (the step's token bound)" : "", (long long)mask_words_, humanb(mask_words_ * 4).c_str()); return RAD_OK; } @@ -1068,13 +1074,11 @@ int Sampler::build_greedy(int64_t n) { any_ngram_wl_ = false; any_couple_ = false; cur_stage_ = greedy_stage_; - /* A drafter's rows run the argmax only, so the n-gram plane is cleared: `run` reads it from - * the staging, and a stale pair from an earlier request's build must not issue the ban over - * history that was not staged this step. The exemption plane needs no clear: `run` uploads - * it only beside an issued ban, every row that runs the ban has its words rewritten in full - * by the build that staged the pair (build_step), and rows below a zeroed pair are skipped - * by the op before they read a word. */ - std::memset(ngram_stage_, 0, (size_t)cap * 2 * sizeof(int32_t)); + /* Nothing a step's build staged is written here: a drafter's pass is built right after the + * step's chain was issued, whose uploads read the pinned staging only when the stream reaches + * them, behind the step's forward. So the n-gram pairs stay as the step staged them and the + * ban is gated on any_ngram_, which this clears; before, the pairs were zeroed here and a + * banning step with drafter passes uploaded the zeros, so the ban never ran on the card. */ if (greedy_ready_) return RAD_OK; for (int64_t i = 0; i < cap; ++i) { DeviceSampleParams& p = greedy_stage_[i]; @@ -1097,27 +1101,32 @@ int Sampler::run(RadCtx* c, rad_buf logits, rad_buf out_tokens) { const RadStream s = rad_stream(c); bool any_mask = false, any_greedy = false, any_chain = false; - bool any_penalty = false, any_dry = false, any_xtc = false, any_ngram = false; + bool any_penalty = false, any_dry = false, any_xtc = false; bool any_topp = false, any_minp = false, any_typ = false, any_temp = false; for (int64_t i = 0; i < n_seq_; ++i) { const DeviceSampleParams& p = cur_stage_[i]; any_mask |= (p.flags & RAD_SP_MASK) != 0; any_penalty |= (p.flags & RAD_SP_PENALTY) != 0; any_dry |= (p.flags & RAD_SP_DRY) != 0; - any_xtc |= (p.flags & RAD_SP_XTC) != 0; - /* The pair plane is read directly, not through cur_stage_: it is per-step staging the - * LAST builder filled (build_step writes a row's pair, build_greedy zeroes every pair), - * so it agrees with cur_stage_ by builder contract. A new builder must keep that - * contract: stage the pair with the params, zero it with the greedy ones. */ - any_ngram |= ngram_stage_[2 * i] > 0; if (p.flags & RAD_SP_GREEDY) any_greedy = true; else { any_chain = true; /* sample_temp leaves a row at temperature <= 0 or exactly 1 as it is */ any_temp |= p.temp > 0.0f && p.temp != 1.0f; - any_topp |= p.top_p < 1.0f; - any_minp |= p.min_p > 0.0f; - any_typ |= p.typical_p < 1.0f; + /* The cuts only remove candidates, and a top-1 row has one: a greedy row over a split + * vocabulary or asking for logprobs, and every row of a drafter's greedy pass. Every + * implementation keeps it (top-p and min-p keep the best, typical keeps a lone + * candidate, XTC needs two above its threshold), so such a row issues none of them; + * nor does a top_p or typical_p outside (0, 1), which every kernel skips. A drafter's + * greedy pass under a split vocabulary, whose rows are zeroed, issued top-p and + * typical every round: two launches with a max and a sum over the candidate width a + * row, for nothing. */ + if (p.top_k != 1) { + any_topp |= p.top_p > 0.0f && p.top_p < 1.0f; + any_minp |= p.min_p > 0.0f; + any_typ |= p.typical_p > 0.0f && p.typical_p < 1.0f; + any_xtc |= (p.flags & RAD_SP_XTC) != 0; + } } } @@ -1129,6 +1138,13 @@ int Sampler::run(RadCtx* c, rad_buf logits, rad_buf out_tokens) { return RAD_E_STATE; } + /* The ban runs only for a build_step build in which some row's staged history holds a whole + * n-gram (any_ngram_; build_greedy clears it). A shorter one bans nothing, however the op is + * implemented, so neither the op nor its planes are issued for it. The pair plane is not + * scanned for a row with a positive n: a drafter's greedy build leaves it as the step staged + * it (see build_greedy). */ + const bool any_ngram = any_ngram_; + /* Async copies on the compute stream, only of what some row reads. The mask is 19 KiB per * constrained sequence at a 151K vocab, which keeps a host-side grammar affordable * (spec §13). */ diff --git a/core/sample/sampler.h b/core/sample/sampler.h index 6cbe555d..682cabb3 100644 --- a/core/sample/sampler.h +++ b/core/sample/sampler.h @@ -106,6 +106,12 @@ struct SamplerConfig { int64_t max_seqs = 0; /* the largest number of sequences one step may carry */ int64_t max_hist = 2048; /* the penalty window bound; a longer request is truncated */ int max_spec = 0; + /* The step's token bound (--max-num-batched-tokens), 0 for none. A step samples one row per + * token it verifies or completes, and the model's logits rows are capped here too + * (rad_arch.h, max_logit_rows), so rows past it could never be staged; the planes are sized + * for min(max_seqs * (max_spec + 1), max(max_tok, max_seqs)). Never below max_seqs: a drafter + * pass stages one greedy row per sequence it drafts for (build_greedy). */ + int64_t max_tok = 0; int rank = 0; int world_size = 1; /* This rank's first vocabulary row. sample_topk adds it to the candidate ids it packs into @@ -218,6 +224,9 @@ public: * meaningful only where the row carries RAD_SP_MASK. */ const uint32_t* staged_mask(int64_t row) const { return mask_stage_ + row * mask_words_; } int64_t mask_words() const { return mask_words_; } + /* Staged row `row`'s n-gram ban pair {n, window}, as the last build_step staged it: a greedy + * build leaves it, since that step's upload may not have read it yet. */ + const int32_t* staged_ngram(int64_t row) const { return ngram_stage_ + 2 * row; } /* Staged row `row`'s bound coupled state, as `run` uploads it: all-zero where the row carries * none (bonus row, greedy row, uncoupled step). Lets a build be checked without a device. */ const RadMtpCoupleState& staged_couple(int64_t row) const { return couple_stage_[row]; } @@ -344,8 +353,9 @@ private: /* Whether any DRY row this step has breakers; only then is the breaker plane uploaded and * passed to sample_dry. */ bool any_brk_ = false; - /* Whether any row this step runs the n-gram ban. Its history is the plane the penalties use, - * so this only decides whether that plane is uploaded and the op issued. */ + /* Whether any row this step runs the n-gram ban over a history at least its n-gram long; a + * shorter one bans nothing. Its history is the plane the penalties use, so this only decides + * whether that plane is uploaded and the op issued. Cleared by build_greedy. */ bool any_ngram_ = false; /* Whether any banned row this step whitelists a column of this rank's shard; only then is * the exemption plane uploaded and passed to sample_ngram_ban. */ diff --git a/core/server/server.cpp b/core/server/server.cpp index a8638215..b83c7816 100644 --- a/core/server/server.cpp +++ b/core/server/server.cpp @@ -666,6 +666,57 @@ static std::vector kept_logprobs(const std::vector& return std::vector(lp.begin(), lp.begin() + (long)lp_before_cut(lp, 0, cut)); } +/* How many trailing bytes of a running choice's text are held back for its stop strings: the + * longest tail that is a proper prefix of one of them (core/text's Detokenizer holds back the + * same in what it has not returned). Every byte before that tail is final. A stop string that + * began there would already be complete in `text`, and pump() would have cut it, or it can no + * longer be completed, since the text only grows at its end. So this holds back exactly what + * pump() may yet cut, for any decoder: one that leaves stop strings to the server (iface.h), and + * core/text's, which cannot see a stop the server's scan can find in the U+FFFD it returned for + * a byte that was not UTF-8. A blanket (longest stop - 1) bytes, which this replaced, delayed + * every delta, the first one included, by up to a 4 KiB stop's worth of text. + * + * Run on every drain of every running choice, so its cost is bounded three ways: + * + * - Only the bytes not yet on the wire (`emitted` on) can be held back, and the tail never + * starts before them: a tail that began earlier would have been a longer one at the drain + * that sent those bytes. So the tails looked at are the ones in what the drain adds to what + * it held back, however long the stop strings are. + * - A tail is compared only where it starts with a byte some stop string starts with. + * - The comparisons share a budget (kStopTailBudget: a stop string looked at costs one, and + * each byte compared one more). A client sets its stop strings (64 of up to 4 KiB) and + * steers the text, and text that keeps almost matching long stop strings would cost a drain + * up to 4095 tails times 64 strings times their length. Past the budget the whole unsent + * window, up to the longest stop less a byte, is held back: more than the tail, never less, + * so nothing of a stop string is sent, and as late as the blanket hold-back this replaced. + * The next drain tries again. */ +constexpr size_t kStopTailBudget = size_t(1) << 14; + +static size_t stop_prefix_tail(std::string_view text, size_t emitted, + const std::vector& stops, size_t maxstop) { + const size_t unsent = text.size() > emitted ? text.size() - emitted : 0; + const size_t limit = std::min(unsent, maxstop > 0 ? maxstop - 1 : 0); + bool starts[256] = {}; + for (const std::string& s : stops) + if (s.size() > 1) starts[(unsigned char)s[0]] = true; + size_t budget = kStopTailBudget; + for (size_t n = limit; n > 0; --n) { + const char* tail = text.data() + text.size() - n; + if (!starts[(unsigned char)*tail]) continue; + for (const std::string& s : stops) { + if (budget == 0) return limit; + --budget; + if (s.size() <= n || s[0] != *tail) continue; + size_t i = 1; /* s[0] is known to match */ + while (i < n && s[i] == tail[i]) ++i; + if (i == n) return n; + if (budget < i) return limit; + budget -= i; + } + } + return 0; +} + bool Server::pump(std::vector& gens, const OaiRequest& r) { bool progress = false; SinkToken buf[128]; @@ -1228,15 +1279,16 @@ HttpResponse Server::streaming_completion(const HttpRequest& req, OaiRequest& r) } } if (g.delta && g.sink->n_produced() > 0) out += g.delta->started(); - /* While the choice runs, hold back the longest stop string minus one byte, or the - * start of a stop sequence would already be on the wire when it is recognised. + /* While the choice runs, hold back a tail that may still become a stop string + * (stop_prefix_tail), or its start would already be on the wire when it is + * recognised. * * Only while running: a closed choice has no more bytes coming, so its whole text is * the answer, including a trailing `\` or partial `\uXXXX` the escape rule would * otherwise hold back. */ size_t safe = g.text.size(); if (!g.closed) { - if (maxstop > 1) safe = safe > maxstop - 1 ? safe - (maxstop - 1) : 0; + if (maxstop > 1) safe -= stop_prefix_tail(g.text, g.emitted, st->r.stop, maxstop); safe = json_stable_prefix(std::string_view(g.text.data(), safe)); if (safe <= g.emitted) continue; } diff --git a/core/server/videos.cpp b/core/server/videos.cpp index 23ffda22..c0e5785d 100644 --- a/core/server/videos.cpp +++ b/core/server/videos.cpp @@ -887,7 +887,8 @@ HttpResponse Server::handle_video_create(const HttpRequest& req) { const int e = mm::h264_roundtrip(f, info.image_crf, &rt, &why); if (e < 0) { ApiError err = err_bad("input_reference", "the picture could not be prepared: " + why); - if (e != RAD_E_INVAL) { err.status = 503; err.type = "server_error"; } + /* A build without an H.264 codec cannot prepare one at all: 501, not a transient 503. */ + if (e != RAD_E_INVAL) { err.status = e == RAD_E_UNSUPPORTED ? 501 : 503; err.type = "server_error"; } return error_response(err, req.peer); } f = std::move(rt); diff --git a/data/recipes/q38-27b-iq2r-l-v4.recipe b/data/recipes/q38-27b-iq2r-l-v4.recipe new file mode 100644 index 00000000..fb1b93d0 --- /dev/null +++ b/data/recipes/q38-27b-iq2r-l-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq2r-l-v4.recipe -- IQ2R-L-V4: Qwen3.8-27B at ~2.797 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (2-bit, 3-bit, 4-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (4.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-4.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq2r-l-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 2.797 bpw, mean KL 0.03602, top-1 93.29% (IQ2R-L-V3: 2.786 bpw, 0.04241). + +blk.0.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u2 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k2.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k3.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq2r-v4.recipe b/data/recipes/q38-27b-iq2r-v4.recipe new file mode 100644 index 00000000..e40d3d22 --- /dev/null +++ b/data/recipes/q38-27b-iq2r-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq2r-v4.recipe -- IQ2R-V4: Qwen3.8-27B at ~2.470 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (2-bit, 3-bit, 4-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (4.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-4.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq2r-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 2.470 bpw, mean KL 0.06113, top-1 91.23% (IQ2R-V3: 2.465 bpw, 0.06807). + +blk.0.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u2 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k2.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k3.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq3r-l-v4.recipe b/data/recipes/q38-27b-iq3r-l-v4.recipe new file mode 100644 index 00000000..309626bd --- /dev/null +++ b/data/recipes/q38-27b-iq3r-l-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq3r-l-v4.recipe -- IQ3R-L-V4: Qwen3.8-27B at ~3.804 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (3-bit, 4-bit, 5-bit, 6-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (4.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-4.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq3r-l-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 3.804 bpw, mean KL 0.00917, top-1 96.61% (IQ3R-L-V3: 3.798 bpw, 0.01129). + +blk.0.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u3 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k3.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k3.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq3r-s-v4.recipe b/data/recipes/q38-27b-iq3r-s-v4.recipe new file mode 100644 index 00000000..b7e08ec8 --- /dev/null +++ b/data/recipes/q38-27b-iq3r-s-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq3r-s-v4.recipe -- IQ3R-S-V4: Qwen3.8-27B at ~3.157 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (2-bit, 3-bit, 4-bit, 5-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (4.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-4.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq3r-s-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 3.157 bpw, mean KL 0.02241, top-1 94.75% (IQ3R-S-V3: 3.145 bpw, 0.02584). + +blk.0.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u2 tcq=15 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.04 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u2 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k2.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k3.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq3r-v4.recipe b/data/recipes/q38-27b-iq3r-v4.recipe new file mode 100644 index 00000000..6de8db27 --- /dev/null +++ b/data/recipes/q38-27b-iq3r-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq3r-v4.recipe -- IQ3R-V4: Qwen3.8-27B at ~3.472 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (3-bit, 4-bit, 5-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (4.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-4.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq3r-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 3.472 bpw, mean KL 0.01495, top-1 95.74% (IQ3R-V3: 3.459 bpw, 0.01698). + +blk.0.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u3 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k3.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k3.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq4r-l-v4.recipe b/data/recipes/q38-27b-iq4r-l-v4.recipe new file mode 100644 index 00000000..cdabe0c0 --- /dev/null +++ b/data/recipes/q38-27b-iq4r-l-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq4r-l-v4.recipe -- IQ4R-L-V4: Qwen3.8-27B at ~4.793 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (4-bit, 5-bit, 6-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (4.5 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-4.5.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq4r-l-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 4.793 bpw, mean KL 0.00297, top-1 98.07% (IQ4R-L-V3: 4.783 bpw, 0.00342). + +blk.0.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.0.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.1.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.2.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.3.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.4.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.5.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.6.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.7.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.16.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.17.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.18.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.19.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.20.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.21.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.22.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.23.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.24.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.25.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.26.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.27.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.28.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.29.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.30.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.31.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.32.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.33.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.34.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.35.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.36.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.37.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.38.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.39.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.40.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.41.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.42.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.43.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.44.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.45.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.46.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.47.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.48.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.49.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.50.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.51.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.52.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.53.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.54.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.55.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u4 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k4.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +output.k7.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.3 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq4r-s-v4.recipe b/data/recipes/q38-27b-iq4r-s-v4.recipe new file mode 100644 index 00000000..a3f4477c --- /dev/null +++ b/data/recipes/q38-27b-iq4r-s-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq4r-s-v4.recipe -- IQ4R-S-V4: Qwen3.8-27B at ~4.142 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (3-bit, 4-bit, 5-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (4.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-4.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq4r-s-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 4.142 bpw, mean KL 0.00643, top-1 97.12% (IQ4R-S-V3: 4.131 bpw, 0.00762). + +blk.0.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.0.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.1.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.2.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.3.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.4.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.5.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.6.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.7.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.24.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.25.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.26.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.27.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.28.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.29.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.30.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.31.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.32.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.33.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.34.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.35.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.36.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.37.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.38.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.39.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.40.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.41.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.42.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.43.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.44.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.45.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.46.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.47.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.48.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.49.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.50.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.51.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.52.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.53.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.54.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.55.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u4 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k4.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k3.weight gptq codes=u3 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.08 damp=0.01 calib=$CALIB tcq_order=1 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq4r-v4.recipe b/data/recipes/q38-27b-iq4r-v4.recipe new file mode 100644 index 00000000..6f64d761 --- /dev/null +++ b/data/recipes/q38-27b-iq4r-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq4r-v4.recipe -- IQ4R-V4: Qwen3.8-27B at ~4.473 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (4-bit, 5-bit, 6-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (4.5 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-4.5.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq4r-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 4.473 bpw, mean KL 0.00444, top-1 97.69% (IQ4R-V3: 4.458 bpw, 0.00512). + +blk.0.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.0.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.1.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.2.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.3.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.4.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.5.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.6.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.7.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.16.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.17.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.18.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.19.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.20.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.21.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.22.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.23.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.24.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.25.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.26.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.27.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.28.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.29.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.30.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.31.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.32.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.33.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.34.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.35.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.36.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.37.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.38.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.39.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.40.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.41.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.42.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.43.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.44.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.45.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.46.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.47.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.48.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.49.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.50.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.51.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.52.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.53.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.54.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.55.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u3 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k3.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +output.k7.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.3 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq5r-s-v4.recipe b/data/recipes/q38-27b-iq5r-s-v4.recipe new file mode 100644 index 00000000..e600eb76 --- /dev/null +++ b/data/recipes/q38-27b-iq5r-s-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq5r-s-v4.recipe -- IQ5R-S-V4: Qwen3.8-27B at ~5.071 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (4-bit, 5-bit, 6-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (5.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-5.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq5r-s-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 5.071 bpw, mean KL 0.00223, top-1 98.33% (IQ5R-S-V3: 5.064 bpw, 0.00249). + +blk.0.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.0.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.1.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.2.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.3.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.4.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.5.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.6.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.7.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.8.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.9.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.10.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.11.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.12.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.13.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.14.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.15.ffn_gate_up.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=1024 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.16.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.17.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.18.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.19.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.20.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.21.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.22.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.23.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.24.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.25.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.26.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.27.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.28.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.29.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.30.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.31.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.32.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.33.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.34.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.35.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.36.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.37.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.38.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.39.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.40.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.41.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.42.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.43.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.44.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.45.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.46.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.47.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.48.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.49.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.50.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.51.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.52.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.53.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.54.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.55.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u5 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k5.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +output.k7.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.3 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq5r-v4.recipe b/data/recipes/q38-27b-iq5r-v4.recipe new file mode 100644 index 00000000..f0549dd7 --- /dev/null +++ b/data/recipes/q38-27b-iq5r-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq5r-v4.recipe -- IQ5R-V4: Qwen3.8-27B at ~5.433 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (5-bit, 6-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (5.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-5.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq5r-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 5.433 bpw, mean KL 0.00154, top-1 98.60% (IQ5R-V3: 5.422 bpw, 0.00182). + +blk.0.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.0.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.1.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.2.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.3.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.4.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.5.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.6.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.7.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.8.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.9.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.10.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.11.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.12.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.13.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.14.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.15.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.16.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.17.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.18.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.19.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.20.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.21.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.22.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.23.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.24.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.25.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.26.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.27.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.28.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.29.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.30.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.31.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.32.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.33.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.34.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.35.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.36.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.37.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.38.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.39.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.40.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.41.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.42.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.43.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.44.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.45.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.46.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.47.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.48.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.49.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.50.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.51.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.52.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.53.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.54.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.55.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight gptq codes=u4 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k4.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +output.k7.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.3 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq6r-l-v4.recipe b/data/recipes/q38-27b-iq6r-l-v4.recipe new file mode 100644 index 00000000..7a02eb4f --- /dev/null +++ b/data/recipes/q38-27b-iq6r-l-v4.recipe @@ -0,0 +1,303 @@ +# q38-27b-iq6r-l-v4.recipe -- IQ6R-L-V4: Qwen3.8-27B at ~6.939 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (6-bit, 7-bit, int8; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is int8, GPTQ'd against the head's input Hessian. +# +# CALIB= rad-convert --recipe data/recipes/q38-27b-iq6r-l-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 6.939 bpw, mean KL 0.00068, top-1 99.08% (IQ6R-L-V3: 6.939 bpw, 0.00072). + +blk.0.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +token_embd.weight rtn codes=u6 zero=u6 group=128 scale=bf16 rule=search +output.weight gptq codes=i8 group=128 scale=bf16 clamp=sym rule=search damp=0.01 calib=$CALIB diff --git a/data/recipes/q38-27b-iq6r-s-v4.recipe b/data/recipes/q38-27b-iq6r-s-v4.recipe new file mode 100644 index 00000000..a1c4c509 --- /dev/null +++ b/data/recipes/q38-27b-iq6r-s-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq6r-s-v4.recipe -- IQ6R-S-V4: Qwen3.8-27B at ~6.063 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (5-bit, 6-bit, int8; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (5.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-5.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq6r-s-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 6.063 bpw, mean KL 0.00100, top-1 98.86% (IQ6R-S-V3: 6.049 bpw, 0.00106). + +blk.0.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.0.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.1.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.2.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.3.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.4.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.5.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.6.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.7.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.8.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.9.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.10.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.11.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.12.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.13.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.14.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.15.ffn_gate_up.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.16.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.17.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.18.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.19.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.20.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.21.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.22.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.23.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.24.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.25.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.26.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.27.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.28.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.29.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.30.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.31.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.32.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.33.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.34.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.35.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.36.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.37.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.38.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.39.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.40.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.41.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.42.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.43.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.44.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.45.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.46.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.47.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.48.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.49.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.50.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.51.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.52.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.53.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.54.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.55.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +token_embd.weight gptq codes=u5 tcq=12 tcq_rows=256 tcq_lut=data/codebooks/iqr-tcq-L12-k5.txt group=128 scale=fp8_e4m3 scale2=f32 block2=*x* transform=fwht128 +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +output.k7.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.3 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq6r-v4.recipe b/data/recipes/q38-27b-iq6r-v4.recipe new file mode 100644 index 00000000..a7bcfd0d --- /dev/null +++ b/data/recipes/q38-27b-iq6r-v4.recipe @@ -0,0 +1,308 @@ +# q38-27b-iq6r-v4.recipe -- IQ6R-V4: Qwen3.8-27B at ~6.439 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (6-bit, 7-bit; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is vocabulary-weighted (5.0 b mean, data/vhead/): its width classes output.k are +# rows of the checkpoint tools/vhead.py builds from the bf16 one; GPTQ reads the head's input Hessian. +# +# python3 tools/vhead.py VHEAD data/vhead/q38-27b-vhead-5.0.cls +# CALIB= rad-convert VHEAD --recipe data/recipes/q38-27b-iq6r-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 6.439 bpw, mean KL 0.00081, top-1 98.96% (IQ6R-V3: 6.372 bpw, 0.00088). + +blk.0.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.0.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.1.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.2.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.3.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.4.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.5.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.6.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.7.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.8.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.9.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.10.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.11.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.12.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.13.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.14.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.15.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.16.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.17.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.18.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.19.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.20.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.21.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.22.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.23.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.24.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.25.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.26.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.27.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.28.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.29.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.30.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 group=128 scale=bf16 dyn=1 transform=fwht128 tcq_gain=1.2 damp=0.01 calib=$CALIB +blk.31.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.33.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.34.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.35.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.36.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.37.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.38.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.39.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.40.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.49.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.50.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.51.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.52.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.53.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.54.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.55.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.56.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.57.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.58.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.59.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.60.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.61.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.62.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.63.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +token_embd.weight rtn codes=u6 zero=u6 group=128 scale=bf16 rule=search +output.k4.weight gptq codes=u4 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.12 damp=0.01 calib=$CALIB tcq_order=1 +output.k5.weight gptq codes=u5 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.16 damp=0.01 calib=$CALIB tcq_order=1 +output.k6.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +output.k7.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.3 damp=0.01 calib=$CALIB tcq_order=1 diff --git a/data/recipes/q38-27b-iq7r-v4.recipe b/data/recipes/q38-27b-iq7r-v4.recipe new file mode 100644 index 00000000..ef64c59c --- /dev/null +++ b/data/recipes/q38-27b-iq7r-v4.recipe @@ -0,0 +1,303 @@ +# q38-27b-iq7r-v4.recipe -- IQ7R-V4: Qwen3.8-27B at ~7.420 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (6-bit, 7-bit, int8; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is int8, GPTQ'd against the head's input Hessian. +# +# CALIB= rad-convert --recipe data/recipes/q38-27b-iq7r-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 7.420 bpw, mean KL 0.00059, top-1 99.15% (IQ7R-V3: 7.420 bpw, 0.00060). + +blk.0.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.0.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.1.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.2.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.3.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.4.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.5.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.6.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.7.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.8.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.9.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.10.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.11.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.12.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.13.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_inz.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ssm_out.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.14.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_qg.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_k.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_v.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.attn_output.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_gate_up.weight gptq codes=u6 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.24 damp=0.01 calib=$CALIB tcq_order=1 +blk.15.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.16.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.17.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.18.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.19.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.20.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.21.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.22.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.23.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.24.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.25.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.26.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.27.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.28.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.29.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_inz.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ssm_out.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.30.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_qg.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_k.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_v.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.attn_output.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.5 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_gate_up.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=512 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.31.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.32.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.32.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.32.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.32.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.33.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.33.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.33.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.33.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.34.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.34.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.34.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.34.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.36.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.36.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.36.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.36.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.37.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.37.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.37.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.37.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.38.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.38.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.38.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.38.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.40.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.40.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.40.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.40.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.41.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.41.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.41.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.41.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.42.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.42.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.42.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.42.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.43.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.44.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.44.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.44.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.44.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.45.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.45.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.45.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.45.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.46.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.46.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.46.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.46.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.47.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.ffn_down.weight gptq codes=u7 tcq=16 tcq_code=mad tcq_rows=256 block=1x* scale=f32 transform=fwht128 tcq_gain=1.30 damp=0.01 calib=$CALIB tcq_order=1 +blk.48.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.48.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.48.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.48.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.49.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.49.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.49.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.49.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.50.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.50.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.50.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.50.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.52.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.52.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.52.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.52.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.53.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.53.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.53.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.53.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.54.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.54.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.54.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.54.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +token_embd.weight rtn codes=u6 zero=u6 group=128 scale=bf16 rule=search +output.weight gptq codes=i8 group=128 scale=bf16 clamp=sym rule=search damp=0.01 calib=$CALIB diff --git a/data/recipes/q38-27b-iq8r-v4.recipe b/data/recipes/q38-27b-iq8r-v4.recipe new file mode 100644 index 00000000..97ed6b59 --- /dev/null +++ b/data/recipes/q38-27b-iq8r-v4.recipe @@ -0,0 +1,303 @@ +# q38-27b-iq8r-v4.recipe -- IQ8R-V4: Qwen3.8-27B at ~8.040 bits a weight. +# IQR-V4: every trunk linear rotated by fwht128 and fitted by GPTQ in act order (tcq_order=1) against the +# calib Hessians, its codes a tail-biting trellis down each column whose 2^16 states' values are computed +# from the state (tcq=16 tcq_code=mad; 2^15 at two bits) under one f32 scale a row, the head-fed projections +# under a bf16 scale a (row, 128) block; widths by layer band and projection from measured prices +# (int8; docs/IQR.md, "IQR-V4"). Served by qwen35_w8a8 at i8a8h with rotated int8 activations. +# The lm_head is int8, GPTQ'd against the head's input Hessian. +# +# CALIB= rad-convert --recipe data/recipes/q38-27b-iq8r-v4.recipe \ +# --set quantization_config.quant_method=w8a8 --set quantization_config.fmt=fwht128 -o OUT.rad +# +# The competition's private tiers 1+2: 8.040 bpw, mean KL 0.00046, top-1 99.22% (IQ8R-V3: 8.040 bpw, 0.00047). + +blk.0.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.0.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.0.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.0.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.1.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.1.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.1.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.1.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.2.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.2.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.2.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.2.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.3.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.3.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.3.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.3.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.3.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.3.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.4.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.4.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.4.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.4.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.5.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.5.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.5.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.5.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.6.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.6.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.6.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.6.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.7.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.7.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.7.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.7.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.7.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.7.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.8.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.8.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.8.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.8.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.9.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.9.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.9.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.9.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.10.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.10.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.10.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.10.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.11.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.11.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.11.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.11.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.11.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.11.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.12.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.12.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.12.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.12.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.13.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.13.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.13.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.13.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.14.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.14.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.14.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.14.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.15.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.15.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.15.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.15.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.15.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.15.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.16.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.16.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.16.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.16.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.17.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.17.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.17.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.17.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.18.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.18.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.18.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.18.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.19.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.19.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.19.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.19.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.19.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.19.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.20.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.20.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.20.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.20.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.21.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.21.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.21.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.21.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.22.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.22.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.22.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.22.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.23.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.23.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.23.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.23.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.23.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.23.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.24.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.24.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.24.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.24.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.25.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.25.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.25.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.25.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.26.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.26.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.26.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.26.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.27.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.27.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.27.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.27.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.27.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.27.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.28.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.28.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.28.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.28.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.29.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.29.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.29.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.29.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.30.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.30.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.30.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.30.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.31.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.31.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.31.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.31.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.31.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.31.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.32.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.32.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.32.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.32.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.33.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.33.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.33.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.33.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.34.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.34.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.34.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.34.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.35.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.36.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.36.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.36.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.36.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.37.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.37.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.37.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.37.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.38.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.38.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.38.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.38.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.39.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.40.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.40.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.40.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.40.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.41.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.41.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.41.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.41.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.42.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.42.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.42.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.42.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.43.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.44.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.44.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.44.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.44.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.45.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.45.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.45.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.45.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.46.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.46.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.46.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.46.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.47.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.48.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.48.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.48.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.48.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.49.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.49.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.49.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.49.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.50.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.50.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.50.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.50.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.51.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.52.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.52.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.52.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.52.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.53.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.53.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.53.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.53.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.54.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.54.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.54.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.54.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.55.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.56.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.57.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.58.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.59.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.60.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.61.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ssm_inz.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ssm_out.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.62.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_qg.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_k.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_v.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.attn_output.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.ffn_gate_up.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +blk.63.ffn_down.weight gptq codes=i8 group=128 scale=bf16 transform=fwht128 clamp=sym rule=search calib=$CALIB +token_embd.weight rtn codes=u6 zero=u6 group=128 scale=bf16 rule=search +output.weight gptq codes=i8 group=128 scale=bf16 clamp=sym rule=search damp=0.01 calib=$CALIB diff --git a/data/vhead/README.md b/data/vhead/README.md new file mode 100644 index 00000000..5cc14662 --- /dev/null +++ b/data/vhead/README.md @@ -0,0 +1,15 @@ +# Vocabulary-weighted lm_head classes + +The width classes of Qwen3.8-27B's vocabulary-weighted lm_head, used by the IQR-V4 recipes +(`data/recipes/q38-27b-*-v4.recipe`) from IQ2R-V4 to IQ6R-V4. `tools/vhead.py` turns the bf16 +checkpoint and one of these files into the checkpoint those recipes convert: + +| file | mean width | widths (rows) | +|---|---|---| +| `q38-27b-vhead-4.0.cls` | 4.0 b | 3 (130560), 4 (31744), 5 (41472), 6 (44544) | +| `q38-27b-vhead-4.5.cls` | 4.5 b | 4 (171008), 5 (43008), 6 (22016), 7 (12288) | +| `q38-27b-vhead-5.0.cls` | 5.0 b | 4 (130560), 5 (33280), 6 (38400), 7 (46080) | + +Each 256-row run of the vocabulary was given the width that minimises its rows' output error +(dW H dW^T against the head's input Hessian) weighted by their tokens' mean probability on +calibration text, at the file's mean width. The format is in `tools/vhead.py`. diff --git a/data/vhead/q38-27b-vhead-4.0.cls b/data/vhead/q38-27b-vhead-4.0.cls new file mode 100644 index 00000000..622967bf Binary files /dev/null and b/data/vhead/q38-27b-vhead-4.0.cls differ diff --git a/data/vhead/q38-27b-vhead-4.5.cls b/data/vhead/q38-27b-vhead-4.5.cls new file mode 100644 index 00000000..e4a30cda Binary files /dev/null and b/data/vhead/q38-27b-vhead-4.5.cls differ diff --git a/data/vhead/q38-27b-vhead-5.0.cls b/data/vhead/q38-27b-vhead-5.0.cls new file mode 100644 index 00000000..04fa6bd5 Binary files /dev/null and b/data/vhead/q38-27b-vhead-5.0.cls differ diff --git a/deploy/compose/qwen3.8-27b-iqr-v4.yaml b/deploy/compose/qwen3.8-27b-iqr-v4.yaml new file mode 100644 index 00000000..2f9ec657 --- /dev/null +++ b/deploy/compose/qwen3.8-27b-iqr-v4.yaml @@ -0,0 +1,13 @@ +# Qwen3.8-27B in IQR-V4 (docs/IQR.md), one size of the ladder from 2.5 to 8 bits a weight, with the +# DFlash2 block-diffusion drafter and the vision tower in the container. IQR_V4 names the size, the +# part of the file name between qwen3.8-27b- and .rad (default iq4r-s-v4, 15 GiB); the speculation +# depth is the drafter's own operating point. +name: radiance-qwen3.8-27b-iqr-v4 +services: + radiance: + extends: { file: common.yaml, service: radiance } + container_name: radiance-qwen3.8-27b-iqr-v4 + command: > + --model /models/qwen3.8-27b-${IQR_V4:-iq4r-s-v4}.rad + --host :: --port ${PORT:-8000} --api-key-env RADIANCE_API_KEY + --tp 2 --max-num-seqs 32 --max-model-len 200000 --kv-cache-dtype fp8 diff --git a/docs/ARCHITECTURES.md b/docs/ARCHITECTURES.md index 360dd8ed..3d95f5cf 100644 --- a/docs/ARCHITECTURES.md +++ b/docs/ARCHITECTURES.md @@ -196,12 +196,10 @@ does not implement these semantics refuses the graph rather than resolving a sim The drafter is declared only at one rank: its `fc` is unsharded and its head scores the full vocabulary, so a `--tp` above 1 is refused at declaration rather than served half-sharded. -The earlier DSpark throughput figures were measured with the approximate window and candidate-pruned -walk; they are not a performance claim for the corrected graph. Run the reproducible runtime QoS -harness below against the corrected BF16 path before publishing new acceptance, latency or -throughput results. This branch's existing W8A8 caller shares the corrected BF16 drafter graph, but -remains a separate release/measurement follow-up to restack after #363. Target verification does -not establish that drafting preserves acceptance rate, latency, or generated text under every +DSpark's acceptance, latency and throughput on this exact graph are not measured yet (figures taken +with an approximate window and a candidate-pruned walk do not carry over); run the QoS harness below +before quoting any. The W8A8 caller shares the bf16 drafter graph. Verification against the target +does not by itself show that drafting keeps acceptance, latency or the generated text under every serving schedule. `scripts/dspark_qos_regression.py` is an unvalidated two-server QoS harness, not evidence that @@ -1567,8 +1565,7 @@ tower and no audio encoder; `rad_block_gemma4_unified.h` holds what replaces the transformers' mask (the window AND (causal OR the same picture)): it bounds the keys behind a row. A run longer than the window (1120 soft tokens against 1024) is read with `attn_paged_ahead`, whose window bounds the keys behind only, so its first rows see the run's far end. Read causally, the 12B answers pictures differently and often wrongly (on DocVQA, "The image does not - provide information" for an answer it reads off the page). `RADIANCE_MEDIA_BIDI=0` keeps every - layer causal. + provide information" for an answer it reads off the page). NVIDIA's DFlash drafter states `dflash_config.causal: false`, with every layer sliding; that flag sets the sliding layers' causality. The recipes are `gemma4-e4b-bf16-df`, `-w8a8-df`, `-w4a8` and diff --git a/docs/DOCKER.md b/docs/DOCKER.md index 00406c84..e5e99fd1 100644 --- a/docs/DOCKER.md +++ b/docs/DOCKER.md @@ -144,6 +144,7 @@ the cards the engine runs on. | `sage-a1.5-mxfp4-df2.yaml` | `sage-a1.5-mxfp4-df2.rad` | The same with the trunk, the experts and the drafter at MXFP4; ten 262,144-token sessions | | `qwen3.8-27b-fp8.yaml` | `qwen3.8-27b-fp8.rad` | Qwen3.8-27B FP8 with its DFlash2 drafter and vision tower | | `qwen3.8-27b-mxfp4.yaml` | `qwen3.8-27b-mxfp4.rad` | Qwen3.8-27B with AMD's Quark AWQ-MXFP4 trunk, its DFlash2 drafter and vision tower | +| `qwen3.8-27b-iqr-v4.yaml` | `qwen3.8-27b-${IQR_V4}.rad` | Qwen3.8-27B in IQR-V4 at the size `IQR_V4` names (default `iq4r-s-v4`), its DFlash2 drafter and vision tower | | `qwen3.8-27b-paro.yaml` | `qwen3.8-27b-paro-int4.rad` | Qwen3.8-27B ParoQuant int4 (learned rotations) with its DFlash2 drafter and vision tower, on one card; the int5 and MXFP4 containers serve from it too | | `qwen3.8-27b-bf16.yaml` | `qwen3.8-27b-bf16.rad` | Qwen3.8-27B in bf16 | | `gemma4-31b-w4a8.yaml` | `gemma4-31b-w4a8.rad` | Gemma 4 31B, int4 trunk with int8 activations, its assistant head as the MTP drafter, vision tower | diff --git a/docs/GUIDE.md b/docs/GUIDE.md index 0b2d7850..0de0ac77 100644 --- a/docs/GUIDE.md +++ b/docs/GUIDE.md @@ -862,15 +862,29 @@ the pinned total is twice the table: set `amdgpu.no_system_mem_limit=1` (the cap and 1.5 GiB) or the second pin can be refused. The kernel charges the tmpfs pages to the memory cgroup of the engine that filled them. +`--ngram-placement disk=DIR` reads the table from its own file, `DIR/ngram-.bin`, instead of from +the container: a table on a faster or separate drive (an Optane beside a model on a large NVMe, or a +model on a hard disk with its table on an SSD) at no host memory. The first start fills the file from +the container (the table's size free in `DIR`, written under `.part` and renamed, so the real name is +always complete); later starts check samples of it against the container and reuse it. The `` is +`ram=DIR`'s, so a file never serves another model; remove the file to have it filled again. Reads go +to it as `disk` reads the container, through the row cache with direct I/O, so `DIR`'s filesystem must +support `O_DIRECT` (tmpfs since Linux 6.6 does, but a tmpfs is what `ram` is for). + **`--weights-disk-tier`** serves a model larger than the card and the host pool together, with every step paced by the drive. A routed expert that fits neither lives only in the container. Before each -routed layer's first expert op, on every pass, the engine reads all that layer's on-disk experts into -one of two VRAM buffers (a router's picks are not known on the host, and a prefill chunk routes to -nearly all of them). The buffers come out of the weight budget (the plan's `file buffers` line), and -the reads go through four 32 MiB pinned windows out of `--host-pool-mib`, as long runs that skip -resident experts. It is meant for running a checkpoint as shipped, to calibrate or compare against. -The bf16 Qwen3.8-Flash-Next (335 GiB) runs on two cards at about 28 s a step, the same at one token as -at 32K, so use large prefill steps: +routed layer's first expert op, on every pass, the engine reads the layer's on-disk experts that its +rows route to into one of two VRAM buffers: the layer's router has run by then, and its counts are +copied back first (one wait on the card per routed layer), so an expert no row routes stays on the +drive. A step whose rows route nearly every expert, 64 rows an expert on average (3277 tokens for +Qwen3.8-Flash-Next's 512 experts at top-10), reads its layers whole instead, each one while the card +computes the one before, with no wait on the card. The buffers come out of the weight budget (the +plan's `file buffers` line), and the reads go through four 32 MiB pinned windows out of +`--host-pool-mib`, as long runs that skip resident experts. Without `--deterministic` the host pool +is also a cache of the drive: an expert read from it is kept in a free pool slot, and a full pool +gives its coldest expert back to the drive for a warmer one. It is meant for running a checkpoint +as shipped, to calibrate or compare against. The bf16 Qwen3.8-Flash-Next (335 GiB) runs on two +cards at about 28 s a 32K-token step, so use large prefill steps: ```sh rad-convert /srv/models/Qwen/Qwen3.8-Flash-Next -o flashnext-bf16.rad --max-ctx 4096 # no recipe: bf16 @@ -2069,7 +2083,7 @@ by 0.002-0.003 nats. | `--kv-resident N` | 0 (off) | stream the sparse attention group's KV from pinned host memory, keeping a ring of N tokens on the card. Raised to 32 768 and to one decode step's selection; a ring that covers the context streams nothing. Ignored with a warning on an architecture that cannot stream (§4.4.1, [KV-STREAMING.md](KV-STREAMING.md)) | | `--host-headroom-mib N` | 4096 | host RAM left free for the system when startup pins host memory — kept for the unpooled allocations, staging and page cache (§4.3). A snapshot store's floor takes back the shortfall from it, down to 1 GiB, rather than come up with none (`--checkpoint-slots`, §4.8) | | `--embedding-placement WHERE` | ram | `ram` or `vram`: the token embedding pinned in host memory beside `--host-pool-mib` and read in place, or on the card (§4.3) | -| `--ngram-placement WHERE` | auto | `auto`, `vram`, `ram` or `disk`: an n-gram table on the card, as a copy in RAM made at load and read by the card, or read from the container (§4.3) | +| `--ngram-placement WHERE` | auto | `auto`, `vram`, `ram` or `disk`: an n-gram table on the card, as a copy in RAM made at load and read by the card, or read from the container (§4.3); `ram=DIR` shares the RAM copy between engines, `disk=DIR` reads the table from its own file in `DIR` | | `--vision-tower-placement WHERE` | vram | `vram` or `ram`: the encoder towers (vision, and audio where a model has one) on the card, or pinned in host memory beside `--host-pool-mib` and read in place once an image (§4.3) | | `--weights-disk-tier` | off | read weights that fit neither VRAM nor the host pool from the container (O_DIRECT); routed experts a layer at a time | @@ -3985,7 +3999,7 @@ is the part of a log to paste into an issue. Its sections: warning is also printed as a `W` line of its own. ``` -I STARTUP REPORT -- radiance 1.16.0 +I STARTUP REPORT -- radiance 1.17.0 I CONFIGURATION -- every option, the value in force, and where it came from I --model /models/flashnext.rad [command line] I --tp 2 [command line] diff --git a/docs/IQR.md b/docs/IQR.md index e5a7327e..aff6ddc4 100644 --- a/docs/IQR.md +++ b/docs/IQR.md @@ -169,3 +169,54 @@ int8 grid both share. The design, the per-weight and GEMM measurements and the comparison with V1 and V2 are in the IQR-V3 technical report (radiance.stilldeadco.de/whitepapers/iqr-v3.pdf). + +## IQR-V4: measured widths, a vocabulary-weighted head and faster kernels + +IQR-V4 keeps V3's computed trellis and its one f32 scale a row, and changes how the bits are spent and +how the GEMMs read them. GPTQ runs in act order inside the column trellis (`tcq_order=1`: the columns +are fitted in descending Hessian diagonal and the codes stored in column order), and the FFN weights' +trellis runs grow to 512 or 1024 rows (`tcq_rows`). The projections the attention heads feed +(`attn_output`, `ssm_out`) take a bf16 scale a (row, 128) block from five bits up (`group=128 +scale=bf16 dyn=1`), where V3's code reached its resolution first. The widths come from measured +prices: each band of eight layers and projection is priced by the KL a width step costs it, measured +at the 2/3-, 3/4- and 4/5-bit boundaries and shrunk halfway to the model's prices, and layer 63's +`ffn_gate_up`, the one tensor whose price is several times its band's, sits one width up (the V4S +entries, to IQ3R-L); from IQ4R-S up the model's prices are as good and are kept (V4W). + +The vocabulary edges carry about a tenth of every entry's bytes. The lm_head's KL weighs each +vocabulary row by its token's probability, so below IQ6R-L the head is vocabulary-weighted: its rows +are four width classes of the computed trellis (`output.k`, a 256-row run a class, chosen by the +row's probability-weighted output error at a 4.0, 4.5 or 5.0 b mean; `data/vhead/`, `tools/vhead.py`), +decoded in one launch by `logits_gemm_vocab` with the head input held at 16 bits and the logits +gathered back into vocabulary order. At 1 to 16 tokens it is faster than the int8 head it replaces. +IQ6R-L-V4 to IQ8R-V4 keep the int8 head, now GPTQ'd against the head's input Hessian, which costs no +bytes and lowers the median KL about 10%. + +The kernels: the one-token GEMV gives each 16-row tile a block whose waves split K, so a GEMM's tiles +finish together instead of trailing off on a few long waves; a 16-token tile without block barriers serves 2 to 16 tokens; and +the activation quantisers after `gate_up`, the delta net's decode fold and the attention gate are folded +into the kernels that produce their input. On Qwen3.8-27B at TP1 IQ4R-S-V4 decodes one stream 4% faster +than the MXFP4 checkpoint at 5x lower KL, and IQ3R-S-V4 is faster at every concurrency. + +| recipe | bpw | KL mean | top-1 | V3 at that size | its bpw | its KL | KL | +|---|---:|---:|---:|---|---:|---:|---:| +| `q38-27b-iq8r-v4` | 8.040 | 0.00046 | 99.22% | IQ8R-V3 | 8.040 | 0.00047 | -2% | +| `q38-27b-iq7r-v4` | 7.420 | 0.00059 | 99.15% | IQ7R-V3 | 7.420 | 0.00060 | -2% | +| `q38-27b-iq6r-l-v4` | 6.939 | 0.00068 | 99.08% | IQ6R-L-V3 | 6.939 | 0.00072 | -6% | +| `q38-27b-iq6r-v4` | 6.439 | 0.00081 | 98.96% | IQ6R-V3 | 6.372 | 0.00088 | -8% | +| `q38-27b-iq6r-s-v4` | 6.063 | 0.00100 | 98.86% | IQ6R-S-V3 | 6.049 | 0.00106 | -6% | +| `q38-27b-iq5r-v4` | 5.433 | 0.00154 | 98.60% | IQ5R-V3 | 5.422 | 0.00182 | -15% | +| `q38-27b-iq5r-s-v4` | 5.071 | 0.00223 | 98.33% | IQ5R-S-V3 | 5.064 | 0.00249 | -10% | +| `q38-27b-iq4r-l-v4` | 4.793 | 0.00297 | 98.07% | IQ4R-L-V3 | 4.783 | 0.00342 | -13% | +| `q38-27b-iq4r-v4` | 4.473 | 0.00444 | 97.69% | IQ4R-V3 | 4.458 | 0.00512 | -13% | +| `q38-27b-iq4r-s-v4` | 4.142 | 0.00643 | 97.12% | IQ4R-S-V3 | 4.131 | 0.00762 | -16% | +| `q38-27b-iq3r-l-v4` | 3.804 | 0.00917 | 96.61% | IQ3R-L-V3 | 3.798 | 0.01129 | -19% | +| `q38-27b-iq3r-v4` | 3.472 | 0.01495 | 95.74% | IQ3R-V3 | 3.459 | 0.01698 | -12% | +| `q38-27b-iq3r-s-v4` | 3.157 | 0.02241 | 94.75% | IQ3R-S-V3 | 3.145 | 0.02584 | -13% | +| `q38-27b-iq2r-l-v4` | 2.797 | 0.03602 | 93.29% | IQ2R-L-V3 | 2.786 | 0.04241 | -15% | +| `q38-27b-iq2r-v4` | 2.470 | 0.06113 | 91.23% | IQ2R-V3 | 2.465 | 0.06807 | -10% | + +IQ4R-L-V4 is 24% below the official FP8 checkpoint's KL (8.766 bpw, 0.00389) at 55% of its size, and +IQ2R-L-V4, at 2.8 bpw, is below the AWQ-tuned MXFP4 checkpoint (4.994 bpw, 0.03824). The design, the +kernels and the measurements are in the IQR-V4 technical report +(radiance.stilldeadco.de/whitepapers/iqr-v4.pdf). diff --git a/libavx/avx_attn.cpp b/libavx/avx_attn.cpp index f5421048..13d6e64b 100644 --- a/libavx/avx_attn.cpp +++ b/libavx/avx_attn.cpp @@ -250,7 +250,10 @@ static int attn_paged_prefill(const RadArgs* a, [[maybe_unused]] RadStream strea * reads it: -2 an ordinary causal row; else the row's parent's index within its sequence's rows * (-1 for the block's first). Inside the block such a row sees itself and its ancestors only, and * its window is measured from the block's first position plus its depth. */ -AVX_KERNEL(attn_paged) { +/* `shared_anchor_window` (attn_paged_anchor_window): every row of a sequence measures its window, + * and a causal row its last visible key, from the sequence's first query position instead of its + * own, as libref does (ref_attn.cpp, ref_attn_paged_impl). */ +static int attn_paged_impl(const RadArgs* a, RadStream stream, bool shared_anchor_window) { if (a->n_t < 8) return RAD_E_INVAL; const RadTensor *q = &a->t[0], *kv = &a->t[1], *bt = &a->t[2], *su = &a->t[3], *o = &a->t[7]; const RadTensor* kdes = rad_arg_in(a, 4); @@ -266,7 +269,8 @@ AVX_KERNEL(attn_paged) { const int64_t block_size = p_int(a, "block_size", kv->rank == 4 ? kv->shape[2] : 0); const int causal = (int)p_int(a, "causal", 1); const int64_t window = p_int(a, "window", 0); - if (head_dim <= 0 || gqa <= 0 || block_size <= 0) return RAD_E_SHAPE; + if (head_dim <= 0 || gqa <= 0 || block_size <= 0 || (shared_anchor_window && window <= 0)) + return RAD_E_SHAPE; if (head_dim > AVX_HD_MAX) return RAD_E_UNSUPPORTED; const int64_t kv_heads = kv->rank == 4 ? kv->shape[1] : 0; @@ -299,7 +303,7 @@ AVX_KERNEL(attn_paged) { const float scale = p_f32(a, "scale", 1.0f / std::sqrt((float)head_dim)); /* Uniform long queries take the panel form; ragged (cus) inputs stay here. */ - if (!cus && q_len >= 32 && !tpar) return attn_paged_prefill(a, stream); + if (!cus && q_len >= 32 && !tpar && !shared_anchor_window) return attn_paged_prefill(a, stream); /* Work units are (token, kv-head) groups: the gqa query rows of a group share every key and * value row, so each is widened once for gqa dots/axpys. Per-row arithmetic is unchanged. */ const int64_t total = rows * kv_heads; @@ -415,12 +419,14 @@ AVX_KERNEL(attn_paged) { ntile = 0; }; + const int64_t mask_pos = shared_anchor_window ? base : pos; for (int64_t j = 0; j < ctx; ++j) { - if (causal ? (j > pos) : (j >= ctx)) continue; + if (causal ? (j > mask_pos) : (j >= ctx)) continue; if (tree && j >= base && !((tmask >> (j - base)) & 1)) continue; if (window > 0) { - const int64_t d = wpos - j; - if (causal ? (d >= window) : (d >= window || d <= -window)) continue; + const int64_t d = (shared_anchor_window ? base : wpos) - j; + if (shared_anchor_window ? (d >= window) + : causal ? (d >= window) : (d >= window || d <= -window)) continue; } if (j / block_size >= max_blocks) break; /* past the block table's width */ const int64_t blk = ldi(bt, s * bt_rs + (j / block_size) * bt_cs); @@ -746,6 +752,15 @@ AVX_BF16_TARGET static bool attn_dense_bf16(const RadTensor* q, const RadTensor* } #endif +AVX_KERNEL(attn_paged) { return attn_paged_impl(a, stream, false); } + +/* attn_paged with one window anchor a sequence (DSpark's drafter); no tree operand. */ +AVX_KERNEL(attn_paged_anchor_window) { + if (!a || a->n_t < 8) return RAD_E_INVAL; + if (a->n_t > 8 && rad_arg_in(a, 8)) return RAD_E_UNSUPPORTED; + return attn_paged_impl(a, stream, true); +} + /* attn_paged with its tree operand present, which attn_paged reads (see there). Refused without * one, and for a non-causal layer. */ AVX_KERNEL(attn_paged_tree) { diff --git a/libavx/avx_cases.cpp b/libavx/avx_cases.cpp index d543323b..51ac3f3e 100644 --- a/libavx/avx_cases.cpp +++ b/libavx/avx_cases.cpp @@ -376,6 +376,13 @@ std::vector build_cases() { HI("block_size", 16), HI("causal", 1), HI("window", window), HS("q_dtype", dt), HS("kv_dtype", dt), HF("scale", 0.125), HI("max_ctx", 128), HI("n_head", 8), HI("max_seqs", 2) }); + /* One anchor a sequence (DSpark's drafter): a window of 8 measured from the first query row. */ + for (const char* dt : { "f32", "bf16" }) + for (int qlen : { 1, 17 }) + add("attn_paged_anchor_window", { HI("q_len", qlen), HI("head_dim", 64), HI("gqa", 4), + HI("block_size", 16), HI("causal", 1), HI("window", 8), + HS("q_dtype", dt), HS("kv_dtype", dt), HF("scale", 0.125), + HI("max_ctx", 128), HI("n_head", 8), HI("max_seqs", 2) }); /* The tree form over the same shapes (its described parents are ordinary rows, -2). */ for (const char* dt : { "f32", "bf16" }) for (int qlen : { 1, 17 }) @@ -787,6 +794,13 @@ std::vector build_cases() { HI("n_vocab", 300), HI("anchor_stride", 1), HS("dtype", "bf16") }); add("dflash_select", { HI("M", 5), HI("steps", 3), HI("top_k", 12), HI("rank", 37), HI("n_vocab", 97), HI("anchor_stride", 2), HS("dtype", "bf16") }); + /* DSpark's full-vocabulary walk: a ragged last tile (V % 64), rank 37 not whole vectors. */ + for (const char* op : { "dflash_markov_greedy", "dflash_markov_greedy_f32" }) { + add(op, { HI("M", 3), HI("steps", 4), HI("rank", 64), HI("n_vocab", 300), + HI("anchor_stride", 1), HS("dtype", "bf16") }); + add(op, { HI("M", 2), HI("steps", 3), HI("rank", 37), HI("n_vocab", 97), + HI("anchor_stride", 2), HS("dtype", "bf16") }); + } /* The same lattices grown into trees: more nodes than steps, and fewer. */ add("dflash_tree", { HI("M", 3), HI("steps", 4), HI("top_k", 8), HI("rank", 64), HI("n_vocab", 300), HI("anchor_stride", 1), HI("nodes", 6), diff --git a/libavx/avx_isa.h b/libavx/avx_isa.h index 877f61fd..209f79c1 100644 --- a/libavx/avx_isa.h +++ b/libavx/avx_isa.h @@ -152,7 +152,8 @@ int avx_par_force(int threads); X(sample_topp) X(sample_minp) X(sample_typical) X(sample_xtc) \ X(sample_merge_topk) X(sample_mask) X(sample_pick) X(sample_argmax) \ X(sample_ngram_ban) X(sample_logprobs) X(dflash_select) X(dflash_conv) \ - X(dflash_tree) X(attn_paged_tree) + X(dflash_tree) X(attn_paged_tree) X(attn_paged_anchor_window) \ + X(dflash_markov_greedy) X(dflash_markov_greedy_f32) /* One ISA level's table: one member per op, in AVX_OP_LIST order. A missing definition is a link * error from that level's avx_table.cpp object. */ diff --git a/libavx/avx_ngram.cpp b/libavx/avx_ngram.cpp index d3fc404f..56ea2562 100644 --- a/libavx/avx_ngram.cpp +++ b/libavx/avx_ngram.cpp @@ -630,6 +630,10 @@ constexpr long long kOnDemandMaxRows = 4096; * below); such a gather never waits on another thread's claim, so the pause cannot close a cycle. */ std::atomic g_urgent_reads{0}; +/* The read-ahead reader thread's owner tag (0 before it starts): a decode gather reads a row that + * thread holds directly instead of waiting on it, so the g_urgent_reads pause cannot close a cycle. */ +std::atomic g_reader_tag{0}; + struct UrgentReads { UrgentReads() { g_urgent_reads.fetch_add(1, std::memory_order_acq_rel); } ~UrgentReads() { @@ -655,6 +659,8 @@ int gather_ondemand(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx:: g.slot.resize((size_t)M); g.reads.clear(); g.again.clear(); + g.waits.clear(); + const uint64_t reader = g_reader_tag.load(std::memory_order_acquire); for (long long m = 0; m < M; ++m) { uint16_t* dst = q.out + m * x_ld; if (pad(row_of(m))) { std::memset(dst, 0, (size_t)ne * sizeof(uint16_t)); continue; } @@ -667,8 +673,13 @@ int gather_ondemand(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx:: g.dst.push_back(dst); g.dm.push_back(m); g.dw.push_back(RowCache::ready(key)); + } else if (f == RowCache::THEIRS && s >= 0 && + ((rc.word[s].load(std::memory_order_acquire) >> 2) & 255) != reader) { + /* Another rank thread is reading it: wait below instead of reading it a second time + * (both ranks gather the same rows, so reading it again doubled decode's reads). */ + g.waits.push_back(m); } else { - /* THEIRS, MINE (a row twice in one call) and NONE are read directly: no wait. */ + /* The reader's THEIRS, MINE (a row twice in one call) and NONE are read directly. */ g.reads.push_back({m, key, f == RowCache::CLAIMED ? s : -1}); } } @@ -686,14 +697,37 @@ int gather_ondemand(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx:: g.dw.push_back(RowCache::ready(r.key)); } } - if (g.src.empty()) return RAD_OK; - /* The seqlock, as gather_rows reads it: a row whose word changed during the decode was taken - * over, and is read again directly. */ - decode(g.src.data(), g.dst.data(), (int64_t)g.src.size(), ne, lut); - std::atomic_thread_fence(std::memory_order_acquire); - for (size_t i = 0; i < g.dm.size(); ++i) - if (rc.word[g.slot[g.dm[i]]].load(std::memory_order_relaxed) != g.dw[i]) - g.again.push_back(g.dm[i]); + /* Wait for the other rank's reads, as gather_rows does. This thread's own reads are done, so no cycle: the other rank reads its claims before it + * waits. A row that turns READY decodes from the cache; one released or taken over is read + * directly below. */ + while (!g.waits.empty()) { + const uint32_t e = rc.published.load(std::memory_order_acquire); + size_t keep = 0; + for (long long m : g.waits) { + const uint64_t key = key_of(m); + const uint64_t x = rc.word[g.slot[m]].load(std::memory_order_acquire); + if (x == RowCache::ready(key)) { + g.src.push_back(rc.data + (size_t)g.slot[m] * (size_t)n); + g.dst.push_back(q.out + m * x_ld); + g.dm.push_back(m); + g.dw.push_back(x); + continue; + } + if ((x & 3) == RowCache::LOADING && (x >> 10) == key) { g.waits[keep++] = m; continue; } + g.again.push_back(m); + } + g.waits.resize(keep); + if (keep) rc.published.wait(e, std::memory_order_acquire); + } + if (!g.src.empty()) { + /* The seqlock, as gather_rows reads it: a row whose word changed during the decode was + * taken over, and is read again directly. */ + decode(g.src.data(), g.dst.data(), (int64_t)g.src.size(), ne, lut); + std::atomic_thread_fence(std::memory_order_acquire); + for (size_t i = 0; i < g.dm.size(); ++i) + if (rc.word[g.slot[g.dm[i]]].load(std::memory_order_relaxed) != g.dw[i]) + g.again.push_back(g.dm[i]); + } if (g.again.empty()) return RAD_OK; g.reads.clear(); for (long long m : g.again) g.reads.push_back({m, key_of(m), -1}); @@ -817,8 +851,8 @@ int gather_rows(const TableFile& tf, RowCache& rc, ReadRing& rr, const avx::RowG * list adds nothing. A list that does not continue the previous one (another request's prompt) * drops the jobs still queued for the previous one. * - * The reader reads in batches of kReaderBatch rows and starts none while a decode-sized gather is - * reading (g_urgent_reads), so a decode step's few reads do not queue in the drive behind a + * The reader keeps up to kReaderBatch reads in the drive, starting one as each lands, and starts + * none while a decode-sized gather is reading (g_urgent_reads), so a decode step's few reads do not queue in the drive behind a * prefetch's thousands. A failed read releases its claims and the next call reads those rows * itself. The reader is detached and never destroyed. */ @@ -833,6 +867,105 @@ constexpr size_t kJobRows = 8192; * the most a decode step's reads can find ahead of them; 128 still keeps an NVMe queue busy. */ constexpr size_t kReaderBatch = 128; +/* The reader's claimed rows `reads[0, total)` (each with a slot), with at most `depth` in the drive + * at once, a new read submitted as each completes, and each row published READY as it lands: waiting + * for whole batches let the drive's queue drain at the end of each (40k reads/s against 46k). While a decode-sized gather is reading, no new read starts; + * the ones in flight drain first, so at most `depth` reads are ever ahead of a decode step's (as + * with the stock batches). On a failed read every unpublished claim is released. */ +int stream_publish(const TableFile& tf, RowCache& rc, ReadRing& rr, Gather& g, + const SpanRead* reads, size_t total, long long n, size_t depth) { + const long long A = tf.align; + const long long stride = ((n + A - 1) / A + 1) * A; + if (depth > rr.entries) depth = rr.entries; + if (depth > 0xffff) depth = 0xffff; + static thread_local std::vector freebuf; + static thread_local std::vector landed; + landed.assign(total, 0); + uint8_t* bounce = g.bounce_for(depth * (size_t)stride, (size_t)A); + int status = bounce ? RAD_OK : RAD_E_NOMEM; + freebuf.clear(); + for (size_t d = 0; d < depth; ++d) freebuf.push_back((uint32_t)(depth - 1 - d)); + size_t next = 0, inflight = 0; + unsigned pending = 0; /* queued in the SQ, not yet submitted */ + while (status == RAD_OK && (next < total || inflight)) { + if (inflight == 0 && pending == 0) + for (int u; (u = g_urgent_reads.load(std::memory_order_acquire)) > 0;) + g_urgent_reads.wait(u, std::memory_order_acquire); + const bool may_start = g_urgent_reads.load(std::memory_order_acquire) == 0; + unsigned tail = __atomic_load_n(rr.sq_tail, __ATOMIC_RELAXED); + unsigned add = 0; + while (may_start && next < total && !freebuf.empty()) { + const uint32_t buf = freebuf.back(); + freebuf.pop_back(); + const SpanRead& r = reads[next]; + const long long a = (long long)r.key & ~(A - 1); + const long long e = ((long long)r.key + n + A - 1) & ~(A - 1); + const unsigned idx = tail & *rr.sq_mask; + io_uring_sqe* s = &rr.sqes[idx]; + std::memset(s, 0, sizeof *s); + s->opcode = IORING_OP_READ; + s->fd = tf.fd; + s->off = (uint64_t)a; + s->addr = (uint64_t)(uintptr_t)(bounce + (size_t)buf * (size_t)stride); + s->len = (unsigned)(e - a); + s->user_data = (uint64_t)next << 16 | buf; + rr.sq_array[idx] = idx; + ++tail; ++add; ++next; ++inflight; + } + if (add) __atomic_store_n(rr.sq_tail, tail, __ATOMIC_RELEASE); + pending += add; + if (!inflight) continue; + const long rc_ = syscall(__NR_io_uring_enter, rr.fd, pending, 1u, IORING_ENTER_GETEVENTS, + nullptr, (size_t)0); + if (rc_ < 0 && errno != EINTR && errno != EAGAIN && errno != EBUSY) { status = RAD_E_IO; break; } + if (rc_ > 0) pending -= (unsigned)rc_ < pending ? (unsigned)rc_ : pending; + unsigned h = __atomic_load_n(rr.cq_head, __ATOMIC_RELAXED); + const unsigned tl = __atomic_load_n(rr.cq_tail, __ATOMIC_ACQUIRE); + unsigned got = 0; + for (; h != tl; ++h) { + const io_uring_cqe& c = rr.cqes[h & *rr.cq_mask]; + const size_t i = (size_t)(c.user_data >> 16); + const uint32_t buf = (uint32_t)(c.user_data & 0xffff); + --inflight; + freebuf.push_back(buf); + const SpanRead& r = reads[i]; + const long long a = (long long)r.key & ~(A - 1); + const long long e = ((long long)r.key + n + A - 1) & ~(A - 1); + if (c.res < 0 || (long long)c.res != e - a) { status = RAD_E_IO; continue; } + const uint8_t* row = bounce + (size_t)buf * (size_t)stride + (r.key & (uint64_t)(A - 1)); + std::memcpy(rc.data + (size_t)r.slot * (size_t)n, row, (size_t)n); + rc.ref[r.slot].store(1, std::memory_order_relaxed); + rc.word[r.slot].store(RowCache::ready(r.key), std::memory_order_release); + landed[i] = 1; + ++got; + } + __atomic_store_n(rr.cq_head, h, __ATOMIC_RELEASE); + if (got) { + g_rows_read.fetch_add(got, std::memory_order_relaxed); + rc.published.fetch_add(1, std::memory_order_release); + rc.published.notify_all(); + } + } + /* After an error, drain what is still in flight so the ring is clean for the next job. */ + while (inflight) { + const long rc_ = syscall(__NR_io_uring_enter, rr.fd, pending, 1u, IORING_ENTER_GETEVENTS, + nullptr, (size_t)0); + if (rc_ < 0 && errno != EINTR && errno != EAGAIN && errno != EBUSY) break; + if (rc_ > 0) pending -= (unsigned)rc_ < pending ? (unsigned)rc_ : pending; + unsigned h = __atomic_load_n(rr.cq_head, __ATOMIC_RELAXED); + const unsigned tl = __atomic_load_n(rr.cq_tail, __ATOMIC_ACQUIRE); + for (; h != tl; ++h) --inflight; + __atomic_store_n(rr.cq_head, h, __ATOMIC_RELEASE); + } + if (status != RAD_OK) { + for (size_t i = 0; i < total; ++i) + if (!landed[i]) rc.word[reads[i].slot].store(RowCache::EMPTY, std::memory_order_release); + rc.published.fetch_add(1, std::memory_order_release); + rc.published.notify_all(); + } + return status; +} + /* Tries at matching a list against the previous one (read_ahead) before it counts as new. */ constexpr int kShiftTries = 64; @@ -883,6 +1016,7 @@ struct AheadReader { Gather& g = gather_state(); ReadRing* rr = read_ring(nullptr); const uint64_t me = owner_tag(); + g_reader_tag.store(me, std::memory_order_release); for (;;) { AheadJob j; { @@ -907,21 +1041,9 @@ struct AheadReader { else if (f == RowCache::NONE && !j.retry) retry.push_back(j.keys[i]); } - /* Every read has a slot, so nothing is decoded and there is no output. */ - for (size_t b = 0; b < g.reads.size(); b += kReaderBatch) { - for (int u; (u = g_urgent_reads.load(std::memory_order_acquire)) > 0;) - g_urgent_reads.wait(u, std::memory_order_acquire); - const size_t cnt = std::min(kReaderBatch, g.reads.size() - b); - if (read_and_publish(*j.tf, *j.rc, *rr, g, &g.reads[b], cnt, j.n, 0, nullptr, - nullptr, nullptr, 0) == RAD_OK) - continue; - /* The failed batch released its own claims; the later batches' go too. */ - for (size_t i = b + cnt; i < g.reads.size(); ++i) - j.rc->word[g.reads[i].slot].store(RowCache::EMPTY, std::memory_order_release); - j.rc->published.fetch_add(1, std::memory_order_release); - j.rc->published.notify_all(); - break; - } + /* Every read has a slot, so nothing is decoded and there is no output; a failed read + * releases every claim not yet published. */ + stream_publish(*j.tf, *j.rc, *rr, g, g.reads.data(), g.reads.size(), j.n, kReaderBatch); if (!retry.empty()) { std::lock_guard lk(mu); AheadJob r; diff --git a/libavx/avx_registry.cpp b/libavx/avx_registry.cpp index 0bdd9d7b..94b16f5e 100644 --- a/libavx/avx_registry.cpp +++ b/libavx/avx_registry.cpp @@ -913,6 +913,12 @@ static const RadParamSpec pDflashSelect[] = { P_INT("M"), P_INT("steps"), P_I static const RadOperandSpec oDflashSelect[] = { OPD("cand"), OPD("unary"), OPD_O("hp"), OPD("anchor"), WGT("pred"), WGT("succ"), OUT("tokens") }; +static const RadParamSpec pDflashMarkov[] = { P_INT("M"), P_INT("steps"), P_INT("rank"), + P_INT("n_vocab"), P_INTO("anchor_stride"), + P_STR("dtype") }; +static const RadOperandSpec oDflashMarkov[] = { OPD("logits"), OPD("anchor"), WGT("pred"), + WGT("succ"), OUT("tile_scores"), + OUT("tile_tokens"), OUT("tokens") }; static const RadParamSpec pDflashTree[] = { P_INT("M"), P_INT("steps"), P_INT("top_k"), P_INT("rank"), P_INT("n_vocab"), P_INTO("anchor_stride"), P_INT("nodes"), @@ -1110,6 +1116,9 @@ static const RadOpSchema kSchemas[] = { { "attn_paged", ARR(pAttnPaged), ARR(oAttnPaged), "paged causal / sliding-window attention, any query length, online-softmax so one pass over the " "cache suffices." }, +{ "attn_paged_anchor_window", ARR(pAttnPaged), ARR(oAttnPaged), + "attn_paged with one window anchor at each sequence's first query position: every row keeps keys " + "with anchor - key < window, and a causal row none after the anchor." }, { "attn_paged_tree", ARR(pAttnPaged), ARR(oAttnPagedTree), "attn_paged over a tree verify (rad_drafter_tree): spec_parent is -2 for an ordinary causal row, " "else the row's parent's index within its sequence's rows (-1 for the block's first). Inside the " @@ -1457,6 +1466,11 @@ static const RadOpSchema kSchemas[] = { { "dflash_conv", ARR(pDflashConv), ARR(oDflashConv), "DFlash2's grouped dynamic depthwise convolution: out[t][h] = sum over taps j, j == 0 or " "t % block_size >= j, of (base[j][h] + delta[t][j][h / group_size]) * x[t - j][h]." }, +{ "dflash_markov_greedy", ARR(pDflashMarkov), ARR(oDflashMarkov), + "DSpark's walk: every vocabulary id scores draft_logit[token] + sum_r pred[previous][r] * " + "succ[token][r], the greatest wins (lower id on a tie) and is the next predecessor." }, +{ "dflash_markov_greedy_f32", ARR(pDflashMarkov), ARR(oDflashMarkov), + "dflash_markov_greedy with f32 draft logits and bf16 codebooks." }, { "dflash_select", ARR(pDflashSelect), ARR(oDflashSelect), "a greedy walk over a candidate lattice: score[l, c] = unary[l, c] + sum_r pred[pid(l)][r] * " "hp[l][r] * succ[cand[l, c]][r], pid(0) the anchor and pid(l) the walk's own previous pick. " @@ -1770,6 +1784,11 @@ ROW("avx_attn_paged", "attn_paged", "attn", "paged causal / sliding-window attention, any query length", "any q and out dtype; bf16 or fp8 kv cache with optional per-(seq,head) descales", cPagedBlock, (int)(sizeof(cPagedBlock) / sizeof(cPagedBlock[0])), L(attn_paged)), +ROW("avx_attn_paged_anchor_window", "attn_paged_anchor_window", "attn", + "paged attention with one shared anchor-aligned sliding window a sequence", + "any q and out dtype; bf16 or fp8 kv cache with optional per-(seq,head) descales", + cPagedBlock, (int)(sizeof(cPagedBlock) / sizeof(cPagedBlock[0])), + L(attn_paged_anchor_window)), ROW("avx_attn_paged_tree", "attn_paged_tree", "attn", "paged causal / sliding-window attention with a tree verify block (spec_parent)", "any q and out dtype; bf16 or fp8 kv cache with optional per-(seq,head) descales; i32 parents", @@ -2082,6 +2101,13 @@ SIMPLE("avx_dflash_conv", "dflash_conv", "draft", SIMPLE("avx_dflash_select", "dflash_select", "draft", "DFlash2's greedy walk over the candidate lattice", "i32 candidates and tokens, float unary and codebooks", L(dflash_select)), +SIMPLE("avx_dflash_markov_greedy", "dflash_markov_greedy", "draft", + "DSpark's full-vocabulary greedy Markov walk", + "bf16 logits and codebooks, f32/i32 tile winners, i32 tokens out", L(dflash_markov_greedy)), +SIMPLE("avx_dflash_markov_greedy_f32", "dflash_markov_greedy_f32", "draft", + "Full-vocabulary greedy Markov walk with f32 draft logits", + "f32 logits, bf16 codebooks, f32/i32 tile winners, i32 tokens out", + L(dflash_markov_greedy_f32)), SIMPLE("avx_dflash_tree", "dflash_tree", "draft", "DFlash2's candidate lattice grown best-first into a tree", "i32 candidates, tokens and parents, float unary and codebooks", L(dflash_tree)), diff --git a/libavx/avx_sample.cpp b/libavx/avx_sample.cpp index 2048fb61..2b69fe2a 100644 --- a/libavx/avx_sample.cpp +++ b/libavx/avx_sample.cpp @@ -925,6 +925,83 @@ AVX_KERNEL(dflash_select) { return RAD_OK; } +/* ================================================================== dflash_markov_greedy + * + * DSpark's walk over the whole vocabulary (libref ref_quant.cpp, ref_markov_greedy): at each step + * every token scores its draft logit plus sum_r pred[pid][r] * succ[token][r], the greatest wins + * (ties to the lower id) and becomes the next predecessor. The winners of each 64-token tile are + * written too, as the device row's decomposition. Scalar and in libref's order (the bf16 form starts + * the sum at the logit, the f32 form adds it last), so the argmax ties the same way. */ +static int markov_greedy(const RadArgs* a, uint32_t logits_dtype) { + if (a->n_t < 7) return RAD_E_INVAL; + const RadTensor *logits = &a->t[0], *anc = &a->t[1], *pred = &a->t[2], *succ = &a->t[3]; + const RadTensor *tsc = &a->t[4], *ttok = &a->t[5], *out = &a->t[6]; + if (!logits->data || !anc->data || !pred->data || !succ->data || !tsc->data || !ttok->data || + !out->data) + return RAD_E_INVAL; + if (logits->dtype != logits_dtype || pred->dtype != RAD_BF16 || succ->dtype != RAD_BF16 || + tsc->dtype != RAD_F32 || ttok->dtype != RAD_I32 || out->dtype != RAD_I32) + return RAD_E_DTYPE; + if (anc->dtype != RAD_I32) return RAD_E_SHAPE; + + const int64_t steps = p_int(a, "steps", 0); + const int64_t R = p_int(a, "rank", 0); + const int64_t V = p_int(a, "n_vocab", 0); + const int64_t astr = p_int(a, "anchor_stride", 1); + const int64_t M = steps > 0 && V > 0 + ? band_rows(numel(logits) / (steps * V), p_int(a, "M", 0)) : 0; + if (M <= 0 || steps <= 0 || R <= 0 || V <= 0 || astr <= 0) return RAD_E_SHAPE; + if (numel(logits) < M * steps * V || numel(anc) < (M - 1) * astr + 1 || + numel(pred) < V * R || numel(succ) < V * R || numel(out) < M * steps) + return RAD_E_SHAPE; + const int64_t n_tiles = (V + 63) / 64; + if (numel(tsc) < M * n_tiles || numel(ttok) < M * n_tiles) return RAD_E_SHAPE; + + const int64_t ls = laststride(logits), os = laststride(out); + const int64_t tss = laststride(tsc), tis = laststride(ttok); + AVX_PARALLEL_FOR_IF(M * steps * V * R >= AVX_PAR_MIN) + for (int64_t m = 0; m < M; ++m) { + float* prev = scratch_f32((size_t)R); + float* sv = scratch_f32_b((size_t)R); + int64_t pid = ldi(anc, offlin(anc, m * astr)); + for (int64_t l = 0; l < steps; ++l) { + const int64_t row = m * steps + l; + const bool ok = pid >= 0 && pid < V; + if (ok) { + const float* pv = in_row(pred, rowoff(pred, pid, R), R, prev); + if (pv != prev) std::memcpy(prev, pv, (size_t)R * sizeof(float)); + } else { + for (int64_t r = 0; r < R; ++r) prev[r] = 0.0f; + } + const int64_t lb = rowoff(logits, row, V); + float gbest = -INFINITY; + int64_t gtok = 0; + for (int64_t tile = 0; tile < n_tiles; ++tile) { + const int64_t first = tile * 64, end = std::min(first + 64, V); + float best = -INFINITY; + int64_t btok = first; + for (int64_t tok = first; tok < end; ++tok) { + const float base = ldt(logits, lb + tok * ls); + const float* su = in_row(succ, rowoff(succ, tok, R), R, sv); + float s = logits_dtype == RAD_F32 ? 0.0f : base; + for (int64_t r = 0; r < R; ++r) s += prev[r] * su[r]; + if (logits_dtype == RAD_F32) s += base; + if (s > best || (s == best && tok < btok)) { best = s; btok = tok; } + } + stt(tsc, rowoff(tsc, m, n_tiles) + tile * tss, best); + st_int_dt(ttok->dtype, ttok->data, rowoff(ttok, m, n_tiles) + tile * tis, btok); + if (best > gbest || (best == gbest && btok < gtok)) { gbest = best; gtok = btok; } + } + st_int_dt(out->dtype, out->data, rowoff(out, m, steps) + l * os, gtok); + pid = gtok; + } + } + return RAD_OK; +} + +AVX_KERNEL(dflash_markov_greedy) { return markov_greedy(a, RAD_BF16); } +AVX_KERNEL(dflash_markov_greedy_f32) { return markov_greedy(a, RAD_F32); } + /* ================================================================== dflash_tree * * The same lattice grown best-first into a tree of `nodes` nodes (rad_drafter_tree), libref's rule diff --git a/libquant/lq_gptq.cpp b/libquant/lq_gptq.cpp index aed81942..7376e488 100644 --- a/libquant/lq_gptq.cpp +++ b/libquant/lq_gptq.cpp @@ -181,6 +181,7 @@ struct Slot { std::mutex mu; bool done = false; Gram g; /* null = looked and found nothing */ + std::vector order; /* gptq_factor_ordered's column order */ }; struct Cache { @@ -210,15 +211,32 @@ std::vector gptq_act_order(const char* dir, const char* name, int64_t K return perm; } +namespace { +Gram factor_impl(const char* dir, const char* name, int64_t K, int64_t domain, double damp, + const int32_t* perm, std::vector* order); +} /* namespace */ + Gram gptq_factor(const char* dir, const char* name, int64_t K, int64_t domain, double damp, const int32_t* perm) { + return factor_impl(dir, name, K, domain, damp, perm, nullptr); +} + +Gram gptq_factor_ordered(const char* dir, const char* name, int64_t K, int64_t domain, double damp, + std::vector* order) { + return factor_impl(dir, name, K, domain, damp, nullptr, order); +} + +namespace { +Gram factor_impl(const char* dir, const char* name, int64_t K, int64_t domain, double damp, + const int32_t* perm, std::vector* order) { if (!dir || !*dir || !name || !*name || K <= 0) return nullptr; const std::string stem = calib_resolve(dir, name, K); const bool layer = stem == calib_stem(name); char dk[32]; std::snprintf(dk, sizeof dk, "%.17g", damp); const std::string key = std::string(dir) + "|" + stem + "|" + std::to_string(K) + "|" + - std::to_string(domain) + "|" + dk + (perm ? "|act" : ""); + std::to_string(domain) + "|" + dk + (perm ? "|act" : "") + + (order ? "|ord" : ""); /* A layer's factor is shared by its experts, so it is built once and cached, under a lock of * its own: weights quantised side by side (rad-convert --gpus) factor different layers at @@ -246,15 +264,23 @@ Gram gptq_factor(const char* dir, const char* name, int64_t K, int64_t domain, d slot = it->second; } lk = std::unique_lock(slot->mu); - if (slot->done) return slot->g; + if (slot->done) { + if (order) *order = slot->order; + return slot->g; + } } auto keep = [&](Gram u) { if (slot) { slot->g = u; slot->done = true; + if (order) slot->order = *order; } return u; }; + if (order) { + order->resize((size_t)K); + for (int64_t i = 0; i < K; ++i) (*order)[(size_t)i] = (int32_t)i; + } std::vector acc; const int found = calib_sum(dir, stem, K, domain, &acc); @@ -263,6 +289,14 @@ Gram gptq_factor(const char* dir, const char* name, int64_t K, int64_t domain, d "rounding it to nearest\n", name, dir, stem.c_str()); return keep(nullptr); } + /* gptq_factor_ordered: the order from the same sum (gptq_act_order's: descending diagonal, + * ties in column order), read once for both. */ + if (order) { + std::stable_sort(order->begin(), order->end(), [&](int32_t x, int32_t y) { + return acc[(size_t)x * (size_t)K + (size_t)x] > acc[(size_t)y * (size_t)K + (size_t)y]; + }); + perm = order->data(); + } /* Under act order the factor is of P H P^T, since the recursion runs over columns in * quantisation order. */ if (perm) { @@ -323,6 +357,7 @@ Gram gptq_factor(const char* dir, const char* name, int64_t K, int64_t domain, d "K=%lld\n", stem.c_str(), found, (long long)K); return keep(u); } +} /* namespace */ void gptq_tcq_dyn_scales(const Grid& g, const float* w, int64_t K, Scales& scales, int64_t r0, int64_t r1, int64_t b0, int64_t b1) { @@ -623,6 +658,35 @@ void gptq_tcq_refine(const Grid& g, const float* x, float* w, int32_t* codes, co } } /* namespace */ +void gptq_rescale_rows(const float* x, float* w, Scales& scales, int64_t N, int64_t K, + const float* h) { + if (!x || !w || !h || N <= 0 || K <= 0 || scales.nc != 1 || scales.br != 1) return; + std::vector hx((size_t)(N * K)), hw((size_t)(N * K)); + mat_hess(x, N, K, h, hx.data()); + mat_hess(w, N, K, h, hw.data()); +#ifdef _OPENMP +#pragma omp parallel for schedule(static) +#endif + for (int64_t n = 0; n < N; ++n) { + float* wr = w + (size_t)(n * K); + const float* xr = hx.data() + (size_t)(n * K); + const float* qr = hw.data() + (size_t)(n * K); + double num = 0.0, den = 0.0; + for (int64_t j = 0; j < K; ++j) { + num += (double)wr[j] * xr[j]; + den += (double)wr[j] * qr[j]; + } + if (!(num > 0.0) || !(den > 0.0)) continue; + const float a = (float)(num / den); + BlockScale& b = scales.b[(size_t)n]; + b.s *= a; + b.stored *= a; + b.inv = 1.0f / b.s; + b.inv_d = 1.0 / (double)b.s; + for (int64_t j = 0; j < K; ++j) wr[j] *= a; + } +} + void gptq_refine(const Grid& g, const float* x, float* w, int32_t* codes, const Scales& scales, int64_t N, int64_t K, const float* h, double damp, int passes) { if (!x || !w || !codes || !h || N <= 0 || K <= 0 || passes <= 0) return; diff --git a/libquant/lq_gptq.h b/libquant/lq_gptq.h index 9364b424..08244e33 100644 --- a/libquant/lq_gptq.h +++ b/libquant/lq_gptq.h @@ -32,6 +32,11 @@ namespace lq { Gram gptq_factor(const char* dir, const char* name, int64_t K, int64_t domain, double damp, const int32_t* perm = nullptr); +/* gptq_factor in act order (gptq_act_order's), the order into `order`: one read of the calibration + * for both, cached with the factor. */ +Gram gptq_factor_ordered(const char* dir, const char* name, int64_t K, int64_t domain, double damp, + std::vector* order); + /* Act order: columns by descending Hessian diagonal (the input energy each carries), ties in * column order. The identity when `dir` holds nothing for the weight. */ std::vector gptq_act_order(const char* dir, const char* name, int64_t K, int64_t domain); @@ -73,5 +78,14 @@ void gptq_tcq_col_scales(const Grid& g, const Scales& scales, int64_t n0, int64_ void gptq_refine(const Grid& g, const float* x, float* w, int32_t* codes, const Scales& scales, int64_t N, int64_t K, const float* h, double damp, int passes); +/* Each row's scale refitted after the loop, the codes held: the row's decoded values w scaled by + * a = (w H x^T) / (w H w^T), the factor minimising (a w - x) H (a w - x)^T. GPTQ chooses a row's + * codes against a scale fixed beforehand from the weight alone; the refit is the least-squares + * scale for the codes it chose, under the same (undamped) Hessian. Rows with one static scale + * (Scales with one block a row, f32 so the stored value moves exactly); `x`, `w` and `h` as for + * gptq_refine, `w` scaled in place. A factor that is not positive leaves its row alone. */ +void gptq_rescale_rows(const float* x, float* w, Scales& scales, int64_t N, int64_t K, + const float* h); + } /* namespace lq */ diff --git a/libquant/lq_grid.cpp b/libquant/lq_grid.cpp index 1b79c76f..c2f688c3 100644 --- a/libquant/lq_grid.cpp +++ b/libquant/lq_grid.cpp @@ -428,14 +428,16 @@ int grid_parse(const RadParam* o, int n_o, Grid* g, std::string* why) { const int64_t S = (int64_t)1 << L; double lut_unit = 0.0; if (const char* code = rad_param_gets(o, n_o, "tcq_code", nullptr)) { - if (std::strcmp(code, "mad") != 0 || rad_param_gets(o, n_o, "tcq_lut", nullptr)) { - if (why) *why = "tcq_code=mad computes the states' values: no tcq_lut="; + const bool wide = std::strcmp(code, "mad16") == 0; + if ((!wide && std::strcmp(code, "mad") != 0) || rad_param_gets(o, n_o, "tcq_lut", nullptr)) { + if (why) *why = "tcq_code=mad or mad16 computes the states' values: no tcq_lut="; return RAD_E_INVAL; } - g->tcq_mad = true; + g->tcq_mad = !wide; + g->tcq_wide = wide; g->tcq_a = (uint32_t)rad_param_geti(o, n_o, "tcq_a", 0xB5297B) & 0xFFFFFFu; g->tcq_b = (uint32_t)rad_param_geti(o, n_o, "tcq_b", 0x2545F491); - g->tcq_lut = tcq_lut_mad((int)L, g->tcq_a, g->tcq_b); + g->tcq_lut = tcq_lut_mad((int)L, g->tcq_a, g->tcq_b, wide); } else if (const char* lf = rad_param_gets(o, n_o, "tcq_lut", nullptr)) { /* The states' values, integers in -127..127 separated by white space, in state order; * a line "# unit X" names the units a unit-rms block spans (default: the values' rms). */ @@ -1146,11 +1148,12 @@ void grid_tcq_run(const Grid& g, const float* x, const float* s, int64_t n, int3 } } -std::vector tcq_lut_mad(int L, uint32_t a, uint32_t b) { +std::vector tcq_lut_mad(int L, uint32_t a, uint32_t b, bool wide) { std::vector lut((size_t)1 << L); for (uint32_t st = 0; st < (1u << L); ++st) { - const uint32_t h = (((st & 0xFFFFFFu) * (a & 0xFFFFFFu)) + b) & 0x3F3F3F3Fu; - lut[st] = (float)((int)((h & 0xFFu) + ((h >> 8) & 0xFFu) + ((h >> 16) & 0xFFu) + (h >> 24)) - 126); + const uint32_t h = (((st & 0xFFFFFFu) * (a & 0xFFFFFFu)) + b) & (wide ? 0xFFFFFFFFu : 0x3F3F3F3Fu); + lut[st] = (float)((int)((h & 0xFFu) + ((h >> 8) & 0xFFu) + ((h >> 16) & 0xFFu) + (h >> 24)) - + (wide ? 510 : 126)); } return lut; } diff --git a/libquant/lq_grid.h b/libquant/lq_grid.h index c2be21d0..5ad847e3 100644 --- a/libquant/lq_grid.h +++ b/libquant/lq_grid.h @@ -126,6 +126,10 @@ struct Grid { * table is still stored, A and B beside it ("trellis.mad"). */ bool tcq_mad = false; uint32_t tcq_a = 0, tcq_b = 0; + /* tcq_code=mad16: the same hash with every byte whole, bytesum(h) - 510 (sigma ~148, where mad's + * is ~37): values a 16-bit reader takes exactly (f16 holds integers to 2048), so the code is not + * held to the int8 grid's ~42 dB floor. No int8 encoding can carry it; gptqsim measures it. */ + bool tcq_wide = false; /* The planes of the encoding, by index; -1 when the grid has none. */ int plane_zero() const { return asym ? 2 : -1; } @@ -180,8 +184,9 @@ int grid_code(const Grid& g, const BlockScale& b, float v); int grid_vq_code(const Grid& g, const BlockScale& b, const float* v); float grid_decode(const Grid& g, const BlockScale& b, int code); -/* tcq_code=mad's value of every one of the 2^L states (Grid::tcq_mad). */ -std::vector tcq_lut_mad(int L, uint32_t a, uint32_t b); +/* tcq_code=mad's value of every one of the 2^L states (Grid::tcq_mad); with `wide`, mad16's + * (Grid::tcq_wide). */ +std::vector tcq_lut_mad(int L, uint32_t a, uint32_t b, bool wide = false); /* A trellis grid's search state for one run, reused across runs. */ struct TcqWork { diff --git a/libquant/lq_hess.cpp b/libquant/lq_hess.cpp index b76ed4b1..2ad553d6 100644 --- a/libquant/lq_hess.cpp +++ b/libquant/lq_hess.cpp @@ -254,6 +254,11 @@ std::string calib_stem(const char* name) { if (s[i] < '0' || s[i] > '9') { all_digits = false; break; } if (all_digits) s.resize(dot); } + /* A vocabulary-weighted lm_head's width classes (output.k) are rows of one weight: they + * read the head's input Gram. */ + if (s.size() > 8 && s.compare(0, 8, "output.k") == 0 && + s.find_first_not_of("0123456789", 8) == std::string::npos) + s.resize(6); return s; } diff --git a/libquant/lq_hess.h b/libquant/lq_hess.h index f3ced66c..b4366849 100644 --- a/libquant/lq_hess.h +++ b/libquant/lq_hess.h @@ -36,7 +36,8 @@ namespace lq { using Gram = std::shared_ptr>; /* `blk.7.ffn_gate_up_exps.123.weight` -> `blk.7.ffn_gate_up_exps`: the stem a layer's pooled - * Hessian file is named by. */ + * Hessian file is named by. A vocabulary-weighted head's width class, `output.k4.weight`, pools + * to `output`. */ std::string calib_stem(const char* name); /* The stem `name`'s Hessian is read from in `dir`: the weight's own (the name less `.weight`, diff --git a/libquant/lq_quant.h b/libquant/lq_quant.h index acde3041..a6d07c08 100644 --- a/libquant/lq_quant.h +++ b/libquant/lq_quant.h @@ -33,7 +33,8 @@ { "tcq_rb", RAD_P_INT, "0", \ "R: a trellis's values on the int8 grid of one scale per R rows (the block's largest)" }, \ { "tcq_code", RAD_P_STR, nullptr, \ - "mad: the states' values computed, bytesum((st*A+B) & 0x3F3F3F3F) - 126 (no tcq_lut=)" }, \ + "mad: the states' values computed, bytesum((st*A+B) & 0x3F3F3F3F) - 126 (no tcq_lut=); " \ + "mad16: bytesum(st*A+B) - 510, wider than int8, for the 16-bit path (gptqsim only)" }, \ { "tcq_a", RAD_P_INT, "11872635", "tcq_code=mad's multiplier A (24 bits)" }, \ { "tcq_b", RAD_P_INT, "625341585", "tcq_code=mad's addend B" }, \ { "tcq_colf", RAD_P_INT, "0", \ diff --git a/libquant/lq_registry.cpp b/libquant/lq_registry.cpp index 03b83d6d..3591063e 100644 --- a/libquant/lq_registry.cpp +++ b/libquant/lq_registry.cpp @@ -58,9 +58,15 @@ const RadQuantOption kGptqOptions[] = { { "act_order", RAD_P_INT, "0", "1: quantise the columns by descending input energy, stored in that order with the " "permutation as the encoding's transform (a kernel permutes its activation to match)" }, + { "tcq_order", RAD_P_INT, "0", + "a trellis's column order: 1 runs GPTQ over the columns by descending input energy, the codes " + "stored in column order (each column is its own trellis, so the reader is unchanged)" }, { "cd", RAD_P_INT, "0", "sweeps of coordinate descent after the loop: every code re-chosen at its conditional " "optimum against the same damped Hessian, the other columns held (lq_gptq.h)" }, + { "rescale", RAD_P_INT, "0", + "1: after the loop each row's scale is refitted to its codes, the least-squares factor under " + "the Hessian (one static f32 scale a row; lq_gptq.h gptq_rescale_rows)" }, { "dyn", RAD_P_INT, "0", "1: each 128-column group's scale chosen when the loop reaches it, from the values earlier " "columns' error has moved it to (one scale level, groups of 128)" }, @@ -106,6 +112,9 @@ int gptq_encoding(const RadParam* o, int n_o, const RadQuantWeight* w, RadEncodi Grid g; const int st = grid_of(o, n_o, w, &g, true); if (st != RAD_OK) return st; + if (g.tcq_wide) + return refuse(w, "tcq_code=mad16's values are wider than int8, and no reader decodes them " + "yet (the 16-bit path): quantise it with gptqsim"); *out = grid_encoding(g); if (rad_param_geti(o, n_o, "act_order", 0)) { if (g.fwht) return refuse(w, "act_order=1 and transform= are two transforms, and an " @@ -132,6 +141,8 @@ int gptq_decode(const RadEncoding* e, const RadQuantWeight* w, const void* const return grid_tcq_decode(e, w->rows, w->cols, planes, row0, rows, out); } +/* `planes` null: quantise and leave the decoded values in `src` (the grid's domain, column order), + * storing nothing -- gptqsim's use. */ int gptq_quantize(const RadParam* o, int n_o, const RadQuantWeight* w, float* src, int64_t row0, int64_t rows, void* const* planes) { Grid g; @@ -144,17 +155,28 @@ int gptq_quantize(const RadParam* o, int n_o, const RadQuantWeight* w, float* sr const char* dir = rad_param_gets(o, n_o, "calib", nullptr); const double damp = rad_param_getf(o, n_o, "damp", 0.01); const bool act = rad_param_geti(o, n_o, "act_order", 0) != 0; + /* A trellis's columns are independent codes, so GPTQ may take them in any order while they + * stay stored in column order: the order is the quantiser's alone. */ + const bool tord = g.tcq_L && rad_param_geti(o, n_o, "tcq_order", 0) != 0; std::vector perm; std::vector imp_p; const float* imp = w->importance; - if (act) { - perm = gptq_act_order(dir, w->name, K, g.fwht); + auto permute = [&](float* m, bool inverse) { std::vector row((size_t)K); for (int64_t r = 0; r < N; ++r) { - float* wr = src + r * K; - for (int64_t j = 0; j < K; ++j) row[(size_t)j] = wr[perm[(size_t)j]]; + float* wr = m + r * K; + for (int64_t j = 0; j < K; ++j) { + if (inverse) row[(size_t)perm[(size_t)j]] = wr[j]; + else row[(size_t)j] = wr[perm[(size_t)j]]; + } std::memcpy(wr, row.data(), (size_t)K * sizeof(float)); } + }; + Gram uf; + if (tord) uf = gptq_factor_ordered(dir, w->name, K, g.fwht, damp, &perm); + else if (act) perm = gptq_act_order(dir, w->name, K, g.fwht); + if (act || tord) { + permute(src, false); if (imp) { imp_p.resize((size_t)K); for (int64_t j = 0; j < K; ++j) imp_p[(size_t)j] = imp[perm[(size_t)j]]; @@ -165,19 +187,26 @@ int gptq_quantize(const RadParam* o, int n_o, const RadQuantWeight* w, float* sr /* Scales come first, from the weight as it stands, and stay fixed through the loop -- or with * dyn=1 each group's is chosen again as the loop reaches it (gptq_quantise). */ Scales sc = grid_scales(g, src, N, K, imp); - const Planes p = grid_planes(g, K, planes); + const Planes p = planes ? grid_planes(g, K, planes) : Planes{}; const bool dyn = rad_param_geti(o, n_o, "dyn", 0) != 0; if (dyn && !gptq_dynamic_ok(g, sc)) return refuse(w, "dyn=1 chooses a 128-column group's scale as GPTQ reaches it, which needs " "one scale level per row and 128 columns"); + if (tord && (dyn || sc.bc < K || g.lv2 || g.tcq_rb)) + return refuse(w, "tcq_order=1 runs the columns out of order, so it takes one static scale a " + "row (block=1x*, no dyn, scale2 or row blocks)"); - const Gram uf = gptq_factor(dir, w->name, K, g.fwht, damp, act ? perm.data() : nullptr); + if (!tord) uf = gptq_factor(dir, w->name, K, g.fwht, damp, act ? perm.data() : nullptr); const float* u = uf ? uf->data() : nullptr; std::vector codes((size_t)(N * K)); const int cd = (int)rad_param_geti(o, n_o, "cd", 0); + const bool rescale = rad_param_geti(o, n_o, "rescale", 0) != 0; + if (rescale && (dyn || sc.nc != 1 || sc.br != 1 || g.lv2 || g.tcq_rb || g.scale_dt != RAD_F32)) + return refuse(w, "rescale=1 refits one static f32 scale a row (block=1x*, scale=f32, no dyn, " + "scale2 or row blocks)"); std::vector x0; - if (cd > 0 && u) x0.assign(src, src + (size_t)(N * K)); + if ((cd > 0 || rescale) && u) x0.assign(src, src + (size_t)(N * K)); { std::string why; const int st = gptq_quantise(g, src, codes.data(), sc, N, K, u, dyn && u, &why); @@ -186,11 +215,26 @@ int gptq_quantize(const RadParam* o, int n_o, const RadQuantWeight* w, float* sr return st; } } - grid_store_scales(g, sc, p); - if (!x0.empty()) { + if (tord) { + permute(src, true); + if (!x0.empty()) permute(x0.data(), true); + std::vector row((size_t)K); + for (int64_t r = 0; r < N; ++r) { + int32_t* cr = codes.data() + r * K; + for (int64_t j = 0; j < K; ++j) row[(size_t)perm[(size_t)j]] = cr[j]; + std::memcpy(cr, row.data(), (size_t)K * sizeof(int32_t)); + } + } + if (!x0.empty() && rescale) { + const Gram h = calib_gram(dir, w->name, K, g.fwht, "gptq rescale"); + if (h) gptq_rescale_rows(x0.data(), src, sc, N, K, h->data()); + } + if (planes) grid_store_scales(g, sc, p); + if (!x0.empty() && cd > 0) { const Gram h = calib_gram(dir, w->name, K, g.fwht, "gptq cd"); if (h) gptq_refine(g, x0.data(), src, codes.data(), sc, N, K, h->data(), damp, cd); } + if (!planes) return RAD_OK; const int64_t V = g.vq.empty() ? 1 : g.vdim; /* one code a vector */ #ifdef _OPENMP #pragma omp parallel for schedule(static) if (N * K > (1 << 20)) @@ -252,6 +296,47 @@ int cast_quantize(const RadParam* o, int n_o, const RadQuantWeight* w, float* sr return RAD_OK; } +/* ------------------------------------------------------------------ gptqsim */ +/* gptq on any grid, its decoded values stored as plain bf16 in the weight's own domain (the grid's + * rotation undone): what a reader that decodes the codes to 16 bits and runs a 16-bit GEMM over a + * 16-bit activation computes -- the W16A16 form a selected tensor can take -- measured before that + * reader exists. A plain bf16 linear runs gemm_nt over the bf16 activation, so the engine serves it + * as is. bf16 keeps 8 bits of mantissa, finer than a 7-bit code's error; tcq_code=mad16 is the code + * the 16-bit path can hold that int8 cannot. The container holds 16 bits a weight: a measurement + * sizes the tensor at its grid's bits. */ +int gptqsim_encoding(const RadParam* o, int n_o, const RadQuantWeight* w, RadEncoding* out) { + if (declines(w)) return RAD_E_UNSUPPORTED; + Grid g; + const int st = grid_of(o, n_o, w, &g, true); + if (st != RAD_OK) return st; + if (rad_param_geti(o, n_o, "act_order", 0)) + return refuse(w, "gptqsim stores the values in column order: tcq_order=1, not act_order=1"); + *out = rad_enc_plain(RAD_BF16); + return RAD_OK; +} + +int gptqsim_quantize(const RadParam* o, int n_o, const RadQuantWeight* w, float* src, int64_t row0, + int64_t rows, void* const* planes) { + Grid g; + int st = grid_of(o, n_o, w, &g, true); + if (st != RAD_OK) return st; + st = gptq_quantize(o, n_o, w, src, row0, rows, nullptr); + if (st != RAD_OK) return st; + const int64_t N = w->rows, K = w->cols; + /* The unnormalised Hadamard is its own inverse up to its width: F F = n I. */ + if (g.fwht) { + grid_transform_rows(g, src, N, K); + const float inv = 1.0f / (float)g.fwht; + for (int64_t i = 0; i < N * K; ++i) src[i] *= inv; + } + uint16_t* out = (uint16_t*)planes[0]; +#ifdef _OPENMP +#pragma omp parallel for schedule(static) if (N * K > (1 << 20)) +#endif + for (int64_t i = 0; i < N * K; ++i) out[i] = f32_to_bf16(src[i]); + return RAD_OK; +} + const RadQuantizerInfo kQuantizers[] = { { "rtn", "round to nearest: every value to its nearest point on the grid, the scale of each block " @@ -263,6 +348,11 @@ const RadQuantizerInfo kQuantizers[] = { "over the columns after it, on any grid, the scales fixed from the weight first", kGptqOptions, (int)(sizeof kGptqOptions / sizeof kGptqOptions[0]), gptq_encoding, whole_weight, gptq_quantize, gptq_decode }, + { "gptqsim", + "gptq on any grid with the decoded values stored as plain bf16, the grid's rotation undone: " + "the W16A16 form of a tensor (a 16-bit decode and GEMM), measured before its reader exists", + kGptqOptions, (int)(sizeof kGptqOptions / sizeof kGptqOptions[0]), + gptqsim_encoding, whole_weight, gptqsim_quantize, nullptr }, { "cast", "a float weight converted to another float dtype, to nearest even, with no scale", kCastOptions, (int)(sizeof kCastOptions / sizeof kCastOptions[0]), diff --git a/libquant/lq_tcq_gpu.hip b/libquant/lq_tcq_gpu.hip index 3d9428aa..25094af2 100644 --- a/libquant/lq_tcq_gpu.hip +++ b/libquant/lq_tcq_gpu.hip @@ -56,12 +56,19 @@ struct TcqArgs { /* A thread's E states' table values. With PACK they sit four to a register as the int8 they are * (the table holds integers in -127..127), for the wide forms. */ -template +template struct Lut { + /* PACK 1: four int8 a register; 2: two int16 a register, for a wide code (tcq_code=mad16, + * values past int8); 0: one float a state. */ + static constexpr int NP = PACK == 2 ? E / 2 : PACK ? E / 4 : 1; float f[PACK ? 1 : E]; - uint32_t p[PACK ? E / 4 : 1]; + uint32_t p[NP]; __device__ void set(int e, float v) { - if (PACK) { + if (PACK == 2) { + const uint32_t b = (uint32_t)(uint16_t)(int16_t)(int)v; + if (e % 2 == 0) p[e / 2] = b; + else p[e / 2] |= b << 16; + } else if (PACK) { const uint32_t b = (uint32_t)(uint8_t)(int8_t)(int)v; if (e % 4 == 0) p[e / 4] = b; else p[e / 4] |= b << (8 * (e % 4)); @@ -70,6 +77,7 @@ struct Lut { } } __device__ float at(int e) const { + if (PACK == 2) return (float)(int16_t)(p[e / 2] >> (16 * (e % 2))); if (PACK) return (float)(int8_t)(p[e / 4] >> (8 * (e % 4))); return f[e]; } @@ -97,7 +105,7 @@ __device__ inline bool cheaper(float ac, int ai, float bc, int bi) { * tcq_rb, NB the groups' cheapest held in one LDS buffer or two (one: a second barrier a step, for * the state counts whose two do not fit). The geometry is compile-time, so a state's LDS address * is an immediate offset from the thread's. */ -template +template __global__ void __launch_bounds__((1 << (L - KB)) * SH / M) __attribute__((amdgpu_waves_per_eu(WPE))) tcq_block(TcqArgs a) { /* SH lanes share a group's predecessors, BT each; a thread holds M groups' worth. */ @@ -166,7 +174,7 @@ __attribute__((amdgpu_waves_per_eu(WPE))) tcq_block(TcqArgs a) { * a register a state again. */ if constexpr (PACK) { #pragma unroll - for (int q = 0; q < E / 4; ++q) asm volatile("" : "+v"(lv.p[q])); + for (int q = 0; q < Lut::NP; ++q) asm volatile("" : "+v"(lv.p[q])); } #pragma unroll for (int m = 0; m < M; ++m) { @@ -326,13 +334,15 @@ using BlockKernel = void (*)(TcqArgs); * packed table and an occupancy target (R9700, a 96-run weight of 5120 columns): fewer threads a * run let more runs share a WGP, until the states a thread holds spill. 1024 threads at most, the * wide codes' groups split over lanes. The 2^10-state forms are the default sizing, for tests. */ -struct Form { int L, k; BlockKernel plain, rb; int threads, nb; }; +/* `wide`: the forms for a code whose values pass int8 (tcq_code=mad16), the table packed two int16 + * a register. */ +struct Form { int L, k; BlockKernel plain, rb; int threads, nb; bool wide; }; #define LQ_FORM(l, kb, m, sh, pack, wpe) \ { l, kb, tcq_block, tcq_block, \ - (1 << (l - kb)) * sh / m, 2 } + (1 << (l - kb)) * sh / m, 2, (pack) == 2 } #define LQ_FORM1(l, kb, m, sh, pack, wpe) \ { l, kb, tcq_block, \ - tcq_block, (1 << (l - kb)) * sh / m, 1 } + tcq_block, (1 << (l - kb)) * sh / m, 1, (pack) == 2 } const Form kForms[] = { LQ_FORM(10, 2, 1, 1, false, 1), LQ_FORM(10, 3, 2, 1, false, 1), LQ_FORM(10, 4, 1, 1, false, 1), LQ_FORM(10, 5, 1, 1, false, 1), @@ -344,13 +354,16 @@ const Form kForms[] = { * states at 2 bits in one; not yet swept */ LQ_FORM1(15, 2, 8, 1, true, 1), LQ_FORM1(16, 3, 8, 1, true, 1), LQ_FORM(16, 4, 4, 1, true, 1), LQ_FORM(16, 5, 2, 1, true, 1), LQ_FORM(16, 6, 1, 1, true, 1), LQ_FORM(16, 7, 1, 2, true, 1), + /* the wide code's forms: the sweep's shapes, the table at int16 */ + LQ_FORM1(16, 3, 8, 1, 2, 1), LQ_FORM(16, 4, 4, 1, 2, 1), LQ_FORM(16, 5, 2, 1, 2, 1), + LQ_FORM(16, 6, 1, 1, 2, 1), LQ_FORM(16, 7, 1, 2, 2, 1), }; #undef LQ_FORM #undef LQ_FORM1 -const Form* pick_form(int L, int k) { +const Form* pick_form(int L, int k, bool wide) { for (const Form& f : kForms) - if (f.L == L && f.k == k) return &f; + if (f.L == L && f.k == k && f.wide == wide) return &f; return nullptr; } @@ -577,7 +590,7 @@ bool gpu_enabled() { return !devices().empty(); } int gptq_tcq_gpu(const Grid& g, float* w, int32_t* codes, Scales& scales, int64_t N, int64_t K, const float* u, bool dynamic, std::string* why) { - const Form* f = pick_form(g.tcq_L, g.tcq_k); + const Form* f = pick_form(g.tcq_L, g.tcq_k, g.tcq_wide); const int64_t T = g.tcq_rows; if (!f) { *why = "the card has no trellis kernel for tcq=" + std::to_string(g.tcq_L) + " with " + diff --git a/libr4d/CMakeLists.txt b/libr4d/CMakeLists.txt index 91c246be..e6fb2d0f 100644 --- a/libr4d/CMakeLists.txt +++ b/libr4d/CMakeLists.txt @@ -160,6 +160,7 @@ set(R4D_UNITS "r4d_gemm_fp8a8|" "r4d_gemm_iqr|" "r4d_iqr_embed|" + "r4d_logits_vocab|" "r4d_quant_act_fp8|" "r4d_givens_rotate|" "r4d_fused_quant_fp8|" diff --git a/libr4d/r4d_attn_prefill_split.h b/libr4d/r4d_attn_prefill_split.h index 6f86caf3..5728a07e 100644 --- a/libr4d/r4d_attn_prefill_split.h +++ b/libr4d/r4d_attn_prefill_split.h @@ -63,9 +63,10 @@ static inline int r4d_prefill_splits_law(int bq, int tile, int q_len, int total_ // tells r4d_selftest a split launch from an unsplit one with the same bytes. Not atomic. static int g_prefill_last_splits = 0; -/* The runtime supplies the live group maximum only when it can prove that the launch's full - * seqused operand is the just-built, non-speculative prefill batch. Other shapes use max_ctx below; - * never synchronously copy device seqused from a HIP queue independent of the AQL upload queue. */ +/* RadArgs::kv_used_max_h is the host maximum of the launch's seqused operand (Ctx::issue_body), + * -1 where it cannot be proven, which uses max_ctx below. In a recorded pass of a plugin with no + * pass-key callback (decode, verify, draft) it is the step's keyed context bound instead. Never + * synchronously copy device seqused from a HIP queue independent of the AQL upload queue. */ /* The KV split's count before the scratch bound: the case's `splits` parameter when it names one * (r4d_selftest; the prefill rows declare no such axis, so the engine passes none), else the law, diff --git a/libr4d/r4d_fuse.cpp b/libr4d/r4d_fuse.cpp index 43a905a2..7ead3168 100644 --- a/libr4d/r4d_fuse.cpp +++ b/libr4d/r4d_fuse.cpp @@ -594,6 +594,46 @@ extern "C" int r4d_fuse_gemm_nt_q_gated_mx(const RadParam* p, int n_p, uint64_t } } +/* ========================================================================================== + * gemm_nt_q_gated at i8a8h -- the same fold over an IQR gate_up weight (r4d_iqr.h) under the + * rotated int8 trunk. (row: gemm_iqr_gated, M <= 16; kernel: libr4d/r4d_gemm_iqr.hip, the gated + * forms of its GEMV and 16-token tile, each byte-identical to the GEMM row gemm_iqr_nt_m64 serves + * at that M followed by gated_had_quant_i8g.) + * + * Operands: [0] a [1] a_scale [2] b [3] b_scale [4] q [5] scale [6] out_bf16 + * + * As gemm_nt_q_gated's chain, with `dtype` i8a8h on the GEMM and the rotated int8 quantiser. + */ +extern "C" int r4d_fuse_gemm_nt_q_gated_iqr(const RadParam* p, int n_p, uint64_t present, int step, + RadFuseStep* out) { + (void)present; + if (!out) return RAD_E_INVAL; + const int64_t M = pi(p, n_p, "M"), N = pi(p, n_p, "N"), K = pi(p, n_p, "K"); + const char* dt = r4d_pgets(p, n_p, "dtype"); + if (M <= 0 || N <= 0 || K <= 0 || N % 2) return RAD_E_UNSUPPORTED; + if (pi(p, n_p, "group", R4D_FP8_BLOCK) != R4D_FP8_BLOCK) return RAD_E_UNSUPPORTED; + if (!dt || std::strcmp(dt, "i8a8h")) return RAD_E_UNSUPPORTED; + if (!act_is(p, n_p, "silu", "silu")) return RAD_E_UNSUPPORTED; + + switch (step) { + case 0: { + Step s(out, "gemm_nt_q"); + s.mirror(p, n_p, "M").mirror(p, n_p, "N").mirror(p, n_p, "K") + .mirror(p, n_p, "group").mirror(p, n_p, "dtype"); + /* a, a_scale, b, b_scale, y, a_sum, b_ref */ + return s.wire({ 0, 1, 2, 3, RAD_FUSE_TMP(0), RAD_FUSE_NONE, RAD_FUSE_NONE }); + } + case 1: { + Step s(out, "gated_had_quant_i8g"); + s.mirror(p, n_p, "M").pint("n", (long long)(N / 2)).mirror(p, n_p, "group") + .pstr("dtype", "bf16").mirror(p, n_p, "act"); + return s.wire({ RAD_FUSE_TMP(0), 4, 5, 6 }); /* gate_up, q, scale, out_bf16 */ + } + default: + return RAD_E_NOTFOUND; + } +} + /* ========================================================================================== * gdn_conv_recurrent_update -- the decode convolution folded into the recurrent update's prologue. * (row: gdn_conv_recurrent_update_k128_v128_bf16; kernel: libr4d/ diff --git a/libr4d/r4d_fused_quant_fp8.hip b/libr4d/r4d_fused_quant_fp8.hip index 0fde9e8f..f6d44f67 100644 --- a/libr4d/r4d_fused_quant_fp8.hip +++ b/libr4d/r4d_fused_quant_fp8.hip @@ -262,7 +262,11 @@ __global__ __launch_bounds__(1024) void gated_quant_fp8_kernel( // // ACT 2 is the product with no activation: the unfused pair is `mul` then the quantiser, so the // gate is not rounded on its own and the product is rounded once, as mul_bf16 does. -template +// +// ROT (with I8: gate_had_quant_i8g) puts the width-128 Hadamard between the bf16-rounded product +// and the absmax, as gated_quant_fp8_kernel's ROT, for an out projection stored rotated: the codes +// are had_quant_act_i8g's over `y`. +template __global__ __launch_bounds__(1024) void gate_quant_fp8_kernel( const uint16_t* __restrict__ g, const uint16_t* __restrict__ x, uint16_t* __restrict__ y, uint8_t* __restrict__ q, float* __restrict__ s, uint32_t n, uint32_t nkb, uint32_t g_ld, @@ -303,6 +307,8 @@ __global__ __launch_bounds__(1024) void gate_quant_fp8_kernel( v[j] = bf2f(h); } } + // The rotated launcher requires n % 128 == 0, so no rotated group contains padding. + if constexpr (ROT) r4d_fwht_wave<(int)kGroup>(v, (int)lane); quant_group(v, s, qr, (size_t)row * s_ld + kb, c0, n, lane); } } @@ -866,11 +872,12 @@ extern "C" int r4d_gated_had_quant_i8g(long gu, long y, long q, long s, int M, i // s [M][ceil(n/128)] f32, `s_ld` elements a row (0 = ceil(n/128)) static int gate_quant_fp8_emit(long g, long x, long y, long q, long s, int M, int n, int mode, int g_ld, int x_ld, int y_ld, int q_ld, int s_ld, - RadStream stream, bool i8 = false) { + RadStream stream, bool i8 = false, bool rot = false) { int emit_rc = RAD_OK; if (!g || !x || !q || !s) return -1; if (M <= 0 || n <= 0) return -2; if (n % 4) return -3; + if (rot && (!i8 || n % (int)kGroup)) return -3; if (mode < 0 || mode > 2) return -5; if (!g_ld) g_ld = n; if (!x_ld) x_ld = n; @@ -881,7 +888,11 @@ static int gate_quant_fp8_emit(long g, long x, long y, long q, long s, int M, in // A wave a group, capped at r4d_act_threads' width, as gated_quant_fp8 above. const int thr = std::min(nkb, r4d_act_threads(M, n) / (int)kWave) * (int)kWave; #define R4D_GTQ_I(a, I) \ - emit_rc = R4D_EMIT(stream, (gate_quant_fp8_kernel), dim3((uint32_t)M), dim3(thr), 0, \ + emit_rc = rot ? R4D_EMIT(stream, (gate_quant_fp8_kernel), dim3((uint32_t)M), \ + dim3(thr), 0, (const uint16_t*)g, (const uint16_t*)x, (uint16_t*)y, \ + (uint8_t*)q, (float*)s, (uint32_t)n, (uint32_t)nkb, (uint32_t)g_ld, \ + (uint32_t)x_ld, (uint32_t)y_ld, (uint32_t)q_ld, (uint32_t)s_ld) \ + : R4D_EMIT(stream, (gate_quant_fp8_kernel), dim3((uint32_t)M), dim3(thr), 0, \ (const uint16_t*)g, (const uint16_t*)x, \ (uint16_t*)y, (uint8_t*)q, (float*)s, (uint32_t)n, (uint32_t)nkb, \ (uint32_t)g_ld, (uint32_t)x_ld, (uint32_t)y_ld, (uint32_t)q_ld, \ @@ -1152,7 +1163,7 @@ static long long tq_pitch(const RadTensor* t, long long width) { /* Two-operand form of gated_quant_fp8 for gated attention: `x` is the attention output and the * gate a column view of the [q|gate] projection. The gate offset comes from the view, so there is * no `gate_offset` parameter. */ -extern "C" int r4d_rad_gate_quant_fp8(const RadArgs* a, RadStream stream) { +static int rad_gate_quant(const RadArgs* a, RadStream stream, bool rot) { const RadTensor* g = r4d_opt(a, TQ_G); const RadTensor* x = r4d_opt(a, TQ_X); const RadTensor* q = r4d_opt(a, TQ_Q); @@ -1160,6 +1171,7 @@ extern "C" int r4d_rad_gate_quant_fp8(const RadArgs* a, RadStream stream) { const RadTensor* y = r4d_opt(a, TQ_Y); if (!g || !x || !q || !sc) return R4D_NO(RAD_E_INVAL); if (q->dtype != RAD_F8E4M3 && q->dtype != RAD_I8) return R4D_NO(RAD_E_DTYPE); + if (rot && q->dtype != RAD_I8) return R4D_NO(RAD_E_DTYPE); /* M is numel(x) / n. The `M` parameter is the band's declared maximum, not this issue's, and * shape[0] counts tokens while a row here is a (token, head) pair. */ const long long K = r4d_geti_or(a, "n", 0); @@ -1181,7 +1193,16 @@ extern "C" int r4d_rad_gate_quant_fp8(const RadArgs* a, RadStream stream) { const int e = gate_quant_fp8_emit(r4d_addr(g), r4d_addr(x), y ? r4d_addr(y) : 0, r4d_addr(q), r4d_addr(sc), (int)M, (int)K, mode, (int)gp, (int)xp, (int)yp, (int)qp, (int)sp, stream, - q->dtype == RAD_I8); + q->dtype == RAD_I8, rot); return e == 0 ? RAD_OK : RAD_E_SHAPE; } +extern "C" int r4d_rad_gate_quant_fp8(const RadArgs* a, RadStream stream) { + return rad_gate_quant(a, stream, false); +} + +/* gate_quant_fp8 at had_quant_act_i8g's codes, for an out projection stored rotated (i8a8h). */ +extern "C" int r4d_rad_gate_had_quant_i8g(const RadArgs* a, RadStream stream) { + return rad_gate_quant(a, stream, true); +} + diff --git a/libr4d/r4d_gdn_recurrent_update_k128_v128_bf16_fp32state.hip b/libr4d/r4d_gdn_recurrent_update_k128_v128_bf16_fp32state.hip index dec073a0..5e1e0d9b 100644 --- a/libr4d/r4d_gdn_recurrent_update_k128_v128_bf16_fp32state.hip +++ b/libr4d/r4d_gdn_recurrent_update_k128_v128_bf16_fp32state.hip @@ -33,6 +33,7 @@ #include "r4d_common.h" #include "r4d_gdn_conv_tap.h" #include "r4d_q8.h" // the 8-bit codes the folded quantiser writes: E4M3 or int8 +#include "r4d_fwht.h" // NORM 3: had_quant_act_i8g's rotation before the int8 codes #include #include #include @@ -245,6 +246,7 @@ void r4d_gdn_recurrent_update_kernel(const unsigned short* __restrict__ q, constexpr int THR = NR * 2; static_assert(!(NORM && VS > 1), "the fused row norm needs the whole 128-wide row"); __shared__ float wsum[THR / 32]; + __shared__ float srot[NORM == 3 ? RU_V : 1]; // NORM 3: the row's bf16 output, for the rotation __shared__ float spart[STG ? RU_TMAX * 4 : 1]; // per (token, half): sum q^2, sum k^2 __shared__ float sscl [STG ? RU_TMAX * 2 : 1]; // per token: the two closed scales const int n = blockIdx.x, hv = blockIdx.y; @@ -642,7 +644,32 @@ void r4d_gdn_recurrent_update_kernel(const unsigned short* __restrict__ q, // `on`, with r4d_fused_quant_fp8.hip's quant_group arithmetic (including the clamp that keeps // the group maximum from becoming NaN). NORM == 2 writes int8 codes instead (quant_act_i8g: // scale amax / 127, round to nearest-even). - if (NORM && oq) { + // NORM == 3 writes had_quant_act_i8g's codes: the row's 128 stored bf16 values through + // r4d_fwht_wave<128> in one wave (a lane four consecutive channels, that function's mapping), + // then its amax / 127 scale and round-to-nearest-even, so the bytes are that quantiser's over + // `o`. + if (NORM == 3 && oq) { + if (half == 0) srot[row] = bf2f(ob); + __syncthreads(); + if (tid < 32) { + float rv[4]; +#pragma unroll + for (int j = 0; j < 4; ++j) rv[j] = srot[4 * tid + j]; + r4d_fwht_wave<128>(rv, tid); + float m = fmaxf(fmaxf(fabsf(rv[0]), fabsf(rv[1])), fmaxf(fabsf(rv[2]), fabsf(rv[3]))); + m = r4d_wave_max(m); + const float qs = m > 0.0f ? m * (1.0f / 127.0f) : 1.0f; + if (tid == 0) os[(size_t)tok * os_ld + hv] = qs; + const float inv = 1.0f / qs; + uint32_t pk = 0; +#pragma unroll + for (int j = 0; j < 4; ++j) + pk |= ((uint32_t)(int)rintf(fminf(fmaxf(rv[j] * inv, -127.0f), 127.0f)) & 0xFFu) << (8 * j); + *(uint32_t*)(oq + (size_t)tok * oq_pitch + (size_t)hv * RU_V + 4 * tid) = pk; + } + __syncthreads(); // srot is reused by the next token + } + if ((NORM == 1 || NORM == 2) && oq) { const float ov = bf2f(ob); float mv = (half == 0) ? fabsf(ov) : 0.0f; mv = fmaxf(mv, r4d_xor_lane<16>(mv)); mv = fmaxf(mv, r4d_xor_lane<8>(mv)); @@ -879,7 +906,8 @@ static unsigned int* ru_conv_ctr(RadStream s, const void* out) { // The recurrent update with gdn_conv_update folded in, decode shape only (bf16 a/b, fused row // norm, one workgroup per (sequence, value head)). State contract, non-temporal choice and -// factor-block bounds are as in ru_update_launch. `w_f32` is the conv weight's type. +// factor-block bounds are as in ru_update_launch. `w_f32` is the conv weight's type. `oq_i8`: +// E4M3 codes (0), int8 (1), or had_quant_act_i8g's rotated int8 (2). static int ru_conv_recurrent_launch(const RuConv& cv, const void* a, const void* b, long ab_stride, const void* A_log, const void* dt_bias, void* state, long st_slot, long st_head, void* o, void* oq, void* os, @@ -896,8 +924,9 @@ static int ru_conv_recurrent_launch(const RuConv& cv, const void* a, const void* const bool nt = flood <= (long)RU_NT_MB * 1024 * 1024; const dim3 grid(N, H, 1), blk(RU_V * 2); #define RC_LAUNCH(NTC, ANCC, SDTC, CVC) \ - do { if (oq_i8) RC_LAUNCH_NM(2, NTC, ANCC, SDTC, CVC); \ - else RC_LAUNCH_NM(1, NTC, ANCC, SDTC, CVC); } while (0) + do { if (oq_i8 == 2) RC_LAUNCH_NM(3, NTC, ANCC, SDTC, CVC); \ + else if (oq_i8) RC_LAUNCH_NM(2, NTC, ANCC, SDTC, CVC); \ + else RC_LAUNCH_NM(1, NTC, ANCC, SDTC, CVC); } while (0) #define RC_LAUNCH_NM(NM, NTC, ANCC, SDTC, CVC) \ hipLaunchKernelGGL((r4d_gdn_recurrent_update_kernel<1, NM, 1, NTC, ANCC, 0, SDTC, CVC>), \ grid, blk, 0, (hipStream_t)stream, nullptr, nullptr, nullptr, a, b, \ @@ -1044,7 +1073,8 @@ enum { OPD_CR_X = 0, OPD_CR_CW, OPD_CR_CB, OPD_CR_CSTATE, OPD_CR_CIDX, OPD_CR_A, OPD_CR_ALOG, OPD_CR_DTB, OPD_CR_STATE, OPD_CR_SIDX, OPD_CR_NACC, OPD_CR_CU, OPD_CR_Z, OPD_CR_NORMW, OPD_CR_O, OPD_CR_OQ, OPD_CR_OS }; -extern "C" int r4d_rad_gdn_conv_recurrent_update(const RadArgs* a, RadStream s) { +/* `had`: gdn_conv_recurrent_update_had, whose codes are had_quant_act_i8g's over `o` (required). */ +static int gdn_conv_recurrent_entry(const RadArgs* a, RadStream s, bool had) { if (gdn_dims_ok() != RAD_OK) return R4D_NO(RAD_E_SHAPE); const RadTensor* x = r4d_opt(a, OPD_CR_X); const RadTensor* cw = r4d_opt(a, OPD_CR_CW); @@ -1070,6 +1100,7 @@ extern "C" int r4d_rad_gdn_conv_recurrent_update(const RadArgs* a, RadStream s) !z || !nw || !o) return R4D_NO(RAD_E_INVAL); if ((oq != nullptr) != (os != nullptr)) return R4D_NO(RAD_E_INVAL); + if (had && (!oq || oq->dtype != RAD_I8)) return R4D_NO(RAD_E_INVAL); if (x->rank != 2 || cst->rank != 3 || o->rank != 3 || ta->rank != 2 || tb->rank != 2) return R4D_NO(RAD_E_SHAPE); if (state->rank < 2 || sidx->rank < 1 || cidx->rank < 1) return R4D_NO(RAD_E_SHAPE); @@ -1147,5 +1178,13 @@ extern "C" int r4d_rad_gdn_conv_recurrent_update(const RadArgs* a, RadStream s) os ? (long)r4d_row_pitch(os) : 0, cu->data, sidx->data, (long)sidx->stride[0], nacc ? nacc->data : nullptr, z->data, (long)z_row, nw->data, neps, nact, N, (int)H, (int)Hg, scale, thr, state->dtype == RAD_F16 ? 1 : 0, s, - oq && oq->dtype == RAD_I8 ? 1 : 0, anc != 0, cw->dtype == RAD_F32); + had ? 2 : oq && oq->dtype == RAD_I8 ? 1 : 0, anc != 0, cw->dtype == RAD_F32); +} + +extern "C" int r4d_rad_gdn_conv_recurrent_update(const RadArgs* a, RadStream s) { + return gdn_conv_recurrent_entry(a, s, false); +} + +extern "C" int r4d_rad_gdn_conv_recurrent_update_had(const RadArgs* a, RadStream s) { + return gdn_conv_recurrent_entry(a, s, true); } diff --git a/libr4d/r4d_gemm_iqr.hip b/libr4d/r4d_gemm_iqr.hip index 984a790f..a3f289f9 100644 --- a/libr4d/r4d_gemm_iqr.hip +++ b/libr4d/r4d_gemm_iqr.hip @@ -1,18 +1,20 @@ // gemm_nt_q over the IQR weights (r4d_iqr.h), decoded from their codes where they are read; VRAM // holds a B-bit weight in B bits. Two rows, as the int8 family's (r4d_gemm_fp8a8.hip): // -// gemm_iqr_nt_m64 M <= 64 (decode and speculative verify). At M <= 8 a GEMV: a wave a 16-row -// tile, its lanes across K, each lane's decoded values one sudot4 against the -// activation. Above, the i8a8 narrow tile with each 128-K block's weight decoded -// and transposed into fragment order through LDS just before its WMMA steps. +// gemm_iqr_nt_m64 M <= 64 (decode and speculative verify). At one token (a computed trellis; +// M <= 8 for the other forms) a GEMV: a block a 16-row tile, its waves across +// K, each lane's decoded values one sudot4 against the activation. To 16 tokens +// a WMMA tile of the same shape, each 128-K unit decoded and transposed into +// fragment order through the wave's LDS just before its WMMA steps. Above, the +// i8a8 narrow tile with the same per-unit decode. // gemm_iqr_tiled any M (prefill). The i8a8 prefill tile over the int8 fragment plane in the // caller's scratch, which the tile's blocks decode as they arrive, each value // once. // -// The narrow and prefill tiles compute what the int8 tiles compute over the same int8 values (their -// split, staging, accumulation order and fold), so a weight decoded here and the same weight's int8 -// values in the int8 kernels give the same output bytes. The GEMV folds per lane and then sums -// across lanes: the product within f32 rounding. +// The narrow tile above 16 tokens and the prefill tile compute what the int8 tiles compute over the +// same int8 values (their split, staging, accumulation order and fold), so a weight decoded here +// and the same weight's int8 values in the int8 kernels give the same output bytes. The GEMV and +// the 16-token tile sum per wave and then across waves: the product within f32 rounding. #include "r4d.h" #include "r4d_args.h" @@ -20,6 +22,8 @@ #include "r4d_fp8_wmma.h" #include "r4d_iqr.h" #include "r4d_iqr_dec.h" +#include "r4d_fwht.h" +#include "r4d_q8.h" #include #include @@ -48,37 +52,97 @@ constexpr uint32_t kIqrSplitWaves = 512; #include "r4d_gemm_8a8_prefill.h" +/* ---- the gated fold (gemm_nt_q_gated at i8a8h) ---------------------------------------------- + * + * gate_up's GEMM with gated_had_quant_i8g's pass in its epilogue. A block computes one 16-column + * tile of the gated output: the gate rows' tile and the up rows' tile, each with the waves and K + * order of the plain kernel at the full weight's N, so their bf16 values are the plain kernel's. + * It writes silu(gate) * up, rounded as gated_quant_fp8_kernel rounds it, into the op's scratch + * (and `out_bf16`), and the last of a 128-column group's eight blocks to arrive rotates and + * quantises the group, a wave a token, as that kernel does: so the codes and scales are the + * pair's bytes. */ +struct GatedOut { + uint16_t* H; /* [M][n] the bf16 product, scratch */ + int8_t* Q; /* [M][q_ld] int8 codes */ + float* S; /* [M][s_ld] a scale per (token, 128 columns) */ + uint16_t* Yb; /* [M][y_ld] the unrotated bf16 product, or null */ + unsigned int* cnt; /* an arrival counter per 128-column group */ + uint32_t n, q_ld, s_ld, y_ld; +}; + +/* Token m's gated value at column `col` from the gate and up rows' f32 sums (row scale applied). */ +__device__ __forceinline__ void gated_put(const GatedOut& go, uint32_t m, uint32_t col, float vg, + float vu) { + const float gv = bf16_to_f32(f32_to_bf16(vg)); + const float a = gv / (1.0f + expf(-gv)); + const uint16_t h = f32_to_bf16(a * bf16_to_f32(f32_to_bf16(vu))); + go.H[(size_t)m * go.n + col] = h; + if (go.Yb) go.Yb[(size_t)m * go.y_ld + col] = h; +} + +/* After every thread's gated_put: the group's last arriver quantises it, `nw` waves. */ +__device__ __forceinline__ void gated_tail(const GatedOut& go, uint32_t M, uint32_t nw) { + __shared__ unsigned int s_last; + const uint32_t tid = threadIdx.x, lane = tid & (kWave - 1), wave = tid / kWave; + const uint32_t g = blockIdx.x / 8u; + __threadfence(); + __syncthreads(); + if (tid == 0) + s_last = __hip_atomic_fetch_add(&go.cnt[g], 1u, __ATOMIC_ACQ_REL, __HIP_MEMORY_SCOPE_AGENT); + __syncthreads(); + if (s_last != 7u) return; + if (tid == 0) __hip_atomic_store(&go.cnt[g], 0u, __ATOMIC_RELAXED, __HIP_MEMORY_SCOPE_AGENT); + __threadfence(); + for (uint32_t m = wave; m < M; m += nw) { + const uint32_t c0 = g * 128u + lane * 4u; + float v[4]; +#pragma unroll + for (uint32_t j = 0; j < 4; ++j) v[j] = bf16_to_f32(go.H[(size_t)m * go.n + c0 + j]); + r4d_fwht_wave<128>(v, (int)lane); + const float mx = r4d_wave_max(fmaxf(fmaxf(fabsf(v[0]), fabsf(v[1])), fmaxf(fabsf(v[2]), fabsf(v[3])))); + const float sc = mx > 0.0f ? mx * (1.0f / q8_top()) : 1.0f; + if (lane == 0) go.S[(size_t)m * go.s_ld + g] = sc; + *(uint32_t*)(go.Q + (size_t)m * go.q_ld + c0) = q8_pack4(v[0], v[1], v[2], v[3], 1.0f / sc); + } +} + /* ---- the GEMV: M <= 8 ---------------------------------------------------------------------- * - * A wave a 16-row tile, its lanes across K: lane l takes columns 4l .. 4l + 3 of each 128-K block, - * so its decoded values of a row are one sudot4 against the activation's four bytes there, and a - * row's sum is folded into f32 with the (row, block) and (token, block) scales a block at a time, - * in each lane, then summed across the wave once at the end. The weight stream is the codes' own + * A block a 16-row tile, its KW waves across K: wave w takes the tile's 128-K blocks w, w + KW, .., + * so at any time a block's waves read KW consecutive units of one tile. Within a wave lane l takes + * columns 4l .. 4l + 3 of each block, so its decoded values of a row are one sudot4 against the + * activation's four bytes there, and a row's sum is folded into f32 with the (row, block) and + * (token, block) scales a block at a time, in each lane. At the end each wave sums its lanes and + * the block sums its waves through LDS in ascending order. The weight stream is the codes' own * bytes, fetched a block ahead; the work a value is its decode, a quarter sudot4 a token and half - * an f32 fold. Split over K into partial planes when the tiles alone leave the card idle; the last - * z block of a column of blocks sums them in ascending z. + * an f32 fold. * - * The fold order differs from the WMMA tile's (per lane, then across lanes), so the output is the - * product within f32 rounding rather than the int8 tile's bytes. */ -constexpr uint32_t kGW = 8; /* waves a block */ -template -__global__ __launch_bounds__(kGW * kWave) R4D_WAVES(6) + * A block lives for 1 / KW of a tile's K, so the card balances over N / 16 short blocks and no + * weight needs a split across blocks. A wave a tile over all of K (the previous form) left a + * partial last round of long waves on every shape: at 102 VGPRs a SIMD holds 15 waves, and N / 16 + * tiles (gate_up 2176, down split 7 ways 2240) never divide that. + * + * The fold order differs from the WMMA tile's (per lane, then across lanes and waves), so the + * output is the product within f32 rounding rather than the int8 tile's bytes. */ +template +__global__ __launch_bounds__((GATED ? 2u : 1u) * KW * kWave) R4D_WAVES(6) void iqr_gemv_kernel(Ctx c0, const int8_t* __restrict__ X, const float* __restrict__ XS, - float* __restrict__ part, uint16_t* __restrict__ Y, - unsigned int* __restrict__ Ctr, uint32_t N, uint32_t x_ld, uint32_t xs_ld, - uint32_t kbs) { + uint16_t* __restrict__ Y, uint32_t N, uint32_t x_ld, uint32_t xs_ld, + GatedOut go) { using D = Dec; + constexpr uint32_t NW = (GATED ? 2u : 1u) * KW; __shared__ __attribute__((aligned(16))) int8_t s_tab[D::kTab]; + __shared__ float s_red[NW][16 * MT]; const uint32_t tid = threadIdx.x, lane = tid & (kWave - 1); - const uint32_t wave = __builtin_amdgcn_readfirstlane(tid / kWave); + const uint32_t wave0 = __builtin_amdgcn_readfirstlane(tid / kWave); Ctx c = c0; c.tab = s_tab; - D::stage(s_tab, c, tid, kGW * kWave); + D::stage(s_tab, c, tid, NW * kWave); __syncthreads(); - const uint32_t rt = blockIdx.x * kGW + wave; - const bool alive = rt * 16u < N; - const uint32_t kb0 = blockIdx.z * kbs, kb1 = min(c.nkb, kb0 + kbs); + /* Gated, waves KW and up take the up rows' tile, n rows below the gate rows'. */ + const uint32_t half = GATED ? wave0 / KW : 0u, wave = GATED ? wave0 % KW : wave0; + const uint32_t rt = blockIdx.x + half * (N / 32u); const uint32_t myrow = rt * 16u + (lane & 15u); float acc[16][MT]; @@ -86,10 +150,14 @@ void iqr_gemv_kernel(Ctx c0, const int8_t* __restrict__ X, const float* __restri for (uint32_t q = 0; q < 16; ++q) #pragma unroll for (uint32_t m = 0; m < MT; ++m) acc[q][m] = 0.0f; + float fsum[MT]; /* the biased path's fold factors since its last flush (wave-uniform) */ +#pragma unroll + for (uint32_t m = 0; m < MT; ++m) fsum[m] = 0.0f; + uint32_t nflush = 0; - typename D::Raw cur = D::fetch(c, rt, kb0, lane, alive && kb0 < kb1), nxt; - for (uint32_t kb = kb0; kb < kb1; ++kb) { - if (kb + 1u < kb1) nxt = D::fetch(c, rt, kb + 1u, lane, alive); + typename D::Raw cur = D::fetch(c, rt, wave, lane, wave < c.nkb), nxt; + for (uint32_t kb = wave; kb < c.nkb; kb += KW) { + if (kb + KW < c.nkb) nxt = D::fetch(c, rt, kb + KW, lane, true); uint32_t xv[MT]; float as[MT]; #pragma unroll @@ -98,8 +166,25 @@ void iqr_gemv_kernel(Ctx c0, const int8_t* __restrict__ X, const float* __restri as[m] = XS[(size_t)m * xs_ld + kb]; } /* Row (lane & 15)'s fold scale and ratio, read by every lane through readlane. */ - const float fs = alive ? fold_f32(c, myrow, kb) : 0.0f; - const float ratio = alive ? rb_ratio(c, myrow, kb) : 0.0f; + /* A bf16 scale a (row, 128): the tile's sixteen rows' scales of this block are 32 + * consecutive bytes at a wave-uniform address, read through the constant address space + * into scalar registers, so no row's scale is broadcast by readlane. */ + constexpr bool SROW = F::SC == kBf16 && F::LRB == 0; + [[maybe_unused]] uint32_t sw[8]; + if constexpr (SROW) { + typedef const __attribute__((address_space(4))) uint32_t cu32; + cu32* sp = (cu32*)((const uint16_t*)c.S + ((size_t)rt * c.nkb + kb) * 16u); +#pragma unroll + for (uint32_t i = 0; i < 8; ++i) sw[i] = sp[i]; + } + auto row_fold = [&](uint32_t q, float fs_) { + if constexpr (SROW) + return __uint_as_float(q & 1u ? sw[q / 2u] & 0xFFFF0000u : sw[q / 2u] << 16); + else + return __builtin_bit_cast(float, __builtin_amdgcn_readlane(__float_as_int(fs_), q)); + }; + const float fs = SROW ? 0.0f : fold_f32(c, myrow, kb); + const float ratio = rb_ratio(c, myrow, kb); uint32_t w[16]; /* A computed trellis off the tcq_rb grid decodes each value as its byte sum, the value * plus 126: one sudot4 of the unsigned sums less 126 times the lane's activation sum. */ @@ -108,19 +193,54 @@ void iqr_gemv_kernel(Ctx c0, const int8_t* __restrict__ X, const float* __restri if constexpr (UNS) { #pragma unroll for (uint32_t m = 0; m < MT; ++m) - xsum[m] = 126 * __builtin_amdgcn_sudot4(true, (int)xv[m], false, 0x01010101, 0, false); + xsum[m] = __builtin_amdgcn_sudot4(true, (int)xv[m], false, 0x7E7E7E7E, 0, false); } - if constexpr (UNS && MT == 1) { + if constexpr (UNS && MT <= 4 && F::SC == kRowF32) { /* One token: each value's hash dotted with its activation byte in every byte lane - * sums the value's bytes and multiplies in one instruction, nothing packed. */ + * sums the value's bytes and multiplies in one instruction, nothing packed. Under one + * f32 scale a row the block's fold is one factor for all rows, so a row's dot starts + * at 0x4B400000 less the lane's bias sum: read as an f32 it is exactly 12582912 plus + * the sum (|sum| < 2^22), one fma folds it, and 12582912 times the block's factors + * leaves each row once at the end. */ + uint32_t h[16][4]; + D::hashes(cur, c, h); +#pragma unroll + for (uint32_t m = 0; m < MT; ++m) { + uint32_t xs[4]; +#pragma unroll + for (uint32_t e = 0; e < 4; ++e) xs[e] = __builtin_amdgcn_perm(0u, xv[m], e * 0x01010101u); + const float s = fs * as[m]; + fsum[m] += s; + const int b0 = kRbBias - __builtin_amdgcn_sudot4(true, (int)xv[m], false, 0x7E7E7E7E, 0, false); +#pragma unroll + for (uint32_t q = 0; q < 16; ++q) { + int d = b0; +#pragma unroll + for (uint32_t e = 0; e < 4; ++e) + d = __builtin_amdgcn_sudot4(false, (int)h[q][e], true, (int)xs[e], d, false); + acc[q][m] = fmaf(__int_as_float(d), s, acc[q][m]); + } + } + /* the bias out every kRbFlush blocks, so a row's sum stays within a few bias terms + * of its value (the prefill tile's bound) */ + if (++nflush == kRbFlush) { +#pragma unroll + for (uint32_t m = 0; m < MT; ++m) { +#pragma unroll + for (uint32_t q = 0; q < 16; ++q) acc[q][m] = fmaf(-kRbBiasF, fsum[m], acc[q][m]); + fsum[m] = 0.0f; + } + nflush = 0; + } + } else if constexpr (UNS && MT == 1) { uint32_t h[16][4]; D::hashes(cur, c, h); uint32_t xs[4]; #pragma unroll - for (uint32_t e = 0; e < 4; ++e) xs[e] = ((xv[0] >> (8u * e)) & 0xFFu) * 0x01010101u; + for (uint32_t e = 0; e < 4; ++e) xs[e] = __builtin_amdgcn_perm(0u, xv[0], e * 0x01010101u); #pragma unroll for (uint32_t q = 0; q < 16; ++q) { - const float wsq = __builtin_bit_cast(float, __builtin_amdgcn_readlane(__float_as_int(fs), q)); + const float wsq = row_fold(q, fs); int d = -xsum[0]; #pragma unroll for (uint32_t e = 0; e < 4; ++e) @@ -132,7 +252,7 @@ void iqr_gemv_kernel(Ctx c0, const int8_t* __restrict__ X, const float* __restri D::unzero(c, rt, kb, w); #pragma unroll for (uint32_t q = 0; q < 16; ++q) { - const float wsq = __builtin_bit_cast(float, __builtin_amdgcn_readlane(__float_as_int(fs), q)); + const float wsq = row_fold(q, fs); #pragma unroll for (uint32_t m = 0; m < MT; ++m) { int d = __builtin_amdgcn_sudot4(!UNS, (int)w[q], true, (int)xv[m], 0, false); @@ -143,58 +263,192 @@ void iqr_gemv_kernel(Ctx c0, const int8_t* __restrict__ X, const float* __restri } cur = nxt; } + /* every lane's rows carry 12582912 times the factors once for each of its blocks */ #pragma unroll for (uint32_t q = 0; q < 16; ++q) #pragma unroll - for (uint32_t m = 0; m < MT; ++m) acc[q][m] = r4d_wave_sum(acc[q][m]); - if constexpr (F::SC == kRowF32) { - /* each row's own scale, after its blocks' sums (lane q's row q; a split's partials are - * linear in it) */ - const float rs = alive ? row_scale(c, rt * 16u + (lane & 15u)) : 0.0f; -#pragma unroll - for (uint32_t q = 0; q < 16; ++q) { - const float rq = __builtin_bit_cast(float, __builtin_amdgcn_readlane(__float_as_int(rs), q)); -#pragma unroll - for (uint32_t m = 0; m < MT; ++m) acc[q][m] *= rq; - } - } - if (lane < 16u && alive) { - /* lane q stores row q: the sums are wave-uniform, picked by a constant index */ + for (uint32_t m = 0; m < MT; ++m) acc[q][m] = r4d_wave_sum(fmaf(-kRbBiasF, fsum[m], acc[q][m])); + if (lane == 0) { #pragma unroll for (uint32_t q = 0; q < 16; ++q) - if (lane == q) { #pragma unroll - for (uint32_t m = 0; m < MT; ++m) { - const size_t o = (size_t)m * N + rt * 16u + q; - if (gridDim.z > 1u) part[(size_t)blockIdx.z * MT * N + o] = acc[q][m]; - else Y[o] = f32_to_bf16(acc[q][m]); - } - } + for (uint32_t m = 0; m < MT; ++m) s_red[wave0][q * MT + m] = acc[q][m]; } - if (gridDim.z > 1u) { - __threadfence(); - __syncthreads(); - __shared__ unsigned int s_arrived; - if (tid == 0) - s_arrived = __hip_atomic_fetch_add(&Ctr[blockIdx.x], 1u, __ATOMIC_ACQ_REL, - __HIP_MEMORY_SCOPE_AGENT); - __syncthreads(); - if (s_arrived + 1u == gridDim.z) { - if (tid == 0) - __hip_atomic_store(&Ctr[blockIdx.x], 0u, __ATOMIC_RELAXED, __HIP_MEMORY_SCOPE_AGENT); - __threadfence(); - const uint32_t r0 = blockIdx.x * kGW * 16u, nr = min(kGW * 16u, N - r0); - for (uint32_t i = tid; i < nr * MT; i += kGW * kWave) { - const size_t o = (size_t)(i / nr) * N + r0 + i % nr; - float v = 0.0f; - for (uint32_t z = 0; z < gridDim.z; ++z) v += part[(size_t)z * MT * N + o]; - Y[o] = f32_to_bf16(v); - } + __syncthreads(); + if constexpr (GATED) { + if (tid < 16u * MT) { + const uint32_t q = tid / MT, m = tid % MT; + float vg = 0.0f, vu = 0.0f; +#pragma unroll + for (uint32_t w = 0; w < KW; ++w) vg += s_red[w][tid]; +#pragma unroll + for (uint32_t w = 0; w < KW; ++w) vu += s_red[KW + w][tid]; + vg *= row_scale(c, blockIdx.x * 16u + q); + vu *= row_scale(c, (blockIdx.x + N / 32u) * 16u + q); + gated_put(go, m, blockIdx.x * 16u + q, vg, vu); + } + gated_tail(go, MT, NW); + } else { + if (tid < 16u * MT) { + const uint32_t q = tid / MT, m = tid % MT; + float v = 0.0f; +#pragma unroll + for (uint32_t w = 0; w < KW; ++w) v += s_red[w][tid]; + /* each row's own scale, after its blocks' sums */ + v *= row_scale(c, rt * 16u + q); + Y[(size_t)m * N + rt * 16u + q] = f32_to_bf16(v); } } } -/* ---- the narrow tile: 8 < M <= 64 ----------------------------------------------------------- +/* ---- the narrow tile at M <= 16 ------------------------------------------------------------- + * + * One 16-token tile: a block a 16-row weight tile, its KW waves across K as the GEMV's (wave w + * the tile's 128-K blocks w, w + KW, ..). A wave decodes each unit and transposes it into + * fragment order through its own LDS tile (frag), then runs the unit's eight WMMA steps against + * the activation's fragments read straight from global memory, where the M x K activation sits + * in L2, so the loop has no block barrier and no shared staging. Rows of the token tile past M + * read token M - 1; their outputs are not stored. + * + * Under one f32 scale a row each unit's int32 sums start at 0x4B400000, so a slot read as an f32 + * is 12582912 plus its sum and one fma folds it (the prefill tile's RB 32 fold), flushed every + * kRbFlush units; other scale forms fold the converted sum with their (row, block) scales. The + * waves' partials are summed through LDS in ascending wave order, so the output is the product + * within f32 rounding, not the int8 tile's bytes. */ +template +__global__ __launch_bounds__((GATED ? 2u : 1u) * KW * kWave) R4D_WAVES(6) +void iqr_m16_kernel(Ctx c0, const int8_t* __restrict__ X, const float* __restrict__ XS, + uint16_t* __restrict__ Y, uint32_t N, uint32_t M, uint32_t x_ld, uint32_t xs_ld, + GatedOut go) { + using D = Dec; + constexpr bool BIAS = F::SC == kRowF32; + constexpr uint32_t NW = (GATED ? 2u : 1u) * KW; + __shared__ __attribute__((aligned(16))) int8_t s_tab[D::kTab]; + /* the waves' transpose tiles, then their partials (8 x 32 floats a wave, in its own tile) */ + __shared__ __attribute__((aligned(16))) uint8_t s_tr[NW * kTrBytes]; + static_assert(8u * kWave * 4u <= kTrBytes, "a wave's partials in its transpose tile"); + auto red = [&](uint32_t w) { return (float*)(s_tr + w * kTrBytes); }; + const uint32_t tid = threadIdx.x, lane = tid & (kWave - 1); + const uint32_t wave0 = __builtin_amdgcn_readfirstlane(tid / kWave); + Ctx c = c0; + c.tab = s_tab; + uint8_t* const tr = s_tr + wave0 * kTrBytes; + D::stage(s_tab, c, tid, NW * kWave); + __syncthreads(); + + /* Gated, waves KW and up take the up rows' tile, n rows below the gate rows'. */ + const uint32_t half = GATED ? wave0 / KW : 0u, wave = GATED ? wave0 % KW : wave0; + const uint32_t rt = blockIdx.x + half * (N / 32u), row0 = rt * 16u; + const uint32_t tok = min(frag_c(lane), M - 1u); + const int8_t* const xrow = X + (size_t)tok * x_ld + frag_k0(lane); + + f8v out = acc_zero(); + float corr = 0.0f; /* BIAS: the units' fold factors since the last flush */ + uint32_t nflush = 0; + auto bload = [&](uint32_t kb, i2v (&b)[8], bool live) { +#pragma unroll + for (uint32_t ks = 0; ks < 8; ++ks) { + const uint2 v = live ? *(const uint2*)(xrow + kb * kBlock + ks * kK) : make_uint2(0u, 0u); + b[ks][0] = (int)v.x; + b[ks][1] = (int)v.y; + } + }; + typename D::Raw cur = D::fetch(c, rt, wave, lane, wave < c.nkb), nxt; + i2v bc[8], bn[8]; + bload(wave, bc, wave < c.nkb); + for (uint32_t kb = wave; kb < c.nkb; kb += KW) { + if (kb + KW < c.nkb) { + nxt = D::fetch(c, rt, kb + KW, lane, true); + bload(kb + KW, bn, true); + } + uint32_t w[16]; + D::rows(cur, c, rb_ratio(c, row0 + (lane & 15u), kb), w); + D::unzero(c, rt, kb, w); + Stage8 a8[2]; + frag(w, tr, lane, a8); + /* two chains of four steps, so a step does not wait on the one before it */ + f8v raw = rb_first(); +#pragma unroll + for (uint32_t ks = 0; ks < kBlock / kK; ++ks) + raw = mma8(frag_of(a8[ks / 4u], ks % 4u), bc[ks], raw); + const float as = XS[(size_t)tok * xs_ld + kb]; + if constexpr (BIAS) { + const float sb = fold_f32(c, row0, kb) * as; + corr += sb; +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) out[t] = __builtin_fmaf(raw[t], sb, out[t]); + if (++nflush == kRbFlush) { +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) out[t] = __builtin_fmaf(-kRbBiasF, corr, out[t]); + corr = 0.0f; + nflush = 0; + } + } else { + float wsr[8]; + if constexpr (F::SC == kBf16 && F::LRB == 0) { + /* A bf16 scale a (row, 128): the lane's eight rows are consecutive in the tile's + * scale run (own_scale's order), 16 aligned bytes, one load. */ + const uint4 q4 = *(const uint4*)((const uint16_t*)c.S + ((size_t)rt * c.nkb + kb) * 16u + + acc_row(lane, 0)); + const uint32_t qd[4] = { q4.x, q4.y, q4.z, q4.w }; +#pragma unroll + for (uint32_t t = 0; t < 4; ++t) { + wsr[2 * t] = __uint_as_float(qd[t] << 16); + wsr[2 * t + 1] = __uint_as_float(qd[t] & 0xFFFF0000u); + } + } else { +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) wsr[t] = fold_f32(c, row0 + acc_row(lane, t), kb); + } +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) + out[t] = __builtin_fmaf(acc_val(raw[t]), wsr[t] * as, out[t]); + } + cur = nxt; +#pragma unroll + for (uint32_t ks = 0; ks < 8; ++ks) bc[ks] = bn[ks]; + } + /* each wave's partials in its own tile, behind its last transpose's reads */ + __builtin_amdgcn_fence(__ATOMIC_RELEASE, "wavefront", "local"); + __builtin_amdgcn_wave_barrier(); +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) red(wave0)[t * kWave + lane] = BIAS ? __builtin_fmaf(-kRbBiasF, corr, out[t]) : out[t]; + __syncthreads(); + if constexpr (GATED) { + if (wave0 == 0) { + const uint32_t col = frag_c(lane); + const uint32_t r0 = acc_row(lane, 0); +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) { + float ag = 0.0f, au = 0.0f; +#pragma unroll + for (uint32_t w = 0; w < KW; ++w) ag += red(w)[t * kWave + lane]; +#pragma unroll + for (uint32_t w = 0; w < KW; ++w) au += red(KW + w)[t * kWave + lane]; + ag *= row_scale(c, blockIdx.x * 16u + r0 + t); + au *= row_scale(c, (blockIdx.x + N / 32u) * 16u + r0 + t); + if (col < M) gated_put(go, col, blockIdx.x * 16u + r0 + t, ag, au); + } + } + gated_tail(go, M, NW); + } else if (wave == 0) { + const uint32_t col = frag_c(lane); + const uint32_t r0 = row0 + acc_row(lane, 0); + float v[8]; +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) { + float a = 0.0f; +#pragma unroll + for (uint32_t w = 0; w < KW; ++w) a += red(w)[t * kWave + lane]; + v[t] = a * row_scale(c, r0 + t); + } + if (col < M) + *(uint4*)(Y + (size_t)col * N + r0) = make_uint4(bf16x2_rne(v[0], v[1]), bf16x2_rne(v[2], v[3]), + bf16x2_rne(v[4], v[5]), bf16x2_rne(v[6], v[7])); + } +} + +/* ---- the narrow tile: 16 < M <= 64 ----------------------------------------------------------- * * r4d_gemm_fp8a8.hip's gemm_fp8a8_body at I8, unfused: MW waves a block, a wave one 16-row weight * tile against NT 16-token tiles staged through LDS, split-K over the caller's scratch with the @@ -305,6 +559,20 @@ void iqr_m64_kernel(Ctx c0, const uint8_t* __restrict__ Bp, const float* __restr const float f = alive ? fold_f32(c, wrow0, kb) : 0.0f; #pragma unroll for (uint32_t t = 0; t < 8; ++t) wsr[t] = f; + } else if constexpr (F::SC == kBf16 && F::LRB == 0) { + /* A bf16 scale a (row, 128): the lane's eight rows are consecutive in the + * tile's scale run (own_scale's order), 16 aligned bytes, one load. Every row + * of a live tile is live (rows is a multiple of 16). */ + uint4 q = make_uint4(0u, 0u, 0u, 0u); + if (alive) + q = *(const uint4*)((const uint16_t*)c.S + + ((size_t)(wrow0 / 16u) * c.nkb + kb) * 16u + acc_row(lane, 0)); + const uint32_t qd[4] = { q.x, q.y, q.z, q.w }; +#pragma unroll + for (uint32_t t = 0; t < 4; ++t) { + wsr[2 * t] = __uint_as_float(qd[t] << 16); + wsr[2 * t + 1] = __uint_as_float(qd[t] & 0xFFFF0000u); + } } else { #pragma unroll for (uint32_t t = 0; t < 8; ++t) @@ -568,55 +836,82 @@ Ctx ctx_of(const Operands& g) { return c; } -/* The GEMV's K split: enough waves to keep the card's memory busy (2048 tiles' worth), each split at - * least four blocks. A function of N and K alone. */ constexpr uint32_t kGemvMaxM = 8; -uint32_t gemv_ksplit(uint32_t N, uint32_t nkb) { - const uint32_t tiles = N / 16u; - uint32_t ks = std::min((2048u + tiles - 1u) / tiles, std::max(1u, nkb / 4u)); - const uint32_t kbs = (nkb + ks - 1u) / ks; - return (nkb + kbs - 1u) / kbs; -} +/* The GEMV, plain into `g.y`, or with `go` the gated fold (a block a gated tile, twice the waves). */ template -int gemv_launch(const Operands& g, void* scratch, long long scratch_bytes, RadStream stream) { - const uint32_t N = (uint32_t)g.N, M = (uint32_t)g.M, nkb = (uint32_t)g.nkb; - uint32_t ks = gemv_ksplit(N, nkb); - const uint32_t gx = (N / 16u + kGW - 1u) / kGW; - unsigned int* ctr = nullptr; - if (ks > 1u) { - ctr = gx <= 8192u ? r4d_8a8_split_ctr(stream, g.y->data) : nullptr; - if (!ctr || !scratch || scratch_bytes < (long long)ks * kGemvMaxM * N * 4) ks = 1u; - } - const uint32_t kbs = (nkb + ks - 1u) / ks; +int gemv_launch(const Operands& g, RadStream stream, const GatedOut* go = nullptr) { + const uint32_t N = (uint32_t)g.N, M = (uint32_t)g.M; const Ctx c = ctx_of(g); - const dim3 grid(gx, 1, ks); + /* Four waves a tile where the tiles alone nearly fill the card, eight on narrow weights (M = 1, + * 4 bits: gate_up 146.6 / 147.1 us, down 76.0 / 78.4, the 5120 x 6144 outputs 31.4 / 31.9, + * attn_k 9.5 / 8.8). */ + const uint32_t kw = N >= 4096u ? 4u : 8u; + const GatedOut gz = go ? *go : GatedOut{}; + uint16_t* const y = go ? nullptr : (uint16_t*)g.y->data; int rc = RAD_E_SHAPE; -#define R4D_IQR_GV(mt_) rc = R4D_EMIT(stream, (iqr_gemv_kernel), grid, dim3(kGW * kWave), 0, c, (const int8_t*)g.a->data, (const float*)g.as->data, (float*)scratch, (uint16_t*)g.y->data, ctr, N, (uint32_t)g.a_ld, (uint32_t)g.sa_ld, kbs) +#define R4D_IQR_GV(mt_, kw_) \ + rc = go ? R4D_EMIT(stream, (iqr_gemv_kernel), dim3(N / 32u), \ + dim3(2u * kw_ * kWave), 0, c, (const int8_t*)g.a->data, \ + (const float*)g.as->data, y, N, (uint32_t)g.a_ld, (uint32_t)g.sa_ld, gz) \ + : R4D_EMIT(stream, (iqr_gemv_kernel), dim3(N / 16u), dim3(kw_ * kWave), \ + 0, c, (const int8_t*)g.a->data, (const float*)g.as->data, y, N, \ + (uint32_t)g.a_ld, (uint32_t)g.sa_ld, gz) +#define R4D_IQR_GVK(mt_) do { if (kw == 4u) R4D_IQR_GV(mt_, 4u); else R4D_IQR_GV(mt_, 8u); } while (0) switch (M) { - case 1u: R4D_IQR_GV(1u); break; - case 2u: R4D_IQR_GV(2u); break; - case 3u: R4D_IQR_GV(3u); break; - case 4u: R4D_IQR_GV(4u); break; - case 5u: R4D_IQR_GV(5u); break; - case 6u: R4D_IQR_GV(6u); break; - case 7u: R4D_IQR_GV(7u); break; - case 8u: R4D_IQR_GV(8u); break; + case 1u: R4D_IQR_GVK(1u); break; + case 2u: R4D_IQR_GVK(2u); break; + case 3u: R4D_IQR_GVK(3u); break; + case 4u: R4D_IQR_GVK(4u); break; + case 5u: R4D_IQR_GVK(5u); break; + case 6u: R4D_IQR_GVK(6u); break; + case 7u: R4D_IQR_GVK(7u); break; + case 8u: R4D_IQR_GVK(8u); break; default: return R4D_NO(RAD_E_SHAPE); } +#undef R4D_IQR_GVK #undef R4D_IQR_GV return rc == RAD_OK && hipGetLastError() == hipSuccess ? RAD_OK : R4D_NO(RAD_E_DEVICE); } +/* The 16-token tile, plain into `g.y` or gated as gemv_launch. */ +template +int m16_launch(const Operands& g, RadStream stream, const GatedOut* go = nullptr) { + const uint32_t N = (uint32_t)g.N, M = (uint32_t)g.M; + const Ctx c = ctx_of(g); + const GatedOut gz = go ? *go : GatedOut{}; + uint16_t* const y = go ? nullptr : (uint16_t*)g.y->data; + int rc; +#define R4D_IQR_M16(kw_) \ + rc = go ? R4D_EMIT(stream, (iqr_m16_kernel), dim3(N / 32u), \ + dim3(2u * kw_ * kWave), 0, c, (const int8_t*)g.a->data, \ + (const float*)g.as->data, y, N, M, (uint32_t)g.a_ld, (uint32_t)g.sa_ld, gz) \ + : R4D_EMIT(stream, (iqr_m16_kernel), dim3(N / 16u), dim3(kw_ * kWave), 0, c, \ + (const int8_t*)g.a->data, (const float*)g.as->data, y, N, M, \ + (uint32_t)g.a_ld, (uint32_t)g.sa_ld, gz) + if (N >= 4096u) R4D_IQR_M16(4u); + else R4D_IQR_M16(8u); +#undef R4D_IQR_M16 + return rc == RAD_OK && hipGetLastError() == hipSuccess ? RAD_OK : R4D_NO(RAD_E_DEVICE); +} + +/* A computed trellis's GEMV pays its decode in VALU work beside every token's dot and fold, the + * tiles decode a unit once for all tokens. Measured on gate_up (34816 x 5120): at one token the + * GEMV wins at every width (2 / 4 / 6 bits 92.6 / 145.2 / 214.6 us, the 16-token tile at 4 / 6 bits + * 150.0 / 215.7); at two only on 2- and 3-bit codes under one f32 scale a row, its values dotted + * straight from their hashes (128.4 / 132.4 against the tile's 137.7 / 138.5; 4 bits 152.8 against + * 150.1); from three tokens the tile. */ +template +constexpr uint32_t gemv_max() { + return F::KIND != kTrellisMad ? kGemvMaxM : F::B <= 3u && F::SC == kRowF32 ? 2u : 1u; +} + template int m64_launch(const Operands& g, void* scratch, long long scratch_bytes, int split_n, RadStream stream) { const uint32_t N = (uint32_t)g.N, K = (uint32_t)g.K, M = (uint32_t)g.M; - /* A computed trellis's GEMV pays its decode in VALU work beside every token's dot and fold; - * from five tokens the narrow tile, which decodes a unit once for all of them, is faster - * (gate_up at 4 bits: GEMV 120 / 136 / 186 us at 3 / 4 / 8 tokens, the tile 151 / 154 / 157). */ - constexpr uint32_t gemv_max = F::KIND == kTrellisMad ? 4u : kGemvMaxM; - if (M <= gemv_max) return gemv_launch(g, scratch, scratch_bytes, stream); + if (M <= gemv_max()) return gemv_launch(g, stream); + if (M <= 16u && ((uintptr_t)g.y->data & 15u) == 0u) return m16_launch(g, stream); /* At most eight waves a block: each has its own transpose tile in LDS. The wave count changes * no output bit (r4d_gemm_fp8a8.hip's narrow_mw). */ const uint32_t mw = std::min(r4d_8a8_narrow_mw(N, M), 8u); @@ -701,11 +996,7 @@ extern "C" int64_t r4d_rad_gemm_iqr_m64_scratch(const RadArgs* a) { uint32_t ck = 0; const uint32_t k2 = r4d_8a8_narrow_ksplit((uint32_t)(sn > 0 ? sn : N), (uint32_t)K, (uint32_t)M, &ck, kIqrSplitWaves); - /* The band's bound covers the GEMV's split at M <= 4 too. */ - const int64_t tile = k2 > 1 ? (int64_t)k2 * M * N * 4 : 0; - const uint32_t kg = gemv_ksplit((uint32_t)N, (uint32_t)(K / kBlock)); - const int64_t gemv = kg > 1 ? (int64_t)kg * kGemvMaxM * N * 4 : 0; - return std::max(tile, gemv); + return k2 > 1 ? (int64_t)k2 * M * N * 4 : 0; } extern "C" int r4d_rad_gemm_iqr_m64(const RadArgs* a, RadStream s) { @@ -723,6 +1014,89 @@ extern "C" int r4d_rad_gemm_iqr_m64(const RadArgs* a, RadStream s) { return R4D_NO(RAD_E_UNSUPPORTED); } +namespace { + +/* gemm_nt_q_gated's operands at i8a8h: [0] a [1] a_scale [2] b [3] b_scale [4] q [5] scale + * [6] out_bf16. The weight is one [N, K] IQR plane, gate rows then up rows. */ +int gated_operands(const RadArgs* a, Operands* g, GatedOut* go) { + g->a = r4d_opt(a, 0); + g->as = r4d_opt(a, 1); + g->b = r4d_opt(a, 2); + g->bs = r4d_opt(a, 3); + g->y = nullptr; + const RadTensor* q = r4d_opt(a, 4); + const RadTensor* sc = r4d_opt(a, 5); + const RadTensor* yb = r4d_opt(a, 6); + if (!g->a || !g->as || !g->b || !g->bs || !q || !sc) return R4D_NO(RAD_E_INVAL); + if (!is_weight_dtype(g->b->dtype) || !is_scale_dtype(g->bs->dtype)) return R4D_NO(RAD_E_DTYPE); + g->word = g->b->dtype & kWordMask; + if ((g->bs->dtype & kWordMask) != g->word) return R4D_NO(RAD_E_DTYPE); + if (g->a->dtype != RAD_I8 || g->as->dtype != RAD_F32 || q->dtype != RAD_I8 || + sc->dtype != RAD_F32 || (yb && yb->dtype != RAD_BF16)) + return R4D_NO(RAD_E_DTYPE); + if (g->b->rank != 2 || g->a->rank < 2 || g->as->rank != 2) return R4D_NO(RAD_E_SHAPE); + g->M = g->a->shape[0]; + g->N = g->b->shape[0]; + g->K = g->b->shape[1]; + const long long n = g->N / 2; + if (g->M < 1 || g->M > 16 || g->N % 256 || g->K % kFK) return R4D_NO(RAD_E_SHAPE); + g->nkb = g->K / kBlock; + if (r4d_numel(g->a) != g->M * g->K || g->as->shape[0] != g->M || g->as->shape[1] != g->nkb) + return R4D_NO(RAD_E_SHAPE); + if (r4d_numel(q) != g->M * n || r4d_numel(sc) != g->M * (n / kBlock) || + (yb && r4d_numel(yb) != g->M * n)) + return R4D_NO(RAD_E_SHAPE); + g->a_ld = r4d_row_pitch(g->a); + g->sa_ld = r4d_row_pitch(g->as); + const long long q_ld = r4d_row_pitch(q), s_ld = r4d_row_pitch(sc), y_ld = yb ? r4d_row_pitch(yb) : 0; + if (g->a_ld < 0 || g->sa_ld < 0 || q_ld < 0 || s_ld < 0 || y_ld < 0) return R4D_NO(RAD_E_STRIDE); + if (!r4d_aligned(g->a->data, 16) || !r4d_aligned(g->b->data, 256) || !r4d_aligned(q->data, 4) || + q_ld % 4) + return R4D_NO(RAD_E_ALIGN); + const Form f = form(g->word); + if (is_trellis(f.kind) && g->N % ((long long)1 << f.lrun)) return R4D_NO(RAD_E_SHAPE); + go->Q = (int8_t*)q->data; + go->S = (float*)sc->data; + go->Yb = yb ? (uint16_t*)yb->data : nullptr; + go->n = (uint32_t)n; + go->q_ld = (uint32_t)q_ld; + go->s_ld = (uint32_t)s_ld; + go->y_ld = (uint32_t)y_ld; + return RAD_OK; +} + +template +int gated_launch(const Operands& g, const GatedOut& go, RadStream stream) { + if (g.M <= gemv_max()) return gemv_launch(g, stream, &go); + return m16_launch(g, stream, &go); +} + +} // namespace + +extern "C" int64_t r4d_rad_gemm_iqr_gated_scratch(const RadArgs* a) { + const long long M = r4d_geti_or(a, "M", 0), N = r4d_geti_or(a, "N", 0); + if (M < 1 || N < 2) return 0; + return (int64_t)align256(M * (N / 2) * 2); +} + +extern "C" int r4d_rad_gemm_iqr_gated(const RadArgs* a, RadStream s) { + Operands g; + GatedOut go; + const int rc = gated_operands(a, &g, &go); + if (rc != RAD_OK) return rc; + if (!a->scratch || (long long)a->scratch_bytes < align256(g.M * (g.N / 2) * 2)) + return R4D_NO(RAD_E_SCRATCH); + go.H = (uint16_t*)a->scratch; + go.cnt = r4d_8a8_split_ctr(s, go.Q); + if (!go.cnt || go.n / 128u > 8192u) return R4D_NO(RAD_E_DEVICE); + const uint32_t kw = kernel_word(g.word); +#define R4D_IQR_GO(...) \ + if (kw == R4D_IQR_T(__VA_ARGS__)::word()) return gated_launch(g, go, s); + R4D_IQR_FORMS(R4D_IQR_GO) +#undef R4D_IQR_GO + return R4D_NO(RAD_E_UNSUPPORTED); +} + extern "C" int64_t r4d_rad_gemm_iqr_tiled_scratch(const RadArgs* a) { const long long N = r4d_geti_or(a, "N", 0), K = r4d_geti_or(a, "K", 0); if (N < 1 || K < 1) return 0; diff --git a/libr4d/r4d_gram_accum_fp8.hip b/libr4d/r4d_gram_accum_fp8.hip index 4bac179d..d2812fde 100644 --- a/libr4d/r4d_gram_accum_fp8.hip +++ b/libr4d/r4d_gram_accum_fp8.hip @@ -1,5 +1,5 @@ -// H += X^T X, in f32, over an E4M3 activation with a per-(row, group) scale, or over a plain bf16 -// one. +// H += X^T X, in f32, over an E4M3 or int8 activation with a per-(row, group) scale, or over a plain +// bf16 one. // // Purpose: the device half of GPTQ's Gram matrix `H = sum_t x_t x_t^T` over a calibration corpus, // for the 4-bit expert format (docs/MOE-W4.md). @@ -38,6 +38,9 @@ constexpr int kThreads = 256; constexpr int kMB = 32; // M rows staged a pass; 2 * 32 * 64 * 4 = 16 KiB of LDS constexpr int kTT = 4; +// I8: the codes are int8 (an int8 trunk's activation, quant_act_i8g's), otherwise E4M3; both carry an f32 +// scale per (row, group). +template __global__ __launch_bounds__(kThreads) void gram_accum_kernel( const void* __restrict__ qv, const float* __restrict__ sc, float* __restrict__ h, uint32_t M, uint32_t K, uint32_t q_ld, uint32_t s_ld, uint32_t h_ld, uint32_t grp, @@ -79,14 +82,24 @@ __global__ __launch_bounds__(kThreads) void gram_accum_kernel( // contract), so a dword load at c1 < K stays inside the allocation. const uint32_t w = *(const uint32_t*)((const uint8_t*)qv + qrow + c1); const float s = sc[(size_t)m * s_ld + g1]; - const v2f lo = r4d_fp8::e4m3_pk(w), hi = r4d_fp8::e4m3_pk(w); - a0 = lo.x * s; a1 = lo.y * s; a2 = hi.x * s; a3 = hi.y * s; + if constexpr (I8) { + a0 = (float)(int8_t)(w & 0xffu) * s; a1 = (float)(int8_t)(w >> 8) * s; + a2 = (float)(int8_t)(w >> 16) * s; a3 = (float)(int8_t)(w >> 24) * s; + } else { + const v2f lo = r4d_fp8::e4m3_pk(w), hi = r4d_fp8::e4m3_pk(w); + a0 = lo.x * s; a1 = lo.y * s; a2 = hi.x * s; a3 = hi.y * s; + } } if (c2 < K) { const uint32_t w = *(const uint32_t*)((const uint8_t*)qv + qrow + c2); const float s = sc[(size_t)m * s_ld + g2]; - const v2f lo = r4d_fp8::e4m3_pk(w), hi = r4d_fp8::e4m3_pk(w); - b0 = lo.x * s; b1 = lo.y * s; b2 = hi.x * s; b3 = hi.y * s; + if constexpr (I8) { + b0 = (float)(int8_t)(w & 0xffu) * s; b1 = (float)(int8_t)(w >> 8) * s; + b2 = (float)(int8_t)(w >> 16) * s; b3 = (float)(int8_t)(w >> 24) * s; + } else { + const v2f lo = r4d_fp8::e4m3_pk(w), hi = r4d_fp8::e4m3_pk(w); + b0 = lo.x * s; b1 = lo.y * s; b2 = hi.x * s; b3 = hi.y * s; + } } } // Columns past K stage as zeros and contribute nothing; the store masks them anyway. @@ -216,8 +229,9 @@ extern "C" int r4d_gram_accum_fp8_tile(void) { return kTile; } // s [M][ceil(K/grp)] f32, `s_ld` elements a row (0 = ceil(K/grp)) // h [K][K] f32, `h_ld` elements a row (0 = K), read and written; with `upper` // only the 64-wide tiles on or above the diagonal are added to -extern "C" int r4d_gram_accum_fp8(long q, long s, long h, int M, int K, int grp, - int q_ld, int s_ld, int h_ld, int upper, long stream) { +namespace { +int gram_accum_codes(bool i8, long q, long s, long h, int M, int K, int grp, int q_ld, int s_ld, + int h_ld, int upper, long stream) { if (!q || !s || !h) return -1; if (M <= 0 || K <= 0) return -2; if (K % 4) return -3; // a staging slot is one dword of four codes @@ -227,12 +241,30 @@ extern "C" int r4d_gram_accum_fp8(long q, long s, long h, int M, int K, int grp, if (!s_ld) s_ld = (K + grp - 1) / grp; if (!h_ld) h_ld = K; const uint32_t nt = (uint32_t)((K + kTile - 1) / kTile); - hipLaunchKernelGGL(gram_accum_kernel, dim3(nt, nt), dim3(kThreads), 0, - (hipStream_t)stream, (const void*)q, (const float*)s, (float*)h, - (uint32_t)M, (uint32_t)K, (uint32_t)q_ld, (uint32_t)s_ld, (uint32_t)h_ld, - (uint32_t)grp, (uint32_t)(upper != 0)); + if (i8) + hipLaunchKernelGGL(gram_accum_kernel, dim3(nt, nt), dim3(kThreads), 0, + (hipStream_t)stream, (const void*)q, (const float*)s, (float*)h, + (uint32_t)M, (uint32_t)K, (uint32_t)q_ld, (uint32_t)s_ld, + (uint32_t)h_ld, (uint32_t)grp, (uint32_t)(upper != 0)); + else + hipLaunchKernelGGL(gram_accum_kernel, dim3(nt, nt), dim3(kThreads), 0, + (hipStream_t)stream, (const void*)q, (const float*)s, (float*)h, + (uint32_t)M, (uint32_t)K, (uint32_t)q_ld, (uint32_t)s_ld, + (uint32_t)h_ld, (uint32_t)grp, (uint32_t)(upper != 0)); return hipGetLastError() == hipSuccess ? 0 : -4; } +} // namespace + +extern "C" int r4d_gram_accum_fp8(long q, long s, long h, int M, int K, int grp, + int q_ld, int s_ld, int h_ld, int upper, long stream) { + return gram_accum_codes(false, q, s, h, M, K, grp, q_ld, s_ld, h_ld, upper, stream); +} + +// q [M][K] int8, otherwise as r4d_gram_accum_fp8 +extern "C" int r4d_gram_accum_i8(long q, long s, long h, int M, int K, int grp, + int q_ld, int s_ld, int h_ld, int upper, long stream) { + return gram_accum_codes(true, q, s, h, M, K, grp, q_ld, s_ld, h_ld, upper, stream); +} // a [M][K] bf16, `a_ld` elements a row (0 = K) // h [K][K] f32, `h_ld` elements a row (0 = K), read and written; `upper` as above @@ -260,7 +292,8 @@ extern "C" int r4d_rad_gram_accum(const RadArgs* a, RadStream s) { const RadTensor* sc = r4d_opt(a, GA_S); const RadTensor* h = r4d_opt(a, GA_H); if (!q || !sc || !h) return R4D_NO(RAD_E_INVAL); - if (q->dtype != RAD_F8E4M3 || sc->dtype != RAD_F32 || h->dtype != RAD_F32) + if ((q->dtype != RAD_F8E4M3 && q->dtype != RAD_I8) || sc->dtype != RAD_F32 || + h->dtype != RAD_F32) return R4D_NO(RAD_E_DTYPE); /* Rows are dim 0 and everything after is the row, as in r4d_rad_quant_act_fp8; `sc` and `h` * are rank 2 by definition. */ @@ -274,9 +307,9 @@ extern "C" int r4d_rad_gram_accum(const RadArgs* a, RadStream s) { if (h->shape[0] != K || h->shape[1] != K) return R4D_NO(RAD_E_SHAPE); const long long qp = r4d_row_pitch(q), sp = r4d_row_pitch(sc), hp = r4d_row_pitch(h); if (qp < 0 || sp < 0 || hp < 0) return R4D_NO(RAD_E_STRIDE); - const int e = r4d_gram_accum_fp8(r4d_addr(q), r4d_addr(sc), r4d_addr(h), (int)M, (int)K, - (int)grp, (int)qp, (int)sp, (int)hp, - (int)r4d_geti_or(a, "upper", 0), (long)(uintptr_t)s); + const int e = gram_accum_codes(q->dtype == RAD_I8, r4d_addr(q), r4d_addr(sc), r4d_addr(h), + (int)M, (int)K, (int)grp, (int)qp, (int)sp, (int)hp, + (int)r4d_geti_or(a, "upper", 0), (long)(uintptr_t)s); return e == 0 ? RAD_OK : RAD_E_SHAPE; } diff --git a/libr4d/r4d_iqr.h b/libr4d/r4d_iqr.h index 0fc84f21..243a2c69 100644 --- a/libr4d/r4d_iqr.h +++ b/libr4d/r4d_iqr.h @@ -181,7 +181,11 @@ R4D_IQR_HD constexpr int64_t tile_major(int64_t r, int64_t kb, int64_t nkb) { X(kTrellisMad, 6, 0, 16, 5, kE4m3Tensor) X(kTrellisMad, 7, 0, 16, 5, kE4m3Tensor) \ /* the computed trellis with a scale a row (no rescale a value) */ \ X(kTrellisMad, 2, 0, 16, 0, kE4m3Tensor) X(kTrellisMad, 3, 0, 16, 0, kE4m3Tensor) \ - X(kTrellisMad, 4, 0, 16, 0, kE4m3Tensor) \ + X(kTrellisMad, 4, 0, 16, 0, kE4m3Tensor) X(kTrellisMad, 5, 0, 16, 0, kE4m3Tensor) \ + X(kTrellisMad, 6, 0, 16, 0, kE4m3Tensor) X(kTrellisMad, 7, 0, 16, 0, kE4m3Tensor) \ + /* the computed trellis under a bf16 scale a (row, 128): the fold reads it in place */ \ + X(kTrellisMad, 4, 0, 16, 0, kBf16) X(kTrellisMad, 5, 0, 16, 0, kBf16) \ + X(kTrellisMad, 6, 0, 16, 0, kBf16) X(kTrellisMad, 7, 0, 16, 0, kBf16) \ /* the computed trellis under one scale a row and a factor a 128-K block */ \ X(kTrellisMad, 2, 0, 16, 0, kRowF32) X(kTrellisMad, 3, 0, 16, 0, kRowF32) \ X(kTrellisMad, 4, 0, 16, 0, kRowF32) X(kTrellisMad, 5, 0, 16, 0, kRowF32) \ @@ -212,9 +216,11 @@ R4D_IQR_HD constexpr bool built(uint32_t w) { X(kTable, 4, 0, 0, 0, kBf16, 0) X(kTable, 5, 0, 0, 0, kBf16, 0) \ X(kTable, 2, 0, 0, 0, kBf16, 1) X(kTable, 3, 0, 0, 0, kBf16, 1) \ X(kTable, 4, 0, 0, 0, kBf16, 1) X(kTable, 5, 0, 0, 0, kBf16, 1) \ - X(kZero, 6, 0, 0, 0, kBf16, 0) \ + X(kZero, 6, 0, 0, 0, kBf16, 0) X(kZero, 7, 0, 0, 0, kBf16, 0) \ + X(kZero, 8, 0, 0, 0, kBf16, 0) \ X(kTrellis, 2, 0, 12, 0, kE4m3Tensor, 1) X(kTrellis, 3, 0, 12, 0, kE4m3Tensor, 1) \ - X(kTrellis, 4, 0, 12, 0, kE4m3Tensor, 1) X(kTrellis, 5, 0, 12, 0, kE4m3Tensor, 1) + X(kTrellis, 4, 0, 12, 0, kE4m3Tensor, 1) X(kTrellis, 5, 0, 12, 0, kE4m3Tensor, 1) \ + X(kTrellis, 6, 0, 12, 0, kE4m3Tensor, 1) X(kTrellis, 7, 0, 12, 0, kE4m3Tensor, 1) R4D_IQR_HD constexpr bool embed_built(uint32_t w) { #define R4D_IQR_EIS(k, b, lv, l, lrb, sc, r) \ diff --git a/libr4d/r4d_iqr_dec.h b/libr4d/r4d_iqr_dec.h index 746ba871..44416eb6 100644 --- a/libr4d/r4d_iqr_dec.h +++ b/libr4d/r4d_iqr_dec.h @@ -49,13 +49,26 @@ struct Ctx { * rows' 8-byte fragment reads fall on distinct banks. */ constexpr uint32_t kTrPitch = 136, kTrBytes = 16 * kTrPitch; +/* Bits [s, s + n) of the 64 bits hi:lo, n <= 32 (constants after unrolling). On byte bounds one + * v_perm, which also zeroes the bytes above; else a funnel shift and a mask. */ +__device__ __forceinline__ uint32_t window(uint32_t lo, uint32_t hi, uint32_t s, uint32_t n) { + if (s % 8u == 0u && n % 8u == 0u && n < 32u) { + uint32_t sel = 0x0C0C0C0Cu; + for (uint32_t i = 0; i < n / 8u; ++i) /* byte s / 8 + i of hi:lo: lo's 0-3, hi's 4-7 */ + sel = (sel & ~(0xFFu << (8u * i))) | ((s / 8u + i) << (8u * i)); + return __builtin_amdgcn_perm(hi, lo, sel); + } + const uint32_t m = n == 32u ? 0xFFFFFFFFu : ((1u << n) - 1u); + return __builtin_amdgcn_alignbit(hi, lo, s) & m; +} + /* `n` <= 32 bits of a little-endian dword stream from bit `o` (constant after unrolling). */ template __device__ __forceinline__ uint32_t field(const uint32_t (&d)[ND], uint32_t o, uint32_t n) { const uint32_t q = o >> 5, s = o & 31u; const uint32_t m = n == 32u ? 0xFFFFFFFFu : ((1u << n) - 1u); if (s + n <= 32u) return (d[q] >> s) & m; - return __builtin_amdgcn_alignbit(q + 1u < ND ? d[q + 1u] : 0u, d[q], s) & m; + return window(d[q], q + 1u < ND ? d[q + 1u] : 0u, s, n); } /* Low bytes of two, then of two pairs, into one dword. */ @@ -161,9 +174,50 @@ struct Dec { /* A grid lane segment may start mid-dword: read the dword-aligned window covering it. */ static constexpr bool ALIGNED = LANE_BITS % 32u == 0u; static constexpr uint32_t ND = ALIGNED ? LANE_BITS / 32u : (LANE_BITS + 24u + 31u) / 32u; - /* The dwords of the unit above a trellis column's continuation can reach: its first codes. */ - static constexpr uint32_t NP = TR ? ND : 1; + /* A trellis column's continuation: its first L - B bits in the unit above, which lie in one + * dword of that unit's lane segment for every width (column e starts at bit 16 B e), so a lane + * reads that dword alone of each of its four columns: p[e]. */ + static constexpr uint32_t CB = 16u * B; + static constexpr uint32_t NP = TR ? 4u : 1u; + static constexpr uint32_t pdw(uint32_t e) { return e * CB / 32u; } + static constexpr uint32_t pbit(uint32_t e) { return e * CB % 32u; } struct Raw { uint32_t d[ND]; uint32_t p[NP]; }; + /* A trellis column's stream: its CB code bits, then its continuation, as NW dwords, which + * its sixteen rows' states are windows of (row q's at bit q B). Built once a unit: a dword of + * a column that does not start on a dword bound is one funnel shift or v_perm, where reading + * each state from the lane's codes would join every state that crosses a bound, and every + * continued one, separately. */ + static constexpr uint32_t NW = TR ? (15u * B + F::L + 31u) / 32u : 1u; + __device__ static uint32_t colw(const Raw& r, uint32_t e, uint32_t i) { + const uint32_t a = e * CB + 32u * i, oe = e * CB + CB; + const uint32_t q = a >> 5, s = a & 31u; + if (a + 32u <= oe) return s == 0u ? r.d[q] : __builtin_amdgcn_alignbit(r.d[q + 1u], r.d[q], s); + if (a >= oe) return r.p[e] >> (pbit(e) + (a - oe)); + const uint32_t n0 = oe - a; /* the column's own last bits, then its continuation */ + if (s + n0 == 32u && pbit(e) == 0u) return __builtin_amdgcn_alignbit(r.p[e], r.d[q], s); + if (s % 8u == 0u && n0 % 8u == 0u && pbit(e) % 8u == 0u && s + n0 <= 32u) { + uint32_t sel = 0u; + for (uint32_t j = 0; j < 4u; ++j) { + const uint32_t b = j < n0 / 8u ? s / 8u + j : 4u + pbit(e) / 8u + (j - n0 / 8u); + sel |= (b < 8u ? b : 0x0Cu) << (8u * j); + } + return __builtin_amdgcn_perm(r.p[e], r.d[q], sel); + } + return field(r.d, a, n0) | (r.p[e] >> pbit(e)) << n0; + } + __device__ static void columns(const Raw& r, uint32_t (&cw)[4][NW]) { +#pragma unroll + for (uint32_t e = 0; e < 4; ++e) +#pragma unroll + for (uint32_t i = 0; i < NW; ++i) cw[e][i] = colw(r, e, i); + } + /* Row q's state of column e: L bits from bit q B of the column's stream. */ + __device__ static uint32_t state(const uint32_t (&cw)[4][NW], uint32_t q, uint32_t e) { + constexpr uint32_t L = F::L; + const uint32_t o = q * B, i = o >> 5, s = o & 31u; + if (s + L <= 32u) return (cw[e][i] >> s) & ((1u << L) - 1u); + return window(cw[e][i], cw[e][i + 1u], s, L); + } static constexpr bool HALF = H16 && TR && !MAD && F::LRB != 0; static constexpr uint32_t kTab = F::KIND == kTable ? 256u : GRID ? (1u << B) << F::LV @@ -203,9 +257,14 @@ struct Dec { r.d[i] = __builtin_amdgcn_alignbit(i + 1u < ND ? w[i + 1u] : 0u, w[i], sh); } if constexpr (TR) { + static_assert(!TR || (pbit(1) + F::L - B <= 32u && pbit(2) + F::L - B <= 32u && + pbit(3) + F::L - B <= 32u), + "a column's continuation in one dword"); const uint32_t rp = rt % c.run_tiles == 0u ? rt + c.run_tiles - 1u : rt - 1u; - const uint8_t* up = c.W + ((size_t)rp * c.nkb + kb) * ub; - load_dw(r.p, up + (size_t)lane * (LANE_BITS / 8u), live); + const uint32_t* up = (const uint32_t*)(c.W + ((size_t)rp * c.nkb + kb) * ub + + (size_t)lane * (LANE_BITS / 8u)); +#pragma unroll + for (uint32_t e = 0; e < 4; ++e) r.p[e] = live ? up[pdw(e)] : 0u; } else { r.p[0] = 0u; } @@ -219,19 +278,14 @@ struct Dec { __device__ static void rows(const Raw& r, const Ctx& c, float ratio, uint32_t (&w)[16]) { static_assert(!UNS || (MAD && F::LRB == 0), "unsigned values: a computed trellis, one scale a row"); if constexpr (TR) { - constexpr uint32_t L = F::L, CB = 16u * B; /* All 64 states, then all 64 lookups, then the values: the LDS reads go out together * instead of each waiting on the last's use. */ - uint32_t st[64]; + uint32_t st[64], cw[4][NW]; + columns(r, cw); #pragma unroll for (uint32_t q = 0; q < 16; ++q) #pragma unroll - for (uint32_t e = 0; e < 4; ++e) { - const uint32_t pos = e * CB + q * B, own = CB - q * B; - st[q * 4 + e] = L <= own ? field(r.d, pos, L) - : field(r.d, pos, own) | - field(r.p, e * CB, L - own) << own; - } + for (uint32_t e = 0; e < 4; ++e) st[q * 4 + e] = state(cw, q, e); [[maybe_unused]] int32_t t[HALF ? 1 : 64]; [[maybe_unused]] _Float16 th[HALF ? 64 : 1]; if constexpr (MAD) { @@ -315,20 +369,16 @@ struct Dec { * each byte is the value plus 126 times the activation, the sum and the product in one. */ __device__ static void hashes(const Raw& r, const Ctx& c, uint32_t (&h)[16][4]) { static_assert(MAD, "hashes: a computed trellis"); - constexpr uint32_t L = F::L, CB = 16u * B; constexpr Form f{ F::KIND, F::B, F::LV, F::L, F::LRB, F::SC, 0 }; const uint32_t* ab = (const uint32_t*)(c.W + aux_off(f, c.N, (int64_t)c.nkb * 128) + ((int64_t)1 << F::L)); const uint32_t A = ab[0], Bc = ab[1]; + uint32_t cw[4][NW]; + columns(r, cw); #pragma unroll for (uint32_t q = 0; q < 16; ++q) #pragma unroll - for (uint32_t e = 0; e < 4; ++e) { - const uint32_t pos = e * CB + q * B, own = CB - q * B; - const uint32_t st = L <= own ? field(r.d, pos, L) - : field(r.d, pos, own) | field(r.p, e * CB, L - own) << own; - h[15u - q][e] = (__umul24(st, A) + Bc) & 0x3F3F3F3Fu; - } + for (uint32_t e = 0; e < 4; ++e) h[15u - q][e] = (__umul24(state(cw, q, e), A) + Bc) & 0x3F3F3F3Fu; } /* Zero: the zero of row (rt*16 + q) for block kb is subtracted bytewise after `rows`. */ diff --git a/libr4d/r4d_iqr_layout.cpp b/libr4d/r4d_iqr_layout.cpp index 807a6740..fc46479b 100644 --- a/libr4d/r4d_iqr_layout.cpp +++ b/libr4d/r4d_iqr_layout.cpp @@ -136,7 +136,8 @@ bool classify(const RadEncoding* enc, const char* tr, Form* f, int64_t* entries) return true; } const int b = unsigned_bits(cp.dtype); - if (!b || b > 7) return false; + /* eight bits only under a zero: the embedding's u8 table (no GEMM form takes it) */ + if (!b || b > 8 || (b == 8 && !rad_enc_plane(enc, "zero"))) return false; if (const RadEncPlane* zp = rad_enc_plane(enc, "zero")) { if (!scale_form(enc, 3, &sc) || sc != kBf16 || !unsigned_bits(zp->dtype) || zp->block[0] != 1 || zp->block[1] != 128) @@ -733,3 +734,69 @@ extern "C" int r4d_rad_unrelayout_iqr_logits(const RadParam* p, int n_p, int ope std::memcpy(v.aux->data, s + lm_tab(f, rows, dim), (size_t)entries); return RAD_OK; } + +/* ==================================================================== logits_gemm_vocab's classes + * + * Each width class of the head is a gemm_nt_q weight of its own rows (operands 1 + 3i its codes, + * 2 + 3i its scales), stored as that row stores it, with the class's rows (`rows`) and n_embd + * as its geometry and the rotated forms (the classes are fwht128). A class's vocabulary ids + * (3 + 3i) are read as stored. */ +namespace { +int vocab_geom(const RadParam* p, int n_p, int operand, RadParam (&q)[4], int* il) { + if (operand < 1 || operand > 12 || (operand - 1) % 3 == 2) return RAD_E_UNSUPPORTED; + static const char* kRows[] = { "rows0", "rows1", "rows2", "rows3" }; + const int i = (operand - 1) / 3; + std::memset(q, 0, sizeof q); + q[0].key = "N"; + q[0].kind = RAD_P_INT; + q[0].ival = r4d_pgeti_or(p, n_p, kRows[i], 0); + q[1].key = "K"; + q[1].kind = RAD_P_INT; + q[1].ival = r4d_pgeti_or(p, n_p, "n_embd", 0); + q[2].key = "group"; + q[2].kind = RAD_P_INT; + q[2].ival = 128; + q[3].key = "dtype"; + q[3].kind = RAD_P_STR; + q[3].sval = "i8a8h"; + *il = (operand - 1) % 3 == 0 ? IL_B : IL_BSCALE; + return RAD_OK; +} +} /* namespace */ + +extern "C" int r4d_rad_layout_iqr_vocab(const RadParam* p, int n_p, int operand, + const RadEncoding* enc, const int* sel, const RadTensor* pl, + int n, RadLayout* out) { + RadParam q[4]; + int il = 0; + const int rc = vocab_geom(p, n_p, operand, q, &il); + if (rc != RAD_OK) return rc; + Form f; + int64_t entries = 0; + if (!classify(enc, "fwht128", &f, &entries) || f.kind != kTrellisMad || f.scale != kRowF32 || + f.lrb != 0 || f.lrun != 8) + return RAD_E_DTYPE; + return r4d_rad_layout_iqr(q, 4, il, enc, sel, pl, n, out); +} + +extern "C" int r4d_rad_relayout_iqr_vocab(const RadParam* p, int n_p, int operand, + const RadEncoding* enc, const int* sel, + const RadTensor* pl, int n, void* dst, + int64_t dst_bytes) { + RadParam q[4]; + int il = 0; + const int rc = vocab_geom(p, n_p, operand, q, &il); + if (rc != RAD_OK) return rc; + return r4d_rad_relayout_iqr(q, 4, il, enc, sel, pl, n, dst, dst_bytes); +} + +extern "C" int r4d_rad_unrelayout_iqr_vocab(const RadParam* p, int n_p, int operand, + const RadEncoding* enc, const int* sel, + const void* src, int64_t src_bytes, + const RadTensor* pl, int n) { + RadParam q[4]; + int il = 0; + const int rc = vocab_geom(p, n_p, operand, q, &il); + if (rc != RAD_OK) return rc; + return r4d_rad_unrelayout_iqr(q, 4, il, enc, sel, src, src_bytes, pl, n); +} diff --git a/libr4d/r4d_logits_vocab.hip b/libr4d/r4d_logits_vocab.hip new file mode 100644 index 00000000..4be05cbb --- /dev/null +++ b/libr4d/r4d_logits_vocab.hip @@ -0,0 +1,536 @@ +// logits_gemm_vocab: the lm_head stored as width classes of the vocabulary's rows, each an IQR +// computed trellis (r4d_iqr.h: tcq_code=mad, one f32 scale a row under a factor a 128-K block, +// fwht128) decoded where it is read. +// +// KL weighs a head row by its token's probability, so a vocabulary-weighted head gives the likely +// tokens' rows more bits than the rare ones'. The rows are sorted into classes of one code width +// each (whole 256-row trellis runs), every class a weight of its own whose rows each carry their +// vocabulary id, and the logits come out in vocabulary order: nothing after the head knows the rows +// were permuted. Stored at its id from the tile, a logit in a random row order is a write to a line +// of its own (+120 us of 760 at 8 tokens, +970 of 2350 at 64). So within a class the rows are in +// ascending id (the converter's order; a class's rows share a width, so their order is free), and +// above 32 tokens the tile stores at the ids directly, the large narrow class's rows then nearly +// contiguous; up to 32 it writes a staging plane in row order and a gather through `vrow` (each +// id's class and row) puts it in vocabulary order, cheaper there by the narrow classes' scattered +// rows (626 / 646 us against 668 / 706 at 8 / 16 tokens; 1618 against 1559 at 64). A rank's rows of +// each class hold only ids of that rank's share (an id outside it is dropped), so the head shards by +// rows as any lm_head does. +// +// The activation is the head's bf16 input rotated by the unnormalised Hadamard per 128 of K (the +// rotation the codes were quantised under) and held at sixteen bits: one f32 scale a (token, 128) +// over integers q = 128 hi + lo, |q| <= 127 * 128, hi and lo int8. The int8 grid the trunk's GEMMs +// use costs the head 2e-5 KL on its own (half the weighted head's quantisation cost); sixteen bits +// are below bf16's rounding. Each 128-K block's dot is then two int8 WMMA passes over the same +// decoded weight fragments, hi then lo, the first scaled by 128 in the accumulator: an exact +// integer per (row, token, block), folded once into f32. +// +// One launch covers every class: a block finds its class among the classes' row ranges (the +// widest first, so the narrow classes' cheaper blocks fill the tail) and runs that width's +// decoder. A class of one width alone would leave most of the card idle (the widest is a few +// thousand rows). + +#include "r4d.h" +#include "r4d_args.h" +#include "r4d_emit.h" +#include "r4d_fp8_wmma.h" +#include "r4d_fwht.h" +#include "r4d_iqr.h" +#include "r4d_iqr_dec.h" + +#include + +namespace { + +using namespace r4d_fp8; +using namespace r4d_iqr; +using namespace r4d_iqr_dev; + +constexpr uint32_t kWave = 32, kBlock = 128, kFK = 256; +constexpr uint32_t kMaxClass = 4; +/* Tokens a pass of the tile: four 16-token tiles. More tokens are taken in passes, each reading + * the head once (a prefill wants one row's logits; the all-position logits of a KL evaluation are + * the case this serves). */ +constexpr uint32_t kPassTok = 64; +/* |q| <= 127 * 128: hi = round(q / 128) stays in int8, lo = q - 128 hi in [-64, 64]. */ +constexpr float kQMax = 16256.0f; + +/* One width class, as the launch sees it. */ +struct Cls { + const uint8_t* W; /* the IQR weight buffer (codes, then the computed code's A and B) */ + const uint8_t* S; /* its scale buffer: the rows' f32 scales, then the blocks' factors */ + uint32_t N; /* rows */ + uint32_t bits; /* code width */ + const int32_t* ids; /* the vocabulary id of each row, global, ascending */ + uint32_t blk0; /* the first grid block of this class */ + uint32_t row0; /* its first row in the classes' row order (the staging plane's) */ +}; +struct Head { + Cls c[kMaxClass]; /* widest first */ + uint32_t n; /* classes */ + uint32_t nkb; /* K / 128 */ + int32_t off; /* this rank's first vocabulary id */ + uint32_t n_vocab; /* this rank's share */ +}; + +/* ---- the activation: rotated, sixteen bits as two int8 planes ------------------------------ + * + * A wave a (token, 128-K block): each lane's four values through r4d_fwht_wave, the block's + * absolute maximum, then q = rint(x * kQMax / amax). An all-zero block stores zeros under scale 0. */ +__global__ __launch_bounds__(kWave) void vocab_quant_kernel(const uint16_t* __restrict__ X, + uint32_t x_ld, int8_t* __restrict__ XH, + int8_t* __restrict__ XL, + float* __restrict__ XS, uint32_t K) { + const uint32_t m = blockIdx.x, kb = blockIdx.y, lane = threadIdx.x; + const uint32_t nkb = K / kBlock; + const uint2 raw = *(const uint2*)(X + (size_t)m * x_ld + kb * kBlock + 4u * lane); + float v[4] = { __uint_as_float(raw.x << 16), __uint_as_float(raw.x & 0xFFFF0000u), + __uint_as_float(raw.y << 16), __uint_as_float(raw.y & 0xFFFF0000u) }; + r4d_fwht_wave<128>(v, (int)lane); + float a = 0.0f; +#pragma unroll + for (uint32_t i = 0; i < 4; ++i) a = fmaxf(a, fabsf(v[i])); + a = r4d_wave_max(a); + const float inv = a > 0.0f ? kQMax / a : 0.0f; + uint32_t hp = 0, lp = 0; +#pragma unroll + for (uint32_t i = 0; i < 4; ++i) { + const int q = (int)fminf(fmaxf(rintf(v[i] * inv), -kQMax), kQMax); + const int hi = (q + 64) >> 7, lo = q - (hi << 7); + hp |= ((uint32_t)hi & 0xFFu) << (8u * i); + lp |= ((uint32_t)lo & 0xFFu) << (8u * i); + } + const size_t o = (size_t)m * K + kb * kBlock + 4u * lane; + *(uint32_t*)(XH + o) = hp; + *(uint32_t*)(XL + o) = lp; + if (lane == 0) XS[(size_t)m * nkb + kb] = a / kQMax; +} + +/* ---- vocabulary order through the staging plane --------------------------------------- + * + * `vrow` is the head's inverse map, one word a vocabulary id: its class's code width in the top four + * bits and its row in the class's whole tensor below, of which this rank holds rows + * [rank * rows, (rank + 1) * rows). A row's tokens are one contiguous read, consecutive ids + * consecutive writes. A staging row is `mp` floats (16-byte aligned). */ +__global__ void vocab_gather_kernel(Head h, const float* __restrict__ st, + const int32_t* __restrict__ vrow, float* __restrict__ out, + uint32_t c_ld, uint32_t mp, uint32_t nb) { + const uint32_t v = blockIdx.x * blockDim.x + threadIdx.x; + if (v >= h.n_vocab) return; + const uint32_t w = (uint32_t)vrow[v], b = w >> 28, rank = (uint32_t)h.off / h.n_vocab; + uint32_t rc = 0, r0 = 0; +#pragma unroll + for (uint32_t k = 0; k < kMaxClass; ++k) + if (k < h.n && h.c[k].bits == b) { rc = h.c[k].N; r0 = h.c[k].row0; } + const uint32_t j = (w & 0x0FFFFFFFu) - rank * rc; + const bool ok = j < rc; + const float4* const src = (const float4*)(st + (size_t)(ok ? r0 + j : 0u) * mp); + for (uint32_t m4 = 0; m4 < nb; m4 += 4) { + float4 q = src[m4 / 4]; + if (!ok) q = make_float4(0.0f, 0.0f, 0.0f, 0.0f); + const float qv[4] = { q.x, q.y, q.z, q.w }; +#pragma unroll + for (uint32_t i = 0; i < 4; ++i) + if (m4 + i < nb) out[(size_t)(m4 + i) * c_ld + v] = qv[i]; + } +} + +/* ---- the decoder --------------------------------------------------------------------------- + * + * r4d_iqr_dec.h's for the computed trellis under one scale a row, with the continuation read + * compactly: a column's stream is 16 B bits, so each of a lane's four columns starts at bit 0 or + * 16 of a dword, and the at most 15 bits a row's state takes from the unit above lie in that one + * dword: four dword loads a unit, where Dec reads the unit above's whole segment again (fourteen + * dwords at seven bits). */ +template +struct HeadDec { + static constexpr uint32_t L = 16, LANE_BITS = 64u * B, ND = LANE_BITS / 32u, CB = 16u * B; + struct Raw { uint32_t d[ND]; uint32_t p[4]; }; + + __device__ static Raw fetch(const uint8_t* W, uint32_t nkb, uint32_t rt, uint32_t kb, + uint32_t lane, bool live) { + Raw r; + constexpr size_t ub = 4u * LANE_BITS; + load_dw(r.d, W + ((size_t)rt * nkb + kb) * ub + lane * (LANE_BITS / 8u), live); + /* the unit above in the run of 256 rows (16 tiles), tail-biting at the run's first */ + const uint32_t rp = rt % 16u == 0u ? rt + 15u : rt - 1u; + const uint32_t* up = (const uint32_t*)(W + ((size_t)rp * nkb + kb) * ub + lane * (LANE_BITS / 8u)); +#pragma unroll + for (uint32_t e = 0; e < 4; ++e) r.p[e] = live ? up[e * CB / 32u] : 0u; + return r; + } + + /* The lane's four values of each of the tile's 16 rows, packed: bytesum((st * A + Bc) & + * 0x3F3F3F3F) - 126 a state. */ + __device__ static void rows(const Raw& r, uint32_t A, uint32_t Bc, uint32_t (&w)[16]) { + /* a row's four values packed as soon as they are computed: the tile's NT accumulators + * leave no room for all 64 at once */ +#pragma unroll + for (uint32_t q = 0; q < 16; ++q) { + uint32_t t[4]; +#pragma unroll + for (uint32_t e = 0; e < 4; ++e) { + const uint32_t pos = e * CB + q * B, own = CB - q * B; + const uint32_t st = + L <= own ? field(r.d, pos, L) + : field(r.d, pos, own) | + ((r.p[e] >> ((e * CB) & 31u)) & ((1u << (L - own)) - 1u)) << own; + const uint32_t h = (__umul24(st, A) + Bc) & 0x3F3F3F3Fu; + t[e] = (uint32_t)__builtin_amdgcn_sudot4(false, (int)h, false, 0x01010101, -126, false); + } + w[15u - q] = pack4(pack2(t[0], t[1]), pack2(t[2], t[3])); + } + } +}; + +/* ---- the tile ------------------------------------------------------------------------------ + * + * gemm_iqr_nt_m64's narrow tile (r4d_gemm_iqr.hip) without the K split: MW waves a block, a wave + * one 16-row tile of its class against NT 16-token tiles whose hi and lo planes are staged through + * LDS a 256-K chunk at a time. Each unit's codes are fetched a chunk ahead, decoded to int8 and + * transposed into fragment order through the wave's LDS tile, then used by both planes' WMMA + * steps. */ +template +struct Lds { + static constexpr uint32_t FN = NT * 16, kB = FN * lds_pitch(); +}; + +template +__device__ __forceinline__ void vocab_tile(const Head& h, const Cls& cl, uint32_t bx, + const int8_t* __restrict__ XH, + const int8_t* __restrict__ XL, + const float* __restrict__ XS, float* __restrict__ out, + uint32_t c_ld, uint32_t nb, uint8_t* s_bh, + uint8_t* s_bl, uint8_t* s_tr) { + using D = HeadDec; + static_assert(F::KIND == kTrellisMad && F::LRB == 0 && F::SC == kRowF32 && F::L == 16, + "a computed trellis, one scale a row"); + constexpr uint32_t FK = kFK, FN = NT * 16, kU = FK / kBlock; + const uint32_t tid = threadIdx.x, lane = tid & (kWave - 1), wave = tid / kWave; + const uint32_t K = h.nkb * kBlock; + + Ctx c{}; + c.W = cl.W; + c.S = cl.S; + c.N = cl.N; + c.nkb = h.nkb; + c.run_tiles = 256u / 16u; + uint8_t* const tr = s_tr + wave * kTrBytes; + + const uint32_t m0 = bx * MW * 16u, n0 = blockIdx.y * FN; + const uint32_t wrow0 = m0 + wave * 16u; + const uint32_t arow = wrow0 / 16u; + const bool alive = wrow0 < cl.N; + + f8v raw[NT], acc[NT]; +#pragma unroll + for (uint32_t j = 0; j < NT; ++j) { raw[j] = acc_zero(); acc[j] = acc_zero(); } + + /* Staging: kTPR threads a token row of a chunk, both planes. */ + constexpr uint32_t kSeg = 32, kTPR = FK / kSeg, kRPP = (MW * kWave) / kTPR; + constexpr uint32_t kBP = (FN + kRPP - 1) / kRPP; + const uint32_t sn = tid / kTPR, sk = (tid % kTPR) * kSeg; + const uint32_t brow0 = n0 + frag_c(lane); + const uint8_t* const hsrc = (const uint8_t*)XH + (size_t)(n0 + sn) * K + sk; + const uint8_t* const lsrc = (const uint8_t*)XL + (size_t)(n0 + sn) * K + sk; + + Stage8 ph[kBP], pl[kBP]; +#pragma unroll + for (uint32_t p = 0; p < kBP; ++p) { + const uint32_t r = sn + p * kRPP; + const bool live = r < FN && n0 + r < nb; + ph[p] = stage8_load(hsrc + (size_t)p * kRPP * K, live); + pl[p] = stage8_load(lsrc + (size_t)p * kRPP * K, live); + } + typename D::Raw pf[kU], pfn[kU]; +#pragma unroll + for (uint32_t p = 0; p < kU; ++p) pf[p] = D::fetch(c.W, c.nkb, arow, p, lane, alive); + /* the computed code's A and B, after its 2^16 values (kept for the unrelayout) */ + constexpr Form fm{ F::KIND, F::B, F::LV, F::L, F::LRB, F::SC, 0 }; + const uint32_t* const ab = (const uint32_t*)(c.W + aux_off(fm, c.N, (int64_t)K) + (1 << 16)); + const uint32_t mA = ab[0], mB = ab[1]; + + for (uint32_t k0 = 0; k0 < K; k0 += FK) { +#pragma unroll + for (uint32_t p = 0; p < kBP; ++p) { + const uint32_t r = sn + p * kRPP; + if (r < FN) { + stage8_store(s_bh, r, sk, ph[p]); + stage8_store(s_bl, r, sk, pl[p]); + } + } + __syncthreads(); + const uint32_t k1 = k0 + FK; + if (k1 < K) { +#pragma unroll + for (uint32_t p = 0; p < kBP; ++p) { + const uint32_t r = sn + p * kRPP; + const bool live = r < FN && n0 + r < nb; + if (r < FN) { + ph[p] = stage8_load(hsrc + (size_t)p * kRPP * K + k1, live); + pl[p] = stage8_load(lsrc + (size_t)p * kRPP * K + k1, live); + } + } +#pragma unroll + for (uint32_t p = 0; p < kU; ++p) pfn[p] = D::fetch(c.W, c.nkb, arow, k1 / kBlock + p, lane, alive); + } + +#pragma unroll + for (uint32_t p = 0; p < kU; ++p) { + const uint32_t kb = k0 / kBlock + p; + uint32_t w[16]; + D::rows(pf[p], mA, mB, w); + Stage8 a8[2]; + frag(w, tr, lane, a8); + /* hi: 128 times its sum, exactly, in the accumulator; then lo on top */ +#pragma unroll + for (uint32_t kk = 0; kk < kBlock / kK; ++kk) { + const uint32_t ks = p * kBlock + kk * kK; + const i2v af = frag_of(a8[kk / 4u], kk % 4u); +#pragma unroll + for (uint32_t j = 0; j < NT; ++j) raw[j] = mma8(af, frag(s_bh, j * 16, ks, lane), raw[j]); + } +#pragma unroll + for (uint32_t j = 0; j < NT; ++j) +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) + raw[j][t] = __int_as_float(__float_as_int(raw[j][t]) << 7); +#pragma unroll + for (uint32_t kk = 0; kk < kBlock / kK; ++kk) { + const uint32_t ks = p * kBlock + kk * kK; + const i2v af = frag_of(a8[kk / 4u], kk % 4u); +#pragma unroll + for (uint32_t j = 0; j < NT; ++j) raw[j] = mma8(af, frag(s_bl, j * 16, ks, lane), raw[j]); + } + /* the block's factor (shared by every row) times each token's activation scale */ + const float f = alive ? fold_f32(c, wrow0, kb) : 0.0f; +#pragma unroll + for (uint32_t j = 0; j < NT; ++j) { + const uint32_t tok = brow0 + j * 16; + const float ws = tok < nb ? f * XS[(size_t)tok * h.nkb + kb] : 0.0f; +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) { + acc[j][t] = fmaf(acc_val(raw[j][t]), ws, acc[j][t]); + raw[j][t] = 0.0f; + } + } + } +#pragma unroll + for (uint32_t p = 0; p < kU; ++p) pf[p] = pfn[p]; + __syncthreads(); + } + + /* A lane's eight accumulator rows are consecutive rows of the wave's tile, of one token: their + * row scales and ids are two 16-byte loads each. STAGE: the logits go to the staging plane in + * the classes' row order, `c_ld` (the pass's tokens rounded up to four) a row, a wave's rows + * then a few consecutive lines; else each goes to its id. */ + if (!alive) return; + const uint32_t r0 = wrow0 + acc_row(lane, 0); + const float4 sa = *(const float4*)((const float*)cl.S + r0), sb = *(const float4*)((const float*)cl.S + r0 + 4); + const float rs[8] = { sa.x, sa.y, sa.z, sa.w, sb.x, sb.y, sb.z, sb.w }; + if constexpr (STAGE) { +#pragma unroll + for (uint32_t j = 0; j < NT; ++j) { + const uint32_t tok = brow0 + j * 16; + if (tok >= nb) continue; + float* const o = out + (size_t)(cl.row0 + r0) * c_ld + tok; +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) o[(size_t)t * c_ld] = acc[j][t] * rs[t]; + } + } else { + const int4 ia = *(const int4*)(cl.ids + r0), ib = *(const int4*)(cl.ids + r0 + 4); + const int32_t id[8] = { ia.x, ia.y, ia.z, ia.w, ib.x, ib.y, ib.z, ib.w }; +#pragma unroll + for (uint32_t j = 0; j < NT; ++j) { + const uint32_t tok = brow0 + j * 16; + if (tok >= nb) continue; + float* const o = out + (size_t)tok * c_ld; +#pragma unroll + for (uint32_t t = 0; t < 8; ++t) { + const uint32_t v = (uint32_t)(id[t] - h.off); + if (v < h.n_vocab) o[v] = acc[j][t] * rs[t]; + } + } + } +} + +template +using VF = FormT; + +/* The widths the classes may have: the computed trellis's built row forms. */ +#define R4D_VOCAB_BITS(X) X(2) X(3) X(4) X(5) X(6) X(7) + +/* Six waves a SIMD: 4 and 8 measure within 2% of it at every width (M = 1 .. 64). */ +template +__global__ __launch_bounds__(MW * kWave) R4D_WAVES(6) +void vocab_tile_kernel(Head h, const int8_t* __restrict__ XH, const int8_t* __restrict__ XL, + const float* __restrict__ XS, float* __restrict__ out, uint32_t c_ld, + uint32_t nb) { + __shared__ __attribute__((aligned(16))) uint8_t s_bh[Lds::kB]; + __shared__ __attribute__((aligned(16))) uint8_t s_bl[Lds::kB]; + __shared__ __attribute__((aligned(16))) uint8_t s_tr[MW * kTrBytes]; + /* the block's class: the last whose first block is at or below this one (uniform), copied + * at constant indices so the argument block is never indexed at run time */ + Cls cl = h.c[0]; +#pragma unroll + for (uint32_t i = 1; i < kMaxClass; ++i) + if (i < h.n && blockIdx.x >= h.c[i].blk0) cl = h.c[i]; + const uint32_t bx = blockIdx.x - cl.blk0; + switch (cl.bits) { +#define R4D_VOCAB_CASE(b) \ + case b: vocab_tile, NT, MW, STAGE>(h, cl, bx, XH, XL, XS, out, c_ld, nb, s_bh, s_bl, s_tr); \ + break; + R4D_VOCAB_BITS(R4D_VOCAB_CASE) +#undef R4D_VOCAB_CASE + default: break; + } +} + +constexpr uint32_t kMW = 8; + +struct Operands { + const RadTensor* x = nullptr; + const RadTensor* y = nullptr; + const RadTensor *w[kMaxClass] = {}, *s[kMaxClass] = {}, *r[kMaxClass] = {}, *vrow = nullptr; + long long M = 0, K = 0, rows[kMaxClass] = {}; + uint32_t n = 0; +}; + +/* Operand order: x, then (w, s, ids) a class, the inverse map, the logits (r4d_rows.cpp's + * oLogitsVocab). */ +constexpr int kOpX = 0, kOpMap = 1 + 3 * (int)kMaxClass, kOpY = kOpMap + 1; + +int operands(const RadArgs* a, Operands* g) { + g->x = r4d_opt(a, kOpX); + g->y = r4d_opt(a, kOpY); + if (!g->x || !g->y) return R4D_NO(RAD_E_INVAL); + if (g->x->dtype != RAD_BF16 || g->y->dtype != RAD_F32) return R4D_NO(RAD_E_DTYPE); + if (g->x->rank < 2 || g->y->rank < 2) return R4D_NO(RAD_E_SHAPE); + g->M = g->x->shape[0]; + g->K = r4d_geti_or(a, "n_embd", 0); + if (g->M < 1 || g->K < kFK || g->K % kFK || r4d_numel(g->x) != g->M * g->K) + return R4D_NO(RAD_E_SHAPE); + if (g->y->shape[0] < g->M) return R4D_NO(RAD_E_SHAPE); + static const char* kRows[kMaxClass] = { "rows0", "rows1", "rows2", "rows3" }; + for (uint32_t i = 0; i < kMaxClass; ++i) { + const RadTensor* w = r4d_opt(a, 1 + 3 * (int)i); + const RadTensor* s = r4d_opt(a, 2 + 3 * (int)i); + const RadTensor* r = r4d_opt(a, 3 + 3 * (int)i); + const long long n = r4d_geti_or(a, kRows[i], 0); + if (!w && !s && !r && n == 0) break; + if (!w || !s || !r || n < 256 || n % 256) return R4D_NO(RAD_E_SHAPE); + if (!is_weight_dtype(w->dtype) || !is_scale_dtype(s->dtype) || r->dtype != RAD_I32) + return R4D_NO(RAD_E_DTYPE); + const uint32_t word = w->dtype & kWordMask; + const Form f = form(word); + if ((s->dtype & kWordMask) != word || f.kind != kTrellisMad || f.L != 16 || f.lrb != 0 || + f.scale != kRowF32 || f.lrun != 8 || f.bits < 2 || f.bits > 7) + return R4D_NO(RAD_E_DTYPE); + if (w->shape[0] != n || w->shape[1] != g->K || r4d_numel(r) != n) return R4D_NO(RAD_E_SHAPE); + if (!r4d_aligned(w->data, 256) || !r4d_aligned(s->data, 16) || !r4d_aligned(r->data, 16)) + return R4D_NO(RAD_E_ALIGN); + g->w[i] = w; + g->s[i] = s; + g->r[i] = r; + g->rows[i] = n; + g->n = i + 1; + } + if (g->n == 0) return R4D_NO(RAD_E_INVAL); + g->vrow = r4d_opt(a, kOpMap); + if (!g->vrow || g->vrow->dtype != RAD_I32 || r4d_numel(g->vrow) != r4d_geti_or(a, "n_vocab", -1)) + return R4D_NO(RAD_E_SHAPE); + if (r4d_row_pitch(g->x) != g->K) return R4D_NO(RAD_E_STRIDE); + return RAD_OK; +} + +/* The staging plane's tokens: a pass of up to this many stages, a larger one stores directly + * (staging 48 tokens measured 1175 us against the direct store's 1062 at 33). */ +constexpr uint32_t kStageTok = 32; + +/* Scratch: the two int8 planes and the scales for every token, then the staging plane. */ +long long scratch_bytes(long long M, long long K, long long rows) { + return 2 * align256(M * K) + align256(M * (K / kBlock) * 4) + align256(rows * kStageTok * 4); +} + +} // namespace + +extern "C" int64_t r4d_rad_logits_gemm_vocab_scratch(const RadArgs* a) { + const long long M = r4d_geti_or(a, "M", 0), K = r4d_geti_or(a, "n_embd", 0); + static const char* kRows[kMaxClass] = { "rows0", "rows1", "rows2", "rows3" }; + long long rows = 0; + for (const char* k : kRows) rows += r4d_geti_or(a, k, 0); + if (M < 1 || K < 1) return 0; + return (int64_t)scratch_bytes(M, K, rows); +} + +extern "C" int r4d_rad_logits_gemm_vocab(const RadArgs* a, RadStream s) { + Operands g; + const int rc = operands(a, &g); + if (rc != RAD_OK) return rc; + const long long M = g.M, K = g.K, nkb = K / kBlock; + long long rows = 0; + for (uint32_t i = 0; i < g.n; ++i) rows += g.rows[i]; + if (!a->scratch || (long long)a->scratch_bytes < scratch_bytes(M, K, rows)) + return R4D_NO(RAD_E_SHAPE); + int8_t* const xh = (int8_t*)a->scratch; + int8_t* const xl = xh + align256(M * K); + float* const xs = (float*)(xl + align256(M * K)); + float* const stg = (float*)((uint8_t*)xs + align256(M * (K / kBlock) * 4)); + + Head h{}; + h.n = g.n; + h.nkb = (uint32_t)nkb; + h.off = (int32_t)r4d_geti_or(a, "vocab_offset", 0); + h.n_vocab = (uint32_t)r4d_geti_or(a, "n_vocab", 0); + const long long c_ld = r4d_row_pitch(g.y); + if (h.n_vocab < 1 || c_ld < (long long)h.n_vocab) return R4D_NO(RAD_E_SHAPE); + /* the widest class first: the narrow classes' cheaper blocks then fill the tail */ + uint32_t ord[kMaxClass]; + for (uint32_t i = 0; i < g.n; ++i) ord[i] = i; + std::sort(ord, ord + g.n, [&](uint32_t x, uint32_t y) { + return form(g.w[x]->dtype & kWordMask).bits > form(g.w[y]->dtype & kWordMask).bits; + }); + uint32_t blocks = 0; + for (uint32_t i = 0; i < g.n; ++i) { + const uint32_t k = ord[i]; + Cls& c = h.c[i]; + c.W = (const uint8_t*)g.w[k]->data; + c.S = (const uint8_t*)g.s[k]->data; + c.ids = (const int32_t*)g.r[k]->data; + c.N = (uint32_t)g.rows[k]; + c.bits = form(g.w[k]->dtype & kWordMask).bits; + c.blk0 = blocks; + c.row0 = blocks * kMW * 16u; + blocks += c.N / (kMW * 16u); + } + + if (R4D_EMIT(s, vocab_quant_kernel, dim3((uint32_t)M, (uint32_t)nkb), dim3(kWave), 0, + (const uint16_t*)g.x->data, (uint32_t)K, xh, xl, xs, (uint32_t)K) != RAD_OK) + return R4D_NO(RAD_E_DEVICE); + for (long long t0 = 0; t0 < M; t0 += kPassTok) { + const uint32_t nb = (uint32_t)std::min(kPassTok, M - t0); + const uint32_t nt = nb > 48 ? 4u : nb > 32 ? 3u : nb > 16 ? 2u : 1u; + const dim3 grid(blocks, 1, 1); + const int8_t* const ph = xh + t0 * K; + const int8_t* const pl = xl + t0 * K; + const float* const ps = xs + t0 * nkb; + const bool stage = nb <= kStageTok; + const uint32_t mp = (nb + 3u) / 4u * 4u; + float* const po = stage ? stg : (float*)g.y->data + t0 * c_ld; + const uint32_t ld = stage ? mp : (uint32_t)c_ld; + int e; +#define R4D_VOCAB_GO(nt_, st_) \ + e = R4D_EMIT(s, (vocab_tile_kernel), grid, dim3(kMW * kWave), 0, h, ph, pl, \ + ps, po, ld, nb) + if (nt == 4u) R4D_VOCAB_GO(4u, false); + else if (nt == 3u) R4D_VOCAB_GO(3u, false); + else if (nt == 2u) R4D_VOCAB_GO(2u, true); + else R4D_VOCAB_GO(1u, true); +#undef R4D_VOCAB_GO + if (e != RAD_OK) return R4D_NO(RAD_E_DEVICE); + if (stage && R4D_EMIT(s, vocab_gather_kernel, dim3((h.n_vocab + 255u) / 256u), dim3(256), 0, + h, (const float*)stg, (const int32_t*)g.vrow->data, + (float*)g.y->data + t0 * c_ld, (uint32_t)c_ld, mp, nb) != RAD_OK) + return R4D_NO(RAD_E_DEVICE); + } + return hipGetLastError() == hipSuccess ? RAD_OK : R4D_NO(RAD_E_DEVICE); +} diff --git a/libr4d/r4d_plugin.h b/libr4d/r4d_plugin.h index 1639bb95..90023f34 100644 --- a/libr4d/r4d_plugin.h +++ b/libr4d/r4d_plugin.h @@ -441,6 +441,7 @@ int r4d_rad_gdn_recurrent_update(const RadArgs*, RadStream); /* gdn_conv_update folded into the recurrent update's prologue for the decode shape; q/k/v are * never written (r4d_gdn_recurrent_update_k128_v128_bf16_fp32state.hip). */ int r4d_rad_gdn_conv_recurrent_update(const RadArgs*, RadStream); +int r4d_rad_gdn_conv_recurrent_update_had(const RadArgs*, RadStream); int r4d_rad_gdn_gated_rmsnorm (const RadArgs*, RadStream); int r4d_rad_dflash_conv (const RadArgs*, RadStream); int r4d_rad_dflash_select (const RadArgs*, RadStream); @@ -622,6 +623,9 @@ int r4d_rad_gemm_i8a8_m16 (const RadArgs*, RadStream); int64_t r4d_rad_gemm_i8a8_m16_scratch(const RadArgs*); int r4d_rad_logits_gemm_i8(const RadArgs*, RadStream); int r4d_rad_logits_gemm_iqr(const RadArgs*, RadStream); +/* `logits_gemm_vocab`: the head as width classes of the vocabulary's rows (r4d_logits_vocab.hip). */ +int r4d_rad_logits_gemm_vocab(const RadArgs*, RadStream); +int64_t r4d_rad_logits_gemm_vocab_scratch(const RadArgs*); int r4d_rad_logit_rerank_iqr(const RadArgs*, RadStream); int r4d_rad_gemm_i8a8_tiled(const RadArgs*, RadStream); int r4d_rad_gemm_i8a8_rb8_tiled(const RadArgs*, RadStream); @@ -629,6 +633,8 @@ int r4d_rad_gemm_i8a8_rb32_tiled(const RadArgs*, RadStream); /* The IQR weights, decoded from their codes where they are read (r4d_gemm_iqr.hip). */ int r4d_rad_gemm_iqr_m64(const RadArgs*, RadStream); int64_t r4d_rad_gemm_iqr_m64_scratch(const RadArgs*); +int r4d_rad_gemm_iqr_gated(const RadArgs*, RadStream); +int64_t r4d_rad_gemm_iqr_gated_scratch(const RadArgs*); int r4d_rad_gemm_iqr_tiled(const RadArgs*, RadStream); int64_t r4d_rad_gemm_iqr_tiled_scratch(const RadArgs*); int r4d_rad_quant_act_i8g(const RadArgs*, RadStream); @@ -642,6 +648,7 @@ int r4d_rad_gated_quant_fp8 (const RadArgs*, RadStream); int r4d_rad_gated_had_quant_fp8(const RadArgs*, RadStream); int r4d_rad_gated_had_quant_i8g(const RadArgs*, RadStream); int r4d_rad_gate_quant_fp8 (const RadArgs*, RadStream); +int r4d_rad_gate_had_quant_i8g(const RadArgs*, RadStream); int r4d_rad_gram_accum (const RadArgs*, RadStream); /* The same accumulator over a plain bf16 activation, no scale operand. */ int r4d_rad_gram_accum_bf16 (const RadArgs*, RadStream); @@ -675,6 +682,7 @@ R4D_HOOKS(fp8_block) R4D_HOOKS(i8_block) R4D_HOOKS(iqr) R4D_HOOKS(iqr_logits) +R4D_HOOKS(iqr_vocab) R4D_HOOKS(fp8_logits) R4D_HOOKS(i8_logits) R4D_HOOKS(hc_e4m3) @@ -1044,6 +1052,7 @@ int r4d_fuse_router_sigmoid_topk_scatter(const RadParam*, int, uint64_t, int, Ra int r4d_fuse_gate_quant_fp8 (const RadParam*, int, uint64_t, int, RadFuseStep*); int r4d_fuse_gemm_nt_q_gated (const RadParam*, int, uint64_t, int, RadFuseStep*); int r4d_fuse_gemm_nt_q_gated_mx (const RadParam*, int, uint64_t, int, RadFuseStep*); +int r4d_fuse_gemm_nt_q_gated_iqr (const RadParam*, int, uint64_t, int, RadFuseStep*); int r4d_fuse_gdn_conv_recurrent_update(const RadParam*, int, uint64_t, int, RadFuseStep*); int r4d_fuse_qk_norm_rope_gate_kv_store(const RadParam*, int, uint64_t, int, RadFuseStep*); int r4d_fuse_qkv_norm_rope_kv_store(const RadParam*, int, uint64_t, int, RadFuseStep*); diff --git a/libr4d/r4d_rows.cpp b/libr4d/r4d_rows.cpp index 54342257..b273c4ec 100644 --- a/libr4d/r4d_rows.cpp +++ b/libr4d/r4d_rows.cpp @@ -532,6 +532,29 @@ static const RadOperandSpec oGdnConvRecurrentUpdate[] = { { "o_scale", RAD_OPD_OUT, 1 }, }; +/* gdn_conv_recurrent_update with had_quant_act_i8g's codes of `o` (a rotated int8 out projection's + * input): the same operands, the codes required. libr4d's alone; no reference serves it. */ +static const RadOperandSpec oGdnConvRecurrentUpdateHad[] = { + { "x", RAD_OPD_IN, 0 }, + { "conv_w", RAD_OPD_WEIGHT, 0 }, + { "conv_b", RAD_OPD_WEIGHT, 1 }, + { "conv_state", RAD_OPD_INOUT, 0 }, + { "conv_idx", RAD_OPD_IN, 0 }, + { "a", RAD_OPD_IN, 0 }, + { "b", RAD_OPD_IN, 0 }, + { "A_log", RAD_OPD_WEIGHT, 0 }, + { "dt_bias", RAD_OPD_WEIGHT, 0 }, + { "state", RAD_OPD_INOUT, 0 }, + { "state_idx", RAD_OPD_IN, 0 }, + { "num_accepted", RAD_OPD_IN, 0 }, + { "cu", RAD_OPD_IN, 0 }, + { "z", RAD_OPD_IN, 0 }, + { "norm_w", RAD_OPD_WEIGHT, 0 }, + { "o", RAD_OPD_OUT, 0 }, + { "o_q", RAD_OPD_OUT, 0 }, + { "o_scale", RAD_OPD_OUT, 0 }, +}; + /* The control vector's projection (r4d_hc_bf16.hip, with the other gated-residual kernels): a bf16 * stream, one unit f32 direction for every stream, an int32 switch per row. */ static const RadParamSpec pHcProject[] = { P_INT("M"), P_INT("n"), P_INT("hc"), P_F64("scale"), @@ -1250,7 +1273,8 @@ static const RadOperandSpec oGivensDense[] = { * * `h` is inout: a caller zeroes it once and each launch adds its block. The operands are named `a` * and `a_scale` as in `gemm_nt_q`, whose activation this characterises. `a_scale` is optional: - * dtype "bf16" reads a plain activation with no scale (a model served at bf16). */ + * dtype "bf16" reads a plain activation with no scale (a model served at bf16); "i8a8" reads an + * int8 trunk's codes. */ static const RadParamSpec pGramAccum[] = { { "M", RAD_P_INT, RAD_REQUIRED }, { "n", RAD_P_INT, RAD_REQUIRED }, @@ -2338,6 +2362,38 @@ static const RadOperandSpec oLogits[] = { { "logits", RAD_OPD_OUT, 0 }, }; +/* The lm_head as width classes of the vocabulary's rows: up to four (codes, scales, ids) triples, + * a class's rows on this rank in `rows`, ids global (`vocab_offset` is this rank's first), and + * `vrow`, the inverse: each of the rank's ids' class width and row. */ +static const RadParamSpec pLogitsVocab[] = { + { "M", RAD_P_INT, RAD_REQUIRED }, + { "n_vocab", RAD_P_INT, RAD_REQUIRED }, + { "n_embd", RAD_P_INT, RAD_REQUIRED }, + { "dtype", RAD_P_STR, RAD_REQUIRED }, + { "vocab_offset", RAD_P_INT, RAD_REQUIRED }, + { "rows0", RAD_P_INT, RAD_REQUIRED }, + { "rows1", RAD_P_INT, RAD_OPTIONAL }, + { "rows2", RAD_P_INT, RAD_OPTIONAL }, + { "rows3", RAD_P_INT, RAD_OPTIONAL }, +}; +static const RadOperandSpec oLogitsVocab[] = { + { "x", RAD_OPD_IN, 0 }, + { "w0", RAD_OPD_WEIGHT, 0 }, + { "s0", RAD_OPD_WEIGHT, 0 }, + { "ids0", RAD_OPD_WEIGHT, 0 }, + { "w1", RAD_OPD_WEIGHT, 1 }, + { "s1", RAD_OPD_WEIGHT, 1 }, + { "ids1", RAD_OPD_WEIGHT, 1 }, + { "w2", RAD_OPD_WEIGHT, 1 }, + { "s2", RAD_OPD_WEIGHT, 1 }, + { "ids2", RAD_OPD_WEIGHT, 1 }, + { "w3", RAD_OPD_WEIGHT, 1 }, + { "s3", RAD_OPD_WEIGHT, 1 }, + { "ids3", RAD_OPD_WEIGHT, 1 }, + { "vrow", RAD_OPD_WEIGHT, 0 }, + { "logits", RAD_OPD_OUT, 0 }, +}; + /* Every sampler scalar is per row and arrives in `params`, an array of RadSampleParams * (abi/rad_sample.h). Parameters are geometry, frozen at declare, so only the two extents are * parameters. */ @@ -3223,6 +3279,15 @@ static const RadOpSchema kSchemas[] = { "present: `tok` holds its row count more tokens after the step's, continuing the LAST " "sequence, and their ids -- as the step that runs them will compute them -- go there; " "the window is the step's own."), + SCHEMA("logits_gemm_vocab", pLogitsVocab, oLogitsVocab, + "logits[M, n_vocab] = x[M, n_embd] @ lm_head^T over a head stored as width classes of " + "the vocabulary's rows: class i is a weight of rows rows on this rank (w its " + "codes, s its scales) and ids the global vocabulary id of each, whose logit it " + "writes; ids outside [vocab_offset, vocab_offset + n_vocab) are dropped. The classes " + "cover the rank's share of the vocabulary once; ascending ids within a class keep the " + "stores together. vrow[n_vocab] is the inverse, each of the rank's ids' class width in " + "the top four bits and its row in the class's whole tensor below, which must fall in " + "this rank's rows (vocab_offset / n_vocab is the rank)."), SCHEMA("logits_gemm", pLogits, oLogits, "the lm_head projection. gemm_nt's arithmetic under the vocabulary edge's parameter " "spelling; M is one row per SAMPLED position, `gather_rows` having run first."), @@ -3355,6 +3420,11 @@ static const RadOpSchema kSchemas[] = { "gdn_conv_update followed by gdn_recurrent_update, with the convolution computed in " "the recurrent update's prologue: q, k and v never reach memory. Byte-identical to " "the two ops it replaces."), + SCHEMA("gdn_conv_recurrent_update_had", pGdnConvRecurrentUpdate, oGdnConvRecurrentUpdateHad, + "gdn_conv_recurrent_update whose `o_q` / `o_scale` are had_quant_act_i8g's codes of " + "`o` (int8, a 128-wide Hadamard before the per-(token, head) amax), for an out " + "projection stored rotated (i8a8h). Byte-identical to gdn_conv_recurrent_update " + "followed by had_quant_act_i8g."), SCHEMA("hc_enter", pHcPlain, oHcEnter, "h[s] = x for each of the hc streams -- the wide residual stream's first value."), SCHEMA("mhc_pre", pMhcPre, oMhcPre, @@ -3610,6 +3680,11 @@ static const RadOpSchema kSchemas[] = { "epilogue, byte-identical to the two ops it replaces."), SCHEMA("gate_quant_fp8", pGateQuantFp8, oGateQuantFp8, "the same, with the gate in its own operand rather than packed beside x."), + SCHEMA("gate_had_quant_i8g", pGateQuantFp8, oGateQuantFp8, + "gate_quant_fp8 at int8 codes with a `group`-wide Hadamard before the absmax: " + "had_quant_act_i8g's codes of the bf16 product (`out_bf16` the unrotated product), for " + "an out projection stored rotated (dtype i8a8h). Byte-identical to gate_quant_fp8's " + "product and had_quant_act_i8g over it."), SCHEMA("quant_act_fp8", pQuantActFp8, oQuantActFp8, "per-(row, `group`-column) symmetric E4M3 quantisation of a token-major activation, in " "PLAIN ROW-MAJOR order rather than quant_act_i8's fragment order. The scale is " @@ -5030,6 +5105,12 @@ static const RadConstraint cGemmNtIqrM64[] = { C_LE("M", 64), C_DIV("K", 256), C_DIV("N", 16), C_EQ("group", R4D_FP8_BLOCK), C_IN("dtype", "i8a8 i8a8h"), }; +/* The gated fold over an IQR gate_up weight, to the 16-token tile's band: the gated width a whole + * number of 128-column groups, silu only (gated_had_quant_i8g's mode the fold compiles). */ +static const RadConstraint cGemmNtQGatedIqr[] = { + C_LE("M", 16), C_DIV("K", 256), C_DIV("N", 256), C_EQ("group", R4D_FP8_BLOCK), + C_IN("dtype", "i8a8h"), C_IN("act", "silu"), +}; static const RadConstraint cGemmNtIqrTiled[] = { C_DIV("K", 256), C_DIV("N", R4D_FP8_BLOCK), C_EQ("group", R4D_FP8_BLOCK), C_IN("dtype", "i8a8 i8a8h"), @@ -5088,7 +5169,7 @@ static const RadConstraint cQsaBlockKey[] = { * `n` a multiple of 4 is the staging slot (one dword of four codes); the 64-wide C tile masks a * ragged tile. */ static const RadConstraint cGramAccum[] = { - C_DIV("n", 4), C_EQ("group", R4D_FP8_BLOCK), C_IN("dtype", "fp8a8"), + C_DIV("n", 4), C_EQ("group", R4D_FP8_BLOCK), C_IN("dtype", "fp8a8 i8a8"), }; /* The bf16 form has no scale grid, so `group` constrains nothing; the staging slot is four * elements of a row. */ @@ -5194,6 +5275,10 @@ static const RadConstraint cGemmNtQGatedMxWide[] = { C_GE("M", 9), C_LE("M", 64), C_DIV("K", 128), C_GE("K", 2688), C_DIV("N", 256), C_EQ("group", 32), C_IN("dtype", "mxfp4a8"), C_IN("act", "silu gelu_tanh"), }; +/* The rotated form: whole 128-column groups (a rotation block cannot straddle a row's end). */ +static const RadConstraint cGateHadQuantI8g[] = { + C_DIV("n", R4D_FP8_BLOCK), C_EQ("group", R4D_FP8_BLOCK), C_IN("dtype", "bf16"), +}; static const RadConstraint cGateQuantFp8[] = { C_DIV("n", 4), C_EQ("group", R4D_FP8_BLOCK), C_IN("dtype", "bf16"), }; @@ -5696,6 +5781,7 @@ static const RadConstraint cLogitsGemmCols[] = { C_EQ("n_embd", 4096), C_IN("dty * 2560 the row would win selection and then fail at layout with no fallback. r4d_fp8_lm.h pads the * stored row to 16 bytes instead (under 0.3% at K = 2560), so every multiple of 128 is served. */ static const RadConstraint cLogitsGemmFp8[] = { C_DIV("n_embd", 128), C_IN("dtype", "bf16") }; +static const RadConstraint cLogitsVocab[] = { C_DIV("n_embd", 256), C_IN("dtype", "bf16") }; /* No tunable axes. */ #define NOTUNE nullptr, 0, nullptr @@ -6567,6 +6653,21 @@ static const RadKernelInfo kKernels[] = { r4d_rad_layout_i8_logits, r4d_rad_relayout_i8_logits, nullptr, r4d_rad_unrelayout_i8_logits }, +{ "logits_gemm_vocab_iqr", "logits_gemm_vocab", "vocab", + "the vocabulary-weighted IQR head in one launch over every class: each block decodes its " + "class's computed-trellis codes (the class's width) into int8 fragments through LDS and runs " + "two int8 WMMA passes against the rotated activation's sixteen bits (hi and lo planes); up to 32 " + "tokens into a staging plane in row order gathered through vrow, above that at each row's id", + "any M (64 tokens a pass); n_embd a multiple of 256; each class a multiple of 256 rows", + "bf16 x, rotated by fwht128 and quantised to 16 bits a (token, 128) in the call's scratch; " + "classes of tcq_code=mad codes (2 to 7 bits, runs of 256 rows) under one f32 scale a row; F32 " + "LOGITS OUT, int32 block sums folded in fp32", + RAD_DOMAIN_DEVICE, R4D_PRIO_LOGITS_FP8, + ROW(cLogitsVocab), NOTUNE, + nullptr, nullptr, r4d_rad_logits_gemm_vocab, r4d_rad_logits_gemm_vocab_scratch, + r4d_rad_layout_iqr_vocab, r4d_rad_relayout_iqr_vocab, + nullptr, r4d_rad_unrelayout_iqr_vocab }, + { "logits_gemm_iqr", "logits_gemm", "vocab", "logits_gemm_i8 over an IQR head kept at its codes' width: each lane's sixteen codes read at " "their width and looked up in the head's table by byte permutes, then the int8 head's matvec " @@ -7814,6 +7915,17 @@ R4D_WIN_TREE_PAIR(512, 4) R4D_WIN_TREE_PAIR(512, 8) nullptr, nullptr, r4d_rad_gdn_conv_recurrent_update, nullptr, nullptr, nullptr, nullptr, nullptr, r4d_fuse_gdn_conv_recurrent_update }, +{ "gdn_conv_recurrent_update_had_k128_v128_bf16", "gdn_conv_recurrent_update_had", "gdn", + "gdn_conv_recurrent_update_k128_v128_bf16 with had_quant_act_i8g's pass in its epilogue: the " + "workgroup's (token, head) row of `o`, one 128-wide group, rotated in one wave and quantised to " + "int8, saving that quantiser's launch per layer", + "as gdn_conv_recurrent_update_k128_v128_bf16; int8 codes", + "as gdn_conv_recurrent_update_k128_v128_bf16, the codes had_quant_act_i8g's over `o`. " + "Byte-identical to that row followed by had_quant_act_i8g (r4d_selftest's gdn conv fold)", + RAD_DOMAIN_DEVICE, R4D_PRIO_ONLY, + ROW(cGdnConvRecurrentUpdate), NOTUNE, + nullptr, nullptr, r4d_rad_gdn_conv_recurrent_update_had }, + { "kda_update_k128_v128_bf16", "kda_update", "gdn", "per-channel KDA recurrence and candidate rollback", "heads 1..65535, K=V=128, prefill and verify", "bf16 activations, f32 gates and state", RAD_DOMAIN_DEVICE, R4D_PRIO_ONLY, ROW(cKdaUpdate), NOTUNE, @@ -8426,6 +8538,24 @@ R4D_WIN_TREE_PAIR(512, 4) R4D_WIN_TREE_PAIR(512, 8) r4d_rad_layout_iqr, r4d_rad_relayout_iqr, nullptr, r4d_rad_unrelayout_iqr }, +{ "gemm_iqr_gated", "gemm_nt_q_gated", "gemm", + "gemm_iqr_nt_m64's GEMV and 16-token tile over a gate_up weight with gated_had_quant_i8g's pass " + "in the epilogue: a block per 16-column tile of the gated output, the plain kernel's waves on the " + "gate rows' tile and as many on the up rows', the product in the op's scratch and the last of a " + "128-column group's blocks to arrive rotating and quantising it, so the [M, 2n] bf16 plane and " + "the quantiser's launch are gone", + "M <= 16; K a multiple of 256; N a multiple of 256 (the gated width of the 128-column group), " + "and of a trellis's run; act silu; an IQR weight's codes, gate rows then up rows", + "i8 A with an f32 scale per (row, 128 K), W an IQR form's codes (as gemm_iqr_nt_m64), and the " + "QUANTISER's outputs: int8 codes of the rotated product, an f32 scale per (row, 128 columns) and " + "an optional bf16 product. Byte-identical to gemm_iqr_nt_m64 followed by gated_had_quant_i8g", + RAD_DOMAIN_DEVICE, R4D_PRIO_ONLY, + ROW(cGemmNtQGatedIqr), NOTUNE, + nullptr, nullptr, r4d_rad_gemm_iqr_gated, r4d_rad_gemm_iqr_gated_scratch, + r4d_rad_layout_iqr, r4d_rad_relayout_iqr, nullptr, r4d_rad_unrelayout_iqr, + /* The byte-identity claim above, as a chain of two rows of this plugin (r4d_fuse.cpp). */ + r4d_fuse_gemm_nt_q_gated_iqr }, + { "gemm_iqr_tiled", "gemm_nt_q", "gemm", "the prefill GEMM over an IQR weight: the call decodes the weight's codes into the int8 fragment " "plane in its scratch, once, and runs gemm_i8a8_tiled (or its rb8 / rb32 fold on a tcq_rb " @@ -9052,10 +9182,11 @@ R4D_WIN_TREE_PAIR(512, 4) R4D_WIN_TREE_PAIR(512, 8) * accumulated Hessians at convert time, from a file. So it is unresolved by the serving graph on * purpose, not an unwired kernel. */ { "gram_accum", "gram_accum", "quant", - "h += x^T x over an E4M3 activation, in f32 -- the Gram matrix a GPTQ packer needs", + "h += x^T x over an E4M3 or int8 activation, in f32 -- the Gram matrix a GPTQ packer needs", "n a multiple of 4 and group 128, because a 64-wide output tile must lie inside one scale " "group; any M, and the accumulator is READ as well as written", - "E4M3 plus an f32 scale per (row, 128 columns) in; an f32 [n][n] accumulator in and out", + "E4M3 (dtype fp8a8) or int8 (i8a8) plus an f32 scale per (row, 128 columns) in; an f32 [n][n] " + "accumulator in and out", RAD_DOMAIN_DEVICE, R4D_PRIO_ONLY, ROW(cGramAccum), NOTUNE, nullptr, nullptr, r4d_rad_gram_accum, nullptr, nullptr, nullptr, @@ -9165,6 +9296,18 @@ R4D_WIN_TREE_PAIR(512, 4) R4D_WIN_TREE_PAIR(512, 8) /* `sigmoid` + `mul` + `quant_act_fp8`, and `mul` + `quant_act_fp8` for act none (r4d_fuse.cpp). */ r4d_fuse_gate_quant_fp8 }, +{ "gate_had_quant_i8g", "gate_had_quant_i8g", "quant", + "gate_quant_fp8 with the width-128 Hadamard between the bf16-rounded product and the absmax and " + "int8 codes: had_quant_act_i8g's pass folded in, saving that quantiser's launch before a gated " + "attention's rotated out projection", + "n a multiple of 128; otherwise as gate_quant_fp8", + "bf16 in, int8 out with an f32 scale per (row, 128 columns) and an optional bf16 out; the codes " + "are had_quant_act_i8g's over the BF16-ROUNDED product", + RAD_DOMAIN_DEVICE, R4D_PRIO_ONLY, + ROW(cGateHadQuantI8g), NOTUNE, + nullptr, nullptr, r4d_rad_gate_had_quant_i8g, nullptr, nullptr, nullptr, + r4d_shape_gate_quant_fp8, nullptr }, + /* ---------------------------------------------------------------------------------- sampling * * spec §13 requires sampling on device. This is the only implementation of sample_chain (libref diff --git a/libr4d/r4d_selftest.cpp b/libr4d/r4d_selftest.cpp index 336f7fe6..0b7e2a18 100644 --- a/libr4d/r4d_selftest.cpp +++ b/libr4d/r4d_selftest.cpp @@ -40,6 +40,7 @@ #include "r4d_hc_fp8.h" #include "r4d_fp8_frag.h" #include "r4d_fp8_lm.h" +#include "r4d_iqr.h" #include "rad_encoding.h" #include "rad_philox.h" #include "rad_sample.h" @@ -4431,11 +4432,15 @@ static int64_t i8_code_misses(const uint16_t* x, int64_t x_ld, const int8_t* q, * codes to quant_act_i8g over its `o`. `f32w` hands the fold the conv weight in f32, as a GGUF * stores it, and leaves the pair's in bf16: the values are bf16's, so the bytes must not change. */ static void gdn_conv_fold_run(const Plugin& pl, const char* nm, const char* form, - bool i8 = false, bool f32w = false) { - const RadKernelInfo* rf = find(pl, "gdn_conv_recurrent_update_k128_v128_bf16"); + bool i8 = false, bool f32w = false, bool had = false) { + /* `had`: the rotated row, against the pair writing `o` and had_quant_act_i8g over it. */ + if (had) i8 = true; + const RadKernelInfo* rf = find(pl, had ? "gdn_conv_recurrent_update_had_k128_v128_bf16" + : "gdn_conv_recurrent_update_k128_v128_bf16"); const RadKernelInfo* rc = find(pl, "gdn_conv_update_w4_h128_bf16"); const RadKernelInfo* rr = find(pl, "gdn_recurrent_update_k128_v128_bf16_fp32state"); - if (!rf || !rc || !rr) { ok(nm, false, "a row is absent"); return; } + const RadKernelInfo* rh = had ? find(pl, "had_quant_act_i8g") : nullptr; + if (!rf || !rc || !rr || (had && !rh)) { ok(nm, false, "a row is absent"); return; } const int64_t K = 128, V = 128, H = 4, Hg = 2, N = 4, W = 4, MQ = 4, SL = W - 2 + MQ; const int64_t conv_dim = (2 * Hg * K + H * V), in_w = conv_dim + H * V; @@ -4553,15 +4558,24 @@ static void gdn_conv_fold_run(const Plugin& pl, const char* nm, const char* form int e = run(rc, { tx, tw, none, cs(0), tci, tna, tcu, tq, tk, tv }, pc); if (e == RAD_OK) e = run(rr, { tq, tk, tv, ta, tb, tal, tdt, st(0), tsi, tna, tcu, tz, tnw, to(0), - toq(0), tos(0) }, pr); + had ? none : toq(0), had ? none : tos(0) }, pr); + if (e == RAD_OK && had) { + std::vector ph = { PI("M", Td), PI("n", H * V), PI("group", 128), PS("dtype", "bf16") }; + e = run(rh, { T(d_o[0], RAD_BF16, { Td, H * V }), toq(0), tos(0) }, ph); + } if (e != RAD_OK) { why = "pair rc=" + std::to_string(e); break; } e = run(rf, { tx, tfw, none, cs(1), tci, ta, tb, tal, tdt, st(1), tsi, tna, tcu, tz, tnw, to(1), toq(1), tos(1) }, pf); if (e != RAD_OK) { why = "fold rc=" + std::to_string(e); break; } + /* had_quant_act_i8g also quantises the padded last sequence's row, which the fold skips + * (a zero row, scale 1 against unwritten 0): the codes over the real sequences' tokens. */ + const size_t real = (size_t)cu[(size_t)N - 1]; const struct { const char* what; void* a; void* b; size_t n; } cmp[] = { - { "o", d_o[0], d_o[1], o_b }, { "o_q", d_oq[0], d_oq[1], oq_b }, - { "o_scale", d_os[0], d_os[1], os_b }, { "state", d_st[0], d_st[1], st_b }, + { "o", d_o[0], d_o[1], o_b }, + { "o_q", d_oq[0], d_oq[1], had ? real * (size_t)(H * V) : oq_b }, + { "o_scale", d_os[0], d_os[1], had ? real * (size_t)H * 4 : os_b }, + { "state", d_st[0], d_st[1], st_b }, { "conv_state", d_cs[0], d_cs[1], cs_b }, }; for (const auto& c : cmp) { @@ -4576,7 +4590,7 @@ static void gdn_conv_fold_run(const Plugin& pl, const char* nm, const char* form } /* At int8 codes, the real sequences' tokens (all but the padded last) against * quant_act_i8g over the pair's `o`. A (token, head) row is one group. */ - if (i8 && why.empty()) { + if (i8 && !had && why.empty()) { const std::vector O = fetch(d_o[0], o_b), Q = fetch(d_oq[0], oq_b), S = fetch(d_os[0], os_b); const int64_t rows = (int64_t)cu[(size_t)N - 1] * H; @@ -4611,6 +4625,12 @@ static void gdn_conv_fold(const Plugin& pl) { "per_candidate", true); } if (sel(row) || sel(nma)) gdn_conv_fold_run(pl, nma, "anchor"); + if (sel(row) || sel("gdn_conv_recurrent_update_had")) { + gdn_conv_fold_run(pl, "gdn_conv_recurrent_update_had is byte-identical to the pair then " + "had_quant_act_i8g, per_candidate", "per_candidate", true, false, true); + gdn_conv_fold_run(pl, "gdn_conv_recurrent_update_had is byte-identical to the pair then " + "had_quant_act_i8g, anchor", "anchor", true, false, true); + } if (sel(row) || sel(nmf)) gdn_conv_fold_run(pl, nmf, "per_candidate", false, true); } @@ -6816,10 +6836,11 @@ static void iqr_gemm_case(const Plugin& pl, const IqrCase& f, int64_t M, int64_t std::vector y((size_t)(M * N)), yr((size_t)(M * N)); st_memcpy(y.data(), d_y, y.size() * 2, hipMemcpyDeviceToHost); st_memcpy(yr.data(), d_yr, yr.size() * 2, hipMemcpyDeviceToHost); - /* M <= 8 is the GEMV, which folds per lane before summing across lanes: the product within - * f32 rounding, so bf16 outputs a rounding apart. Above, the int8 tiles' bytes. */ + /* M <= 16 is the GEMV or the 16-token tile, which sum per wave before summing across waves: + * the product within f32 rounding, so bf16 outputs a rounding apart. Above, the int8 tiles' + * bytes. */ /* kRowF32 scales its sums in the epilogue, not a block at a time: to a rounding too. */ - const bool exact = M > 8 && !f.rowf; + const bool exact = M > 16 && !f.rowf; /* An output's rounding is bounded by its sum's magnitude, not its own: a row that cancels to * near zero keeps the error of its terms. The bound is a bf16 step of the output plus 2^-8 of * the outputs' rms. */ @@ -14750,6 +14771,214 @@ static void iqr_head_case(const Plugin& pl, int TB, int64_t N, int64_t K, int64_ dfree_all(); } +/* logits_gemm_vocab_iqr against the f64 product it computes: each class a computed trellis + * (tcq_code=mad, runs of 256 rows, one f32 scale a row under a factor a 128-K block, fwht128) of + * random codes, its rows' vocabulary ids a random permutation of the rank's share (`off` = the + * share for a second rank's, whose rows are the second half of each class's tensor), the activation + * random bf16, at token counts on both sides of the staging plane's 32. The reference rotates the activation in + * f32 and quantises it to sixteen bits a (token, 128) as the kernel does, then multiplies the + * host's decode of every class in f64: the kernel's f32 folds keep the logits within 2^-18 of their + * rms. Every logit must be written once: the output starts as NaN. The classes' planes also go back + * through the hooks' inverse. */ +struct VocabClass { int B; int64_t rows; }; + +static void vocab_head_case(const Plugin& pl, const std::vector& cls, int64_t M, + int64_t K, int64_t off) { + const char* row = "logits_gemm_vocab_iqr"; + if (!sel(row)) return; + int64_t V = 0; + std::string ws; + for (const auto& c : cls) { V += c.rows; ws += (ws.empty() ? "" : ",") + std::to_string(c.B) + "x" + std::to_string(c.rows); } + char nm[200]; + std::snprintf(nm, sizeof nm, "%s classes %s K=%lld M=%lld off=%lld", row, ws.c_str(), + (long long)K, (long long)M, (long long)off); + const RadKernelInfo* r = find(pl, row); + if (!r || !r->layout || !r->relayout || !r->scratch) { ok(nm, false, "row or hooks absent"); return; } + const int64_t nkb = K / 128; + uint64_t z = 0x9E3779B97F4A7C15ull * (uint64_t)(V + M * 7 + K + off); + auto rnd = [&]() { + z += 0x9E3779B97F4A7C15ull; + uint64_t x = z; + x = (x ^ (x >> 30)) * 0xBF58476D1CE4E5B9ull; + x = (x ^ (x >> 27)) * 0x94D049BB133111EBull; + return x ^ (x >> 31); + }; + static const uint32_t kU[] = { 0, RAD_U1, RAD_U2, RAD_U3, RAD_U4, RAD_U5, RAD_U6, RAD_U7 }; + std::vector perm((size_t)V); + for (int64_t i = 0; i < V; ++i) perm[(size_t)i] = (int32_t)i; + for (int64_t i = V - 1; i > 0; --i) std::swap(perm[(size_t)i], perm[(size_t)(rnd() % (uint64_t)(i + 1))]); + + std::vector gp = { PI("M", M), PI("n_vocab", V), PI("n_embd", K), PS("dtype", "bf16"), + PI("vocab_offset", off) }; + static const char* kRows[] = { "rows0", "rows1", "rows2", "rows3" }; + for (size_t i = 0; i < cls.size(); ++i) gp.push_back(PI(kRows[i], cls[i].rows)); + + /* the decoded head in vocabulary order, f64 */ + std::vector Wd((size_t)(V * K)); + std::vector ts(1 + 3 * 4 + 2); + std::vector> keep; + /* the inverse map: each id's class width and its row in the class's whole tensor, this rank + * being the second of a share `off` (the classes' tensors then twice its rows) when off > 0 */ + const int64_t rank = off > 0 ? 1 : 0; + std::vector vrow((size_t)V, -1); + int64_t base = 0; + for (size_t ci = 0; ci < cls.size(); ++ci) { + const VocabClass& vc = cls[ci]; + const int64_t N = vc.rows; + Planes p; + rad_enc_clear(&p.enc); + rad_enc_copy_str(p.enc.scheme, "trellis"); + rad_enc_add_plane(&p.enc, "codes", kU[vc.B], 1, 1); + rad_enc_add_plane(&p.enc, "scale", RAD_F32, 1, 0); + const int t = rad_enc_add_table(&p.enc, "trellis", RAD_I8, (int64_t)1 << 16, 1); + p.enc.plane[t].block[0] = 256; + p.enc.plane[t].block[1] = 0; + rad_enc_add_table(&p.enc, "trellis.mad", RAD_U32, 2, 1); + rad_enc_add_plane(&p.enc, "scale.col", RAD_F32, 0, 128); + rad_enc_copy_str(p.enc.transform, "fwht128"); + p.size(N, K); + const int ic = p.find("codes"), is = p.find("scale"), ia = p.find("trellis"); + for (int64_t n = 0; n < N; ++n) + for (int64_t c = 0; c < K; ++c) + rad_store_bits(p.data[(size_t)ic].data() + n * p.row_bytes(ic), vc.B, c, + (uint32_t)(rnd() & ((1ull << vc.B) - 1))); + const uint32_t A = (uint32_t)(rnd() & 0xFFFFFFu) | 1u, Bc = (uint32_t)rnd(); + uint32_t* ab = (uint32_t*)p.data[(size_t)p.find("trellis.mad")].data(); + ab[0] = A; + ab[1] = Bc; + for (uint32_t st = 0; st < (1u << 16); ++st) { + const uint32_t h = ((st & 0xFFFFFFu) * A + Bc) & 0x3F3F3F3Fu; + p.data[(size_t)ia][st] = (uint8_t)(int8_t)((int)((h & 0xFFu) + ((h >> 8) & 0xFFu) + + ((h >> 16) & 0xFFu) + (h >> 24)) - 126); + } + std::vector rs((size_t)N), cf((size_t)nkb); + for (int64_t n = 0; n < N; ++n) rs[(size_t)n] = std::ldexp(1.0f + (float)(rnd() % 1000) / 1000.0f, -9 - (int)(rnd() % 3)); + for (int64_t g = 0; g < nkb; ++g) cf[(size_t)g] = 0.5f + (float)(rnd() % 1000) / 1000.0f; + for (int64_t n = 0; n < N; ++n) ((float*)p.data[(size_t)is].data())[n] = rs[(size_t)n]; + for (int64_t g = 0; g < nkb; ++g) ((float*)p.data[(size_t)p.find("scale.col")].data())[g] = cf[(size_t)g]; + const int C = (16 + vc.B - 1) / vc.B; + const int8_t* aux = (const int8_t*)p.data[(size_t)ia].data(); + for (int64_t n = 0; n < N; ++n) { + const int64_t id = perm[(size_t)(base + n)]; + for (int64_t k = 0; k < K; ++k) { + uint32_t st = 0; + for (int q = C - 1; q >= 0; --q) { + const int64_t rr = n / 256 * 256 + (n % 256 - q + 256) % 256; + st = ((st << vc.B) | rad_load_bits(p.data[(size_t)ic].data() + rr * p.row_bytes(ic), vc.B, k)) & 0xFFFFu; + } + Wd[(size_t)(id * K + k)] = (double)aux[st] * rs[(size_t)n] * cf[(size_t)(k / 128)]; + } + } + const int op = 1 + 3 * (int)ci; + std::vector wq, wsc; + RadLayout lw, ls; + const int rw = stored(r, gp, op, p, { "codes", "trellis", "trellis.mad" }, &wq, &lw); + const int rsc = stored(r, gp, op + 1, p, { "scale", "scale.col" }, &wsc, &ls); + if (rw != RAD_OK || rsc != RAD_OK) { + ok(nm, false, "relayout rc " + std::to_string(rw) + "/" + std::to_string(rsc)); + return; + } + std::string why; + const bool back = restores(r, gp, op, p, { "codes", "trellis", "trellis.mad" }, wq, &why) && + restores(r, gp, op + 1, p, { "scale", "scale.col" }, wsc, &why); + ok((std::string(nm) + ": class " + std::to_string(ci) + "'s planes invert").c_str(), back, why); + ok((std::string(nm) + ": class " + std::to_string(ci) + " holds its codes' bits").c_str(), + lw.bytes <= N * K * vc.B / 8 + ((int64_t)1 << 16) + 1024, + std::to_string(lw.bytes) + " B for " + std::to_string(N * K * vc.B / 8) + " B of codes"); + std::vector ids((size_t)N); + for (int64_t n = 0; n < N; ++n) { + ids[(size_t)n] = perm[(size_t)(base + n)] + (int32_t)off; + vrow[(size_t)perm[(size_t)(base + n)]] = (int32_t)((uint32_t)vc.B << 28) | (int32_t)(n + rank * N); + } + void* d_w = dalloc(wq.size()); + void* d_s = dalloc(wsc.size()); + void* d_r = dalloc(ids.size() * 4); + if (!d_w || !d_s || !d_r) { ok(nm, false, "hipMalloc failed"); return; } + st_memcpy(d_w, wq.data(), wq.size(), hipMemcpyHostToDevice); + st_memcpy(d_s, wsc.data(), wsc.size(), hipMemcpyHostToDevice); + st_memcpy(d_r, ids.data(), ids.size() * 4, hipMemcpyHostToDevice); + ts[(size_t)op] = T(d_w, lw.dtype, { N, K }); + ts[(size_t)op + 1] = T(d_s, ls.dtype, { N, nkb }); + ts[(size_t)op + 2] = T(d_r, RAD_I32, { N }); + base += N; + } + for (size_t ci = cls.size(); ci < 4; ++ci) + for (int j = 0; j < 3; ++j) { + ts[1 + 3 * ci + (size_t)j] = T(nullptr, RAD_U8, { 1 }); + absent(ts[1 + 3 * ci + (size_t)j]); + } + void* d_m = dalloc(vrow.size() * 4); + if (!d_m) { ok(nm, false, "hipMalloc failed"); return; } + st_memcpy(d_m, vrow.data(), vrow.size() * 4, hipMemcpyHostToDevice); + ts[13] = T(d_m, RAD_I32, { V, 1 }); + + std::vector hx((size_t)(M * K)); + for (auto& v : hx) v = h_to_bf16((float)((double)(int64_t)(rnd() % 20001 - 10000) / 4000.0)); + /* The activation as the kernel holds it: rotated in f32 (h_fwht's butterflies are + * r4d_fwht_wave's, in its order), then q = rint(x * 16256 / amax) a (token, 128) under the + * scale amax / 16256. */ + std::vector xr((size_t)(M * K)); + for (int64_t m = 0; m < M; ++m) + for (int64_t g = 0; g < nkb; ++g) { + float v[128]; + for (int j = 0; j < 128; ++j) v[j] = h_bf16(hx[(size_t)(m * K + g * 128 + j)]); + h_fwht(v, 128); + float a = 0.0f; + for (int j = 0; j < 128; ++j) a = std::max(a, std::fabs(v[j])); + const float inv = a > 0.0f ? 16256.0f / a : 0.0f, sc = a / 16256.0f; + for (int j = 0; j < 128; ++j) { + const float q = std::fmin(std::fmax(rintf(v[j] * inv), -16256.0f), 16256.0f); + xr[(size_t)(m * K + g * 128 + j)] = (double)q * (double)sc; + } + } + std::vector ref((size_t)(M * V)); + double r2 = 0.0; + for (int64_t m = 0; m < M; ++m) + for (int64_t v = 0; v < V; ++v) { + double s = 0.0; + for (int64_t k = 0; k < K; ++k) s += Wd[(size_t)(v * K + k)] * xr[(size_t)(m * K + k)]; + ref[(size_t)(m * V + v)] = s; + r2 += s * s; + } + const double rms = std::sqrt(r2 / (double)(M * V)); + + void* d_x = dalloc(hx.size() * 2); + void* d_y = dalloc((size_t)(M * V) * 4); + if (!d_x || !d_y) { ok(nm, false, "hipMalloc failed"); return; } + st_memcpy(d_x, hx.data(), hx.size() * 2, hipMemcpyHostToDevice); + std::vector nan((size_t)(M * V), std::nanf("")); + st_memcpy(d_y, nan.data(), nan.size() * 4, hipMemcpyHostToDevice); + ts[0] = T(d_x, RAD_BF16, { M, K }); + ts[14] = T(d_y, RAD_F32, { M, V }); + RadArgs a; + std::memset(&a, 0, sizeof(a)); + a.t = ts.data(); a.n_t = (int)ts.size(); + a.p = gp.data(); a.n_p = (int)gp.size(); + a.world_size = 1; + const int64_t need = r->scratch(&a); + if (need > 0) { a.scratch = dalloc((size_t)need); a.scratch_bytes = need; } + const int rc = r->launch(&a, (RadStream) nullptr); + if (rc != RAD_OK || st_stream_sync(nullptr) != hipSuccess) { ok(nm, false, "rc " + std::to_string(rc)); dfree_all(); return; } + std::vector y((size_t)(M * V)); + st_memcpy(y.data(), d_y, y.size() * 4, hipMemcpyDeviceToHost); + int64_t bad = 0, first = -1, unset = 0; + double e2 = 0.0; + for (size_t i = 0; i < y.size(); ++i) { + if (std::isnan(y[i])) { ++unset; if (first < 0) first = (int64_t)i; continue; } + const double d = (double)y[i] - ref[i]; + e2 += d * d; + if (!(std::fabs(d) <= std::ldexp(rms, -18))) { if (first < 0) first = (int64_t)i; ++bad; } + } + const double rel = std::sqrt(e2 / (r2 > 0 ? r2 : 1.0)); + ok(nm, bad == 0 && unset == 0, + bad || unset ? std::to_string(bad) + " off, " + std::to_string(unset) + " unwritten of " + + std::to_string(y.size()) + ", first [" + std::to_string(first / V) + "][" + + std::to_string(first % V) + "] " + std::to_string(y[(size_t)first]) + " vs " + + std::to_string(ref[(size_t)first]) + ", rms " + std::to_string(rms) + : "rel_l2 " + std::to_string(rel)); + dfree_all(); +} + /* embed_lookup_iqr against the table its forms stood for when libr4d widened them to bf16 at * load: each value the form's int8 times its row's bf16 scale in f32, the fwht128 rotation undone * in libquant's butterfly order, rounded to bf16 to nearest even, then times `mult` with one @@ -14764,7 +14993,7 @@ static void iqr_embed_case(const Plugin& pl, const IqrEmbedCase& f, int64_t rows (double)mult); const RadKernelInfo* r = find(pl, "embed_lookup_iqr"); if (!r || !r->layout || !r->relayout) { ok(nm, false, "row or hooks absent"); return; } - static const uint32_t kU[] = { 0, RAD_U1, RAD_U2, RAD_U3, RAD_U4, RAD_U5, RAD_U6 }; + static const uint32_t kU[] = { 0, RAD_U1, RAD_U2, RAD_U3, RAD_U4, RAD_U5, RAD_U6, RAD_U7, RAD_U8 }; const int64_t nkb = dim / 128; uint64_t z = 0xABCDEFull * (uint64_t)(f.kind * 31 + f.B + f.rot); auto rnd = [&]() { @@ -14786,7 +15015,7 @@ static void iqr_embed_case(const Plugin& pl, const IqrEmbedCase& f, int64_t rows } else { p.enc = rad_enc_affine(kU[f.B], RAD_BF16, 1, 128); if (f.kind == 3) rad_enc_add_table(&p.enc, "table", RAD_I8, 1, (int64_t)1 << f.B); - else rad_enc_add_plane(&p.enc, "zero", RAD_U6, 1, 128); + else rad_enc_add_plane(&p.enc, "zero", f.B == 8 ? RAD_U8 : f.B == 7 ? RAD_U7 : RAD_U6, 1, 128); } if (f.rot) rad_enc_copy_str(p.enc.transform, "fwht128"); p.size(rows, dim); @@ -14799,7 +15028,8 @@ static void iqr_embed_case(const Plugin& pl, const IqrEmbedCase& f, int64_t rows if (f.kind == 2) for (int64_t n = 0; n < rows; ++n) for (int64_t g = 0; g < nkb; ++g) - rad_store_bits(p.data[(size_t)ia].data() + n * p.row_bytes(ia), 6, g, (uint32_t)(24 + rnd() % 17)); + rad_store_bits(p.data[(size_t)ia].data() + n * p.row_bytes(ia), std::max(f.B, 6), g, + (uint32_t)((1 << (std::max(f.B, 6) - 1)) - 8 + rnd() % 17)); else for (auto& v : p.data[(size_t)ia]) v = (uint8_t)(int8_t)((int)(rnd() % 255) - 127); for (int64_t i = 0; i < rows * nkb; ++i) { @@ -14827,7 +15057,7 @@ static void iqr_embed_case(const Plugin& pl, const IqrEmbedCase& f, int64_t rows for (int64_t k = 0; k < dim; ++k) { int q; if (f.kind == 3) q = ((const int8_t*)p.data[(size_t)ia].data())[code(n, k)]; - else if (f.kind == 2) q = (int)code(n, k) - (int)rad_load_bits(p.data[(size_t)ia].data() + n * p.row_bytes(ia), 6, k / 128); + else if (f.kind == 2) q = (int)code(n, k) - (int)rad_load_bits(p.data[(size_t)ia].data() + n * p.row_bytes(ia), std::max(f.B, 6), k / 128); else { uint32_t st = 0; for (int qq = C - 1; qq >= 0; --qq) { @@ -15927,6 +16157,14 @@ static void perf_row(const Plugin& pl, const char* name, std::vector const int64_t need = r->scratch(&a); if (need < 0) { std::printf(" %-22s scratch %lld\n", name, (long long)need); return; } if (need > 0) { a.scratch = dalloc((size_t)need); a.scratch_bytes = need; } + /* R4D_PERF_RAND_SCRATCH: random scratch bytes, so a variant that skips writing its + * scratch still multiplies operands of real entropy (WMMA power tracks the data) */ + if (need > 0 && std::getenv("R4D_PERF_RAND_SCRATCH")) { + std::vector h((size_t)need); + uint64_t z = 0x2545F4914F6CDD1Dull; + for (auto& v : h) { z ^= z << 13; z ^= z >> 7; z ^= z << 17; v = (uint8_t)z; } + st_memcpy(a.scratch, h.data(), h.size(), hipMemcpyHostToDevice); + } } /* One warm launch, which also checks the row serves this shape; a refusal is reported, not @@ -16039,6 +16277,312 @@ static void mx_perf(const Plugin& pl, int64_t N, int64_t K, int64_t M, int iters } +/* gate_had_quant_i8g against gate_quant_fp8's bf16 product and had_quant_act_i8g over it, byte for + * byte: the codes, the scales and the product. The gate is a column view of a [q|gate] row (pitch + * 2n), as a gated attention lays it out; M rows of n, each a (token, head). */ +static void gate_had_case(const Plugin& pl, int64_t M, int64_t n) { + if (!sel("gate_had_quant_i8g")) return; + char nm[120]; + std::snprintf(nm, sizeof nm, "gate_had_quant_i8g is gate_quant_fp8 then had_quant_act_i8g, M=%lld n=%lld", + (long long)M, (long long)n); + const RadKernelInfo* rh = find(pl, "gate_had_quant_i8g"); + const RadKernelInfo* rg = find(pl, "gate_quant_fp8"); + const RadKernelInfo* rq = find(pl, "had_quant_act_i8g"); + if (!rh || !rg || !rq) { ok(nm, false, "rows absent"); return; } + uint32_t z = 0x1234567u + (uint32_t)(M * 7 + n); + auto rnd = [&](float span) { + z = z * 1664525u + 1013904223u; + return ((float)(z >> 8) / 16777216.0f * 2.0f - 1.0f) * span; + }; + std::vector hg((size_t)(M * 2 * n)), hx((size_t)(M * n)); + for (auto& v : hg) v = h_to_bf16(rnd(6.0f)); + for (auto& v : hx) v = h_to_bf16(rnd(3.0f)); + void* d_g = dalloc(hg.size() * 2); + void* d_x = dalloc(hx.size() * 2); + void* d_q = dalloc((size_t)(M * n)); + void* d_s = dalloc((size_t)(M * (n / 128)) * 4); + void* d_y = dalloc((size_t)(M * n) * 2); + void* d_q2 = dalloc((size_t)(M * n)); + void* d_s2 = dalloc((size_t)(M * (n / 128)) * 4); + void* d_y2 = dalloc((size_t)(M * n) * 2); + void* d_f8 = dalloc((size_t)(M * n)); + void* d_f8s = dalloc((size_t)(M * (n / 128)) * 4); + if (!d_g || !d_x || !d_q || !d_s || !d_y || !d_q2 || !d_s2 || !d_y2 || !d_f8 || !d_f8s) { + ok(nm, false, "hipMalloc failed"); + return; + } + st_memcpy(d_g, hg.data(), hg.size() * 2, hipMemcpyHostToDevice); + st_memcpy(d_x, hx.data(), hx.size() * 2, hipMemcpyHostToDevice); + RadTensor gate = T((uint8_t*)d_g + n * 2, RAD_BF16, { M, n }); + gate.stride[0] = 2 * n; + auto run = [&](const RadKernelInfo* r, std::vector ts, std::vector ps) { + RadArgs a; + std::memset(&a, 0, sizeof(a)); + a.t = ts.data(); a.n_t = (int)ts.size(); a.p = ps.data(); a.n_p = (int)ps.size(); + a.world_size = 1; + const int rc = r->launch(&a, (RadStream) nullptr); + return rc != RAD_OK ? rc : (st_stream_sync(nullptr) != hipSuccess ? -1000 : RAD_OK); + }; + const std::vector pg = { PI("M", M), PI("n", n), PI("group", 128), PS("dtype", "bf16"), + PS("act", "sigmoid") }; + int e = run(rh, { gate, T(d_x, RAD_BF16, { M, n }), T(d_q, RAD_I8, { M, n }), + T(d_s, RAD_F32, { M, n / 128 }), T(d_y, RAD_BF16, { M, n }) }, pg); + if (e == RAD_OK) + e = run(rg, { gate, T(d_x, RAD_BF16, { M, n }), T(d_f8, RAD_F8E4M3, { M, n }), + T(d_f8s, RAD_F32, { M, n / 128 }), T(d_y2, RAD_BF16, { M, n }) }, pg); + if (e == RAD_OK) + e = run(rq, { T(d_y2, RAD_BF16, { M, n }), T(d_q2, RAD_I8, { M, n }), T(d_s2, RAD_F32, { M, n / 128 }) }, + { PI("M", M), PI("n", n), PI("group", 128), PS("dtype", "bf16") }); + if (e != RAD_OK) { ok(nm, false, "rc " + std::to_string(e)); return; } + auto fetch = [](void* d, size_t b) { + std::vector h(b); + st_memcpy(h.data(), d, b, hipMemcpyDeviceToHost); + return h; + }; + const bool same = fetch(d_q, (size_t)(M * n)) == fetch(d_q2, (size_t)(M * n)) && + fetch(d_s, (size_t)(M * (n / 128)) * 4) == fetch(d_s2, (size_t)(M * (n / 128)) * 4) && + fetch(d_y, (size_t)(M * n) * 2) == fetch(d_y2, (size_t)(M * n) * 2); + ok(nm, same, same ? "" : "codes, scales or product differ"); +} + +/* The V4 trunk's IQR planes for an [N, K] weight: a 2^16-state computed trellis of B-bit codes in + * 256-row runs, one f32 scale a row (each its own, 7 significant bits), a power of two a 128-K block, + * fwht128; random codes from `z`. */ +static Planes iqr_v4_planes(int64_t N, int64_t K, int B, uint64_t z, bool bf16s = false) { + auto rnd = [&]() { + z += 0x9E3779B97F4A7C15ull; + uint64_t x = z; + x = (x ^ (x >> 30)) * 0xBF58476D1CE4E5B9ull; + x = (x ^ (x >> 27)) * 0x94D049BB133111EBull; + return x ^ (x >> 31); + }; + static const uint32_t kU[] = { 0, RAD_U1, RAD_U2, RAD_U3, RAD_U4, RAD_U5, RAD_U6, RAD_U7, RAD_U8 }; + constexpr int L = 16; + Planes p; + rad_enc_clear(&p.enc); + rad_enc_copy_str(p.enc.scheme, "trellis"); + rad_enc_add_plane(&p.enc, "codes", kU[B], 1, 1); + if (bf16s) rad_enc_add_plane(&p.enc, "scale", RAD_BF16, 1, 128); + else rad_enc_add_plane(&p.enc, "scale", RAD_F32, 1, 0); + const int t = rad_enc_add_table(&p.enc, "trellis", RAD_I8, (int64_t)1 << L, 1); + p.enc.plane[t].block[0] = 256; + p.enc.plane[t].block[1] = 0; + rad_enc_add_table(&p.enc, "trellis.mad", RAD_U32, 2, 1); + if (!bf16s) rad_enc_add_plane(&p.enc, "scale.col", RAD_F32, 0, 128); + rad_enc_copy_str(p.enc.transform, "fwht128"); + p.size(N, K); + for (auto& v : p.data[(size_t)p.find("codes")]) v = (uint8_t)rnd(); + const uint32_t A = (uint32_t)(rnd() & 0xFFFFFFu) | 1u, Bc = (uint32_t)rnd(); + uint32_t* ab = (uint32_t*)p.data[(size_t)p.find("trellis.mad")].data(); + ab[0] = A; + ab[1] = Bc; + uint8_t* tab = p.data[(size_t)t].data(); + for (uint32_t st = 0; st < (1u << L); ++st) { + const uint32_t h = ((st & 0xFFFFFFu) * A + Bc) & 0x3F3F3F3Fu; + tab[st] = (uint8_t)(int8_t)((int)((h & 0xFFu) + ((h >> 8) & 0xFFu) + ((h >> 16) & 0xFFu) + (h >> 24)) - 126); + } + if (bf16s) { + for (int64_t i = 0; i < N * (K / 128); ++i) + rad_store_f32(p.data[(size_t)p.find("scale")].data(), RAD_BF16, i, + std::ldexp(1.0f + (float)(rnd() % 64) / 64.0f, -9 - (int)(rnd() % 4))); + } else { + for (int64_t n = 0; n < N; ++n) + ((float*)p.data[(size_t)p.find("scale")].data())[n] = + std::ldexp(1.0f + (float)(rnd() % 64) / 64.0f, -9 - (int)(rnd() % 4)); + for (int64_t g = 0; g < K / 128; ++g) + ((float*)p.data[(size_t)p.find("scale.col")].data())[g] = std::ldexp(1.0f, (int)(rnd() % 4) - 1); + } + return p; +} + +/* gemm_iqr_gated against its chain, gemm_iqr_nt_m64 then gated_had_quant_i8g, byte for byte: the + * codes, the scales and the bf16 product, on the V4 trunk's form; and the gated row stores the + * weight as the GEMM row does, so the two read one copy. */ +static void iqr_gated_case(const Plugin& pl, int B, int64_t M, int64_t n, int64_t K) { + if (!sel("gemm_iqr_gated") && !sel("gemm_iqr")) return; + const int64_t N = 2 * n, nkb = K / 128; + char nm[160]; + std::snprintf(nm, sizeof nm, "gemm_iqr_gated trellis-mad B=%d row-f32 M=%lld n=%lld K=%lld", B, + (long long)M, (long long)n, (long long)K); + const RadKernelInfo* rg = find(pl, "gemm_iqr_gated"); + const RadKernelInfo* rm = find(pl, "gemm_iqr_nt_m64"); + const RadKernelInfo* rq = find(pl, "gated_had_quant_i8g"); + if (!rg || !rm || !rq) { ok(nm, false, "rows absent"); return; } + Planes p = iqr_v4_planes(N, K, B, 0x6A7ED00Du + (uint64_t)(B * 97 + M)); + std::vector lp = { PI("N", N), PI("K", K), PI("group", 128), PS("dtype", "i8a8h") }; + std::vector wq, wsc, wq2, wsc2; + RadLayout lw, ls; + if (stored(rg, lp, 2, p, { "codes", "trellis", "trellis.mad" }, &wq, &lw) != RAD_OK || + stored(rg, lp, 3, p, { "scale", "scale.col" }, &wsc, &ls) != RAD_OK || + stored(rm, lp, 2, p, { "codes", "trellis", "trellis.mad" }, &wq2) != RAD_OK || + stored(rm, lp, 3, p, { "scale", "scale.col" }, &wsc2) != RAD_OK) { + ok(nm, false, "relayout refused"); + return; + } + ok((std::string(nm) + ": the weight stored as gemm_iqr_nt_m64 stores it").c_str(), wq == wq2 && wsc == wsc2); + uint64_t z = 0xA5A5F00Du + (uint64_t)M; + auto rnd = [&]() { z ^= z << 13; z ^= z >> 7; z ^= z << 17; return z; }; + std::vector ha((size_t)(M * K)); + std::vector has((size_t)(M * nkb)); + for (auto& v : ha) v = (int8_t)((int)(rnd() % 255) - 127); + for (auto& v : has) v = std::ldexp(1.0f + (float)(rnd() % 256) / 256.0f, -5); + void* d_a = dalloc(ha.size()); + void* d_as = dalloc(has.size() * 4); + void* d_w = dalloc(wq.size()); + void* d_s = dalloc(wsc.size()); + void* d_q = dalloc((size_t)(M * n)); + void* d_sc = dalloc((size_t)(M * (n / 128)) * 4); + void* d_yb = dalloc((size_t)(M * n) * 2); + void* d_y = dalloc((size_t)(M * N) * 2); + void* d_q2 = dalloc((size_t)(M * n)); + void* d_sc2 = dalloc((size_t)(M * (n / 128)) * 4); + void* d_yb2 = dalloc((size_t)(M * n) * 2); + if (!d_a || !d_as || !d_w || !d_s || !d_q || !d_sc || !d_yb || !d_y || !d_q2 || !d_sc2 || !d_yb2) { + ok(nm, false, "hipMalloc failed"); + return; + } + st_memcpy(d_a, ha.data(), ha.size(), hipMemcpyHostToDevice); + st_memcpy(d_as, has.data(), has.size() * 4, hipMemcpyHostToDevice); + st_memcpy(d_w, wq.data(), wq.size(), hipMemcpyHostToDevice); + st_memcpy(d_s, wsc.data(), wsc.size(), hipMemcpyHostToDevice); + auto launch = [&](const RadKernelInfo* k, std::vector ts, std::vector ps) { + RadArgs a; + std::memset(&a, 0, sizeof(a)); + a.t = ts.data(); a.n_t = (int)ts.size(); + a.p = ps.data(); a.n_p = (int)ps.size(); + a.world_size = 1; + if (k->scratch) { + const int64_t need = k->scratch(&a); + if (need > 0) { a.scratch = dalloc((size_t)need); a.scratch_bytes = need; } + } + const int rc = k->launch(&a, (RadStream) nullptr); + return rc == RAD_OK && st_stream_sync(nullptr) == hipSuccess ? RAD_OK : (rc ? rc : -1); + }; + const RadTensor tw = T(d_w, lw.dtype, { N, K }), ts = T(d_s, ls.dtype, { N, nkb }); + int r1 = RAD_OK; + /* Twice: the second call finds the group counters the first left at zero. */ + for (int rep = 0; rep < 2 && r1 == RAD_OK; ++rep) + r1 = launch(rg, { T(d_a, RAD_I8, { M, K }), T(d_as, RAD_F32, { M, nkb }), tw, ts, + T(d_q, RAD_I8, { M, n }), T(d_sc, RAD_F32, { M, n / 128 }), + T(d_yb, RAD_BF16, { M, n }) }, + { PI("M", M), PI("N", N), PI("K", K), PI("group", 128), PS("dtype", "i8a8h"), + PS("act", "silu") }); + std::vector tm = { T(d_a, RAD_I8, { M, K }), T(d_as, RAD_F32, { M, nkb }), tw, ts, + T(d_y, RAD_BF16, { M, N }), T(nullptr, RAD_F32, { 1 }), + T(nullptr, RAD_U8, { 1 }) }; + absent(tm[5]); absent(tm[6]); + const int r2 = launch(rm, tm, { PI("M", M), PI("N", N), PI("K", K), PI("group", 128), PS("dtype", "i8a8h") }); + const int r3 = r2 == RAD_OK + ? launch(rq, { T(d_y, RAD_BF16, { M, N }), T(d_q2, RAD_I8, { M, n }), + T(d_sc2, RAD_F32, { M, n / 128 }), T(d_yb2, RAD_BF16, { M, n }) }, + { PI("M", M), PI("n", n), PI("group", 128), PS("dtype", "bf16"), PS("act", "silu") }) + : r2; + if (r1 != RAD_OK || r3 != RAD_OK) { + ok(nm, false, "rc " + std::to_string(r1) + " (chain " + std::to_string(r3) + ")"); + return; + } + std::vector q((size_t)(M * n)), q2(q.size()), sc((size_t)(M * (n / 128)) * 4), sc2(sc.size()), + yb((size_t)(M * n) * 2), yb2(yb.size()); + st_memcpy(q.data(), d_q, q.size(), hipMemcpyDeviceToHost); + st_memcpy(q2.data(), d_q2, q2.size(), hipMemcpyDeviceToHost); + st_memcpy(sc.data(), d_sc, sc.size(), hipMemcpyDeviceToHost); + st_memcpy(sc2.data(), d_sc2, sc2.size(), hipMemcpyDeviceToHost); + st_memcpy(yb.data(), d_yb, yb.size(), hipMemcpyDeviceToHost); + st_memcpy(yb2.data(), d_yb2, yb2.size(), hipMemcpyDeviceToHost); + size_t dq = 0, ds = 0, dy = 0; + for (size_t i = 0; i < q.size(); ++i) dq += q[i] != q2[i]; + for (size_t i = 0; i < sc.size(); i += 4) ds += std::memcmp(&sc[i], &sc2[i], 4) != 0; + for (size_t i = 0; i < yb.size(); i += 2) dy += std::memcmp(&yb[i], &yb2[i], 2) != 0; + char d[160]; + std::snprintf(d, sizeof d, "%zu codes, %zu scales, %zu products differ", dq, ds, dy); + ok(nm, dq == 0 && ds == 0 && dy == 0, d); +} + +/* --perfiqr: the IQR row at one shape over the V4 trunk's form (a 2^16-state computed trellis of + * B-bit codes in 256-row runs, one f32 scale a row, fwht128) with random codes, the weight streamed + * from DRAM (rotated copies), then the MXFP4 rows at the same shape (--perfmxd). Timing only. */ +static void iqr_perf(const Plugin& pl, int64_t N, int64_t K, int64_t M, int B, int iters) { + /* B >= 10: the head-fed form (V4's v4h grids), B - 10 bits under a bf16 scale a (row, 128). */ + const bool bf16s = B >= 10; + if (bf16s) B -= 10; + if (N % 256 || K % 256 || M < 1 || B < 2 || B > 8) { + std::printf("--perfiqr: N and K multiples of 256, M >= 1, 2 <= B <= 8 (+10: bf16 scales)\n"); + return; + } + const char* row = M <= 64 ? "gemm_iqr_nt_m64" : "gemm_iqr_tiled"; + const RadKernelInfo* r = find(pl, row); + if (!r || !r->layout || !r->relayout) { std::printf(" %-22s row or hooks absent\n", row); return; } + const int64_t nkb = K / 128; + uint64_t z = 0x51ED2701u + (uint64_t)B; + auto rnd = [&]() { + z += 0x9E3779B97F4A7C15ull; + uint64_t x = z; + x = (x ^ (x >> 30)) * 0xBF58476D1CE4E5B9ull; + x = (x ^ (x >> 27)) * 0x94D049BB133111EBull; + return x ^ (x >> 31); + }; + Planes p = iqr_v4_planes(N, K, B, z, bf16s); + std::vector lp = { PI("N", N), PI("K", K), PI("group", 128), PS("dtype", "i8a8h") }; + std::vector wq, wsc; + RadLayout lw, ls; + if (stored(r, lp, 2, p, { "codes", "trellis", "trellis.mad" }, &wq, &lw) != RAD_OK || + (bf16s ? stored(r, lp, 3, p, { "scale" }, &wsc, &ls) + : stored(r, lp, 3, p, { "scale", "scale.col" }, &wsc, &ls)) != RAD_OK) { + std::printf(" %-22s relayout refused\n", row); + return; + } + std::vector ha((size_t)(M * K)); + std::vector has((size_t)(M * nkb)); + for (auto& v : ha) v = (int8_t)((int)(rnd() % 255) - 127); + for (auto& v : has) v = std::ldexp(1.0f + (float)(rnd() % 256) / 256.0f, -7); + const int copies = (int)std::max(2, (256ll << 20) / (int64_t)wq.size() + 1); + void* d_a = dalloc(ha.size()); + void* d_as = dalloc(has.size() * 4); + void* d_w = dalloc(wq.size() * (size_t)copies); + void* d_s = dalloc(wsc.size()); + void* d_y = dalloc((size_t)(M * N) * 2); + if (!d_a || !d_as || !d_w || !d_s || !d_y) { std::printf(" %-22s hipMalloc failed\n", row); return; } + st_memcpy(d_a, ha.data(), ha.size(), hipMemcpyHostToDevice); + st_memcpy(d_as, has.data(), has.size() * 4, hipMemcpyHostToDevice); + for (int c = 0; c < copies; ++c) + st_memcpy((uint8_t*)d_w + (size_t)c * wq.size(), wq.data(), wq.size(), hipMemcpyHostToDevice); + st_memcpy(d_s, wsc.data(), wsc.size(), hipMemcpyHostToDevice); + std::vector tq = { + T(d_a, RAD_I8, { M, K }), T(d_as, RAD_F32, { M, nkb }), T(d_w, lw.dtype, { N, K }), + T(d_s, ls.dtype, { N, nkb }), T(d_y, RAD_BF16, { M, N }), T(nullptr, RAD_F32, { 1 }), + T(nullptr, RAD_U8, { 1 }), + }; + absent(tq[5]); absent(tq[6]); + std::vector gp = { PI("M", M), PI("N", N), PI("K", K), PI("group", 128), PS("dtype", "i8a8h") }; + char nm[64]; + std::snprintf(nm, sizeof nm, "iqr k%d%s %s", B, bf16s ? "h" : "", M <= 64 ? "m64" : "tiled"); + std::printf("\nN=%lld K=%lld M=%lld\n", (long long)N, (long long)K, (long long)M); + perf_row(pl, row, tq, gp, d_w, wq.size(), copies, (double)(wq.size() + wsc.size()), iters, 2, nm); + /* At a gate_up shape to 16 tokens: the gated fold, and the quantiser it replaces. */ + if (N % 256 == 0 && M <= 16) { + const int64_t n = N / 2; + void* d_q = dalloc((size_t)(M * n)); + void* d_sc = dalloc((size_t)(M * (n / 128)) * 4); + if (d_q && d_sc) { + perf_row(pl, "gemm_iqr_gated", + { T(d_a, RAD_I8, { M, K }), T(d_as, RAD_F32, { M, nkb }), T(d_w, lw.dtype, { N, K }), + T(d_s, ls.dtype, { N, nkb }), T(d_q, RAD_I8, { M, n }), T(d_sc, RAD_F32, { M, n / 128 }), + T(nullptr, RAD_BF16, {}) }, + { PI("M", M), PI("N", N), PI("K", K), PI("group", 128), PS("dtype", "i8a8h"), + PS("act", "silu") }, + d_w, wq.size(), copies, (double)(wq.size() + wsc.size()), iters, 2); + RadTensor nob = T(nullptr, RAD_BF16, { M, n }); + absent(nob); + perf_row(pl, "gated_had_quant_i8g", + { T(d_y, RAD_BF16, { M, N }), T(d_q, RAD_I8, { M, n }), T(d_sc, RAD_F32, { M, n / 128 }), nob }, + { PI("M", M), PI("n", n), PI("group", 128), PS("dtype", "bf16"), PS("act", "silu") }, + d_y, (size_t)(M * N * 2), 1, (double)(M * N * 2), iters, 0); + } + } + dfree_all(); + mx_perf(pl, N, K, M, iters); +} + /* ------------------------------------------------------------------ the small ops, timed * * Most of a decode step's kernels are small ops moving a few tens of kilobytes, so their cost is @@ -20636,6 +21180,118 @@ static void fp8f32_forms(const Plugin& pl, int64_t M, int64_t N, int64_t K, int } } +/* The vocabulary-weighted head at one shape against the int8 head (logits_gemm_i8) and the 6-bit + * table head (logits_gemm_iqr) over the same rows: `spec` its classes as B:rows,B:rows (a rank's + * share), K n_embd, M tokens. Codes and scales are random bytes (the time does not depend on + * them), the vocabulary ids a random permutation, ascending within each class as the converter + * stores them. GB/s is on each head's stored bytes. */ +static void vocab_perf(const Plugin& pl, const char* spec, int64_t K, int64_t M, int iters) { + using namespace r4d_iqr; + std::vector> cls; + for (const char* p = spec; *p;) { + const int B = (int)std::strtol(p, (char**)&p, 10); + if (*p != ':') break; + const int64_t n = std::strtoll(p + 1, (char**)&p, 10); + cls.emplace_back(B, n); + if (*p == ',') ++p; + } + int64_t N = 0; + for (auto& c : cls) N += c.second; + if (cls.empty() || cls.size() > 4 || K % 256 || M < 1 || N % 16) { + std::printf("--perfvocab: B:rows[,B:rows..] (1-4 classes, rows a multiple of 256) K M\n"); + return; + } + const RadKernelInfo* rv = find(pl, "logits_gemm_vocab_iqr"); + const RadKernelInfo* ri = find(pl, "logits_gemm_i8"); + const RadKernelInfo* rq = find(pl, "logits_gemm_iqr"); + if (!rv || !ri || !rq) { std::printf("--perfvocab: rows absent\n"); return; } + uint64_t z = 12345; + auto fill = [&](void* d, size_t n) { + std::vector h(n); + for (auto& b : h) { z = z * 6364136223846793005ull + 1442695040888963407ull; b = (uint8_t)(z >> 56) & 0x3Fu; } + st_memcpy(d, h.data(), n, hipMemcpyHostToDevice); + }; + void* d_x = dalloc((size_t)(M * K) * 2); + void* d_y = dalloc((size_t)(M * N) * 4); + fill(d_x, (size_t)(M * K) * 2); + std::vector ts(15); + std::vector gp = { PI("M", M), PI("n_vocab", N), PI("n_embd", K), PS("dtype", "bf16"), + PI("vocab_offset", 0) }; + std::vector vrow((size_t)N); + static const char* kRows[] = { "rows0", "rows1", "rows2", "rows3" }; + std::vector perm((size_t)N); + for (int64_t i = 0; i < N; ++i) perm[(size_t)i] = (int32_t)i; + for (int64_t i = N - 1; i > 0; --i) { + z = z * 6364136223846793005ull + 1442695040888963407ull; + std::swap(perm[(size_t)i], perm[(size_t)((z >> 33) % (uint64_t)(i + 1))]); + } + double vbytes = 0; + int64_t base = 0; + for (size_t i = 0; i < cls.size(); ++i) { + const Form f{ kTrellisMad, (uint32_t)cls[i].first, 0, 16, 0, kRowF32, 8, 0 }; + const int64_t n = cls[i].second, wb = weight_bytes(f, n, K), sb = scale_bytes(f, n, K); + void* d_w = dalloc((size_t)wb); + void* d_s = dalloc((size_t)sb); + fill(d_w, (size_t)wb); + std::vector sc((size_t)(sb / 4), 1e-3f); + st_memcpy(d_s, sc.data(), (size_t)sb, hipMemcpyHostToDevice); + /* a class's ids ascending, as the converter writes them */ + std::sort(perm.begin() + base, perm.begin() + base + n); + for (int64_t j = 0; j < n; ++j) + vrow[(size_t)perm[(size_t)(base + j)]] = (int32_t)((uint32_t)cls[i].first << 28) | (int32_t)j; + void* d_r = dalloc((size_t)n * 4); + st_memcpy(d_r, perm.data() + base, (size_t)n * 4, hipMemcpyHostToDevice); + ts[1 + 3 * i] = T(d_w, R4D_DT_IQR_W | word(f), { n, K }); + ts[2 + 3 * i] = T(d_s, R4D_DT_IQR_S | word(f), { n, K / 128 }); + ts[3 + 3 * i] = T(d_r, RAD_I32, { n }); + gp.push_back(PI(kRows[i], n)); + vbytes += (double)(wb + sb + n * 4); + base += n; + } + for (size_t i = cls.size(); i < 4; ++i) + for (int j = 0; j < 3; ++j) { ts[1 + 3 * i + (size_t)j] = T(nullptr, RAD_U8, { 1 }); absent(ts[1 + 3 * i + (size_t)j]); } + void* d_m = dalloc((size_t)N * 4); + st_memcpy(d_m, vrow.data(), (size_t)N * 4, hipMemcpyHostToDevice); + vbytes += (double)N * 4; + ts[0] = T(d_x, RAD_BF16, { M, K }); + ts[13] = T(d_m, RAD_I32, { N, 1 }); + ts[14] = T(d_y, RAD_F32, { M, N }); + RadArgs a; + std::memset(&a, 0, sizeof(a)); + a.t = ts.data(); a.n_t = (int)ts.size(); a.p = gp.data(); a.n_p = (int)gp.size(); a.world_size = 1; + const int64_t need = rv->scratch(&a); + a.scratch = dalloc((size_t)need); a.scratch_bytes = need; + if (rv->launch(&a, nullptr) != RAD_OK || st_stream_sync(nullptr) != hipSuccess) { std::printf("--perfvocab: launch failed\n"); return; } + const double tv = st_time_us([&](int) { rv->launch(&a, nullptr); }, iters, nullptr); + + /* the int8 head and the 6-bit table head over N rows */ + const int64_t ib = N * r4d_fp8::lm_row_bytes(K); + const Form ft{ kTable, 6, 0, 0, 0, kBf16, 0, 0 }; + const int64_t qb = lm_bytes(ft, N, K); + void* d_i = dalloc((size_t)ib); + void* d_q = dalloc((size_t)qb); + fill(d_i, (size_t)ib); + fill(d_q, (size_t)qb); + std::vector lp = { PI("M", M), PI("n_vocab", N), PI("n_embd", K), PS("dtype", "bf16") }; + std::vector ti = { T(d_x, RAD_BF16, { M, K }), T(d_i, RAD_I8, { N, K }), T(d_y, RAD_F32, { M, N }) }; + std::vector tq = { T(d_x, RAD_BF16, { M, K }), T(d_q, R4D_DT_IQR_W | word(ft), { N, K }), T(d_y, RAD_F32, { M, N }) }; + auto timed = [&](const RadKernelInfo* r, std::vector& t) { + RadArgs b; + std::memset(&b, 0, sizeof(b)); + b.t = t.data(); b.n_t = (int)t.size(); b.p = lp.data(); b.n_p = (int)lp.size(); b.world_size = 1; + if (r->scratch) { const int64_t s = r->scratch(&b); if (s > 0) { b.scratch = dalloc((size_t)s); b.scratch_bytes = s; } } + if (r->launch(&b, nullptr) != RAD_OK || st_stream_sync(nullptr) != hipSuccess) return -1.0; + return st_time_us([&](int) { r->launch(&b, nullptr); }, iters, nullptr); + }; + const double t8 = timed(ri, ti), t6 = timed(rq, tq); + std::printf("\nlm_head N=%lld K=%lld M=%lld, %d iters\n", (long long)N, (long long)K, (long long)M, iters); + std::printf(" %-26s %9.1f us %7.1f MiB %6.1f GB/s %.3f b a weight\n", ("vocab " + std::string(spec)).c_str(), tv, + vbytes / (1 << 20), vbytes / (tv * 1e3), vbytes * 8 / (double)(N * K)); + std::printf(" %-26s %9.1f us %7.1f MiB %6.1f GB/s\n", "int8 (logits_gemm_i8)", t8, ib / 1048576.0, ib / (t8 * 1e3)); + std::printf(" %-26s %9.1f us %7.1f MiB %6.1f GB/s\n", "6-bit table (logits_gemm_iqr)", t6, qb / 1048576.0, qb / (t6 * 1e3)); + dfree_all(); +} + /* The block-quantised trunk GEMMs GLM's checkpoints resolve to, at one shape: E4M3 with F32 * 128x128 block scales (gemm_fp8a8_f32scale, the MLA and dense-MLP projections) and OCP-MXFP4 * (the shared experts' rows: skinny, decode split and tiled). GB/s is on the weight and its scale @@ -31523,9 +32179,10 @@ static void device_phase(const Plugin& pl) { i8a8_numeric(pl, "gemm_i8a8_rb32_tiled", 200, 256, 640, 32); i8a8_numeric(pl, "gemm_i8a8_rb32_tiled", 300, 256, 5120, 32); /* The IQR forms, decoded where they are read, against the int8 rows on their values: V1's - * tables, grids and zero; V2's 4096-state trellis; V3's 16384-state one on tcq_rb=32. M 1, - * 4 and 8 reach the GEMV (split over K at N 512), 9 and 64 the narrow tile (64 a split at N - * 512), 300 the prefill decode. */ + * tables, grids and zero; V2's 4096-state trellis; V3's 16384-state one on tcq_rb=32. M 1 + * reaches the GEMV, 2 the GEMV on 2- and 3-bit computed codes under one f32 scale a row, 4 + * and 8 the GEMV off the computed trellis; else to 16 the 16-token tile; 17 and 64 the + * narrow tile (64 a split at N 512), 300 the prefill decode. */ { const IqrCase fs[] = { { 3, 2, 0, 0, 1, false, false }, { 3, 3, 0, 0, 1, false, true }, { 3, 4, 0, 0, 1, false, true }, @@ -31538,16 +32195,27 @@ static void device_phase(const Plugin& pl) { { 6, 2, 0, 16, 32, true, true }, { 6, 3, 0, 16, 32, true, true }, { 6, 4, 0, 16, 32, true, true }, { 6, 5, 0, 16, 32, true, true }, { 6, 6, 0, 16, 32, true, true }, { 6, 7, 0, 16, 32, true, true }, { 6, 2, 0, 16, 1, true, true }, { 6, 4, 0, 16, 1, true, true }, + { 6, 5, 0, 16, 1, true, true }, { 6, 6, 0, 16, 1, true, true }, { 6, 7, 0, 16, 1, true, true }, + { 6, 4, 0, 16, 1, false, true }, { 6, 5, 0, 16, 1, false, true }, + { 6, 6, 0, 16, 1, false, true }, { 6, 7, 0, 16, 1, false, true }, { 6, 2, 0, 16, 1, false, true, true }, { 6, 3, 0, 16, 1, false, true, true }, { 6, 4, 0, 16, 1, false, true, true }, { 6, 5, 0, 16, 1, false, true, true }, { 6, 6, 0, 16, 1, false, true, true }, { 6, 7, 0, 16, 1, false, true, true }, { 6, 2, 0, 15, 1, false, true, true }, }; + for (const int b : { 2, 3, 4, 6 }) + for (const int64_t m : { (int64_t)1, (int64_t)2, (int64_t)5, (int64_t)16 }) + iqr_gated_case(pl, b, m, 1024, 1280); + iqr_gated_case(pl, 4, 1, 17408, 5120); + iqr_gated_case(pl, 4, 9, 17408, 5120); for (const IqrCase& f : fs) { iqr_gemm_case(pl, f, 1, 512, 1024); + iqr_gemm_case(pl, f, 2, 4096, 1024); iqr_gemm_case(pl, f, 4, 2048, 2560); iqr_gemm_case(pl, f, 8, 512, 1024); iqr_gemm_case(pl, f, 9, 512, 1024); + iqr_gemm_case(pl, f, 16, 4096, 2560); + iqr_gemm_case(pl, f, 17, 512, 1024); iqr_gemm_case(pl, f, 64, 512, 2560); iqr_gemm_case(pl, f, 300, 512, 1024); } @@ -32805,11 +33473,21 @@ static void device_phase(const Plugin& pl) { iqr_head_case(pl, 5, 4096, 5120, 1); iqr_head_case(pl, 4, 4096, 5120, 8); } + if (sel("logits_gemm_vocab_iqr")) { + const std::vector four = { { 4, 768 }, { 5, 512 }, { 6, 256 }, { 7, 256 } }; + for (const int64_t M : { (int64_t)1, (int64_t)8, (int64_t)16, (int64_t)37, (int64_t)64, (int64_t)100 }) + vocab_head_case(pl, four, M, 512, 0); + vocab_head_case(pl, { { 3, 512 }, { 2, 256 } }, 9, 1024, 768); + vocab_head_case(pl, { { 3, 512 }, { 2, 256 } }, 40, 1024, 768); + vocab_head_case(pl, { { 5, 1024 } }, 8, 5120, 0); + } if (sel("embed_lookup_iqr")) { const IqrEmbedCase es[] = { { 3, 2, 0, false, false }, { 3, 3, 0, false, false }, { 3, 4, 0, false, true }, - { 3, 5, 0, false, false }, { 2, 6, 0, false, false }, { 5, 2, 12, true, true }, + { 3, 5, 0, false, false }, { 2, 6, 0, false, false }, { 2, 7, 0, false, false }, + { 2, 8, 0, false, false }, { 5, 2, 12, true, true }, { 5, 3, 12, true, true }, { 5, 4, 12, true, true }, { 5, 5, 12, true, true }, + { 5, 6, 12, true, true }, { 5, 7, 12, true, true }, }; for (const IqrEmbedCase& f : es) { iqr_embed_case(pl, f, 512, 640, 1.0f); @@ -32824,6 +33502,8 @@ static void device_phase(const Plugin& pl) { fp8_logits_numeric(pl, 2560, 2560, M, true); } + gate_had_case(pl, 37, 256); + gate_had_case(pl, 4, 128); /* The fused quantisers are checked against the kernels they replace, gated on their own * rows. */ if (sel("rmsnorm_quant_fp8") || sel("gated_quant_fp8") || sel("gate_quant_fp8") || @@ -33079,11 +33759,15 @@ static void usage(void) { " N a gate_up's width) and print the weight bandwidth each reaches.\n" " --perfwpa N K M [iters] [pb1]: the int5 and int4 x int8 tiled GEMMs (gemm_w5a8i8_tiled,\n" " gemm_w4a8i8_tiled), warmed, min / median time and a hash of the output.\n" + " --perfiqr N K M B [iters]: the IQR row over a B-bit V4 trunk form (B + 10: the head-fed\n" + " form, a bf16 scale a (row, 128)), then --perfmxd\n" " --perfmxd N K M [iters]: the dense MXFP4 GEMM rows (gemv, decode, skinny, tiled) at\n" " one shape, with the weight bandwidth each reaches.\n" " --perfbf16 N K M [iters]: the bf16 skinny GEMM at every variant it has.\n" " --perff32 N K M [iters]: gemm_nt_f32 at the tile form its rule picks, compared\n" " byte for byte with the host arithmetic, with GB/s and TFLOP/s.\n" + " --perfvocab B:rows,.. K M [iters]: the vocabulary-weighted head against the int8\n" + " and 6-bit table heads over the same rows\n" " --perfq N K M [iters]: the block-quantised trunk rows GLM resolves to: E4M3 with\n" " F32 block scales and the three OCP-MXFP4 rows, GB/s on weight + scales.\n" " --perfw4 N K M [iters]: a tuning sweep of the asymmetric W4 x F16 GEMM;\n" @@ -33204,7 +33888,8 @@ int main(int argc, char** argv) { long long real_woff = 0, real_soff = 0, real_n = 0, real_k = 0; long long perf_n = 0, perf_k = 0, perf_m = 0; int perf_it = 50, perf_w2 = 0, perf_w4 = 0, perf_bf = 0, perf_w8 = 0, perf_f32 = 0, - perf_q = 0, perf_mx = 0, perf_wpa = 0; + perf_q = 0, perf_mx = 0, perf_wpa = 0, perf_vocab = 0, perf_iqr = 0; + const char* vocab_spec = nullptr; long long perf_pb1 = 0; long long sop_m = 0, sop_k = 0; int sop_it = 2000; @@ -33277,6 +33962,13 @@ int main(int argc, char** argv) { perf_m = std::strtoll(argv[++i], nullptr, 0); if (i + 1 < argc && argv[i + 1][0] != '-') perf_it = (int)std::strtol(argv[++i], nullptr, 0); if (i + 1 < argc && argv[i + 1][0] != '-') perf_pb1 = std::strtoll(argv[++i], nullptr, 0); + } else if (!std::strcmp(argv[i], "--perfiqr")) { + if (i + 4 >= argc) { usage(); return 2; } + perf_n = std::strtoll(argv[++i], nullptr, 0); + perf_k = std::strtoll(argv[++i], nullptr, 0); + perf_m = std::strtoll(argv[++i], nullptr, 0); + perf_iqr = (int)std::strtol(argv[++i], nullptr, 0); + if (i + 1 < argc && argv[i + 1][0] != '-') perf_it = (int)std::strtol(argv[++i], nullptr, 0); } else if (!std::strcmp(argv[i], "--perfmxd")) { if (i + 3 >= argc) { usage(); return 2; } perf_mx = 1; @@ -33300,6 +33992,15 @@ int main(int argc, char** argv) { perf_k = std::strtoll(argv[++i], nullptr, 0); perf_m = std::strtoll(argv[++i], nullptr, 0); if (i + 1 < argc && argv[i + 1][0] != '-') perf_it = (int)std::strtol(argv[++i], nullptr, 0); + } else if (!std::strcmp(argv[i], "--perfvocab")) { + /* the vocabulary-weighted head against the int8 and table heads (see vocab_perf) */ + if (i + 3 >= argc) { usage(); return 2; } + perf_vocab = 1; + perf_n = 1; + vocab_spec = argv[++i]; + perf_k = std::strtoll(argv[++i], nullptr, 0); + perf_m = std::strtoll(argv[++i], nullptr, 0); + if (i + 1 < argc && argv[i + 1][0] != '-') perf_it = (int)std::strtol(argv[++i], nullptr, 0); } else if (!std::strcmp(argv[i], "--perfq")) { /* GLM's block-quantised trunk rows (see q_perf). */ if (i + 3 >= argc) { usage(); return 2; } @@ -33728,7 +34429,9 @@ int main(int argc, char** argv) { #ifdef RAD_HAVE_HIP if (perf_f32) f32_forms(pl, perf_m, perf_n, perf_k, perf_it, true); else if (perf_q) q_perf(pl, perf_n, perf_k, perf_m, perf_it); + else if (perf_vocab) vocab_perf(pl, vocab_spec, perf_k, perf_m, perf_it); else if (perf_wpa) wpa_perf(pl, perf_n, perf_k, perf_m, perf_it, perf_pb1); + else if (perf_iqr) iqr_perf(pl, perf_n, perf_k, perf_m, perf_iqr, perf_it); else if (perf_mx) mx_perf(pl, perf_n, perf_k, perf_m, perf_it); else if (perf_bf) bf16_perf(pl, perf_n, perf_k, perf_m, perf_it); else if (perf_w4) w5a16_perf(pl, 4, perf_m, perf_n, perf_k, perf_it, diff --git a/libr4d/r4d_shapes.cpp b/libr4d/r4d_shapes.cpp index 1b9579ed..4d2e111b 100644 --- a/libr4d/r4d_shapes.cpp +++ b/libr4d/r4d_shapes.cpp @@ -2024,7 +2024,7 @@ extern "C" int r4d_shape_gram_accum(const RadParam* p, int n_p, int operand, Rad const int64_t n = pi(p, n_p, "n"); const int64_t g = pi(p, n_p, "group", R4D_FP8_BLOCK); /* dtype bf16 is a plain activation with no scale operand; fp8a8 is E4M3 codes and a dequant - * scale per (row, group). */ + * scale per (row, group), i8a8 the same with int8 codes. */ const char* dt = rad_param_gets(p, n_p, "dtype", nullptr); if (dt && !std::strcmp(dt, "bf16")) { const RadOpdDesc l[] = { @@ -2035,8 +2035,10 @@ extern "C" int r4d_shape_gram_accum(const RadParam* p, int n_p, int operand, Rad R4D_PICK(l); } if (g != R4D_FP8_BLOCK) return RAD_E_UNSUPPORTED; + /* i8a8: an int8 trunk's codes, with the same scale grid. */ + const uint32_t q = dt && !std::strcmp(dt, "i8a8") ? (uint32_t)RAD_I8 : (uint32_t)RAD_F8E4M3; const RadOpdDesc l[] = { - opd((uint32_t)RAD_F8E4M3, M, n), + opd(q, M, n), opd((uint32_t)RAD_F32, M, (n + g - 1) / g), opd((uint32_t)RAD_F32, n, n), }; diff --git a/tests/arch_test.cpp b/tests/arch_test.cpp index 13fe41b3..c6a8bb09 100644 --- a/tests/arch_test.cpp +++ b/tests/arch_test.cpp @@ -9699,9 +9699,11 @@ int w8a8_declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* ctx } /* namespace */ -/* The `_had_quant_i8g` producers, which libr4d serves and libref does not. */ +/* The `_had_quant_i8g` producers and the ops that write those codes in their epilogue (the + * attention gate's, the delta net's decode conv fold's), which libr4d serves and libref does not. */ const char* const kW8a8Fused[] = { "rmsnorm_had_quant_i8g", "ar_rmsnorm_had_quant_i8g", - "gated_had_quant_i8g" }; + "gated_had_quant_i8g", "gate_had_quant_i8g", + "gdn_conv_recurrent_update_had" }; /* Where the `_had_quant_i8g` producers are not served, every trunk linear of a rotated int8 * container is an i8a8h GEMM right behind its own had_quant_act_i8g, at one rank and two: 2 @@ -9736,11 +9738,13 @@ TEST(qwen35_w8a8_serves_every_trunk_linear_rotated_int8) { } } -/* Where they are served, the norms and the gated product write had_quant_act_i8g's codes into the - * int8 pair, and the projections reading them declare no quantiser: had_quant_act_i8g is left only - * before the attention and delta-net output projections (2 + 6), every norm is the rotated twin (at - * two ranks with its fused all-reduce form beside it), and every feed-forward's product is - * gated_had_quant_i8g. No E4M3 norm or gated quantiser is left, and the 36 GEMMs are unchanged. */ +/* Where they are served, the norms, the gated product, the attention gate and the delta net's + * decode conv fold write had_quant_act_i8g's codes into the int8 pair, and the projections reading + * them declare no quantiser: had_quant_act_i8g is left only as the delta net's quantiser of the + * rows its decode fold does not serve (6), every norm is the rotated twin (at two ranks with its + * fused all-reduce form beside it), every feed-forward's product is gated_had_quant_i8g and every + * attention gate gate_had_quant_i8g. No E4M3 norm or gated quantiser is left, and the 36 GEMMs are + * unchanged. */ TEST(qwen35_w8a8_feeds_its_rotated_codes_from_the_producers_where_libr4d_serves_them) { MetaKV mk = q35w8a8_meta(); for (int world : { 1, 2 }) { @@ -9751,9 +9755,11 @@ TEST(qwen35_w8a8_feeds_its_rotated_codes_from_the_producers_where_libr4d_serves_ int rot = 0; for (const RecOp& o : b.ops) rot += o.op == "gemm_nt_q" && pstr(&o, "dtype") == "i8a8h"; CHECK_EQ(rot, 2 * 4 + 6 * 2 + 8 * 2); - CHECK_EQ(count_op(b, "had_quant_act_i8g"), 2 + 6); + CHECK_EQ(count_op(b, "had_quant_act_i8g"), 6); CHECK_EQ(count_op(b, "rmsnorm_had_quant_i8g"), 8 + 8); CHECK_EQ(count_op(b, "gated_had_quant_i8g"), 8); + CHECK_EQ(count_op(b, "gate_had_quant_i8g"), 2); + CHECK_EQ(count_op(b, "gdn_conv_recurrent_update_had"), 6); for (const char* op : { "rmsnorm_quant_fp8", "ar_rmsnorm_quant_fp8", "gated_quant_fp8", "quant_act_i8g" }) CHECK_EQ(count_op(b, op), 0); @@ -10767,7 +10773,7 @@ TEST(the_gemma4_12b_embeds_images_and_audio_without_an_encoder) { * bound (its window two-sided), the encoder says so to the core (RadEncoderDecl::bidirectional), * and on a pass with a run (RadBatch::n_bidi) each sliding layer attends the run's rows again over * their sequence's cache up to the run's end, written over the causal result in the same rows. - * Without the config key, or with RADIANCE_MEDIA_BIDI=0, nothing of it. */ + * Without the config key, nothing of it. */ TEST(the_gemma4_12b_reads_a_pictures_rows_both_ways) { std::vector keys(std::begin(k_gem12_keys), std::end(k_gem12_keys)); std::vector vals(std::begin(k_gem12_vals), std::end(k_gem12_vals)); @@ -10784,7 +10790,7 @@ TEST(the_gemma4_12b_reads_a_pictures_rows_both_ways) { const int32_t run = 10; static const int32_t rows[] = { run }; for (const int win : { 1024, 8 }) - for (int mode = 0; mode < 3; ++mode) { /* 0 on, 1 no key, 2 RADIANCE_MEDIA_BIDI=0 */ + for (int mode = 0; mode < 2; ++mode) { /* 0 on, 1 no key */ std::vector wvals = vals; for (size_t k = 0; k < keys.size(); ++k) if (!std::strcmp(keys[k], "sliding_window")) wvals[k] = win == 8 ? "8" : "1024"; @@ -10802,9 +10808,7 @@ TEST(the_gemma4_12b_reads_a_pictures_rows_both_ways) { meta.kv_key = keys.data(); meta.kv_val = wvals.data(); RadBuildCtx ctx = build_ctx(rank, world); ctx.max_enc_patches = 1120; - if (mode == 2) setenv("RADIANCE_MEDIA_BIDI", "0", 1); const int rc = gemma4_bf16::declare(&b, &meta, &ctx); - unsetenv("RADIANCE_MEDIA_BIDI"); REQUIRE_EQ(rc, RAD_OK); const bool on = mode == 0; CHECK_EQ(b.encoder.bidirectional, on ? 1 : 0); @@ -11518,22 +11522,22 @@ struct ArchCases { qwen35_bf16::step, 0, {}, 0xf82117051023e608ull); add("qwen35_fp8 + MTP", [this, sc](RadBuilder* b) { auto c = sc(1, 3); return qwen35_fp8::declare(b, q35.meta(), &c); }, - qwen35_fp8::step, 3, {}, 0x20ab9ed24e409329ull); + qwen35_fp8::step, 3, {}, 0x958b83102809266bull); add("qwen35_fp8 + MTP, two ranks", [this, sc](RadBuilder* b) { auto c = sc(2, 3); return qwen35_fp8::declare(b, q35.meta(), &c); }, - nullptr, 3, { "ar_rmsnorm_quant_fp8" }, 0x5b52afb1706a954eull); + nullptr, 3, { "ar_rmsnorm_quant_fp8" }, 0x91408682a38a1754ull); add("qwen35_fp8 + DFlash2", [this, sc](RadBuilder* b) { auto c = sc(1, 7); return qwen35_fp8::declare(b, q35df.meta(), &c); }, - qwen35_fp8::step, 7, {}, 0x365e4cbb415ac284ull); + qwen35_fp8::step, 7, {}, 0x60d33ded99aa451eull); add("qwen35_w8a8 + DFlash2", [this, sc](RadBuilder* b) { auto c = sc(1, 7); return w8a8_declare(b, q35w8df.meta(), &c); }, - qwen35_w8a8::step, 7, {}, 0x742a596708bbda1dull); + qwen35_w8a8::step, 7, {}, 0x570d3bc8fc15f701ull); add("qwen35_w8a8 + DFlash2, two ranks", [this, sc](RadBuilder* b) { auto c = sc(2, 7); return w8a8_declare(b, q35w8df.meta(), &c); }, - nullptr, 7, { "ar_rmsnorm_quant_fp8" }, 0x93b6390d30e59953ull); + nullptr, 7, { "ar_rmsnorm_quant_fp8" }, 0x6c5267846652829full); add("qwen35moe_fp8 + MTP", [this, sc](RadBuilder* b) { auto c = sc(1, 3); return qwen35moe_fp8::declare(b, q35moe.meta(), &c); }, - qwen35moe_fp8::step, 3, {}, 0x4c7e42e71f167042ull); + qwen35moe_fp8::step, 3, {}, 0x325d0299495a0dd8ull); add("qwen4exp_fp8", [this](RadBuilder* b) { auto c = q4_ctx(0, 1); return qwen4exp_fp8::declare(b, &q4, &c); }, qwen4exp_fp8::step, 3, {}, 0x9454e9dff6db286bull); @@ -12276,10 +12280,10 @@ TEST(a_4096_budget_without_a_span_is_the_pinned_graph_and_steps) { { "qwen4exp_fp8", 2, 1, 0x4bc19e44d0743e49ull, 0x959ef6b7c6f57d8bull }, { "qwen4exp_fp8", 4, 0, 0xea29df78a9297c5cull, 0xfbe74f2b9d7020bfull }, { "qwen4exp_fp8", 4, 3, 0x1e4ba87a0d9619f4ull, 0x36df57cac613c6cfull }, - { "qwen35_fp8", 1, 0, 0xc56a518087e3f4b4ull, 0xa7ec3cf6252cd441ull }, - { "qwen35_fp8", 2, 1, 0x6e644b3d13bac619ull, 0xdd5d65ef158c4136ull }, - { "qwen35moe_fp8", 1, 0, 0x7a9330e0da08f97cull, 0x2b5989b2a6dbc7dfull }, - { "qwen35moe_fp8", 2, 0, 0x3a2761e9546797f1ull, 0x4a597c66b5868eeeull }, + { "qwen35_fp8", 1, 0, 0x0f08ba5027cba71aull, 0xa7ec3cf6252cd441ull }, + { "qwen35_fp8", 2, 1, 0xe7780f241685a18bull, 0xdd5d65ef158c4136ull }, + { "qwen35moe_fp8", 1, 0, 0xb1e6173bd121dc2aull, 0x2b5989b2a6dbc7dfull }, + { "qwen35moe_fp8", 2, 0, 0x46d061a0de9a8933ull, 0x4a597c66b5868eeeull }, }; for (const Case& cs : cases) { RadBuilder b; diff --git a/tests/config_test.cpp b/tests/config_test.cpp index 837339f5..658e9acc 100644 --- a/tests/config_test.cpp +++ b/tests/config_test.cpp @@ -902,9 +902,28 @@ TEST(the_ngram_table_takes_a_directory_for_a_shared_ram_copy) { CHECK(s.ngram_placement == TablePlacement::Ram); CHECK(s.ngram_share_dir.empty()); Config c; - for (const char* bad : { "ram=", "vram=/tmp/x", "disk=/tmp/x", "auto=/tmp/x" }) + for (const char* bad : { "ram=", "disk=", "vram=/tmp/x", "auto=/tmp/x" }) CHECK_EQ(parse({ "--ngram-placement", bad }, &c), RAD_E_INVAL); CHECK_EQ(parse({ "--embedding-placement", "ram=/tmp/x" }, &c), RAD_E_INVAL); + CHECK_EQ(parse({ "--embedding-placement", "disk=/tmp/x" }, &c), RAD_E_INVAL); +} + +/* disk=DIR is disk read from the table's own file in DIR (#130); it and ram=DIR replace each + * other, and a plain placement drops both directories. */ +TEST(the_ngram_table_takes_a_directory_for_its_own_file_on_disk) { + Config s; + CHECK_EQ(parse({ "--ngram-placement", "disk=/mnt/optane" }, &s), RAD_OK); + CHECK(s.ngram_placement == TablePlacement::Disk); + CHECK_EQ(s.ngram_disk_dir, std::string("/mnt/optane")); + CHECK(s.ngram_share_dir.empty()); + CHECK_EQ(parse({ "--ngram-placement", "disk=/mnt/optane", "--ngram-placement", "ram=/dev/shm" }, + &s), RAD_OK); + CHECK(s.ngram_placement == TablePlacement::Ram); + CHECK(s.ngram_disk_dir.empty()); + CHECK_EQ(s.ngram_share_dir, std::string("/dev/shm")); + CHECK_EQ(parse({ "--ngram-placement", "disk=/mnt/optane", "--ngram-placement", "disk" }, &s), + RAD_OK); + CHECK(s.ngram_disk_dir.empty()); } /* --draft-window takes exactly two names; the default is kDraftWindowDefault, which the help text diff --git a/tests/format_test.cpp b/tests/format_test.cpp index 962b86b9..e6c4ac57 100644 --- a/tests/format_test.cpp +++ b/tests/format_test.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include @@ -453,6 +455,70 @@ TEST(a_table_copied_into_locked_memory_is_the_mapping_byte_for_byte) { f.close(); } +/* --ngram-placement disk=DIR (#130): the first open fills the table's own file from the container, + * renamed into place whole; the mapping holds the container's bytes and is that file's (the disk + * gather finds the file behind its mapping); a second open reuses it unfilled; a file that is not + * this table is refused rather than served. */ +TEST(a_table_file_on_another_disk_is_filled_once_and_mapped_in_place_of_the_container) { + const std::string p = radtest::tmp_path("tfile"); + RadWriter w; + REQUIRE(w.begin(p.c_str()) >= 0); + w.set_arch("radtest"); + const RadWriter::Weight x = mkw("ngram.weight", plain_bf16(), 1500, 999, -1, -1, 0); + const Planes want = planes_of(x, 7); + REQUIRE(w.add_weight(x, want.ptr.data()) >= 0); + REQUIRE(w.finish() >= 0); + RadFile f; + REQUIRE(f.open(p.c_str()) >= 0); + const RadFilePlane& pl = f.plane(*f.find("ngram.weight"), 0); + const uint8_t* src = f.data(pl); + const int64_t n = (int64_t)pl.bytes; + const std::string tab = radtest::tmp_path("tfile-table"); + ::unlink(tab.c_str()); + + TableCopy a; + bool filled = false; + std::string why; + REQUIRE_EQ(table_file_open(f, src, n, (int64_t)pl.offset, tab, &a, &filled, &why), (int)RAD_OK); + CHECK(filled); + CHECK_EQ(a.bytes, (size_t)n); + CHECK(std::memcmp(a.base, src, (size_t)n) == 0); + CHECK(::access((tab + ".part").c_str(), F_OK) != 0); + /* The mapping is the file's, as /proc/self/maps names it. */ + { + std::ifstream maps("/proc/self/maps"); + bool backed = false; + for (std::string line; std::getline(maps, line);) { + unsigned long long lo = 0, hi = 0; + if (std::sscanf(line.c_str(), "%llx-%llx", &lo, &hi) != 2) continue; + if ((uintptr_t)a.base >= lo && (uintptr_t)a.base < hi) + backed = line.size() >= tab.size() && line.compare(line.size() - tab.size(), tab.size(), tab) == 0; + } + CHECK(backed); + } + ::munmap(a.base, a.bytes); + + TableCopy b; + REQUIRE_EQ(table_file_open(f, src, n, (int64_t)pl.offset, tab, &b, &filled, &why), (int)RAD_OK); + CHECK(!filled); + CHECK(std::memcmp(b.base, src, (size_t)n) == 0); + ::munmap(b.base, b.bytes); + + /* Same size, other bytes: refused, and left for the operator to remove. */ + { + std::fstream t(tab, std::ios::in | std::ios::out | std::ios::binary); + t.seekp(0); + const char junk[16] = "not the table.."; + t.write(junk, sizeof junk); + } + TableCopy c; + CHECK_EQ(table_file_open(f, src, n, (int64_t)pl.offset, tab, &c, &filled, &why), (int)RAD_E_IO); + CHECK(c.base == nullptr); + CHECK(why.find("does not match") != std::string::npos); + ::unlink(tab.c_str()); + f.close(); +} + /* --ngram-placement ram=DIR: the first holder to open the file fills it, a later one finds it * ready (a second descriptor in one process is a second holder, since flock locks belong to the * open file description), and the file goes when the last holder leaves. A file whose header is diff --git a/tests/glm5next_test.cpp b/tests/glm5next_test.cpp index bd645b67..052386ef 100644 --- a/tests/glm5next_test.cpp +++ b/tests/glm5next_test.cpp @@ -1614,12 +1614,13 @@ TEST(glm53_is_the_pinned_graph_and_steps) { /* Pins from this test's own `pin:` printout: the head form (heads_only, which declares the * streamed ops) and the row form, at one and eight ranks. Re-recorded after every graph * change -- the merge re-recorded them for main's builder plus this branch's file-direct - * expert ops. */ - const Case cases[] = { { 1, 0x8e12725b3ed3548dull, 0x68ffc03d2b640d51ull }, + * expert ops, and the graphs again when the routing counts became RAD_BUF_PERSIST (the + * steps did not change). */ + const Case cases[] = { { 1, 0x74395d49106a3042ull, 0x68ffc03d2b640d51ull }, /* World 8 is this branch's expert-parallel graph (288/world whole * experts, file-direct), so its pins differ from main's. */ - { 8, 0x6232b56d6f971d61ull, 0x1b80576ba8f1ecc7ull }, - { 8, 0x3e4b89352f01b57bull, 0xed8cc595e8eeb593ull, true } }; + { 8, 0x1a0da8de6bd0be62ull, 0x1b80576ba8f1ecc7ull }, + { 8, 0xe3751c4cc46e027aull, 0xed8cc595e8eeb593ull, true } }; for (const Case& cs : cases) { RadBuilder b; b.kv_block = 4; diff --git a/tests/js/README.md b/tests/js/README.md index 500fcda1..fb7d1e2d 100644 --- a/tests/js/README.md +++ b/tests/js/README.md @@ -4,8 +4,8 @@ The dashboard is one C++ string: `core/server/dashboard.cpp` embeds the whole pa so its JavaScript has no file of its own to test. These harnesses extract the page from the translation unit (`page.js`) and **execute the shipped functions**, sliced by line range, against mocked DOM. A retyped copy would test the copy, not the bytes -that ship — and a sliced function that is defined but never *called* proves nothing, -which has already happened once here. +that ship, and each harness calls the functions it slices: one that is only defined proves +nothing. node tests/js/poll_spark.test.js node tests/js/extremes.test.js @@ -39,11 +39,9 @@ are deliberately not repo dependencies: node tests/js/render_align.js http://127.0.0.1:8800/ Exits nonzero when the two bottoms land on different device rows. Run it after touching glyph or -header geometry. Three claims about alignment and spacing went through this branch on the strength -of reading the CSS and the SVG viewBox, and all three were wrong -- collapsed whitespace made a -"wide" separator zero pixels wide, and an SVG whose box is flush with the baseline still floats, -because the baseline sits above the box bottom. None of that is visible in the source. Measure the -rendered page. +header geometry: alignment cannot be read off the CSS and the SVG viewBox (collapsed whitespace can +make a separator zero pixels wide, and an SVG flush with the baseline still floats, because the +baseline sits above the box bottom), so measure the rendered page. ## Why these are not in ctest @@ -51,13 +49,3 @@ They need node, which is not a build dependency of this project and will not be present on a contributor's box or in the ROCm build image. Wiring them into ctest would turn a missing optional tool into a red build, so they stay opt-in and are run by hand when the page changes. `dashboard_test` covers the C++ side only. - -## History - -Both files came out of the 2026-11-01 dashboard review. Commit `9cc237f` claimed -"18 checks execute the shipped noteSample, triple, acceptTriple, resetWindows and -newEngineRun" while the harness lived only in `/tmp` — true when written, not -reproducible by anyone else, which an independent review correctly rejected. They are -in the tree so that claim can be re-run. `history.test.js` and `download.test.js` came from the -dashboard work that followed, on the same rule: a check that lives in `/tmp` is a claim about the -author's machine. diff --git a/tests/mem_test.cpp b/tests/mem_test.cpp index 6fc7a503..c2af7fa7 100644 --- a/tests/mem_test.cpp +++ b/tests/mem_test.cpp @@ -4363,6 +4363,31 @@ TEST(the_session_view_says_what_a_return_reuses_and_what_is_off_the_card) { } } +/* Conversations under one shared first block (a decision model's instructions, which no request + * evicts) keep at most 1024 rows: the least recently used row goes, the newest stay. Before, every + * request added a row and each insert walked all of them (#375). */ +TEST(a_shared_root_keeps_a_bounded_session_table) { + IdleTiers t; + CHECK_OK(t.configure(tier_config(0, 1024))); + constexpr uint64_t kRows = 1500; + for (uint64_t i = 1; i <= kRows; ++i) + t.note_session(i, {bh(1), bh(1000 + i)}, 32, i * SEC); + std::vector s = t.sessions(); + CHECK_EQ(s.size(), 1024u); + bool newest = false, oldest = false; + for (const auto& r : s) { + newest |= r.id == kRows; + oldest |= r.id == 1; + } + CHECK(newest); + CHECK(!oldest); + /* A later turn of a kept conversation still absorbs its row. */ + t.note_session(kRows + 1, {bh(1), bh(1000 + kRows), bh(7)}, 48, (kRows + 1) * SEC); + s = t.sessions(); + CHECK_EQ(s.size(), 1024u); + for (const auto& r : s) CHECK(r.id != kRows); +} + TEST(tiers_stay_off_until_a_size_is_given) { IdleTiers t; CHECK_OK(t.configure(tier_config(0, 1024))); diff --git a/tests/place_test.cpp b/tests/place_test.cpp index f2d48bd3..318c5f0b 100644 --- a/tests/place_test.cpp +++ b/tests/place_test.cpp @@ -1460,6 +1460,535 @@ TEST(the_file_stager_reads_each_routed_layer_from_the_container) { std::remove(path.c_str()); } +namespace { +/* Every weight of `f` in a container image, each on RAD_ALIGN_UNIT in declared order with a 2 MiB + * hole between layers, written to `path` with each byte container_byte(offset). Empty when the + * working directory has no O_DIRECT (the caller skips). */ +std::vector write_container(Fixture& f, const std::string& path) { + int64_t off = 4 * (int64_t)RAD_ALIGN_UNIT; + int32_t prev = -1; + for (rad_weight w = 1; (size_t)w < f.prog.weights.size(); ++w) { + WeightInfo& wi = f.prog.weights[w]; + if (prev >= 0 && wi.decl.group.layer != prev) off += 2 * MiB; + prev = wi.decl.group.layer; + wi.stored_bytes = wi.logical_bytes; + wi.file_offset = (uint64_t)off; + off = align_up(off + wi.stored_bytes, RAD_ALIGN_UNIT); + } + std::vector img((size_t)off); + for (int64_t i = 0; i < off; ++i) img[(size_t)i] = container_byte(i); + FILE* fp = std::fopen(path.c_str(), "wb"); + if (!fp) return {}; + const bool wrote = std::fwrite(img.data(), 1, img.size(), fp) == img.size(); + std::fclose(fp); + DirectFile probe; + if (!wrote || probe.open(path.c_str(), RAD_DIO_READ) < 0) { + std::remove(path.c_str()); + return {}; + } + return img; +} + +/* A routing-count source like Ctx::route_counts_device over a MoE block declared once: one counts + * buffer that every routed layer's router rewrites (glm5next shares its counts this way), so a + * read that took the counts before its own layer's router ran would see another layer's. A layer + * in `missing` has not reported yet. `asked` counts the stager's questions. */ +struct SharedCounts { + int32_t* dev = nullptr; + int64_t n = 0; + std::vector missing; + int asked = 0; + explicit SharedCounts(int64_t n_expert) : n(n_expert) { + dev = (int32_t*)rad_dev_alloc(n_expert * (int64_t)sizeof(int32_t), RAD_MEM_DEVICE); + } + ~SharedCounts() { if (dev) rad_dev_free(dev, RAD_MEM_DEVICE); } + /* The router of the rows about to run, on the host backend's shared memory. */ + void route(std::initializer_list c) { + int64_t i = 0; + for (int32_t v : c) dev[i++] = v; + } + static const int32_t* get(void* ud, int32_t layer, int64_t* n_expert) { + SharedCounts& s = *(SharedCounts*)ud; + ++s.asked; + *n_expert = 0; + if (std::find(s.missing.begin(), s.missing.end(), layer) != s.missing.end()) return nullptr; + *n_expert = s.n; + return s.dev; + } +}; + +/* What one routed unit's weights are published as right now: the container's bytes, the zero + * region (a skipped expert), or nothing. */ +enum class Pub { Bytes, Zeros, Null, Other }; +Pub published(Mover& m, const Plan& p, const Program& prog, int32_t unit, + const std::vector& img, RadStream s) { + Pub got = Pub::Bytes; + for (rad_weight w : p.units[(size_t)unit].weights) { + const WeightSlot* slot = m.residency()->lookup(w); + if (!slot || !slot->ptr) return Pub::Null; + if (published_matches(m, prog, w, img, s)) continue; + std::vector head(256); + rad_stream_sync(m.transfer_stream()); + if (rad_memcpy_async(head.data(), slot->ptr, (int64_t)head.size(), s) < 0) return Pub::Other; + rad_stream_sync(s); + bool zero = true; + for (uint8_t v : head) zero = zero && v == 0; + got = zero ? Pub::Zeros : Pub::Other; + } + return got; +} + +int32_t unit_at(const Plan& p, int32_t layer, int32_t expert) { + for (int32_t i = 0; i < (int32_t)p.units.size(); ++i) + if (p.units[(size_t)i].layer == layer && p.units[(size_t)i].expert == expert) return i; + return -1; +} +} /* namespace */ + +/* A layer is read with the counts its own router wrote, at its own trigger. Three routed layers + * of four 3 MiB experts, 1 and 3 on the file tier, every router writing one shared counts buffer. + * A read taken before a layer's router ran -- at the pass's first op, or ahead at the previous + * layer's trigger -- would filter the layer by another layer's counts and leave a routed expert + * to be computed from the zero region. A second slice of a layer's rows routes again, and what it + * routes that the first did not is read then. */ +TEST(the_file_stager_reads_a_layer_with_the_counts_its_own_router_wrote) { + Fixture f; + const int L = 3; + build_moe_layers(f, L, 4, 2 * MiB + 1000, MiB + 24); + f.prog.meta.n_expert = 4; + const std::string path = "place_test_counts.rad"; + const std::vector img = write_container(f, path); + if (img.empty()) { + std::printf(" SKIP the working directory has no O_DIRECT\n"); + return; + } + std::vector prof; + for (int l = 0; l < L; ++l) + for (int e = 0; e < 4; ++e) + prof.push_back(RadFileProfile{l, e, e == 0 ? 0.5f : e == 2 ? 0.4f : 0.01f, 0.0f}); + /* Six residents, the two file buffers and the embedding fill the card; the host pool is the + * file tier's staging and nothing more. */ + const int64_t stride = align_up(align_up(2 * MiB + 1000, RAD_ALIGN_UNIT) + MiB + 24, + RAD_ALIGN_UNIT); + Config c = base_config(); + c.placement = "expert_tiered"; + c.deterministic = true; + c.vram_weights_mib = 32; + c.host_pool_mib = (RAD_PLACE_FILE_STAGE_SLOTS * stride + + RAD_PLACE_FILE_WINDOWS * RAD_PLACE_FILE_WINDOW_BYTES) / MiB + 1; + c.weights_disk_tier = true; + PlannerInput in{&f.prog, &c, 0, 1, prof.data(), (int64_t)prof.size()}; + Plan p; + CHECK_OK(Planner(in).plan(&p)); + for (const MoveUnit& mu : p.units) + if (mu.expert >= 0) CHECK(mu.tier == ((mu.expert & 1) ? Tier::SSD : Tier::VRAM)); + + Mover m; + MoverConfig mc; + mc.container_path = path; + CHECK_OK(m.init(f.prog, p, mc)); + RadStream s = nullptr; + CHECK_OK(rad_stream_create(&s, 0)); + CHECK_OK(m.bind_compute_stream(s)); + SharedCounts counts(4); + /* What the last pass's last router left: both file-tier experts of every layer routed. */ + counts.route({0, 1, 0, 1}); + FileStager fs; + CHECK_OK(fs.init(f.prog, p, &m, &SharedCounts::get, &counts)); + REQUIRE_EQ(fs.n_layers(), (size_t)L); + auto pub = [&](int l, int e) { return published(m, p, f.prog, unit_at(p, l, e), img, s); }; + auto none = [&](int l) { return pub(l, 1) == Pub::Null && pub(l, 3) == Pub::Null; }; + + /* Op 0 is the embedding; layer l's expert ops are 2l+1 and 2l+2. */ + RadBatch b{}; + CHECK(fs.begin_pass(&b)); + bool resync = false; + CHECK_OK(fs.before_op(0, s, &resync)); + /* Nothing yet: no counts for layer 0 exist before its router has run. */ + CHECK(!resync); + for (int l = 0; l < L; ++l) CHECK(none(l)); + + counts.route({0, 2, 0, 0}); /* layer 0's router: expert 1 only */ + CHECK_OK(fs.before_op(1, s, &resync)); + CHECK(resync); + CHECK(pub(0, 1) == Pub::Bytes); + CHECK(pub(0, 3) == Pub::Zeros); /* not routed: the zero region, not read */ + CHECK(none(1)); /* layer 1's router has not run */ + CHECK(none(2)); + CHECK_OK(fs.after_op(1, s)); + /* A second slice of layer 0's rows that routes nothing new reads and publishes nothing. */ + const int64_t waits0 = fs.waits(); + counts.route({0, 5, 0, 0}); + CHECK_OK(fs.before_op(1, s, &resync)); + CHECK(!resync); + CHECK_EQ(fs.waits(), waits0); + CHECK(pub(0, 1) == Pub::Bytes && pub(0, 3) == Pub::Zeros); + CHECK_OK(fs.after_op(1, s)); + CHECK_OK(fs.before_op(2, s, &resync)); + + counts.route({0, 0, 0, 5}); /* layer 1's router: expert 3 only */ + CHECK_OK(fs.before_op(3, s, &resync)); + CHECK(none(0)); /* released */ + CHECK(pub(1, 3) == Pub::Bytes); + CHECK(pub(1, 1) == Pub::Zeros); + CHECK(none(2)); + /* A second slice of layer 1's rows routes expert 1 as well: read now, and waited on. */ + const int64_t waits = fs.waits(); + counts.route({0, 7, 0, 0}); + CHECK_OK(fs.before_op(3, s, &resync)); + CHECK(resync); + CHECK_EQ(fs.waits(), waits + 1); + CHECK(pub(1, 1) == Pub::Bytes); + CHECK(pub(1, 3) == Pub::Bytes); + /* A third routes nothing new: no read, no wait. */ + counts.route({0, 0, 0, 1}); + CHECK_OK(fs.before_op(3, s, &resync)); + CHECK(!resync); + CHECK_EQ(fs.waits(), waits + 1); + CHECK_OK(fs.before_op(4, s, &resync)); + + counts.route({0, 1, 0, 1}); + CHECK_OK(fs.before_op(5, s, &resync)); + CHECK(none(0) && none(1)); + CHECK(pub(2, 1) == Pub::Bytes && pub(2, 3) == Pub::Bytes); + CHECK_OK(fs.before_op(6, s, &resync)); + CHECK_OK(fs.end_pass(s)); + for (int l = 0; l < L; ++l) CHECK(none(l)); + /* Two experts skipped at a trigger (layer 0's 3, layer 1's 1), one of them read by the + * second slice; five units read, each once. */ + CHECK_EQ(m.stats().ssd_skipped_units, (uint64_t)2); + CHECK_EQ(m.stats().ssd_units, (uint64_t)5); + + /* A layer the source has no counts for (it has not reported) is read whole, so it can be read + * ahead as before: layer 1 at layer 0's trigger. A counted one is not. */ + counts.missing = {1}; + CHECK(fs.begin_pass(&b)); + CHECK_OK(fs.before_op(0, s, &resync)); + counts.route({0, 0, 0, 3}); + CHECK_OK(fs.before_op(1, s, &resync)); + CHECK(pub(0, 3) == Pub::Bytes && pub(0, 1) == Pub::Zeros); + CHECK(pub(1, 1) == Pub::Bytes && pub(1, 3) == Pub::Bytes); + CHECK(none(2)); + CHECK_OK(fs.before_op(2, s, &resync)); + CHECK_OK(fs.before_op(3, s, &resync)); + CHECK(pub(1, 1) == Pub::Bytes && pub(1, 3) == Pub::Bytes); + CHECK(none(2)); + CHECK_OK(fs.before_op(4, s, &resync)); + counts.route({0, 4, 0, 0}); + CHECK_OK(fs.before_op(5, s, &resync)); + CHECK(pub(2, 1) == Pub::Bytes && pub(2, 3) == Pub::Zeros); + CHECK_OK(fs.before_op(6, s, &resync)); + CHECK_OK(fs.end_pass(s)); + for (int l = 0; l < L; ++l) CHECK(none(l)); + + /* With no layer counted, the first one is read at the pass's first op, as before. */ + counts.missing = {0, 1, 2}; + CHECK(fs.begin_pass(&b)); + CHECK_OK(fs.before_op(0, s, &resync)); + CHECK(resync); + CHECK(pub(0, 1) == Pub::Bytes && pub(0, 3) == Pub::Bytes); + CHECK(none(1)); + CHECK_OK(fs.end_pass(s)); + for (int l = 0; l < L; ++l) CHECK(none(l)); + + /* A pass whose rows route nearly every expert -- 64 rows an expert on average, here four + * experts at top-1, so 256 rows -- is read whole and ahead like a layer without counts: the + * counts are never asked for, so no trigger drains the stream, though they are there. One + * row fewer is read exactly. */ + f.prog.meta.n_expert_used = 1; + counts.missing.clear(); + FileStager wf; + CHECK_OK(wf.init(f.prog, p, &m, &SharedCounts::get, &counts)); + CHECK_EQ(wf.whole_rows(), (int64_t)256); + CHECK_EQ(fs.whole_rows(), (int64_t)0); /* top-k unknown: always exact */ + counts.route({0, 0, 0, 0}); /* routes nothing, were it asked */ + const int asked = counts.asked; + RadBatch big{}; + big.n_tok = 256; + CHECK(wf.begin_pass(&big)); + CHECK_OK(wf.before_op(0, s, &resync)); + CHECK(resync); + CHECK(pub(0, 1) == Pub::Bytes && pub(0, 3) == Pub::Bytes); + CHECK(none(1)); + CHECK_OK(wf.before_op(1, s, &resync)); + CHECK(pub(0, 1) == Pub::Bytes && pub(0, 3) == Pub::Bytes); + CHECK(pub(1, 1) == Pub::Bytes && pub(1, 3) == Pub::Bytes); /* ahead, at layer 0's trigger */ + CHECK_OK(wf.before_op(1, s, &resync)); /* another slice: nothing left to read */ + CHECK(!resync); + CHECK_OK(wf.before_op(2, s, &resync)); + CHECK_OK(wf.before_op(3, s, &resync)); + CHECK(none(0)); + CHECK(pub(2, 1) == Pub::Bytes && pub(2, 3) == Pub::Bytes); + for (rad_op op = 4; op <= 6; ++op) CHECK_OK(wf.before_op(op, s, &resync)); + CHECK_OK(wf.end_pass(s)); + CHECK_EQ(counts.asked, asked); + for (int l = 0; l < L; ++l) CHECK(none(l)); + + big.n_tok = 255; + CHECK(wf.begin_pass(&big)); + CHECK_OK(wf.before_op(0, s, &resync)); + CHECK(none(0)); + counts.route({0, 2, 0, 0}); + CHECK_OK(wf.before_op(1, s, &resync)); + CHECK(pub(0, 1) == Pub::Bytes && pub(0, 3) == Pub::Zeros); + CHECK(none(1)); + CHECK(counts.asked > asked); + CHECK_OK(wf.end_pass(s)); + + rad_stream_sync(m.transfer_stream()); + rad_stream_destroy(s); + std::remove(path.c_str()); +} + +/* The pool is a cache of the file tier under a dynamic plan. A read that finds it full gives its + * coldest pooled unit back to the file tier when that unit is colder than the one read, never one + * of the layer being read or of one whose ops are about to run; the unit given back -- here one + * the plan put in the pool, in a layer with nothing on the file tier -- is read back by its own + * layer's trigger; and a read whose only copy is a deposit is waited on before the layer's ops. */ +TEST(a_full_pool_gives_back_its_coldest_unit_and_the_stager_reads_it_again) { + Fixture f; + const int L = 3; + build_moe_layers(f, L, 4, MiB + 1000, MiB / 2 + 24); + f.prog.meta.n_expert = 4; + const std::string path = "place_test_cache.rad"; + const std::vector img = write_container(f, path); + if (img.empty()) { + std::printf(" SKIP the working directory has no O_DIRECT\n"); + return; + } + /* Rank order: layer 0's experts, then layer 1's, then layer 2's. Layer 0's four fill the + * pool and the rest go to the file tier, so layer 0 has nothing there. The card holds the + * embedding and the two file buffers; a resident would also need a hot-cache shadow slot, + * and the plan has no room for the pair. */ + std::vector prof; + for (int l = 0; l < L; ++l) + for (int e = 0; e < 4; ++e) + prof.push_back(RadFileProfile{l, e, 0.9f - 0.3f * (float)l - 0.05f * (float)e, 0.0f}); + const int64_t stride = align_up(align_up(MiB + 1000, RAD_ALIGN_UNIT) + MiB / 2 + 24, + RAD_ALIGN_UNIT); + Config c = base_config(); + c.placement = "expert_tiered"; + c.vram_weights_mib = 15; + const int64_t reserve = RAD_PLACE_FILE_STAGE_SLOTS * stride + + RAD_PLACE_FILE_WINDOWS * RAD_PLACE_FILE_WINDOW_BYTES; + c.host_pool_mib = (reserve + 4 * stride) / MiB + 1; + c.weights_disk_tier = true; + PlannerInput in{&f.prog, &c, 0, 1, prof.data(), (int64_t)prof.size()}; + Plan p; + CHECK_OK(Planner(in).plan(&p)); + REQUIRE(p.dynamic); + auto tier_of = [&](int l, int e) { return p.units[(size_t)unit_at(p, l, e)].tier; }; + for (int e = 0; e < 4; ++e) { + REQUIRE(tier_of(0, e) == Tier::HostPinned); + REQUIRE(tier_of(1, e) == Tier::SSD); + REQUIRE(tier_of(2, e) == Tier::SSD); + } + + Mover m; + MoverConfig mc; + mc.container_path = path; + CHECK_OK(m.init(f.prog, p, mc)); + RadStream s = nullptr; + CHECK_OK(rad_stream_create(&s, 0)); + CHECK_OK(m.bind_compute_stream(s)); + HeatEngine h; + CHECK_OK(h.init(p, HeatParams{})); + REQUIRE(h.enabled()); + SharedCounts counts(4); + FileStager fs; + CHECK_OK(fs.init(f.prog, p, &m, &SharedCounts::get, &counts)); + /* Layer 0 is covered though the plan put none of it on the file tier: a deposit may give its + * pooled units back to the file tier. */ + REQUIRE_EQ(fs.n_layers(), (size_t)L); + auto pub = [&](int l, int e) { return published(m, p, f.prog, unit_at(p, l, e), img, s); }; + + /* Where the pooled units are published: their pool slots, which this test never fills (the + * load phase does), so they are compared by address. */ + auto addr = [&](int l, int e) { + return m.residency()->lookup(p.units[(size_t)unit_at(p, l, e)].weights.front())->ptr; + }; + void* const pooled[3] = { addr(0, 1), addr(0, 2), addr(0, 3) }; + for (void* q : pooled) CHECK(q != nullptr); + + /* Layer 2's expert 0 has routed before; nothing else has. */ + const int32_t hist[4] = {3, 0, 0, 0}; + h.observe(2, hist, 4); + CHECK_OK(m.begin_dispatch(1, &h)); + + RadBatch b{}; + bool resync = false; + CHECK(fs.begin_pass(&b)); + CHECK_OK(fs.before_op(0, s, &resync)); + counts.route({1, 0, 0, 0}); + CHECK_OK(fs.before_op(1, s, &resync)); /* layer 0: nothing on the file tier */ + CHECK(!resync); + CHECK_OK(fs.before_op(2, s, &resync)); + /* Layer 1's expert 2 is as cold as every pooled unit: not worth a slot, read into the + * buffer. */ + counts.route({0, 0, 2, 0}); + CHECK_OK(fs.before_op(3, s, &resync)); + CHECK(pub(1, 2) == Pub::Bytes); + CHECK_EQ(m.stats().pool_evictions, (uint64_t)0); + CHECK_OK(fs.before_op(4, s, &resync)); + /* Layer 2's expert 0 is warmer: the coldest pooled unit outside layer 2 goes back to the file + * tier, the lowest of the equally cold ones -- layer 0's expert 0 -- and its weights point at + * the zero region until its own layer reads it. */ + counts.route({3, 0, 0, 0}); + CHECK_OK(fs.before_op(5, s, &resync)); + CHECK(pub(2, 0) == Pub::Bytes); + CHECK_EQ(m.stats().pool_evictions, (uint64_t)1); + CHECK(pub(0, 0) == Pub::Zeros); + CHECK(m.on_file_tier({unit_at(p, 0, 0)})); + CHECK(addr(0, 1) == pooled[0] && addr(0, 2) == pooled[1] && addr(0, 3) == pooled[2]); + CHECK_OK(fs.before_op(6, s, &resync)); + CHECK_OK(fs.end_pass(s)); + + /* The pool slot it gave up comes back after its quarantine. */ + for (int d = 2; d < 5; ++d) { + CHECK_OK(rad_stream_sync(s)); + CHECK_OK(m.begin_dispatch(d, &h)); + } + + /* Layer 0's trigger routes the unit back: it is read into the free pool slot -- a read + * whose only copy is that deposit, which the stream waits on all the same. */ + CHECK(fs.begin_pass(&b)); + CHECK_OK(fs.before_op(0, s, &resync)); + counts.route({1, 0, 0, 0}); + const int64_t waits = fs.waits(); + CHECK_OK(fs.before_op(1, s, &resync)); + CHECK(resync); + CHECK_EQ(m.stats().ssd_deposits, (uint64_t)1); + CHECK_EQ(fs.waits(), waits + 1); + CHECK(pub(0, 0) == Pub::Bytes); + CHECK(!m.on_file_tier({unit_at(p, 0, 0)})); + counts.route({0, 0, 0, 0}); + for (rad_op op = 2; op <= 6; ++op) CHECK_OK(fs.before_op(op, s, &resync)); + CHECK_OK(fs.end_pass(s)); + /* A deposit outlives the pass: the unit stays in its pool slot. */ + CHECK(pub(0, 0) == Pub::Bytes); + + rad_stream_sync(m.transfer_stream()); + rad_stream_sync(s); + rad_stream_destroy(s); + std::remove(path.c_str()); +} + +/* A layer with nothing on the file tier is held by neither buffer, yet its ops are about to be + * issued: a read-ahead of the next layer that finds the pool full must not give one of its pooled + * units back (the weights would point at the zero region for an op still to come), while the same + * pass's read-ahead from the next layer on is free to take it. */ +TEST(a_read_ahead_never_takes_a_pooled_unit_of_the_layer_about_to_run) { + Fixture f; + const int L = 3; + build_moe_layers(f, L, 4, MiB + 1000, MiB / 2 + 24); + f.prog.meta.n_expert = 4; + const std::string path = "place_test_cache2.rad"; + const std::vector img = write_container(f, path); + if (img.empty()) { + SKIP("the working directory has no O_DIRECT"); + } + /* Rank order: layer 0's experts, then layer 1's, then layer 2's. Layer 0's four fill the + * pool and the rest go to the file tier, so layer 0 has nothing there. The card holds the + * embedding and the two file buffers; a resident would also need a hot-cache shadow slot, + * and the plan has no room for the pair. */ + std::vector prof; + for (int l = 0; l < L; ++l) + for (int e = 0; e < 4; ++e) + prof.push_back(RadFileProfile{l, e, 0.9f - 0.3f * (float)l - 0.05f * (float)e, 0.0f}); + const int64_t stride = align_up(align_up(MiB + 1000, RAD_ALIGN_UNIT) + MiB / 2 + 24, + RAD_ALIGN_UNIT); + Config c = base_config(); + c.placement = "expert_tiered"; + c.vram_weights_mib = 15; + const int64_t reserve = RAD_PLACE_FILE_STAGE_SLOTS * stride + + RAD_PLACE_FILE_WINDOWS * RAD_PLACE_FILE_WINDOW_BYTES; + c.host_pool_mib = (reserve + 4 * stride) / MiB + 1; + c.weights_disk_tier = true; + PlannerInput in{&f.prog, &c, 0, 1, prof.data(), (int64_t)prof.size()}; + Plan p; + CHECK_OK(Planner(in).plan(&p)); + REQUIRE(p.dynamic); + auto tier_of = [&](int l, int e) { return p.units[(size_t)unit_at(p, l, e)].tier; }; + for (int e = 0; e < 4; ++e) { + REQUIRE(tier_of(0, e) == Tier::HostPinned); + REQUIRE(tier_of(1, e) == Tier::SSD); + REQUIRE(tier_of(2, e) == Tier::SSD); + } + + Mover m; + MoverConfig mc; + mc.container_path = path; + CHECK_OK(m.init(f.prog, p, mc)); + RadStream s = nullptr; + CHECK_OK(rad_stream_create(&s, 0)); + CHECK_OK(m.bind_compute_stream(s)); + HeatEngine h; + CHECK_OK(h.init(p, HeatParams{})); + REQUIRE(h.enabled()); + SharedCounts counts(4); + FileStager fs; + CHECK_OK(fs.init(f.prog, p, &m, &SharedCounts::get, &counts)); + /* Layer 0 is covered though the plan put none of it on the file tier: a deposit may give its + * pooled units back to the file tier. */ + REQUIRE_EQ(fs.n_layers(), (size_t)L); + auto pub = [&](int l, int e) { return published(m, p, f.prog, unit_at(p, l, e), img, s); }; + + /* Where the pooled units are published: their pool slots, which this test never fills (the + * load phase does), so they are compared by address. */ + auto addr = [&](int l, int e) { + return m.residency()->lookup(p.units[(size_t)unit_at(p, l, e)].weights.front())->ptr; + }; + void* const pooled[3] = { addr(0, 1), addr(0, 2), addr(0, 3) }; + for (void* q : pooled) CHECK(q != nullptr); + + void* const pooled0 = addr(0, 0); + /* Layers 1 and 2 are read whole, ahead (no counts for them); each has one warm expert. */ + counts.missing = {1, 2}; + const int32_t hist1[4] = {0, 0, 5, 0}, hist2[4] = {3, 0, 0, 0}; + h.observe(1, hist1, 4); + h.observe(2, hist2, 4); + CHECK_OK(m.begin_dispatch(1, &h)); + + RadBatch b{}; + bool resync = false; + CHECK(fs.begin_pass(&b)); + CHECK_OK(fs.before_op(0, s, &resync)); + counts.route({1, 0, 0, 0}); + CHECK_OK(fs.before_op(1, s, &resync)); /* layer 0 starts; layer 1 read ahead */ + CHECK_EQ(m.stats().pool_evictions, (uint64_t)0); + CHECK(addr(0, 0) == pooled0); + CHECK(addr(0, 1) == pooled[0] && addr(0, 2) == pooled[1] && addr(0, 3) == pooled[2]); + CHECK(pub(1, 2) == Pub::Bytes); + CHECK_OK(fs.before_op(2, s, &resync)); + CHECK_OK(fs.before_op(3, s, &resync)); /* layer 1 starts; layer 2 read ahead */ + CHECK_EQ(m.stats().pool_evictions, (uint64_t)1); + CHECK(pub(2, 0) == Pub::Bytes); + CHECK_OK(fs.before_op(4, s, &resync)); + CHECK_OK(fs.before_op(5, s, &resync)); + CHECK_OK(fs.before_op(6, s, &resync)); + CHECK_OK(fs.end_pass(s)); + + /* A read-ahead the pass never reaches still copied (a deposit into the pool, say), and the + * stream is ordered behind it when the pass ends. Once the slot layer 0 gave up is back, layer + * 1 is read ahead at layer 0's trigger and the pass stops there. */ + for (int d = 2; d < 5; ++d) { + CHECK_OK(rad_stream_sync(s)); + CHECK_OK(m.begin_dispatch(d, &h)); + } + CHECK(fs.begin_pass(&b)); + CHECK_OK(fs.before_op(0, s, &resync)); + counts.route({1, 0, 0, 0}); + CHECK_OK(fs.before_op(1, s, &resync)); + const int64_t waits = fs.waits(); + CHECK_OK(fs.end_pass(s)); + CHECK_EQ(fs.waits(), waits + 1); + + rad_stream_sync(m.transfer_stream()); + rad_stream_sync(s); + rad_stream_destroy(s); + std::remove(path.c_str()); +} + TEST(mover_promotes_and_demotes_through_the_shadow_slots) { HeatFixture hf; HeatEngine h; diff --git a/tests/quant_algo_test.cpp b/tests/quant_algo_test.cpp index d4a1b345..96c60ca2 100644 --- a/tests/quant_algo_test.cpp +++ b/tests/quant_algo_test.cpp @@ -272,6 +272,25 @@ TEST(an_expert_reads_its_own_hessian_before_its_layers) { CHECK(same_planes(run(both, e11), run(only_pool, e11))); } +TEST(a_vocabulary_heads_width_class_reads_the_heads_hessian) { + /* A calibration run records the lm_head's input as `output`; the vocabulary-weighted head's + * classes (output.k3, output.k4, ...) are rows of that one weight and quantise against it, as + * a weight named `output` does. With no Gram at all GPTQ rounds to nearest, which differs. */ + NEED_LIBQUANT(); + const TempDir t("rad_quant_vhead"), e("rad_quant_novhead"); + REQUIRE(!t.path.empty() && !e.path.empty()); + REQUIRE(write_gram(t.path + "/gram.r0.output.bin", kC, kT, H())); + auto run = [&](const std::string& dir, const char* name) -> Quantised { + Opts o; + o.s("codes", "i4").i("group", 32).s("scale", "f16").s("calib", dir.c_str()); + Quantised q = quantise(quantizer("gptq"), o, name, kR, kC, weight()); + CHECK_EQ(q.status, RAD_OK); + return q; + }; + CHECK(same_planes(run(t.path, "output.k4.weight"), run(t.path, "output.weight"))); + CHECK(!same_planes(run(t.path, "output.k4.weight"), run(e.path, "output.k4.weight"))); +} + TEST(gptq_through_lapack_matches_the_loops) { /* Where OpenBLAS was found the factorisations go through LAPACK; RAD_LQ_LAPACK=0 takes the * single-threaded loops, the reference. The same Gram in two directories (the factor cache is diff --git a/tests/runtime_test.cpp b/tests/runtime_test.cpp index 12746401..bafd2368 100644 --- a/tests/runtime_test.cpp +++ b/tests/runtime_test.cpp @@ -746,6 +746,42 @@ TEST(route_report_is_asynchronous_and_drains_oldest_first) { CHECK_EQ(f.ctx.route_report(99, &r), RAD_E_INVAL); } +/* The file stager reads a layer's counts through the address the layer's last report named, at + * the layer's next trigger. That holds for a buffer in the arena's fixed region or outside the + * arena. A transient buffer is at another offset at another arena level, and a later transient + * may share its bytes since no declared op reads the counts, so the source declines it and the + * stager reads that layer whole. */ +TEST(the_counts_source_declines_a_transient_buffer) { + Fixture f; + f.P.arena_fixed_bytes = 4096; + f.add_buffer("x", RAD_BF16, 64, 4, 0); + CHECK_OK(f.start()); + char* const base = (char*)f.ctx.arena_base(); + REQUIRE(base != nullptr); + int64_t n = -1; + CHECK(f.ctx.route_counts_device(0, &n) == nullptr); /* nothing reported yet */ + CHECK_EQ(n, (int64_t)0); + + RadRouting r{}; + r.n_expert = 4; + r.top_k = 2; + r.expert_count = (const int32_t*)(base + 256); /* the fixed region */ + CHECK_OK(f.step(1, 0, [&](Ctx& c) { CHECK_OK(c.route_report(0, &r)); })); + CHECK(f.ctx.route_counts_device(0, &n) == r.expert_count); + CHECK_EQ(n, (int64_t)4); + + r.expert_count = (const int32_t*)(base + 4096 + 512); /* a transient */ + CHECK_OK(f.step(1, 1, [&](Ctx& c) { CHECK_OK(c.route_report(1, &r)); })); + CHECK(f.ctx.route_counts_device(1, &n) == nullptr); + CHECK_EQ(n, (int64_t)0); + + static const int32_t outside[4] = { 1, 2, 3, 4 }; /* not the arena's */ + r.expert_count = outside; + CHECK_OK(f.step(1, 2, [&](Ctx& c) { CHECK_OK(c.route_report(1, &r)); })); + CHECK(f.ctx.route_counts_device(1, &n) == outside); + CHECK_OK(rad_stream_sync(f.ctx.stream())); +} + /* A step that drafts reports the same layer once per pass, all into the step's one bank. The drain * runs before every pass, so it must not take that bank until the step is over; taken early, it * would cover only the passes so far and miss the rest. */ @@ -2373,12 +2409,14 @@ TEST(legacy_prefill_keying_only_fails_closed_for_dynamic_split_rows) { CHECK_EQ(f.ctx.pass_key(&b), (uint64_t)0); b.phase = RAD_PHASE_MIXED; CHECK_EQ(f.ctx.pass_key(&b), (uint64_t)0); + /* Decode, verify and draft passes stay recordable: their launches read the keyed + * context bound, not the live maximum (issue_passes_only_proven_kv_host_summaries). */ b.phase = RAD_PHASE_DECODE; b.n_spec = 1; - CHECK_EQ(f.ctx.pass_key(&b), (uint64_t)0); + CHECK(f.ctx.pass_key(&b) != 0); b.n_spec = 0; b.draft_pass = -1; - CHECK_EQ(f.ctx.pass_key(&b), (uint64_t)0); + CHECK(f.ctx.pass_key(&b) != 0); b.draft_pass = 0; - CHECK(f.ctx.pass_key(&b) != 0); // Ordinary decode remains recordable. + CHECK(f.ctx.pass_key(&b) != 0); } } @@ -2427,6 +2465,14 @@ TEST(issue_passes_only_proven_kv_host_summaries) { CHECK_EQ(issue(positions_device + 128, 1, 1, RAD_PHASE_PREFILL, 0), -1); // past step end CHECK_EQ(issue(positions_device + 64, 1, 1, RAD_PHASE_MIXED, 0), -1); CHECK_EQ(issue(positions_device + 64, 1, 1, RAD_PHASE_PREFILL, 1), -1); + /* A plugin with no pass-key callback records its decode passes, so a launch there reads the + * step's context bound plus its longest query, which the key holds, never the live maximum. */ + f.batch.max_ctx_len = 2048; + f.batch.max_q_len = 2; + CHECK_EQ(issue(used_device, 2, 2, RAD_PHASE_DECODE, 1), 2050); + CHECK_EQ(issue(used_device + 1, 1, 2, RAD_PHASE_DECODE, 0), 2050); + CHECK_EQ(issue(used_device, 3, 2, RAD_PHASE_DECODE, 1), -1); // still nothing to bound + CHECK_EQ(issue(used_device, 2, 2, RAD_PHASE_PREFILL, 0), 1152); // prefill keeps the exact one } TEST(the_prefill_geometry_key_reuses_equal_grids_and_separates_changed_grids) { diff --git a/tests/sample_test.cpp b/tests/sample_test.cpp index 6ce05b86..d2c85a6d 100644 --- a/tests/sample_test.cpp +++ b/tests/sample_test.cpp @@ -3560,4 +3560,124 @@ TEST(the_coupled_evidence_survives_the_drafters_greedy_build) { CHECK_EQ(ev.rows, (int64_t)6); } +/* The planes are sized for the rows a step can sample: one per token the step carries, so never + * more than max_tok, and never fewer than max_seqs (a drafter's greedy pass). */ +TEST(the_sampler_rows_are_bounded_by_the_steps_tokens) { + Registry reg; + (void)reg.load_plugin(home() + "/kernels/libref.so", 0); + RadModelMeta meta{}; + meta.arch_id = "sampler_rows"; + meta.name = "sampler_rows"; + RadBuildCtx bc{}; + bc.max_seqs = 4; + bc.max_tok = 8; + bc.max_ctx = 64; + bc.max_spec = 7; + bc.scope = ""; + Builder b(reg, meta, bc); + Sampler s; + SamplerConfig cfg; + cfg.n_vocab = 16; + cfg.n_vocab_local = 16; + cfg.max_seqs = 4; + cfg.max_spec = 7; + cfg.max_tok = 8; + cfg.max_hist = 16; + cfg.max_candidates = 8; + CHECK_OK(s.declare(&b, cfg)); + const int32_t d[7] = { 1, 2, 3, 4, 5, 6, 7 }; + Request r = make_req(1, { 1 }, greedy_params()); + r.n_draft = 7; + r.draft = d; + CHECK_OK(s.build_step({ &r })); + Request q = make_req(2, { 1 }, greedy_params()); + CHECK_EQ(s.build_step({ &r, &q }), RAD_E_FULL); + CHECK_OK(s.build_greedy(4)); + + /* A token bound below the sequences: a greedy pass still fits every sequence. */ + Builder b2(reg, meta, bc); + Sampler t; + cfg.max_tok = 2; + CHECK_OK(t.declare(&b2, cfg)); + CHECK_OK(t.build_greedy(4)); + CHECK_EQ(t.build_greedy(5), RAD_E_FULL); +} + +/* A DRAFT PASS'S BUILD LEAVES THE STEP'S STAGING TO ITS UPLOAD. + * + * issue_serial_drafter and block_pass build their greedy passes right after the step's chain was + * issued, and on a card that chain's uploads read the pinned staging only when the stream reaches + * them, behind the step's forward pass. build_greedy zeroed the n-gram pairs there, so on a server + * with a drafter a banning request uploaded n = 0 and was never banned on the card. Host-site ops + * join their stream before they run, so the race itself cannot show on the host backend; the + * pairs are checked instead, and the ban still runs in the step after the greedy build. */ +TEST(a_drafters_greedy_build_leaves_the_steps_ngram_pairs_to_its_upload) { + HostChain ch(16, 2, 0); + NEED_CHAIN(ch) + SamplingParams sp = greedy_params(); + sp.ngram_ban_n = 2; + sp.ngram_window = 8; + /* 4 followed 3 once, so after the last 3 the ban removes 4 and 5 is the argmax. */ + std::vector lg(16, 0.0f); + lg[4] = 2.0f; + lg[5] = 1.0f; + Request a = make_req(1, { 3, 4, 3 }, sp); + std::vector tok; + CHECK_OK(ch.step({ &a }, lg, &tok)); + CHECK_EQ(tok[0], 5); + CHECK_EQ(ch.s.staged_ngram(0)[0], 2); + CHECK_EQ(ch.s.staged_ngram(0)[1], 8); + + CHECK_OK(ch.s.build_greedy(2)); + CHECK_EQ(ch.s.staged_ngram(0)[0], 2); + CHECK_EQ(ch.s.staged_ngram(0)[1], 8); + + Request b = make_req(2, { 3, 4, 3 }, sp); + CHECK_OK(ch.step({ &b }, lg, &tok)); + CHECK_EQ(tok[0], 5); +} + +/* A top-1 row keeps its one candidate through every cut, so a step of top-1 rows issues none: a + * greedy row asking for logprobs (a top-1 chain row, as every greedy row is under a split + * vocabulary) with top-p, min-p, typical and XTC set samples its argmax and its logprob without + * them. A row with more than one candidate issues all four. Every row of a drafter's greedy pass + * is top-1 too, with those fields at 0; under a split vocabulary it issued top-p and typical, a + * max and a sum over the candidate width a row, every round. */ +TEST(a_top1_row_issues_no_candidate_cut) { + HostChain ch(32, 2, 0); + NEED_CHAIN(ch) + auto issued = [&](const char* name) { + ch.ctx.flush_issued(); + for (const OpInfo& o : ch.prog.ops) + if (o.op == name && o.issued) return true; + return false; + }; + static const char* const kCuts[] = { "sample_topp", "sample_minp", "sample_typical", + "sample_xtc" }; + SamplingParams g = greedy_params(); + g.n_probs = 1; + g.top_p = 0.5f; + g.min_p = 0.1f; + g.typical_p = 0.5f; + g.xtc_probability = 1.0f; + g.xtc_threshold = 0.01f; + std::vector lg(32); + for (int t = 0; t < 32; ++t) lg[(size_t)t] = 0.1f * (float)t; + Request a = make_req(1, { 1 }, g); + std::vector tok; + CHECK_OK(ch.step({ &a }, lg, &tok)); + CHECK_EQ(tok[0], 31); + TokenLogprobs lp; + CHECK_OK(ch.s.logprobs_for(0, tok[0], &lp)); + CHECK_NEAR(lp.logprob, lg[31] - log_sum_exp(lg), 1e-5); + for (const char* op : kCuts) CHECK(!issued(op)); + + SamplingParams two = g; + two.temp = 1.0f; + two.top_k = 2; + Request b = make_req(2, { 1 }, two); + CHECK_OK(ch.step({ &b }, lg, &tok)); + for (const char* op : kCuts) CHECK(issued(op)); +} + RAD_TEST_MAIN() \ No newline at end of file diff --git a/tests/stream_test.cpp b/tests/stream_test.cpp index ea20ce3f..b3810d7e 100644 --- a/tests/stream_test.cpp +++ b/tests/stream_test.cpp @@ -9,7 +9,9 @@ * a time, and the assembly must equal the buffered body built by the same server. */ #include "server_fakes.h" +#include "work_counter.h" +#include #include namespace { @@ -558,12 +560,12 @@ Text text_streamed(const std::string& path, const std::string& body) { } /* namespace */ -/* What the server holds back while a reply runs (the longest stop string less a byte, an unfinished - * character, a half-written escape) and releases at the end: for every split into two drains and - * one byte a drain, the streamed text of chat, completions and llama-server's native completion is - * the buffered text, and the finish agrees. A stop string's bytes never reach the wire, or the - * concatenation would hold them. On chat a reply that starts inside its reasoning block applies - * its stop strings only after the closer. */ +/* What the server holds back while a reply runs (a tail that may still become a stop string, an + * unfinished character, a half-written escape) and releases at the end: for every split into two + * drains and one byte a drain, the streamed text of chat, completions and llama-server's native + * completion is the buffered text, and the finish agrees. A stop string's bytes never reach the + * wire, or the concatenation would hold them. On chat a reply that starts inside its reasoning + * block applies its stop strings only after the closer. */ TEST(a_streamed_text_is_the_buffered_text_at_every_drain_boundary) { struct Case { const char* name; @@ -578,6 +580,8 @@ TEST(a_streamed_text_is_the_buffered_text_at_every_drain_boundary) { { "characters around a stop", "\xC3\xA9STOP\xC3\xA9", "STOP", false }, { "escapes", "q\\u12\\\\\"x\\", "", false }, { "a stop longer than the reply's tail", "abcZZ", "ZZZ", false }, + { "a tail that stops being a stop's start", "abSTxSTOPy", "STOP", false }, + { "a stop's start that starts it again", "xSTASTARy", "STAR", false }, }; for (const char* path : { "/v1/chat/completions", "/v1/completions", "/completion" }) { for (const Case& c : cases) { @@ -608,6 +612,147 @@ TEST(a_streamed_text_is_the_buffered_text_at_every_drain_boundary) { } } +/* A running choice holds back only a tail that may still become a stop string: what precedes it is + * on the wire after the drain that produced it, on chat, completions and llama-server's native + * completion. The hold-back this replaced kept the longest stop string less a byte off the wire + * whatever the tail was, so with a ten-byte stop every delta trailed by nine bytes and a short + * reply showed nothing before its end. */ +TEST(a_running_choice_holds_back_only_what_may_still_become_a_stop_string) { + struct Step { + const char* piece; /* the drain's new bytes */ + const char* wire; /* everything on the wire after it */ + }; + const Step steps[] = { + { "Hello", "Hello" }, + { " ENDOF", "Hello " }, /* "ENDOF" may still become "ENDOFREPLY" */ + { "X\n", "Hello ENDOFX" }, /* it cannot now, but "\n" may become "\n\n" */ + { "ENDO", "Hello ENDOFX\n" }, /* "\nE" cannot, "ENDO" may become "ENDOFREPLY" */ + { "FREPLY tail", "Hello ENDOFX\n" }, /* the stop is cut, and nothing of it went out */ + }; + for (const char* path : { "/v1/chat/completions", "/v1/completions", "/completion" }) { + Fixture f; + const std::string stop = R"(,"stop":["ENDOFREPLY","\n\n"],"stream":true})"; + const std::string body = std::string(path) == "/v1/chat/completions" + ? R"({"messages":[{"role":"user","content":"hi"}],"max_tokens":1000)" + stop + : R"({"prompt":"hi","max_tokens":1000)" + stop; + f.sched.manual = true; + HttpResponse r = f.post(path, body); + f.sched.manual = false; + REQUIRE(r.status == 200); + REQUIRE(r.streaming()); + const size_t i = f.sched.seen.size() - 1; + std::string out, c; + r.next(c); + out += c; + for (const Step& s : steps) { + f.sched.push(i, s.piece); + c.clear(); + r.next(c); + out += c; + const Text got = text_streamed(path, out); + if (got.text == s.wire) continue; + CHECK_EQ(got.text, std::string(s.wire)); + fprintf(stderr, " %s, after \"%s\"\n", path, s.piece); + } + f.sched.finish(i, Finish::Stop); + for (int k = 0; k < 64; ++k) { + c.clear(); + const bool more = r.next(c); + out += c; + if (!more) break; + } + r.on_close(true); + const Text all = text_streamed(path, out); + CHECK_EQ(all.text, std::string("Hello ENDOFX\n")); + CHECK_EQ(all.finish, std::string(std::string(path) == "/completion" ? "word" : "stop")); + } +} + +namespace { + +/* The work of 24 drains of a streamed completion, in radtest::Work's unit, each after a short + * piece of text, once the text is longer than any stop string: what each drain holds back is then + * looked for in as many tails as the longest stop string is long. 20 pieces of 300 bytes, each + * the next byte of `fill`, come first. Also checks the text arrives. */ +uint64_t drains_work(const std::string& stops, const std::string& fill = "the quick brown ") { + Fixture f; + f.sched.manual = true; + HttpResponse r = f.post("/v1/completions", R"({"prompt":"hi","max_tokens":100000,"stream":true,)" + R"("stop":)" + stops + "}"); + f.sched.manual = false; + CHECK_EQ(r.status, 200); + CHECK(r.streaming()); + if (r.status != 200 || !r.streaming()) return 0; + const size_t i = f.sched.seen.size() - 1; + std::string out, c; + r.next(c); + out += c; + std::string sent; + for (int k = 0; k < 20; ++k) { + const std::string part(300, fill[(size_t)k % fill.size()]); + sent += part; + f.sched.push(i, part); + c.clear(); + r.next(c); + out += c; + } + uint64_t w = 0; + for (int k = 0; k < 24; ++k) { + const std::string piece = "word " + std::to_string(k) + ", "; + sent += piece; + f.sched.push(i, piece); + c.clear(); + w += radtest::work().of([&] { r.next(c); }); + out += c; + } + f.sched.finish(i, Finish::Stop); + for (int k = 0; k < 64; ++k) { + c.clear(); + const bool more = r.next(c); + out += c; + if (!more) break; + } + r.on_close(true); + CHECK_EQ(text_streamed("/v1/completions", out).text, sent); + return w; +} + +} /* namespace */ + +/* A request may send 64 stop strings of 4 KiB, and a running choice's hold-back looks at the tails + * of what it has not sent, up to the longest stop string, on each drain. A tail is compared only + * where it starts with a byte some stop string starts with, so stop strings the text cannot start + * cost a drain a lookup per tail: such a drain costs about as much as one with a single two-byte + * stop. Comparing every tail with every stop string, 262 080 calls a drain, cost three hundred + * times. */ +TEST(a_drain_looks_for_long_stop_strings_only_where_they_can_start) { + json many = json::array(); + for (int k = 0; k < 64; ++k) many.push_back("~" + std::string(4095, (char)('a' + k % 26))); + const uint64_t one = drains_work(R"(["~~"])"), all = drains_work(many.dump()); + std::fprintf(stderr, " one stop %llu, 64 of 4 KiB %llu %s, ratio %.2f\n", + (unsigned long long)one, (unsigned long long)all, radtest::work().unit(), + (double)all / (double)one); + CHECK((double)all / (double)one < (radtest::work().exact() ? 20.0 : 40.0)); +} + +/* The client sets the stop strings and steers the text: 64 stop strings of 4 KiB that all begin + * with 4093 'a', and a reply that is thousands of 'a' and then something else, matches them for + * as long as there are 'a' and then no more, at every one of the 4095 tails of every one of the + * 64 strings, which is 500 million bytes compared on a drain with no bound. The comparisons share + * a budget past which a drain holds back all it has not sent, so the cost of a drain is bounded + * whatever the text. */ +TEST(a_drain_that_almost_matches_long_stop_strings_costs_a_bounded_amount) { + json many = json::array(); + for (int k = 0; k < 64; ++k) + many.push_back(std::string(4093, 'a') + (char)('0' + k / 8) + (char)('0' + k % 8)); + const uint64_t one = drains_work(R"(["~~"])"); + const uint64_t all = drains_work(many.dump(), "aaaaaaaaaaaaaaaaaaax"); + std::fprintf(stderr, " one stop %llu, 64 of 4 KiB almost matched %llu %s, ratio %.2f\n", + (unsigned long long)one, (unsigned long long)all, radtest::work().unit(), + (double)all / (double)one); + CHECK((double)all / (double)one < (radtest::work().exact() ? 40.0 : 80.0)); +} + /* ================================================================== Anthropic's stop reasons */ /* Anthropic's stop_reason and stop_sequence say why a reply ended, buffered and streamed alike: a diff --git a/tests/trigger_test.cpp b/tests/trigger_test.cpp index 82c84f65..88d2144b 100644 --- a/tests/trigger_test.cpp +++ b/tests/trigger_test.cpp @@ -416,13 +416,20 @@ void wait_windows(GbnfGrammar& g, const Vocab& vb, int n) { /* Waiting costs the same at any length. A lazy grammar sees every token of the reply until its * word appears, and each speculative window copies its state twice; the last tokens of a long * reply must cost what the first did. Counted in work, 20,000 windows at the start and again after - * 200,000 more. */ + * 200,000 more, each the least of three runs: under the CPU-time fallback (a container build, tests + * beside it) one run alone came out 1.65x the other. */ TEST(lazy_grammar_waiting_work_does_not_grow_with_the_reply) { Vocab vb; auto g = make(vb, true, { "\n" }, {}); - const uint64_t first = radtest::work().of([&] { wait_windows(*g, vb, 20000); }); + auto least = [&] { + uint64_t m = UINT64_MAX; + for (int k = 0; k < 3; ++k) + m = std::min(m, radtest::work().of([&] { wait_windows(*g, vb, 20000); })); + return m; + }; + const uint64_t first = least(); wait_windows(*g, vb, 200000); - const uint64_t last = radtest::work().of([&] { wait_windows(*g, vb, 20000); }); + const uint64_t last = least(); CHECK(g->awaiting_trigger()); std::printf(" lazy wait: %llu then %llu %s per 20k windows\n", (unsigned long long)first, (unsigned long long)last, radtest::work().unit()); diff --git a/tests/videos_test.cpp b/tests/videos_test.cpp index 6083870f..930fba2a 100644 --- a/tests/videos_test.cpp +++ b/tests/videos_test.cpp @@ -1144,7 +1144,7 @@ TEST(input_reference_takes_the_models_h264_round_trip) { guided(v, 18); const std::string pic = png_rgb(301, 171, 200, 40, 90); HttpResponse r = v.create(Videos::body({ { "input_reference", png_url(pic) } })); - if (r.status == 503) return; /* a build without libx264 refuses it, as it should */ + if (r.status == 501) return; /* a build without an H.264 encoder refuses it, as it should */ REQUIRE_EQ(r.status, 200); const gen::VideoRequest& q = v.gen.last(); REQUIRE_EQ(q.image.size(), (size_t)256 * 256 * 3); diff --git a/tools/vhead.py b/tools/vhead.py new file mode 100644 index 00000000..4a51b23d --- /dev/null +++ b/tools/vhead.py @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 +"""vhead.py -- a vocabulary-weighted lm_head checkpoint, as the IQR-V4 recipes convert it. + + vhead.py SRC DST CLASSES + +SRC is a Hugging Face checkpoint directory (Qwen/Qwen3.8-27B), CLASSES a width-class file from +data/vhead/ (q38-27b-vhead-4.0.cls, -4.5, -5.0: the head's mean code width). DST becomes SRC with +lm_head.weight replaced by its width classes; every other file of SRC is linked, not copied. Pass DST +to rad-convert in place of SRC. + +A vocabulary-weighted head stores each vocabulary row on one of four trellis widths, the tokens that +carry the most probability on the widest. The classes were chosen per 256-row run to minimise each +row's output error weighted by its token's mean probability on calibration text, at the file's mean +width; every TP2 rank's half of the vocabulary holds the same number of rows of each class, so the +class tensors shard by rows with the vocabulary. DST/vhead.safetensors holds, for each width B: + + lm_head.kB.weight [rows, n_embd] bf16 the class's rows of lm_head.weight + lm_head.kB.ids [rows, 1] i32 each row's vocabulary id + +rows in ascending id within each half of the vocabulary, and lm_head.vrow [n_vocab, 1] i32: an id's +width in the top four bits and its row in the class tensor below. rad-convert names the classes +output.kB; a recipe quantises each on its own width, and GPTQ reads the head's input Hessian for all +of them (libquant pools output.kB to output). + +CLASSES: one ASCII line `radiance-vhead-1 n_vocab=V widths=a,b,c,d`, then V/4 bytes, an id's class +(the index of its width in `widths`) two bits each, id 4i in the low bits of byte i. + +bf16 is moved as raw u16 (no arithmetic happens here), so numpy alone suffices. +""" +import json +import os +import struct +import sys + +import numpy as np + + +def st_header(path): + with open(path, "rb") as f: + n = struct.unpack("> (2 * j)) & 3 for j in range(4)], 1).reshape(-1)[:V] + return cls.astype(np.int64), widths + + +def main(): + if len(sys.argv) != 4: + raise SystemExit(__doc__.split("\n\n")[1]) + src, dst, cpath = sys.argv[1:4] + cls, widths = read_classes(cpath) + idx = json.load(open(os.path.join(src, "model.safetensors.index.json"))) + W, dt = st_tensor(os.path.join(src, idx["weight_map"]["lm_head.weight"]), "lm_head.weight") + V = W.shape[0] + if cls.size != V or V % 2: + raise SystemExit(f"vhead.py: the class file covers {cls.size} ids, the head has {V} rows") + half = V // 2 + ids = np.arange(V, dtype=np.int64) + vrow = np.full((V, 1), -1, dtype=np.int32) + out_ids, out_w = [], [] + for i, k in enumerate(widths): + rows = np.concatenate([ids[:half][cls[:half] == i], ids[half:][cls[half:] == i]]) + vrow[rows, 0] = (k << 28) | np.arange(rows.size, dtype=np.int32) + out_ids.append((f"lm_head.k{k}.ids", rows.astype(np.int32)[:, None], "I32")) + out_w.append((f"lm_head.k{k}.weight", W[rows], dt)) + assert (vrow >= 0).all() + os.makedirs(dst, exist_ok=True) + st_write(os.path.join(dst, "vhead.safetensors"), out_ids + [("lm_head.vrow", vrow, "I32")] + out_w) + wm = dict(idx["weight_map"]) + del wm["lm_head.weight"] + for name, _, _ in out_ids + out_w + [("lm_head.vrow", None, None)]: + wm[name] = "vhead.safetensors" + with open(os.path.join(dst, "model.safetensors.index.json"), "w") as f: + json.dump({"metadata": idx.get("metadata", {}), "weight_map": wm}, f) + # every other file of SRC, and every shard (lm_head's own shard still holds other tensors) + keep = set(idx["weight_map"].values()) + for f in os.listdir(src): + if f == "model.safetensors.index.json" or (f.endswith(".safetensors") and f not in keep): + continue + if not os.path.lexists(os.path.join(dst, f)): + os.symlink(os.path.abspath(os.path.join(src, f)), os.path.join(dst, f)) + print(f"vhead.py: {dst}: " + " ".join(f"k{k}:{int((cls == i).sum())}" for i, k in enumerate(widths)) + + f", mean {sum(widths[i] * int((cls == i).sum()) for i in range(len(widths))) / V:.3f} b") + + +if __name__ == "__main__": + main()