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
Embedding: long-chunk pinned upload default on for every backend (neutral on ROCm and dense, tokens identical)
YanissAmza8c3b9e2da65
diff --git a/exllamav3/modules/embedding.py b/exllamav3/modules/embedding.pyindex ecbf4cf..e893ee2 100644--- a/exllamav3/modules/embedding.py+++ b/exllamav3/modules/embedding.py@@ -181,12 +181,12 @@ class Embedding(Module):x = bufreturn x- # EXL3_PF_EMB_UPLOAD (default on for CUDA, off for ROCm where it measured neutral; =0 turns it off): a long chunk (>= 1024 rows) of a CPU-resident embedding is gathered straight into a pinned buffer in the+ # EXL3_PF_EMB_UPLOAD (default on everywhere: +7 % 3090 MoE prefill at 32K, neutral on ROCm and dense, tokens identical; =0 turns it off): a long chunk (>= 1024 rows) of a CPU-resident embedding is gathered straight into a pinned buffer in the# table's own 16-bit dtype and uploaded asynchronously; the widening to out_dtype (exact, fp16/bf16 -> fp32) happens on the device# in Module.prepare_for_device (finish_narrow). The default path gathers, widens on the host and copies 4 bytes per element from# pageable memory (94 MB per 4583-row chunk: ~25 ms with the GPU idle, 3.8 GB/s). Same values bit for bit.def _narrow_upload_ok(self, ids: torch.Tensor, params: dict) -> bool:- if os.environ.get("EXL3_PF_EMB_UPLOAD", "0" if torch.version.hip else "1") != "1" or ids.device.type != "cpu" or self.normalize or params.get("pinned_staging"):+ if os.environ.get("EXL3_PF_EMB_UPLOAD", "1") != "1" or ids.device.type != "cpu" or self.normalize or params.get("pinned_staging"):return Falsew = self.embedding.weightreturn w.device.type == "cpu" and w.dtype in (torch.half, torch.bfloat16) and ids.numel() >= 1024 and torch.cuda.is_available()