Skip to content

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.

Raise HC one-pass ticket capacity to 65536 rows so 8192-row prefill chunks keep the fused mHC paths

Yaniss3d071812f9a1
diff --git a/exllamav3/exllamav3_ext/hc_mix.cu b/exllamav3/exllamav3_ext/hc_mix.cu
index a2d9f42..2813ba6 100644
--- a/exllamav3/exllamav3_ext/hc_mix.cu
+++ b/exllamav3/exllamav3_ext/hc_mix.cu
@@ -1622,7 +1622,9 @@ 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.
-#define HC_MAX_TICKETS 4096
+// 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 %).
+#define HC_MAX_TICKETS 65536
#define HC_DEC_ROWS 64
static int g_hc_onepass = -1;
static bool hc_onepass(int R)
diff --git a/exllamav3/modules/hyperconnections.py b/exllamav3/modules/hyperconnections.py
index 1dd7325..d83b910 100644
--- a/exllamav3/modules/hyperconnections.py
+++ b/exllamav3/modules/hyperconnections.py
@@ -329,7 +329,7 @@ class HyperConnection(Module):
if post is None or comb is None: # GatedResidual-style sites (Qwen) carry no post/comb
return False
b, s, H, D = x.shape
- return (b * s > 256 and b * s <= 4096 and H == 4 and D % 4 == 0
+ return (b * s > 256 and b * s <= 65536 and H == 4 and D % 4 == 0
and x.dtype == torch.float and x.is_contiguous()
and y.dtype in (torch.float, torch.half) and y.is_contiguous() and y.numel() == b * s * D
and post.dtype == torch.float and post.is_contiguous()
@@ -362,7 +362,7 @@ class HyperConnection(Module):
and D <= 8192 and streams.is_contiguous() and _hc_mix_supported(streams.device)):
return None
R = b * s
- if R <= 256 or R > 4096:
+ if R <= 256 or R > 65536: # = HC_MAX_TICKETS (hc_mix.cu)
return None
if ext.hc_mix_num_chunks(R, H * D) != 1:
return None