feat(m0): measure the one model's game placements and fix desktop app matching
Add a gamemode stage that restarts Qwen3.6-35B-A3B with a smaller routed expert VRAM budget (6, 4, 2 GiB, and 2 GiB with half the CPU workers), then the normal placement again, and records switch time, free VRAM, output speed, first spoken sentence and 8K-context first token for each. It names the fastest placement that leaves the game its 8 GB reserve. Strata 0.1.59's qwen36 engine cannot shrink VRAM while running, so each placement is a restart. The desktop stage now matches running apps by the process image name Windows lists (Discord.exe) and closes the calculator it launched by image name when close-app cannot find a UWP app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -364,6 +364,44 @@ def test_vram_shrink(r: StageResult, c: ChatClient, reserve_mib: int = 8000) ->
|
||||
r["vram_shrink"] = out
|
||||
|
||||
|
||||
def quick_bench(c: ChatClient, context_tokens: int = 8192) -> dict[str, Any]:
|
||||
"""The numbers a placement change moves, in about half a minute: output
|
||||
speed, the first spoken sentence and the first token after a long context.
|
||||
Fail-open: an error is kept by name and the next measurement runs."""
|
||||
out: dict[str, Any] = {"errors": []}
|
||||
runs = []
|
||||
for i in range(3):
|
||||
try:
|
||||
a = c.chat([{"role": "user", "content": f"({i}) 한국의 사계절을 각각 세 문장씩 자세히 설명해 줘."}],
|
||||
max_tokens=320, extra=NO_THINK)
|
||||
runs.append(a)
|
||||
except Exception as e:
|
||||
out["errors"].append(f"decode: {type(e).__name__}")
|
||||
out["decode_tok_s"] = stats(x.get("decode_tok_s") for x in runs)
|
||||
voice = []
|
||||
for kind, prompt in KOREAN_PROMPTS:
|
||||
if kind != "voice":
|
||||
continue
|
||||
try:
|
||||
a = c.chat([{"role": "system", "content": VOICE_SYSTEM}, {"role": "user", "content": prompt}],
|
||||
max_tokens=120, extra=NO_THINK)
|
||||
voice.append(a.get("first_sentence"))
|
||||
except Exception as e:
|
||||
out["errors"].append(f"voice: {type(e).__name__}")
|
||||
out["voice_first_sentence"] = stats(voice)
|
||||
seed = random.randint(0, 10**9)
|
||||
doc = f"[문서 {seed}]\n" + filler(int(context_tokens * 1.5), seed)
|
||||
try:
|
||||
a = c.chat([{"role": "system", "content": VOICE_SYSTEM},
|
||||
{"role": "user", "content": doc + "\n\n위 글의 주제를 한 문장으로 말해 줘."}],
|
||||
max_tokens=48, extra=NO_THINK)
|
||||
out["context"] = {"prompt_tokens": (a.get("usage") or {}).get("prompt_tokens"), "ttft": a.get("ttft"),
|
||||
"first_sentence": a.get("first_sentence")}
|
||||
except Exception as e:
|
||||
out["errors"].append(f"context: {type(e).__name__}")
|
||||
return out
|
||||
|
||||
|
||||
def warmup(r: StageResult, c: ChatClient) -> None:
|
||||
"""One throwaway request so model loading is not counted as answer time."""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user