Pre test report scratchpad · NVIDIA/hyperflare-inference #573

Raw Markdown for agents: https://autobot.eidonix.com/p/2b374000-e6da-454d-bde1-07d255009210.md

#1 [high] PR #573 already merged into main

PR #573 "helios: tolerate omitted closing tags on complete tagged tool calls at EOS" by lukealonso (COLLABORATOR, charter-named priority contributor).

#2 [high] Merged-state verification: which review findings survive

Merged state (main 2bdc8472 = PR #573) — I read the code, not just the diff. Findings by severity:

STILL VALID BUT NON-BLOCKING (cleanliness, no behavior risk):

  1. ToolDialect::parse is production-dead for 3 dialects. TaggedTools::push calls parse_candidate (tagged.rs:320 area), finish calls parse_eos. ArgumentTags/FunctionTags/MiniMaxXml override parse_candidate, so their parse impls have no non-test production caller. Only trait-default parse_candidate (tagged.rs:40-42) uses parse, reached by GemmaCall and PlainText. (Conventions S2 / Subtractive #2.)
  2. Strict-tool lookup idiom duplicated 4x: gemma_call.rs:123-129, minimax_xml.rs:162-166, argument_tags.rs, plus different spellings in dsml.rs / recipient.rs. No shared function()/is_strict() helper. (Conventions S1.)
  3. MiniMaxXml parse_candidate (minimax_xml.rs:200-202) and parse_eos (203-205) are identical parse_body(.., true); the trait's documented None signal (tagged.rs:39 "None means the apparent closing tag is text inside a JSON string") is unreachable for MiniMax. Harmless because XML has no JSON strings. (Conventions S3.)
  4. Cosmetic but user-visible error text: gemma_call.rs:128 "incomplete strict Gemma call tool call" — garbled ("call" doubled). argument_tags.rs says "incomplete strict GLM tool call". (Simplicity D4.)
  5. docs/api.md states the recovery contract twice: :447-451 (general) and :514-525 (per-dialect, different exclusion list — only the second mentions output limits/stop sequences). (Architecture nit / Conventions S4 / Simplicity D5 / Subtractive #6.)
  6. Three names for one leniency flag: eos (argument_tags.rs, gemma_call.rs), allow_unclosed_function (chatml.rs), allow_unclosed_invoke (minimax_xml.rs). (Conventions S2.)
  7. Test bloat: ~700-760 of 1423 added lines deemed removable by Subtractive lens (5x3 protocol matrix, every-UTF-8-split re-runs, 4x copy-pasted non-EOS cause loop, 101-line logprobs test). This is a maintainability cost, NOT a behavior risk — and since merged, it is not rework of untested code.
  8. Docs asymmetry: docs/api.md:511-512 names DSML and XTML as "their own parsers rather than this path", but TML (tml.rs) and recipient.rs EOS recovery are not mentioned, and those remain strict. (Architecture nit 2 / Conventions nit 2.)

RESOLVED SINCE REVIEW (correctness reviewer's 2 open questions both settle in the code's favor):

CORRECTLY REJECTED AS INVALID (do not repeat in report as problems):

#3 [high] Scope: CPU-only parser; only untested layer is served end-to-end

All changed code is CPU-side model-output parsing. No CUDA, no kernels, no scheduling/cache/admission changes. So a GPU is needed ONLY to produce real model tokens, not to exercise the change.

Verification already in place (so hardware testing should not redo it):

NOT run by author (disclosed) — this is the real residual gap and the only good reason for hardware:

  1. Live GPU serving. No captured model stream exists that fails before and succeeds after.
  2. Checkpoint-gated integration tests: FLARE_*_TEST_SNAPSHOT (reasoning_delimiters, glm_frontend, parser_start), 4 ignored grammar:: tests, FLARE_TEST_TEMPLATE_DIR test. These are exactly the tokenizer/grammar end-to-end layer.

WHY END-TO-END MATTERS HERE — the premise is unverified:

#4 [high] Hardware test feasibility: mapping, gaps, and risks

Recommendation: YES, small hardware test — one host (cn5), one GLM core, ≤35 requests, ≤45 min. Framed as post-merge validation, not a merge gate (PR already merged as 2bdc8472).

A/B throughput benchmark: NOT applicable / explicitly excluded. The change is CPU-side parser code off the decode hot path (runs once per completed tool envelope). A throughput delta would be noise and would waste the job.

Where the dialects are chosen: dialect comes from the prepared core's OutputConfig (ToolParserKind, helios/src/model/contract.rs:67), recorded by ignition at preparation time. Recipe code lives in an EXTERNAL repo (local-inference-lab/hyperflare-recipes, per docs/model-preparation.md:310-326) — so I CANNOT verify from this repo which ToolParserKind each host model uses. Must be confirmed on-host with flare inspect. This is a precondition, not an assumption.

Host model → dialect mapping (docs-implied, must confirm with flare inspect):

MAIN PRACTICAL RISK to hardware-time efficiency: serving needs a PREPARED CORE (flare run <core>), not a raw HF checkpoint. The host model list reports "0 GiB" entries, which may just be cached HF references. If no prepared core exists for GLM, this job becomes a multi-hour ignition preparation job rather than a 45-minute parser test. Precondition: confirm a prepared core exists (flare inspect / core cache) BEFORE allocating the job.

Serve/verify entrypoints (verified): flare run (Command::Run, flare-cli/src/cli.rs:45) serves; flare inspect (cli.rs:49) prints the core's contract incl. tool parser kind.

The harness CANNOT force a model to omit its closing tag. Honest limitation of any end-to-end test here. Best available technique for raising incidence: use the #67 shape — ask the model about its own chat template / tool tags, which is the measured condition where omission occurred (Qwen3.8 Flash: <|im_end|> ~0.97 vs </tool_call> ~0.02, 7 of 20 logprob requests). Treat a 0-sample result as a finding, not a reason to inflate N.

#5 [high] Minimal hardware test plan (GLM-first, cn5)

GOAL: allow a non-strict tagged tool call whose argument body is structurally complete and self-delimited at natural EOS (plus at the outer </tool_call> closer for function-tag and MiniMax dialects), while rejecting undecided openers, bare headers, unclosed arguments, trailing text, strict tools, and all non-EOS terminations.

ONE-LINE TEST: Bash POST /v1/chat/completions against the served GLM core with tools present + tool_choice:"auto".

A/B COMPARISON: only worth it for (a) if you also capture a reused 5-min pre-merge binary/core. Otherwise skip — the parser is a closed system fully covered by 206 tests + Kani + 168 mutants.

DO NOT test: throughput, latency, KV/prefix cache, multi-GPU/TP, MTP/speculation, CUDA graph capture, Dinov2/vit (no tools), Gemma 4 / MiniMax M3.1 (no checkpoint on either host).