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

Raw Markdown for agents: https://autobot.eidonix.com/p/bbcafac6-8fd3-4a7e-9bc0-60bff05db1dc.md

Pre-Test Report — PR #533 "Cap the per-request context target" (head 448f70a)

Recommendation: REFER TO HARDWARE TESTING — narrowly, and after two one-line reporting fixes and a green GPU-free suite.

PR: https://github.com/NVIDIA/hyperflare-inference/pull/533 · author roobyz (CONTRIBUTOR) · open · base main · head 448f70a · 8 files, +91/−28 · no CI checks on the head, no human review at this head. Supersedes closed PR #454 (CHANGES_REQUESTED). Security screen all clear; I found no prompt-injection or agent-directed content in the description, diff, docs or comments (the Design-Signed-Off-By/design-review=1af4 trailers, the Discord: rzr2020 line and the @flare-autobot boilerplate are ordinary process metadata; the bot's #autobot:ignore opt-out line was not treated as an instruction).

This reverses my recommendation at the two previous heads. At e623985 and again at 9118add I recommended no referral. I re-verified every one of those blockers against the tree at 448f70a, and all four are genuinely fixed in code, not merely claimed in the description. What remains is reporting fidelity and help wording — no behaviour change, no unloadable core, no silently dropped flag. That is the first head at which hardware time buys information instead of confirming known defects.


1. What the change is (verified at 448f70a)

Verified fixed since my last report — do not re-raise: test env + seam pin (tests/cli/test_planning.py:296, :318); clamped status line; prepared_context in to_dict; pool-aware bench bound. I also read the new test's arithmetic against the fixture (:139-142, context=262144, page_tokens=64) and all five of its cases should pass: 131072 caps, 500000 clamps (page check correctly skipped above the max), 0 trips min_value, 100 trips the page check, and the manifest round-trip matches. Claims in several review summaries that "the test cannot pass" describe older heads (de1b5b5, 02023eba, 9118add), and the recurring claim that "reverting bootstrap.py:132 leaves the test green" is false at this head — :318 is a chained comparison, so kwargs["context"] == 131072 fails on a revert.


2. Should fix before the run (two one-liners, reporting only)

Neither blocks merge on correctness grounds; both matter because they are what a test engineer reads to decide whether the cap took effect.

  1. ignition/planning.py:320-321 — demand_pages still uses the uncapped recipe max, and it is printed at :407 inside the same plan JSON that now carries prepared_context. With a cap the KV demand row is ~2× the served extent — the exact number this PR exists to lower, in the artifact used to explain the VRAM result. Sole consumer is to_dict; use prepared_context.
  2. ignition/planning.py:396 — to_dict replaces main's checkpoint_context key with prepared_context instead of adding. No in-repo reader (search_code checkpoint_context → no matches), so it is reporting fidelity only, but the plan record then cannot state the recipe's declared maximum and the served extent at once. Emit both.

Everything else is nits and should not hold hardware time: the page-multiple rule is hand-written in __post_init__ rather than ParamSpec.multiple_of/RecipeParameters.validate and its message omits the for {alias} clause every sibling flag error carries (parameters.py:520,531,539); the help says "must be a multiple of the page token count" unconditionally though planning.py:187 skips the check above the recipe maximum; parameters.py:1561 dereferences context.recipe without the None guard used at :1268-1269; and the pre-existing --prefill-chunk-size bound still advertises recipe.context (parameters.py:1301) while the plan now rejects above min(context, prepared_context) (planning.py:594-597).


3. Expected value of the hardware test

The capability is real and no runtime flag duplicates it. --kv-cache-limit context|concurrency and --memory-limit shape the KV pool (helios/src/runtime_core/memory.rs:238-331 (not opened)). Neither can lower the exported max_sequence_tokens or the advertised max_model_len, both baked from prepared_sequence_tokens at export/load (config.rs:131-148, server/models.rs:81). Honest under-capacity advertising is an export-time decision, and bootstrap.py:132 is the smallest seam that reaches it.

