From c2cc1421d66e70b703755d857132e74224121cf6 Mon Sep 17 00:00:00 2001 From: Shogo Okada <33060490+okada-shogo@users.noreply.github.com> Date: Wed, 25 Nov 2026 01:08:44 +0900 Subject: [PATCH] poly: Inkling 2's DSpark drafter takes its matrices in any type the card multiplies The drafter's loader took its layers' matrices only as BF16 or Q8_0, though they go through lin() like the target's. It now takes any type native_mmvq_supported() names, so a drafter file requantized to Q4_0 or IQ4_NL (llama-quantize, keeping markov_w1, joint_proj and dspark_hidden_out in BF16) loads: 455 MiB of drafter weights in VRAM instead of 580 (RTX 2070 Super), 28 more experts in the cache. Q8_0 and BF16 files load as before. The target checks every draft. A smaller drafter changes two things the tokens can follow on an 8 GB card: which drafts are kept (windows of other lengths round near-ties apart, as drafter on vs off already does), and which experts the larger cache computes on the card rather than on the CPU, as any change of the VRAM reserve does. Co-Authored-By: Claude Opus 5.5 --- engine/src/poly/inkling2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/poly/inkling2.cpp b/engine/src/poly/inkling2.cpp index c20d37404..6cb9434a2 100644 --- a/engine/src/poly/inkling2.cpp +++ b/engine/src/poly/inkling2.cpp @@ -371,7 +371,8 @@ void Inkling2::ds_load() { const auto mat = [&](const std::string& name, uint64_t n_in, uint64_t n_out) { const TensorInfo* t = f.find(name); const uint32_t type = t ? t->type : 0; - find(name, type == kTypeBF16 ? kTypeBF16 : 8u, n_in, n_out); // BF16 or Q8_0 + // BF16, or a type the card's products take (lin(): Q8_0 as published, or a smaller quantization of it) + find(name, type == kTypeBF16 || kernels::native_mmvq_supported((int) type) ? type : 8u, n_in, n_out); return Dev{to_dev(t), type, (int) n_in, (int) n_out}; }; const uint64_t E = (uint64_t) n_embd_, hq = (uint64_t) n_head_ * head_dim_, kv = (uint64_t) n_kv_ * head_dim_,