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.

Hy4 server: prefill timing uses one clock

YanissAmzc50a1d716d9b
diff --git a/tools/hy4/engine.py b/tools/hy4/engine.py
index 0d157a3..3a54419 100644
--- a/tools/hy4/engine.py
+++ b/tools/hy4/engine.py
@@ -125,11 +125,11 @@ class Hy4Engine:
y = int(torch.argmax(lg))
H = torch.cat(states) if len(states) > 1 else states[0]
hcur = H[-1:].clone()
- t = time.time()
+ t = time.perf_counter()
self.last_stats["prefill_trunk_s"] = t - self._t0
self._prime_draft(ids, H)
torch.cuda.synchronize()
- self.last_stats["prime_s"] = time.time() - t
+ self.last_stats["prime_s"] = time.perf_counter() - t
return y, hcur
def _prime_draft(self, ids: list[int], H):