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
Use neutral wording in comments and test defaults
YanissAmz24e8d147dd7d
diff --git a/exllamav3/exllamav3_ext/hc_mix.cu b/exllamav3/exllamav3_ext/hc_mix.cuindex 2813ba6..7e1f8d3 100644--- a/exllamav3/exllamav3_ext/hc_mix.cu+++ b/exllamav3/exllamav3_ext/hc_mix.cu@@ -1623,7 +1623,7 @@ void hc_mix// One-pass hc_mix_norm (r35): per-device row tickets, zeroed at allocation (first eager call,// never under capture); runtime-settable via hc_mix_set_onepass for in-process A/B.// 65536 = the forward row limit (grid.y): 8192-row prefill chunks keep the one-pass and fused site paths-// (box1 run 32 K1: at 4096 tickets an 8191-row chunk fell back to partials + finalize + apply, mHC +65 %).+// (at 4096 tickets an 8191-row chunk fell back to partials + finalize + apply, mHC +65 %).#define HC_MAX_TICKETS 65536#define HC_DEC_ROWS 64static int g_hc_onepass = -1;diff --git a/tests/check_cache_hit_equality.py b/tests/check_cache_hit_equality.pyindex 57ea359..1fb79ea 100644--- a/tests/check_cache_hit_equality.py+++ b/tests/check_cache_hit_equality.py@@ -4,7 +4,7 @@ wt = sys.argv[1]; out = sys.argv[2]LENS = [int(x) for x in sys.argv[3:]] or [5000, 7000]sys.path.insert(0, wt); sys.path.insert(0, wt + "/tools/glm")import torch-MODEL = '/home/yaniss/hermes-work/v14g/run/home/models/GLM-5.3-Flash-EXL3-Yamz'+MODEL = os.environ.get('KYOJIN_GLM_MODEL', 'models/GLM-5.3-Flash-EXL3-Yamz')import servefor _k, _v in serve.SPEED_ENV.items(): os.environ.setdefault(_k, _v) # what serve.py main() doesos.environ.setdefault('EXL3_MOE_UNION_V2', '1'); serve.apply_eh_sidecar_default(MODEL)diff --git a/tools/glm/serve.py b/tools/glm/serve.pyindex d5aa7f0..4a98cdd 100644--- a/tools/glm/serve.py+++ b/tools/glm/serve.py@@ -55,7 +55,7 @@ SPEED_ENV = {"EXL3_BIG_TAIL_DENSE": "1","EXL3_PREFILL_BIG_CHUNK_MAXPOS": "32768", # plain chunks beyond 32K depth, lower peak memory at 512K ctx# 15/10: 8192-row prefill chunks (an 8K prompt = one forward; 4-slot KDA checkpoints keep every tail boundary).- # Box 8K cold window -3.8 %, kamel served 8K 697 / 32K 681 tok/s, logits + restore hashes equal to 4096 chunks.+ # Box 8K cold window -3.8 %, served 8K 697 / 32K 681 tok/s, logits + restore hashes equal to 4096 chunks."EXL3_PREFILL_BIG_CHUNK": "8192","EXL3_NC2_CKPT4": "1",# 27/09: unquantized MTP eh_proj (td205 stores it at 2 bpw, cos 0.79):@@ -89,7 +89,7 @@ SPEED_ENV = {"EXL3_PF_NO_TAIL": "1",# 15/10: a turn that resumes mid-page (tail checkpoint) and adds >= 1024 tokens no longer pays a separate last-page# forward: served tool turn 4.34 -> 3.35 s, 2.58 -> 2.14 s; first-token KLD vs cold within the chunk-size floor- # (box1 Results 70-73). Slot files keep the tail checkpoint (slot_store format 2), so a reload does not replay the gap.+ # Slot files keep the tail checkpoint (slot_store format 2), so a reload does not replay the gap."EXL3_TAIL_MAXGAP": "8192","EXL3_HOST_LEAN": "1","EXL3_HOST_CUTS": "1",@@ -106,16 +106,16 @@ SPEED_ENV = {# 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, no measured change on chat / code / structured. 0 = argmax drafts."EXL3_SPEC_SAMPLED": "1",- # 14/10 (box1 nc2): prefill producers write GEMM-padded rows (KDA o_proj input, mHC norm outputs) and the shared expert is+ # 14/10: prefill producers write GEMM-padded rows (KDA o_proj input, mHC norm outputs) and the shared expert is# added in the routed-MoE reduce epilogue: no pad copies, no separate widen + fp32 add. Bitwise: first-token and restored-- # prompt logits equal on vs off (kamel, 3 x 8K + 1 x 32K, one load, ABBA). 8K prefill +3.7..+6.2 % (these four + the async+ # prompt logits equal on vs off (3 x 8K + 1 x 32K, one load, ABBA). 8K prefill +3.7..+6.2 % (these four + the async# stash, which alone shows no gain and stays off), 32K +0.3 % (shared fuse) / +2.2 % (pads). 0 = off."EXL3_NC2_SHARED_FUSE": "1","EXL3_NC2_KDA_OPAD": "1","EXL3_NC2_HC_YPAD": "1","EXL3_NC2_HC_YPAD_MLP": "1",- # 15/10 (box1 nc2 S1-rest, S3, S1-kda): silu_mul, the MLA unfold and the KDA prefill norm write their GEMM input at the padded- # pitch; attention / MLA o_proj / the ablit projection keep fp16 output where the residual reads it. Bitwise (kamel, one load,+ # 15/10: silu_mul, the MLA unfold and the KDA prefill norm write their GEMM input at the padded+ # pitch; attention / MLA o_proj / the ablit projection keep fp16 output where the residual reads it. Bitwise (one load,# ABBA, on top of the four above: first-token and restored-prompt logits equal, 3 x 8K + 1 x 32K); prefill +0.3 % at 8K (iGPU# heat), +0.8 % at 32K. 0 = off."EXL3_NC2_SILU_PAD": "1",diff --git a/tools/qwen/spec_policy.py b/tools/qwen/spec_policy.pyindex 0905991..d55dac4 100644--- a/tools/qwen/spec_policy.py+++ b/tools/qwen/spec_policy.py@@ -290,7 +290,7 @@ class OnlineRule(CostRule):self.acc_ema = float(accepted) if self.acc_ema is None else (1 - a) * self.acc_ema + a * acceptedif self.pred_ema > 1e-6: self.scale = min(self.hi, max(self.lo, self.acc_ema / self.pred_ema))-# measured plain-batch step ms for 1..8 rows (kamel T52) + 3.1 ms per drafted depth + 2 ms of round overhead: cycle ms for D drafts+# measured plain-batch step ms for 1..8 rows + 3.1 ms per drafted depth + 2 ms of round overhead: cycle ms for D draftsCYCLE_MS = [30.3 + 2.0, 41.6 + 3.1 + 2.0, 50.2 + 6.2 + 2.0, 58.6 + 9.3 + 2.0, 68.8 + 12.4 + 2.0, 75.1 + 15.5 + 2.0, 84.7 + 18.6 + 2.0, 92.9 + 21.7 + 2.0]class TableRule(ProductRule):diff --git a/tools/test_serve_compat.py b/tools/test_serve_compat.pyindex 1d55298..da5bda0 100644--- a/tools/test_serve_compat.py+++ b/tools/test_serve_compat.py@@ -3,7 +3,7 @@The RigMark part runs bench.py (read-only, outside this repo) over real HTTP against qwen/serve.py and glm/serve.py with afake engine that keeps a whole-prompt cache and drops it in reset_prefix_cache(). Model-free, CPU only. It is skipped when-the RigMark source is not at $RIGMARK_SRC (default ~/hermes-work/rigmark/src).+the RigMark source is not at $RIGMARK_SRC."""from __future__ import annotations@@ -21,7 +21,7 @@ HERE = Path(__file__).resolve().parentsys.path.insert(0, str(HERE))import serve_compat-RIGMARK = Path(os.environ.get("RIGMARK_SRC", os.path.expanduser("~/hermes-work/rigmark/src")))+RIGMARK = Path(os.environ.get("RIGMARK_SRC", "/nonexistent"))class HelperTests(unittest.TestCase):