Value proposition report · NVIDIA/hyperflare-inference #533

Raw Markdown for agents: https://autobot.eidonix.com/p/14ee193b-449a-432a-ac4f-13a9273a395f.md

Verdict: worth merging

The capability is needed, the layer is right, and the footprint is small: 8 files — ~40 lines of code plus a 43-line test, all Ignition Python plus docs (one optional field on the shared RecipeParameters base, one Plan.prepared_context accessor, one consumer line, one CLI argument that the parameter system generates). There is no Helios change, no per-model branch, and omitting the flag is a strict no-op. The two things I said last round must be fixed before merge — the unpatched source_identity() in the new test and the absence of any assertion pinning the seam that actually changes the core — are both fixed at head 448f70a7. What remains is one missing test, two sentences of docs and three reporting nits.

Why this belongs in the project (charter mapping)

What I verified at this head (fixes since my last report)

  1. The new test patches the environment. tests/cli/test_planning.py:296 sets source_identity, so rebuild_manifest.from_plan at :329 no longer hashes ignition/flashinfer/flare-heliopause or requires find_spec("flashinfer").
  2. The seam is now pinned. tests/cli/test_planning.py:316-319 asserts common_preparation_kwargs(capped)["context"] == capped.prepared_context == 131072 and != recipe.context. Reverting bootstrap.py:132 to plan.recipe.context now turns the test red — previously the whole test stayed green with the cap disconnected, which was the most serious remaining gap.
  3. The printed report shows the served value, not the request. parameters.py:1560-1561 emits request context {min(context_target, recipe.context):,} tokens, so --request-context 500000 prints the recipe maximum. That closes my previous item 7.
  4. The safety checks line up with the quantity that is actually served. planning.py:186-190 gates the page-multiple check on target <= recipe.context — precisely the set where prepared_context == target — so it validates the served extent and leaves an oversized target a documented no-op; :212 uses min(context, prepared_context) for bench; :594-597 bounds the prefill chunk by min(result.context, result.prepared_context) so a cap below the chunk fails at export instead of after a full GPU preparation with Helios refusing the core (helios/src/scheduler.rs:66-77 via model/catalog.rs:42); :368 folds the cap into guaranteed_tokens.
  5. checkpoint_context → prepared_context in to_dict (planning.py:395-396) is safe: a repo-wide search finds zero readers of checkpoint_context (Rust flare inspect reads deployment["max_sequence_tokens"], which now carries the capped value through the core itself).
  6. The description now scopes its evidence to --kv-cache-limit concurrency and states that under the default memory mode the cap buys admission control only, and the fit_context sentence is now accurate. With why / what changed / result / evidence in order, it satisfies the charter's four-part description requirement.

Should fix before merge (all small, none touching the design)

  1. The one new safety check has no test. planning.py:594-597 is untested. The fixture's chunk is 4096 (tests/cli/test_planning.py:120), so one pytest.raises(UsageError, match="prefill-chunk-size") with context_target=2048, beside :321-327, covers it.
  2. docs/cli-design.md:458 under-documents two constraints a user will hit: the cap must be at least --prefill-chunk-size, and it also lowers the default output allowance because max_new_tokens defaults to max_sequence_tokens (helios/src/server/config.rs:210-213). One clause each.
  3. parameters.py:1318 help contradicts the check: it says the value "must be a multiple of the page token count" unconditionally, while planning.py:187 only enforces that below the recipe maximum, and the help never says the value is clamped to the recipe max. Reword to match the implemented rule.
  4. planning.py:320-321 — demand_pages still uses recipe.context, so the KV demand printed into the plan JSON overstates exactly the number this flag lowers. Use prepared_context (sole consumer is to_dict at :407).

Nits, not worth holding the change: status_parts (parameters.py:1560-1561) inlines the clamp where every sibling uses a status_label, and dereferences context.recipe.context without the None guard _recipe_context_limit (:1268-1269) applies — unreachable from serve.py:271, which always supplies a recipe.

The residual risk, stated plainly

BasePreparationConfig.context still defaults to 262144 (bootstrap.py:33), and nothing validates that an exported core's max_sequence_tokens equals plan.prepared_context; Helios checks only internal consistency (helios/src/model/catalog.rs:35-71). Recipe prepare() functions live outside this repository, so a recipe that builds its PreparationConfig without routing common_preparation_kwargs would silently ignore the flag. The PR's own verification (five named checkpoints, three prepared contexts, VRAM scaling ~8.2/6.3/4.3 GB per slot — the pool = concurrency × prepared context signature) is the evidence that the seam works in practice, and it is the right kind of evidence for this repo. I would not ask for a structural fix, only that the merge commit or docs row carries the note that the cap reaches the core through common_preparation_kwargs.

Bottom line

Worth merging. It is the right capability in the right layer, general and a no-op by default, with measured payoff on the project's target hardware and a four-part description that satisfies the charter. Merge after (1) one pytest.raises for the prefill-chunk bound, (2) two constraint clauses in docs/cli-design.md:458, and (3) aligning the --request-context help with the implemented clamp rule. Item 4 and the nits are optional polish.

Nothing was executed: the head has no CI checks and no pytest run happened here, so every claim above is a static read of the cited lines at 448f70a7. pytest tests/cli/test_planning.py tests/cli/test_commands.py settles item 1 and confirms items 1–2 of the "verified" list in one command.