feat(m0): measure the LLM next to the STT, the STT on the CPU and a real game

gamemode now also starts the 2 GB expert placement with a 16K context and
drops the --kv q4_0 and --mtp off rows the Strata 0.1.59 qwen36 engine
ignores; the normal placement answers one request at a time.

gamemode_stt loads the STT worker (stt.py mode=load) before the LLM picks its
placement and keeps it transcribing ten speakers at once while the LLM is
measured, so the VRAM left is the real game share. The game placements run
with the STT on the GPU and on the CPU. gamemode_live repeats the game rows
while the user runs a real game; it only runs when asked for
(run_m0_game_live.bat) and is skipped when nobody is at the PC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-10 19:12:53 +09:00
parent d0ffa7f55e
commit 3794bb7149
7 changed files with 499 additions and 59 deletions

View File

@@ -44,7 +44,17 @@ STAGES = [
("desktop", "PC 제어 도구(agent-desktop) 확인", "", "desktop.py", [], 0),
# Automatic tuning: the one model in each placement (normal, less VRAM for a game).
("gamemode", "게임 중 자동 조절: 모델 배치별 속도", "base", "llm.py", ["model=fast", "only=levels"], 0),
# The same placements with the STT loaded next to the LLM (on the GPU and on the CPU).
("gamemode_stt", "게임 중 자동 조절: LLM과 음성 인식을 함께 켰을 때", "base", "llm.py",
["model=fast", "only=together"], 0),
# With the user's game running. Needs someone at the PC, so only when asked for (--only).
("gamemode_live", "게임을 켠 상태로 재기 (직접 게임을 켜 주셔야 합니다)", "base", "llm.py",
["model=fast", "only=live"], 0),
]
# Stages left out of a full run: they need the user there after the unattended part.
ON_DEMAND = {"gamemode_live"}
# Stages that start the STT worker next to the LLM and need the stt venv's Python.
NEEDS_STT = {"gamemode_stt", "gamemode_live"}
def free_gb(path: Path) -> float:
@@ -61,6 +71,9 @@ def run_stage(key: str, venv: str, script: str, opts: list[str], work: Path, env
if venv == "cosy":
src = envs.ensure_cosy_source(work, log)
opts = opts + [f"src={src}"]
if key in NEEDS_STT:
stt_py = envs.ensure_env("stt", work, work / "logs" / "env_stt.log")
opts = opts + [f"stt_python={stt_py}"]
cmd = [py, str(KIT / "m0lib" / script), "--out", str(out), "--work", str(work)]
for o in opts:
cmd += ["--opt", o]
@@ -128,7 +141,7 @@ def main() -> int:
t0 = time.time()
for key, title, venv, script, opts, need_gb in STAGES:
if (only and key not in only) or key in skip:
if (only and key not in only) or key in skip or (not only and key in ON_DEMAND):
continue
out = work / "results" / f"{key}.json"
if out.exists() and not a.redo: