From 3939193dd305fd69cf76a6469a1da5a40b2b2e04 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Tue, 27 Oct 2026 22:22:57 +0100 Subject: [PATCH] mac: the setup test question keeps the engine's own prompt window (a 16-token window gave a wrong first word on Metal) --- tools/dsv41/smoke.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/dsv41/smoke.py b/tools/dsv41/smoke.py index 7a2b94e9..9a0dcc90 100644 --- a/tools/dsv41/smoke.py +++ b/tools/dsv41/smoke.py @@ -77,8 +77,12 @@ def main() -> int: with tempfile.TemporaryDirectory() as d: f = Path(d) / "ids.txt" f.write_text(",".join(str(i) for i in ids), encoding="ascii") - cmd = [a.exe, "--pack", str(pack), "--ids", "@" + str(f), "--n", str(a.tokens), "--max-context", "1024", "--dspark", "none" if sys.platform == "darwin" else "auto", - "--window", "16"] # (a Mac runs without the drafter: its Metal engine has no kernels for it) + mac = sys.platform == "darwin" + cmd = [a.exe, "--pack", str(pack), "--ids", "@" + str(f), "--n", str(a.tokens), "--max-context", "1024", "--dspark", "none" if mac else "auto"] + # (a Mac runs without the drafter: its Metal engine has no kernels for it, and it keeps the engine's own prompt window: with a window of + # 16 or 17 tokens the Metal engine gave a wrong first word in about half the runs; the engine's default window never did) + if not mac: + cmd += ["--window", "16"] if a.gpus: cmd += ["--gpus", a.gpus] try: