mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 15:58:53 +00:00
[Engine] tools/quant_quality.py: drop --prefill-head-alias from the engine command
The yardstick replaces --short-read with its own value, but kept --prefill-head-alias, which the engine refuses without --short-read 0, so a run config with MTP stopped before READY (#5553). Add the flag to DROP_FLAG and a small unittest for engine_args(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
13eedf5524
commit
dd275381fd
2 files changed
+29
-1
No files matched your search
@@ -42,7 +42,7 @@ FIXED_ENV = {"STRATA_ROUTE_TAIL_SKIP": "0", "STRATA_PREFILL_CPU_SHARE": "0", "ST
|
||||
DROP_VALUE = {"--expert-cache", "--adapt-every", "--pcie-frac", "--suffix-draft", "--prompt-cache", "--max-context",
|
||||
"--prefill", "--prompt-cache-every", "--short-read", "--conversation-cache-mib", "--eos-ids",
|
||||
"--kv", "--kv-resident"} # (--resident-budget-gib stays: a PC whose RAM does not hold the experts)
|
||||
DROP_FLAG = {"--serve", "--vision", "--resident-experts", "--resident-cpu-experts"}
|
||||
DROP_FLAG = {"--serve", "--vision", "--resident-experts", "--resident-cpu-experts", "--prefill-head-alias"}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------------------------ ids
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
"""Tests for the engine command tools/quant_quality.py builds, without starting an engine.
|
||||
|
||||
python -m unittest tools.test_quant_quality_args
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0, str(ROOT / "tools"))
|
||||
import quant_quality as QQ # noqa: E402
|
||||
|
||||
|
||||
class EngineArgs(unittest.TestCase):
|
||||
def test_drops_prefill_head_alias(self):
|
||||
# A run config with MTP carries --prefill-head-alias --short-read 0; the yardstick replaces --short-read,
|
||||
# and the engine refuses --prefill-head-alias without --short-read 0, so it stopped before READY (#5553).
|
||||
cfg = {"exe": "strata", "args": ["--pack", "P", "--prefill-head-alias", "--short-read", "0", "--kv", "int8"]}
|
||||
cmd = QQ.engine_args(cfg, None, 1000)
|
||||
self.assertNotIn("--prefill-head-alias", cmd)
|
||||
self.assertEqual(cmd.count("--short-read"), 1)
|
||||
self.assertEqual(cmd[cmd.index("--short-read") + 1], "1064")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user