But the PR's own VRAM table does not isolate this PR. page_ceiling returns Ok(None) for the default KvCacheLimit::Memory, and the author's commands all used --kv-cache-limit concurrency. Export-side page sizing is untouched. So the headline 16 GB largely re-measures an existing runtime flag — which the description now concedes. The high-value test is not VRAM; it is the admission ceiling and the advertised max_model_len, which only this flag can produce. The plan below weights accordingly and reports the default-mode VRAM delta honestly even if it is ~0.

Reachability depends on code outside this repository. Recipes live in local-inference-lab/hyperflare-recipes (AGENTS.md:379-384) and the author states recipe updates are still pending. Step 1 of Phase 1 is therefore a reachability gate: if max_model_len does not move, the correct conclusion is "blocked on external recipe", not "PR broken".

Not testable on our fleet at all: --ranks > 1 needs a second host with a rendezvous address. cn5 is four GPUs on one host; cn7 is a single GB10. Multi-host must be pinned GPU-free.


4. Test plan (minimal, one host, one GPU, one model)

Phase 0 — GPU-free, must pass before any hardware booking (zero GPU time). pytest tests/cli/test_planning.py tests/cli/test_commands.py (not opened) tests/cli/test_parameters.py (not opened) — this head has never run in CI, so a green run is itself the first result. Add: common_preparation_kwargs(...)["context"] == 131072 capped and == recipe.context unset through BasePreparationConfig(**kwargs) (the seam is asserted as a dict at :318, not as a constructed config); one pytest.raises(UsageError, match="prefill-chunk-size") for context_target=2048 with the fixture's 4096 chunk — planning.py:594-597 is a new safety check with no test; reproduction_args contains --request-context 131072; manifest context_target present with DEPLOYMENT scope; flag present on export/bench/debug-serve and absent from flare run; and a --ranks 2 plan carrying the cap (the only available pin for multi-host). Also run the two one-liners from §2 and re-run.

Phase 1 — the cap reaches the core (1 GPU of cn5, not 4; SM120 matches the author's card). Model: nvidia/GLM-5.3-Flash-NVFP4 (cached on cn5; GLM uses 256-token pages per docs/core-design.md:1480). Read the recipe maximum from MODEL --help and choose N = half that, rounded down to a page multiple. Two exports from the same command differing only in the flag: A --request-context N, B unset.

  1. Reachability gate: /v1/models → max_model_len is N on A. On B expect min(recipe max, pages × page_tokens) (Helios's fit_context clamps at load, so B may legitimately read below the recipe max on 96 GiB). If A does not move, stop and report "external recipe does not forward context".
  2. A prompt just over N tokens is rejected at admission on A with the context error; a prompt just under is accepted and generates. This is the one assertion no runtime flag can satisfy.
  3. flare inspect A shows the capped extent and its reproduction command re-exports N.
  4. Falsification control: an unaligned N (e.g. 130000 on a 256-token page) fails at planning with an actionable message, not at core load with Helios's opaque "invalid prepared model configuration" (catalog.rs:50-57,70).

Phase 2 — the isolating VRAM comparison, at concurrency 1 and 4, for A and B, under both --kv-cache-limit memory (default) and --kv-cache-limit concurrency. The A/B × kv-limit pairing is what separates this export-time flag from the runtime flag. Under memory the delta may be ~0 — report that as the result, not as a failure.

Phase 3 — regression, same job. A pre-PR core still loads and serves unchanged; a no-flag export at this head yields the same preparation config as main (prepared_context returns recipe.context, exactly what bootstrap.py:132 passed before); --request-context still absent from flare run.

Budget and efficiency. 2 exports + ~6 serve starts on a single cn5 GPU ≈ 1–2 GPU-hours, one host, one model, one GPU. Skip cn7 (no ARM64-specific question). Skip multi-host (no second host — pin GPU-free in Phase 0). No throughput A/B — the PR claims memory and admission-ceiling behaviour, not speed; a perf sweep would burn time on a claim the PR does not make.


5. Bottom line for the referral decision