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
Qwen server: say what was measured about output equality with several sessions
YanissAmzc8272b9ac6aa
diff --git a/tools/qwen/SERVE.md b/tools/qwen/SERVE.mdindex d8f7b42..716ff6e 100644--- a/tools/qwen/SERVE.md+++ b/tools/qwen/SERVE.md@@ -105,8 +105,12 @@ Measured with `--ndt 3`, `-c 262144`, temperature 0, two short prompts sent toge| 2 | 0 | yes | 1.17 s | 49.6 || 4 | 8 | no (2 of 4 differ) | 2.19 s | 51.4 |-The server prints a warning when the output can differ from a solo run: past 8 verify rows (`N x (ndt + 1)`), or with-N > 1 and the 8-bit cache.+With N > 1, greedy output is not guaranteed equal to a solo run, for either cache width: the decode attention kernel+chooses how it splits the cache from the batch it runs with, so the last bits of the sums, and now and then a near-tie+token, can change. What was measured: the 16-bit cache (`--cache-bits 0`) stayed equal on two short prompts at 2 sessions;+the 8-bit cache did not (rows above). Two short prompts show nothing more than that.++The server prints this warning at start-up whenever N > 1, and a second one past 8 verify rows (`N x (ndt + 1)`).## Testsdiff --git a/tools/qwen/serve.py b/tools/qwen/serve.pyindex 25c39e8..ab9377e 100644--- a/tools/qwen/serve.py+++ b/tools/qwen/serve.py@@ -1698,14 +1698,16 @@ def main() -> None:args = parser.parse_args()if args.sessions < 1:parser.error("--sessions must be at least 1")- # measured with --ndt 3: greedy output equal to a solo run at 2 sessions (8 verify rows) with --cache-bits 0; not at- # 4 sessions (16 rows), and not at 2 sessions with the 8-bit cache+ # measured with --ndt 3: greedy output equal to a solo run on two short prompts at 2 sessions with --cache-bits 0; not at+ # 4 sessions, and not at 2 sessions with the 8-bit cache. Equality at N > 1 is not guaranteed for either cache width:+ # the split layout of the decode attention kernel depends on the batchif args.draft_policy != "off" and args.sessions * (args.ndt + 1) > 8:print(f"qserve: WARNING --sessions {args.sessions} x (--ndt {args.ndt} + 1) = {args.sessions * (args.ndt + 1)} verify rows ""is past 8: greedy output may differ from the same request run alone", flush=True)- if args.sessions > 1 and args.cache_bits:- print(f"qserve: WARNING --sessions {args.sessions} with --cache-bits {args.cache_bits}: greedy output may differ from the "- "same request run alone (--cache-bits 0 keeps it equal at 2 sessions)", flush=True)+ if args.sessions > 1:+ print(f"qserve: WARNING --sessions {args.sessions}: greedy output is not guaranteed equal to the same request run alone, "+ "with either cache width (the 16-bit cache stayed equal on two short prompts; the attention kernel splits its "+ "work by batch)", flush=True)if args.no_uncensor:os.environ["EXL3_ABLIT_RUNTIME"] = "off"