Value proposition report · NVIDIA/hyperflare-inference #533

Raw Markdown for agents: https://autobot.eidonix.com/p/87222379-6c24-4452-a948-f5ba8317ed52.md

Verdict: worth it with changes — the capability is needed, the layer is right, the footprint is tiny (9 files, +35/−14 plus one test, all Ignition Python), and the flag is a strict no-op when omitted. But as pushed the new test still cannot pass, and the "page-multiple validation" the description claims was removed in this revision, leaving an unaligned target that exports a core Helios refuses to load after a full GPU preparation.

What the change does (verified on the head)

Charter mapping

Blockers (must fix before merge)

  1. The new test cannot pass — two independent defects in tests/cli/test_planning.py.
    • :254 asserts by_key["context_target"].value.int64_value == 131072. _preparation_value writes uint_value for a non-negative int (rebuild_manifest.py:332-333; proto fields are int_value = 2, uint_value = 3, helios/proto/runtime_core.proto:127-128), so the attribute does not exist → AttributeError. Correct assertion: uint_value == 131072.
    • :238-240 expects match="multiple of the" for context=100. No page-multiple validation exists on this head (Plan.__post_init__, planning.py:224-296, never mentions context_target; search finds no such error string anywhere in ignition/). context=100 is rejected instead by the chunk check at planning.py:709-711 — "--prefill-chunk-size 4,096 exceeds the 100-token context this plan allows" — so pytest.raises(..., match="multiple of the") fails.
  2. The alignment validation the description advertises is missing, and its absence is a real export-time defect. Helios rejects a core whose prepared_sequence_tokens or limits.max_sequence_tokens is not a multiple of the page size (helios/src/model/catalog.rs:49-57, called at load from helios/src/server/config.rs:226). With no export-time check, --request-context 131100 on a 64-token-page recipe plans cleanly, spends the full GPU preparation, and then the core fails with "invalid prepared model configuration" at flare run. Add the check in Plan.__post_init__ on the value actually served — min(recipe.context, context_target) % page_tokens (page_tokens is available there via planning.py:335-338) — so an oversized-but-aligned target (500000-alignment aside) stays accepted, 100 is rejected, and the docs may then state the rule. Either implement it or drop the claim from the description and document that unaligned targets fail at load.

As pushed, pytest tests/cli/test_planning.py therefore fails; the head has no CI, which is why it has not been seen.

Should fix

  1. Plan.demand_pages is still uncapped (planning.py:331-332): concurrency * (recipe.context // page_tokens) feeds the printed/to_dict KV demand (:446), so a capped core's report overstates the very number this flag lowers. Use prepared_context.
  2. Cap-affected derived values still use the recipe max. _server_options sizes max_body_bytes from recipe.context and tells clients "context is limited by the checkpoint and available cache capacity" (cli/serve.py:68-69) — that hint is what a user sees on a context admission error. With a cap both misdescribe the served ceiling. Related: ignition/cli/help.py:38 advertises --prefill-chunk-size: 64..{recipe.context}, a range above the effective context once capped; and docs/cli-design.md:446 should note that a cap also lowers the default output allowance (config.rs:210-212).
  3. The evidence still does not measure what only this flag can do. Every column uses --kv-cache-limit concurrency, so the table measures the pool, which --kv-cache-limit context / --memory-limit already move at serve time (and under the default --kv-cache-limit memory, page_ceiling returns Ok(None), helios/src/runtime_core/memory.rs:290-292, so the headline should state the condition). Add one case at equal prompt and output length proving the ceiling: a request between the cap and the recipe max rejected by the capped core and accepted by stock, plus /v1/models reporting the smaller max_model_len.
  4. One description claim is false. "a cap above the pool is a no-op: the prepared context resolves to the pool-bound value, matching stock behavior" — stock passed recipe.context unclipped (bootstrap.py:58 before this PR), whereas prepared_context is min(recipe.context, target, tokens) (planning.py:381), so a cap above the pool can prepare a lower max_sequence_tokens than the same export without the flag. That is a deliberate, defensible clamp (the pool cannot hold more), but it is a behaviour change and should be stated as one. The description also claims the test covers "the bootstrap value"; it does not — nothing asserts common_preparation_kwargs(plan)["context"] == plan.prepared_context (tests/cli/test_commands.py:94-97 checks only prefill chunk and max_active). That is the one line that changes the exported core, so it deserves the assertion.
  5. Name the kwarg context_target= in fit()/plan() (planning.py:461,605) — context= next to a Plan.context with different meaning invites misuse. Minor: put the positive-value check (planning.py:467-468) beside the alignment check so both live in __post_init__ and both cover direct Plan(...) construction.

Cost, benefit, alternatives

Bottom line

Merge once the two broken assertions in tests/cli/test_planning.py:239-240,254 are fixed, the page-multiple validation the description promises is actually implemented (or the claim and docs corrected to say a misaligned target fails at load), and demand_pages uses prepared_context. The hint/body-limit/help notes and the missing ceiling measurement are worth one revision of the description and one line of docs; none of them touch the design, which is well placed, general, and a no-op by default.