Pre test report report · NVIDIA/hyperflare-inference #457

Raw Markdown for agents: https://autobot.eidonix.com/p/7751ceaa-fdd9-4fd4-8e64-15c3998b0f7f.md

Pre-test report — PR #457 "Fail untyped TML model headers at EOS and align TMLv0 grammars with TmlOutput"

(+431/−7 in 4 files: helios/src/grammar.rs, helios/src/grammar/strict.rs, helios/src/output/tml.rs, helios/src/server/request/tml_tests.rs. Head aacbca1.)

Verdict: DO NOT refer to hardware testing yet — blocked twice over

  1. No core on the available hardware can execute the changed code. The fix is gated on ToolParserKind::TmlJson (helios/src/grammar.rs:242, helios/src/grammar/strict.rs:1465, parser selected at helios/src/output/pipeline.rs:78 (not opened)). The only recipe in the tree that configures TMLv0 is Inkling 2 (ignition/recipes/inkling2/frontend.py:42,70 — tools=p.TML_JSON, prompt_encoder=PromptEncoder.TML_V0). GLM-5.3 uses GLM_ARGUMENT_TAGS, Qwen3.8 uses QWEN_CODER, Kimi uses XTML, so every model staged on cn5 and cn7 (GLM-5.3, Qwen3.8, dinov2) is untouched by this PR and would test nothing.

    • Inkling 2 Small is not obtainable: Checkpoint(alias="inkling-2-small-nvfp4", repository="/data/models/Inkling-2-Small-NVFP4", revision="local", stored_bytes=344_366_116_864), ranks={4: …} (ignition/recipes/inkling2/recipe.py:57-66). Local-only path, 344 GB checkpoint, 351 GB core on disk (docs/model-preparation.md:1627). cn5 (4× RTX PRO 6000 Blackwell Max-Q) is the exact host Small was qualified on (docs/model-preparation.md:1570) but does not stage it.
    • Inkling 2 Mini (thinkingmachines/Inkling-2-Mini @ ed40e7da625f594fc9c4990f5f66be24873c22d7, stored_bytes=19_525_870_752, device_bytes=20_263_810_112, ranks={1: …} — recipe.py:73-81) would fit one GB10 on cn7, but needs ~40 GB disk (checkpoint + prepared core) versus the 16 GiB per-job scratch on both hosts, so the core cannot be prepared or held inside a job.
    • Enabling step is infrastructure, not test work: stage the Mini checkpoint on cn7 and prepare/serve its core from host storage (outside job scratch). Until then any hardware slot spent on this PR produces no signal.
  2. Several should-fix items change what a test would be validating. Testing now would certify behaviour that is likely to change — exactly what priority 1 forbids.

Both the Architecture, Correctness, Conventions, Simplicity, Prose lenses returned the same shape: no blocking defect, multiple should-fix issues, zero human reviews, zero labels, and no CI checks on the head commit.

Findings that must be resolved before testing

A. The EOS guard keys on header text, not on "nothing was emitted" (Correctness, should fix). AnswerState::HeaderWithoutContent is recorded only when a non-empty model header closes on <|end_message|>/<|content_model_end_sampling|> (helios/src/output/tml.rs:282-288) and errors only at Termination::Eos (:399-401). Because emit returns early on visible == 0 (:207-209) and call_or_text on an empty body (:335-337), these still complete silently as status: "completed" with output=[reasoning] — the very symptom the PR claims to close:

Either the guard must key on "no answer emitted at EOS", or the PR must state that a closed empty frame is legitimate (the PR's own test at :652-653 asserts a reasoning-only turn [MODEL, THINK, "t", END, TURN_END] → Ok). A tester cannot judge pass/fail without that decision. Fix it first.

B. Undocumented API-contract change (Architecture + Prose, should fix). The PR turns a previously status: "completed" turn into response.failed / HTTP 500 server_error for every TMLv0 request, grammar-constrained or not (helios/src/server/output.rs:332-341 → helios/src/server/protocol/encode.rs:760). docs/api.md documents comparable failure modes at :535-545 and :621-625 but says nothing about the new rule, about unnamed tool headers, or about preamble-then-tools; docs/api.md:585-602 is the strict-tool/TMLv0 section and docs/api.md:443-444 still says only "recognized but incomplete calls at natural completion are errors". AGENTS.md:225 (not opened) requires the API doc update for API behaviour changes. Without it, the expected-test outcomes are not contractual and a tester has no oracle.

C. Strict-path ambiguity handling is half-applied and unmeasured (Architecture + Correctness, should fix). compile_content_headers factors the unnamed header through one JSON-schema enum (helios/src/grammar.rs:381-391) to avoid N-way Earley ambiguity across large tool sets; compile_strict_tml instead emits (@payload_0 | … | @payload_k) (helios/src/grammar/strict.rs:1599-1603), i.e. the shape the sibling path avoids, bounded only by max_grammar_size: 131_072 (grammar.rs:176-181) and MAX_GRAMMAR_BYTES = 262_144 (grammar.rs:22, checked strict.rs:2443-2455) — an over-limit grammar is rejected at admission, not degraded. No test in the diff uses more than two tools (two at strict.rs:4591-4599; live evidence was a single get_weather), while the 178-tool measurement that motivated the non-strict fix was on the non-strict path. This needs a CPU test at ~178 strict tools (compile + advance, with timing) or an explicit strict-tool bound. Cheap, no GPU.

D. Evidence gaps in the tests that would be the acceptance criteria (Conventions + Simplicity, should fix).

E. Prose / provenance (should fix but non-blocking for test cost). The live GPU evidence cites TML-d24-varloop-research, which this branch rejects (ignition/recipes/inkling2/config.py:88-92: "Inkling 2 preparation requires a fixed loop pass count") and which survives only in closed PR #468; the snapshot command is FLARE_INKLING2_TEST_SNAPSHOT=... (a placeholder); agentic_suite.py (not opened) does not exist in the repository. Nothing in the PR's own numbers is reproducible from the tree.

Cheap validation to do instead — no GPU required

These settle most of the open questions for free and should all be green before hardware is requested:

  1. Default-path suite (currently unrun — head has no CI checks): cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --target-dir flare-cli/target --features runtime-core,server (the CI command, .github/workflows/native-serving.yml:63 (not opened); AGENTS.md:311 (not opened)). This exercises output::tml::tests:: and both grammar tests. Zero-cost regression gate.
  2. Snapshot suite — needs only the Inkling 2 tokenizer.json (not opened) (hundreds of MB at most, fits 16 GiB scratch): FLARE_INKLING2_TEST_SNAPSHOT=<dir containing tokenizer.json (not opened)> cargo test … -- --ignored --test-threads=1 server::request::tml_tests:: (tml_tests.rs:9-12,40; all eight tests are #[ignore]d). Run after the duplicate test is deleted.
  3. CPU-only 178-tool strict-grammar test (finding C): compile and advance a strict TMLv0 grammar with 178 tools, record compile time and acceptance. No GPU, directly answers the only open performance question.
  4. Tokenizer-fixture case for the malformed terminal header with tml-renderers' reference_parse.error (finding D), so the expected outcome is cross-implementation evidence rather than a hand-written ID list.

If the above land and a Mini core is staged on cn7 — minimal hardware plan

Host: cn7 (1 × GB10, SM121 — the qualified target for Mini, docs/model-preparation.md:1660,1709), one job, flare run with prefix cache enabled, tests/server/test_inkling2_mini.py as the surrounding harness. No A/B throughput run: the change adds no compute to any hot path and the PR makes no throughput claim, so throughput testing would be wasted slots. Total: ~1 job, ~30–45 min.

# Test Expectation Cost
A Force a reasoning-only turn ending `< message_model >bash<
B False-failure control: ~10 ordinary generations (plain text, reasoning-only, one tool round trip) Zero new 500s; identical output to pre-PR behaviour ~10 requests
C Unnamed header tool call: <|message_model|><|content_invoke_tool_json|>{"name":…,"args":{…}}<|end_message|>, tool_choice:"auto" function_call in output / tool_calls, not raw JSON in content a few requests
D Preamble then tools: a text answer frame followed by tool frames message plus function_call, grammar does not reject a few requests
E Strict TMLv0 on the served core (docs/TODO.txt:25-28, currently unqualified): strict: true on Chat Completions and Responses, buffered and streamed, plus max_tokens / max_output_tokens truncation of a strict call Truncated call omitted and output limit reported; EOS inside a begun call errors (docs/api.md:621-625); required/named tool choice fails if no call completes; valid call decodes under the wrapper schema the bulk of the run
F Regression: non-strict TMLv0 tool call and response_format: json_schema (as in tests/server/test_inkling2_mini.py:120-135) Unchanged from main 2–4 requests

Do not test: ChatML/DSML/XTML/GLM/Qwen/Kimi paths (untouched code), multi-host/RoCE, prefix-cache internals, or non-TMLv0 structured output — none are reachable from the diff. Skip Small entirely unless a 4-GPU SM120 host with /data/models/Inkling-2-Small-NVFP4 and ~350 GB free disk is provisioned; that is a separate qualification effort, not a PR regression test.

Expected value if hardware testing were performed today

Low. The hardware available cannot run the changed code at all, and the expected pass/fail criteria are still moving (findings A, B, C, D). Everything of value in the open questions — grammar acceptance at 178 tools, the strict-path cost, the cross-implementation expectation for the malformed header, and the default-path regression suite — is obtainable in minutes on CPU.

Safety note

The malicious-content screen returned all_clear: the diff contains no agent-directed text, no fetched URLs, no encoded blobs, and no hidden side effects; the only untrusted prose is the PR description and code comments, which were treated as material to review.