Kyojin: open-source engine that runs 100 GB-class open models (GLM-5.3, Qwen3.8, DeepSeek V4.1) on one desktop machine. AMD Strix Halo, NVIDIA RTX and Apple Mac. OpenAI API, built on ExLlamaV3.
Python amdapple-siliconcudadeepseekexl3exllamav3glminferencellmllm-inferencelocal-llmnvidiaopenai-apiquantizationqwenrocmstrix-halo
Comments: plain wording in the draft head and sampled-draft notes
YanissAmzb2171d1581e4
diff --git a/exllamav3/modules/draft2s.py b/exllamav3/modules/draft2s.pyindex 88623d1..3be115b 100644--- a/exllamav3/modules/draft2s.py+++ b/exllamav3/modules/draft2s.py@@ -11,9 +11,9 @@ A draft step needs one argmax and one max probability over the whole vocabulary.argmax = best exact logit among the 16; p = 1 / sum over candidates exp(v - max), v = exact logit for the 16, the3-bit score for the others (rows outside the candidates are left out: they hold a median 0.0000 / 90th pct 0.0011 ofthe normaliser on held-out Qwen draft steps, and dropping them changes the replayed served rule by <= 0.12 point).-The target verifies every draft, so this head cannot change the text, only how many drafts are accepted (box1 NOTEBOOK-Results 3-7: argmax = full head on 99.70 % of held-out steps).-All index maths are bounds-checked on the CPU in box1 desk/draft2s_head_bounds.py (masked loads, clamped rows)."""+The target verifies every draft, so this head cannot change the text, only how many drafts are accepted (measured:+argmax = full head on 99.70 % of held-out steps).+All index maths are bounds-checked on the CPU (masked loads, clamped rows)."""import osimport torchimport tritondiff --git a/tools/glm/serve.py b/tools/glm/serve.pyindex 2b8274c..1d7daf5 100644--- a/tools/glm/serve.py+++ b/tools/glm/serve.py@@ -96,7 +96,7 @@ SPEED_ENV = {"EXL3_GEMV_R_RM6": "1",# 14/10: sampled requests (temperature > 0) draw the MTP drafts from the drafter's own law and keep them with the exact# min(1, p / q) rule (exllamav3/generator/spec_sample.py): same output distribution, greedy untouched. One load, T 1 top_p- # 0.95, 15 prompts x 3 seeds: prose +5.2 % decode, chat / code / structured within noise. 0 = argmax drafts.+ # 0.95, 15 prompts x 3 seeds: prose +5.2 % decode, no measured change on chat / code / structured. 0 = argmax drafts."EXL3_SPEC_SAMPLED": "1",}diff --git a/tools/qwen/draft2s_pack.py b/tools/qwen/draft2s_pack.pyindex b1f11e1..015d24d 100644--- a/tools/qwen/draft2s_pack.py+++ b/tools/qwen/draft2s_pack.py@@ -4,7 +4,7 @@# Tier 2 row copy: the head rows after a 128-point input Hadamard per group, 3 bits per weight, one fp16 scale per (row,# group): row-addressable, unlike the EXL3 head (its output Hadamard mixes 128 rows).# Tier 3 is the EXL3 head itself (exact logits of the short-listed 128-row blocks): nothing to pack.-# Maths = box1 desk/composed_check.py and night1 qw0/head_sim3.py (recall 0.9958 at m = 512 on held-out steps).+# Maths checked offline (recall 0.9958 at m = 512 on held-out steps).# usage: draft2s_pack.py W.npy HDIR OUT.safetensors (W.npy = the dequantized head (in_features, vocab); HDIR = rec.json +# h_*.npy of a capture; only the "train" split is used for the fit)import os, sys, json@@ -14,7 +14,7 @@ import torchfrom safetensors.torch import save_fileAXES, GROUP = int(os.environ.get("DRAFT2S_AXES", 512)), 128-M = int(os.environ.get("DRAFT2S_M", 512)) # tier-1 target count; GLM 4096-wide head: 1024 (box1 NOTEBOOK Result 11)+M = int(os.environ.get("DRAFT2S_M", 512)) # tier-1 target count; GLM 4096-wide head: 1024 (measured)def hadamard(n):h = np.array([[1.0]], dtype=np.float32)