Hardware test plan — PR #677 (fix/helios-glm53-tool-and-reasoning, head c897437)
1. What is being validated
Two independent fixes in one branch:
| Half | Files | Claimed behavior |
|---|---|---|
| Tagged tool-call parsing | helios/src/output/tagged.rs (Candidate{Complete,InJsonString,IncompleteValue} :31-37, ToolDialect::scan_value_end :61-63, TaggedTools::in_value), argument_tags.rs (GLM <arg_value>), chatml.rs (ChatML <parameter=…>, scan_value_end :30-47), gemma_call.rs (`< |
" |
| Chat decode / effort | decode.rs (:181-199 assistant-only reasoning aliases, :593-682 effort), inference.rs:121-122 (not opened) (Effort::Medium), request.rs:521 (&["medium","high"]), frontend/mod.rs:843-880 (sentinel __flare_unknown_effort__ template probe) |
thinking/reasoning aliases on assistant messages (non-string → 400); nested reasoning.effort on Chat; top-level none/minimal/low/medium/high/max normalized against the prepared vocabulary and withheld from options.template; xhigh and numeric scores pass through raw. |
2. Bottom line on GPU spend
Neither half needs a GPU to be validated, and there is no speedup to measure against main.
- On
main, the literal-tag input does not parse at all (the reported HTTP 500). The O(K·N) reparse this PR fixes exists only in the PR's own earlier revision (f439f744). "O(N)" is a hardening property of new code, provable by timing a CPU stress test — an A/B GPU benchmark would measure nothing. - Every behavioral claim already has a CPU-only in-tree test that the author reports passing:
argument_tags.rs:765-934(every two-part UTF-8 split, single-character streaming, strict-tool accept/reject, EOS accept vs reject, all four non-EOS terminations, 40,000-tag ≈480 KiB stress), the same shape atchatml.rs:1557andgemma_call.rs:444,minimax_xml.rs:443-483;helios/src/server/request/tml_tests.rs:102-114prompts_match_tml_renderers_token_for_token(needs only a tokenizer.json (not opened),FLARE_INKLING2_TEST_SNAPSHOT);decode.rs:2436-2759new decode/prepare unit tests;helios/tests/deepseek_requests.rs:453-462(not opened).
So: Phase 0 (CPU) carries the validation. Phase 1 on cn7 (~45 min GPU) confirms the two user-visible changes on real templates. Phase 2 on cn5 (~20 min) is optional.
3. Host → what it can actually test
| Host | Usable for #677? |
|---|---|
| cn7 (1×GB10, arm64, 10 CPU, 60 GiB RAM, 16 GiB scratch) | Primary. Has nvidia/Qwen3.8-27B-NVFP4 (strict low/medium/xhigh template → high/max 400 regression), MiniMaxAI/MiniMax-M3.1-Flash (touched MiniMaxXml), and nvidia/GLM-5.3-Flash-NVFP4 (the <arg_value> headline case + fallback-effort template). One GPU, so serve one core at a time. |
| cn5 (4×RTX PRO 6000, amd64, 48 CPU, 125 GiB RAM) | Optional. Only tool-bearing model is nvidia/GLM-5.3-Flash-NVFP4 (also on cn7). No Qwen, no Gemma, no MiniMax. Use only if the GLM dialect is somehow left unexercised on cn7. |
| Missing everywhere | No Inkling 2 (TMLv0) core and no DeepSeek core on either host. The medium→0.7 (Chat) vs 0.9 (Responses) contract and DeepSeek high=75 vs max=100 are therefore CPU-only checks. State this in the test record — do not imply hardware covered them. |
4. Phase 0 — CPU, no GPU lease (~40 min). Do this first; if it fails, stop.
# 1. pin templates
.venv/bin/python tests/frontend/prepare_templates.py --output "$FLARE_TEST_TEMPLATE_DIR"
# 2. full crate
cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) \
--features runtime-core,server 2>&1 | tee /tmp/677-unit.log
# PASS: 0 failed; record exact passed/ignored and compare with the PR's 1,841/47
# 3. the parser tests, by name
cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) \
--features runtime-core,server literal_closing_tool_tag
# plus plain_closing_tool_tag_in_element_text, split_streams_preserve_reasoning
# 4. TMLv0 golden + effort normalization
FLARE_INKLING2_TEST_SNAPSHOT=<dir with tokenizer.json (not opened)> \
cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) \
--features runtime-core,server -- --ignored tml_tests # PASS: 6 passed, includes
# prompts_match_tml_renderers_token_for_token
cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server \
chat_normalizes_reasoning_effort_across_glm_qwen_tml_and_deepseek
cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server \
chat_preserves_assistant_reasoning_aliases_across_jinja_and_native_encoders
# 5. linearity timing (the PR's only quantitative claim) — release build, 40,000-tag case
cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features runtime-core,server \
-- --nocapture literal_closing_tool_tag
# PASS: single-digit milliseconds, not seconds
Optional but recommended (author disclosed it was not run): cargo kani on helios/src/output/tagged/kani_proofs.rs (not opened) — in_value was added to eos_decision (kani_proofs.rs:99-136 (not opened)) and per docs/verification.md:56-84 an unexecuted proof is not evidence. If Kani is unavailable on the machine, record it as an unrun check, not a pass.
5. Phase 1 — cn7, ~45 min GPU (one core at a time)
# rebuild Flare from PR head; a serving-only Rust change needs NO re-export (AGENTS.md:273-278)
cargo build --release --manifest-path flare-cli/Cargo.toml (not opened)
flare-cli/target/release/flare run <qwen3.8-27b-nvfp4 core> --gpus 0
1. Effort matrix (Qwen3.8, non-streaming, max_tokens: 8, thinking on). Send reasoning_effort = low, medium, high, xhigh, max, minimal.
- PASS: all six return 200 (before this PR,
highandmaxreturned 400 —tests/frontend/qwen38.json:3089-3099(not opened)). - Mapping check (
high→medium,max→xhigh,minimal→low): the rendered prompt is not exposed by the API, so assert equalusage.prompt_tokensfor the pairs (high,medium) and (max,xhigh) and for (minimal,low). Record the token counts. reasoning_effort: "none"→ 200, noreasoning_content,completion_tokens> 0.reasoning_effort: 7(numeric, invalid for Qwen) → still rejected.
2. Reasoning aliases (one script, 4 requests against the same service). Base an assistant turn on a tool call, follow with a tool result.
reasoning_content: "…"(baseline),thinking: "…",reasoning: "…",reasoning: {"nested": true}.- PASS: the first three give identical
usage.prompt_tokens; the fourth is HTTP 400 namingreasoning. - Then send
thinking/reasoningon arole: "tool"message and assert the prompt token count equals the baseline (non-assistant roles must ignore them — the PR's nits claimed this was fixed; verify it).
3. MiniMax regression (2 requests). Serve MiniMaxAI/MiniMax-M3.1-Flash: one plain completion and one tool call. This only needs to confirm the MiniMaxXml parse_candidate → Complete mapping (minimax_xml.rs:200-202) did not disturb its namespace-prefixed closer; the synthetic proof is minimax_xml.rs:443-483.
4. Tool-call smoke for the headline fix (Qwen's ChatML dialect), non-streaming and stream: true separately. Declare one function with a single string parameter and ask: "Call grep with pattern exactly a</tool_call>b."
- PASS: HTTP 200,
finish_reason: "tool_calls",json.loads(arguments)["pattern"] == "a</tool_call>b". - If the model will not emit the literal tag, record "model did not produce the input" and do not iterate — the parser is already proven on synthetic input; that is stronger evidence than one sampled generation.
5. EOS rejection. Same tool, max_tokens: 16, prompt inviting a long argument. PASS: any truncated call is not returned as a tool call (docs/api.md:636-638).
6. Regression sweep: FLARE_API_TEST_URL=http://127.0.0.1:8000 .venv/bin/python -m pytest tests/server/test_protocols.py -q (idle service) and pytest tests/server/test_qwen38_dense_dflash.py (not opened) -q.
6. Phase 2 — cn5, ~20 min, only if the GLM dialect is unexercised
GLM-5.3-Flash-NVFP4 is also on cn7 (1 GPU is enough for TP1), so prefer cn7 and skip cn5 rather than paying 4-GPU load time. If used: flare-cli/target/release/flare run <glm-5.3-flash-nvfp4 core> --gpus 0, then
- effort subset
minimal, medium, high, max— assertminimalandlowproduce equal prompt tokens, andmediumandhighdo. GLM is the fallback template (low/highelsemax), somediummust resolve tohigh; ifmediumrendersmax, the sentinel probe atfrontend/mod.rs:863-880is broken — the single most valuable hardware finding available here. - the step-4 tool-call smoke above (GLM is the
<arg_value>case the PR targets).
7. Not testable on this hardware, and not worth GPU time
ToolDialect::scan_value_enddefaultOk(0)(tagged.rs:61-63): safe today only because all threeIncompleteValuedialects override it. A code-review item; no request to a served model can reach it.- Sentinel-render heuristic for
medium(frontend/mod.rs:863-880): undocumented, tested only against raise-on-unknown templates; a hypothetical template defaulting unknowns tomediumwould lose the level. Review item; the Phase 2 GLM check is the closest hardware proxy. - Gemma
<|"|>dialect — one request at most (gemma-4-E4B-iton cn7) for a smoke check; the split sweep ingemma_call.rsis the real coverage. - TP>1, scheduler, prefix cache — untouched by this PR; cn7's single GPU and cn5's 4-GPU load cost are irrelevant.
8. Time budget
| Phase | Where | GPU time | Wall clock |
|---|---|---|---|
| 0 | any CPU host / cn5 48-CPU job | 0 | ~40 min |
| 1 | cn7 | ~45 min | ~75 min incl. core load |
| 2 (optional) | cn5 | ~20 min | ~40 min incl. core load |
9. Findings a reviewer should carry into the test record
- The PR is mergeable, with nits per re-review at head
c897437: all round-1 blockers fixed (TMLv0mediumpreserved viaEffort::Medium; linearscan_value_end;high/maxnormalized for Qwen;docs/api.md:975-995and:621-625updated; rebased over merged #670). Two non-blocking items remain: the fail-openOk(0)default and the sentinel heuristic. - Testing will not change the merge decision — it will confirm the two user-visible changes work end-to-end on a strict template (Qwen3.8) and on the tool parser with a real model. That is a worthwhile ~45 minutes on cn7; it is not worth 4 GPUs for hours on cn5.
- No speedup claim survives measurement: nothing to benchmark against
main, sincemainfails the input outright. Frame the result as "the HTTP 500 is gone and the argument is preserved", plus the CPU timing showing linear scan. - Report gaps honestly in the result: no Inkling 2 and no DeepSeek hardware, so those contracts were validated only by the CPU golden/unit tests;
cargo kaniunrun unless you run it in Phase 0.