Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

Merge f-dsv41-port into f-dsv41-rel (release integration)

Niko1221c70ae83d4ce1
diff --cc src/dsv41/ds4_iq.cu
index ed251059d,93c1ef26c..404f525a1
--- a/src/dsv41/ds4_iq.cu
+++ b/src/dsv41/ds4_iq.cu
@@@ -35,10 -34,10 +35,10 @@@ template <> struct Ty<kIQ3_XXS> { stati
template <> struct Ty<kIQ3_S> { static constexpr int B = 110, TAB = 512, MIN = 0; };
template <> struct Ty<kIQ4_XS> { static constexpr int B = 136, TAB = 4, MIN = 0; };
template <> struct Ty<kQ4_K> { static constexpr int B = 144, TAB = 0, MIN = 1; };
- // The types with a known layout and no device kernel (the CPU lane's ggml dots take them): their row bytes are needed to
- // lay a pack out, nothing else. Ty<> gives the block; the kernels are never instantiated for them.
+ // The 1.5- and 1.75-bit types (IQ1_S, IQ1_M: an 11-bit index into iq1s_grid_gpu, whose 8 values are 4-bit codes) and
+ // IQ4_NL (32 values a block: its codebook's 16 int8 values are the first 4 words of its table)
template <> struct Ty<kIQ1_S> { static constexpr int B = 50, TAB = 2048, MIN = 0; };
-template <> struct Ty<kIQ1_M> { static constexpr int B = 56, TAB = 2048, MIN = 0; };
+template <> struct Ty<kIQ1_M> { static constexpr int B = 56, TAB = 2048, MIN = 0; }; // (the device kernels: ggml's iq1s_grid_gpu, a u32 of eight 4-bit grid+1 values)
template <> struct Ty<kIQ4_NL> { static constexpr int B = 18, TAB = 16, MIN = 0; };
template <> struct Ty<kQ2_K> { static constexpr int B = 84, TAB = 0, MIN = 1; };
template <> struct Ty<kQ3_K> { static constexpr int B = 110, TAB = 0, MIN = 0; };
diff --cc tools/dsv41/pack_gguf.py
index 3d39d4346,d6d78b21a..54e9d7ed6
--- a/tools/dsv41/pack_gguf.py
+++ b/tools/dsv41/pack_gguf.py
@@@ -483,7 -452,10 +497,10 @@@ def main() -> int
for il in kv.get("%s.engram.layers" % arch, []):
for part in ("engram_embd", "engram_kv", "engram_gate"):
nm = "blk.%d.%s.weight" % (il, part)
- if not has_part(il, part, have) and not any(t[0] == nm for g in eg_from.values() for t in g.tensors):
+ # a dense override names tensors the way the pack does, not the way the GGUF does
+ eng_nm = "layers.%d.%s" % (il, LAYER[part + ".weight"])
- if (nm not in have and eng_nm not in ov_names
++ if (not has_part(il, part, have) and eng_nm not in ov_names
+ and not any(t[0] == nm for g in eg_from.values() for t in g.tensors)):
raise SystemExit("%s: missing - not in the quant's shards nor in an Engram set (--engram, or "
"<model>/../Engram/: unsloth's UD-Q8_K_XL shard of the Engram tables)" % nm)
rel = lambda p: os.path.relpath(p, model).replace(os.sep, "/") # noqa: E731