mac: the setup test question keeps the engine's own prompt window (a 16-token window gave a wrong first word on Metal)

This commit is contained in:
Niko1221 committed 2026-10-27 22:22:57 +01:00
1 parent 864afc7421
commit 3939193dd3
1 file changed
+6 -2
+6 -2
View File
@@ -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: