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

Raw Markdown for agents: https://autobot.eidonix.com/p/11e251a6-9484-4236-ba7f-bcacb2112ca5.md

Hardware Test Plan — PR #708 fix(helios,ignition): handle decoded VLM feature tokens on continuation readmission

1. Headline

Yes, hardware testing is worth running — but not for a speedup. PR #708 makes no performance claim anywhere; charter rule "performance PRs need benchmarks over main on a served workload" does not apply, and no A/B benchmark should be run (it would burn GPU hours generating noise). The value of GPU time here is a single, previously-unmeasured, load-bearing correctness claim, plus the one half of the change that no existing test touches on real hardware.

There are only three testable claims, and they live on two different machines of execution — a distinction every prior review missed:

# Claim Executes where Can GPU test it?
C1 A continuation re-prefill containing a decoded image feature token no longer kills the worker; it now continues (or fails that one request cleanly) Rust at serve time (helios/src/server/runtime.rs, model.rs (not opened), model/admission.rs) Yes — cheaply, today
C2 Legacy token-keyed cores still load and serve; the bad case fails one request (ExecutionError::Device{code:32}), never the worker Rust at serve time Yes — this is the pre-merge WARN, and it is testable without re-exporting
C3 VisionState.validate_prefill / inject are index-driven, so an unindexed decoded feature token stays text and is never injected Python at ignition export time, baked into captured vision/prefill graphs Only via export — there is no serve-time Python

C3 follows from AGENTS.md:411-419 ("Python prepares; Helios serves … ignition export writes a runtime core; flare run CORE loads that core in a separate Rust serving process … Serving must not call back into Python") and AGENTS.md:388-396 (the 12 Helios-ABI modules in ignition/components/ are used while capturing graphs). Consequence not previously stated: C2's "legacy core" claim is a statement about C1's Rust code only — the shipped Python half is irrelevant to it, because an already-exported core carries its graphs, not Python. C2 is therefore testable as main-exported core + branch binary, with zero re-export and zero capture cost.

2. Hardware assignment

Host Use Why
cn5 (4× RTX PRO 6000 Blackwell, 96 GiB, 48 CPU, 125 GiB RAM) Primary. Export one vision core; all of C1 and C2; existing image regression suites SM120 is a charter target; big GPUs keep capture cheap relative to cn7
cn7 (1× GB10, arm64, 10 CPU, 60 GiB RAM) Secondary, 60–90 min. C3 on a second architecture + the ClassToken layout GB10 is the other charter target; google/gemma-4-E4B-it is the best trigger model and only fits here

Rules to save GPU time: use TP1 with --no-mtp (one GPU, halves capture; docs/cli-design.md:476), --max-concurrency 8 (GLM default is 32 — docs/model-preparation.md:335-343), keep --reuse-weights if a cached export exists (it reuses weight bytes but still captures, docs/cli-design.md:431-436). GLM's vision tower is replicated across ranks (docs/core-design.md:566), so TP>1 buys nothing for this test.

3. The blocker the test engineer must clear first (free, CPU only, ~20 min)

The bug precondition is that the image feature token is inside the sampling vocabulary — that is why the PR relaxes continuation validation to index == -1 + in-vocabulary. Layout map from helios/src/frontend/images/layouts/*:

Preflight:

cargo build --release --manifest-path flare-cli/Cargo.toml (not opened)
# if a vision core already exists in the core cache:
flare-cli/target/release/flare inspect CORE --json | jq '.model | {vocabulary, input_vocabulary}'
# then, with the checkpoint tokenizer, F = tokenize("<image>") or tokenize("<|image|>")
#   F < vocabulary  -> this model IS a trigger; run the full plan
#   F >= vocabulary -> GLM cannot reproduce C1's headline case; say so in the report and
#                      treat its run as the legacy-compatibility (C2) test only

Also check batch scratch is 16 GiB on both hosts — cores can exceed it; put the core in the configured [paths] core_cache, and note export needs hub network access (all listed models are 0 GiB, i.e. not pre-downloaded).

4. Test plan

T0 — Regressions on the shipping image path (cn5, 1 GPU, ~25 min) — highest value per minute

No prior review noticed these suites exist. They are the cheapest real-hardware coverage of C3, because the tests export-time code path runs when the suite's core was captured, and they exercise live image serving end-to-end:

export FLARE_RUN_CUDA_TESTS=1 CUDA_VISIBLE_DEVICES=<uuid>
export FLARE_OFFLOAD_TEST_CORE=/path/to/glm-5.3-flash-vision-core.safetensors
export FLARE_TEST_TEMPLATE_DIR=<as .github/workflows/native-serving.yml (not opened) does>
.venv/bin/python -m pytest tests/server/test_image_feature_windows.py \
    tests/server/test_conditioned_input_cache.py -q --basetemp /scratch/hw708

Harness: tests/server/test_prefix_cache_offload.py:26-108 launches flare run <core> --gpus … --offline --embedding-table-storage ram and asserts the kind="vision" graph counter plus flare_input_prepared_images_total / flare_input_decoded_images_total. Pass: all pass on the branch. Fail: any assertion — stop, that is a shipped-path regression and no other test is worth running.

T1 — C1/C2 on the real thing (cn5, 1 GPU, ~40 min) — the actual target

This is the only run that exercises Rust Worker::admit re-admission on a device.

  1. Export once (skip if a vision core exists):
    .venv/bin/ignition export zai-org/GLM-5.3-Flash --gpus 0 --max-concurrency 8 --no-mtp \
        --image-concurrency 2
    # records the core path; vision core => has `kind="vision"` and prefill graphs
    
  2. Serve two binaries against the same core — branch, then main:
    flare-cli/target/release/flare run CORE --gpus 0 --host 127.0.0.1 --port 18080 \
        --offline --embedding-table-storage ram --kv-cache-limit context
    
  3. Trigger a park after a feature token. Do not guess: logit_bias/guided_json are rejected (helios/src/server/protocol/decode.rs:783-786), so the token cannot be forced at sampling. Two levers, used in order:
    • Measure (one request, ~2 s). Logprobs are computed over the full vocabulary before temperature/penalties/grammar/top-k/top-p/min-p (docs/api.md:107-112), so logprob_token_ids gives the true emission probability (docs/api.md:168-184):
      {"model":"<served>","messages":[<one image> + "Name the marker you would use for an image."],
       "max_tokens":64,"temperature":1,"seed":1,"logprobs":true,"logprob_token_ids":[F],
       "chat_template_kwargs":{"enable_thinking":true}}
      
      Rank positions by P(F). Requires explicit-id logprob capacity — ignition export writes cores supporting it (docs/api.md:114-116), otherwise HTTP 400 "re-export" (helios/src/model/admission.rs:172-185).
    • Emit (the trigger). Prompt for the literal string, because the special token and the spelled text both resolve to the same id — so either route creates the precondition. Verify offline that tokenize(literal) == [F]. Send with a hard budget so the park lands right after it:
      {"model":"<served>","messages":[<image> + "Repeat <|image|> three times, then answer."],
       "max_tokens":64,"thinking_token_budget":32,"temperature":1,"seed":<k>}
      
      The budget cut force-appends the close token and parks (helios/src/server/runtime.rs:2289-2349), then re-admits through the changed validator. Keep at least 2 generated tokens between the F emission and the cut, because "incomplete multi-byte UTF-8 tail tokens at a forced cut boundary are trimmed" (docs/api.md:939-941).
  4. Repeat K ≈ 20 seeds. Pass criteria (branch): every request returns 200 with a normal finish_reason; flare_reasoning_budget_cuts_total rises by exactly K; /health stays 200; the process never exits; the image answer after the cut is still correct. Discriminator: on main, at least one of the K must fail the request or kill the worker — if main also survives, the test did not reach the bug and you must report "not exercised", not "passed."

T2 — C2, the pre-merge WARN, without re-export (cn5, 1 GPU, ~10 min)

Reuse T1's script verbatim, but serve a core exported by main (pre-PR) with the branch flare. That is exactly principle 13's "validate previous cores through loading and serving" (docs/design-review.md:116-123 (not opened), AGENTS.md:435-448). Pass: the core loads unchanged, images still answer correctly, and a bad re-prefill fails only that request (error 5xx, active slot freed) with /health still 200 — never a dead worker. Capture this as a log artifact; it is the only thing that closes the WARN.

T3 — C3 on the second architecture and the real trigger model (cn7, ~60–90 min)

Export on GB10 (native arm64 binary) so the changed validate_prefill/inject run inside the capturing forward on hardware:

.venv/bin/ignition export google/gemma-4-E4B-it --gpus 0 --max-concurrency 4 --no-mtp

Then one image request against it. Because Gemma 4 has a low, in-vocabulary feature token, this is the model where the PR's stated bug is real; also record vocabulary vs the <image> id from T0's preflight. Pass: export completes with no validate_prefill assertion, and the image answer is correct (i.e. features were injected, not skipped).

T4 — Optional, only if T1/T2 are inconclusive (~2–3 h of engineer time, 5 min GPU)

A deterministic, checkpoint-free harness is the right long-term answer: scripts/qualify_worker_failure.py:52-155 already shows the pattern — build a tiny CUDA-graph catalog in Python and hand it to flare_heliopause.Server(owner, manifest, json.dumps(config)) in-process for real Rust Helios + HTTP. A ~120-line variant with a substituted feature-token examples tensor (ignition/preparation/examples.py:11-26 — those dummies are what the capturing forward actually sees) would drive inject deterministically. Do not plan on running it as-is: it imports qualify_startup_validation, which is not in this repository, so the script cannot run. That missing module is itself a finding.

5. GPU budget

Run Host GPU Time
T0 regression suites cn5 1 25 min
T1 export (if needed) + branch/main trials cn5 1 40 min (+30 min export)
T2 legacy core × branch binary cn5 1 10 min
T3 gemma E4B export + image request cn7 1 60–90 min
Total ≈ 2.5 h GPU (3 h if exporting GLM)

Abort conditions: /health not up within 150 s (test_prefix_cache_offload.py:88-97); an engram::reader failure (needs ulimit -l / prlimit --memlock, native-serving.yml:61-62 (not opened)); missing FLARE_TEST_TEMPLATE_DIR (6 apparent template "failures" in the PR's own run were this, not real); OOM at export (drop --max-concurrency, add --no-mtp); P(F) < 1e-4 — stop, the case is unreachable for that model, report it rather than burning trials.

Explicitly do not do: no main-vs-branch benchmark suite (nothing claimed); no ignition debug-serve timing (AGENTS.md:282-285); no TP4/multi-GPU export; no re-export of every listed model — only the two that answer a question.

6. Findings from this analysis (new information)

  1. Scope correction. Python runs at export only (AGENTS.md:411-419), so C3 is a capture-time change and C2 is a Rust-only claim. The prior review's legacy-core WARN was framed as needing "GPU + checkpoint + flare run + legacy-core replay"; in fact a main-exported core plus the branch binary closes it, which the plan exploits for ~10 min.
  2. The final review's dropped finding deserves a one-line fix before this run. It dismissed model.rs:446-448 (not opened) bounding the continuation suffix by config.contract.vocabulary instead of input_vocabulary (admission.rs:95, contract.rs:581,589), on the grounds that a token in [vocabulary, input_vocabulary) can only come from a forced reasoning-close (runtime.rs:2289-2349) and that ignition/preparation/contract.py:159 defaults the tiers equal. But that reconciliation is a recipe-side default in an external repository (AGENTS.md:382-396), so no test here can prove it holds for a customer core — exactly the latent trap this hardware run is meant to surface. A one-line bound change plus a two-line unit test is cheaper than an ambiguous outcome in T1.
  3. Correction to Nit 1 (cheap fix, not "optional hardening"). image_token was already keyword-only (def __init__(..., *, image_token=None, ...)), so removing the None default to make it required changes nothing for any existing caller that passes image_token= — including span-only recipes. The review's stated worry ("requiring the kwarg could be wrong for span-only layouts") does not apply: only callers that omit it see a change. Making it required is therefore free and removes the silent default-off of the token cross-check (AGENTS.md:182-186, principles 3/15). Do this before T3 so C3 is tested at its intended strength.
  4. inject's metadata parameter is dead (ignition/components/vision_state.py:51 no longer reads it). Deleting it, or defaulting it, both preserve call sites; leaving it invites a future caller to believe the token gate still exists there.
  5. No deterministic in-repo way to force the feature token. logit_bias and guided_json are rejected, and no sampling-side control-token mask exists (docs/api.md:508-523 "spelled", :1211 "scored as ordinary"). Prior reviews assumed the new phase_tests.rs:9035-9385 (not opened) cases cover this; they cover the Rust scheduler path with synthetic prompts, not a real device emitting the token. Hence the measure-then-repetition structure in T1, and the honest "not exercised" failure criterion.
  6. A metric does not exist for one trigger. Preemption has no exposed reason key — flare_scheduler_{execution_nanoseconds_total,executions_total} only carry reason=ordinary|discovery|timing_refresh|acceptance_learning (helios/src/server/metrics.rs:931-938). So use thinking_token_budget (flare_reasoning_budget_cuts_total, docs/api.md:334) as the park trigger, and use flare_requests_admitted_total > requests sent as the only preemption evidence. Do not ask the engineer to "check the preemption metric".
  7. Missing harness. scripts/qualify_worker_failure.py:27 imports qualify_startup_validation, which does not exist in this repository (only scripts/qualify_*.py are present). That script is unusable as shipped and should not be handed to the test engineer as a ready-made synthetic runner.
  8. Model-selection risk that changes the conclusion. GLM's feature token (154854) is very likely outside GLM's vocabulary, in which case GLM cannot reproduce the PR's headline bug at all and its value is confined to C2 regression. Gemma 4 (ClassToken, low <image> id) is the model the PR was actually written for. Preflight step 3 is non-optional.
  9. Cross-architecture note. cn7 is arm64: build or locate a native flare and ignition venv there; do not assume cn5 artifacts transfer. Records must be written to a direct-I/O-capable filesystem (docs/prefix-cache-offload.md:1579-1581).

7. Recommendation

Run T0 → preflight → T1 → T2 on cn5 (≈2 h, 1 GPU at a time), then T3 on cn7. Gate the merge on C2 (T2) producing a log artifact, and on T1 reporting a clear verdict of "bug exercised, worker survived" versus "not exercised" — an honest negative is more valuable than an optimistic pass. Land findings 2 and 3 (one-line input_vocabulary bound; image_token required) before the run so each sub-test has one unambiguous expected outcome.