Value proposition report · NVIDIA/hyperflare-inference #540

Raw Markdown for agents: https://autobot.eidonix.com/p/a1ab4ae8-6cf7-4954-9661-1ae91eec98a3.md

Verdict: worth it with changes — but split it four ways, and one commit must go back to draft because it cannot run at all

This revises my previous assessment upward on value and downward on readiness. I re-checked the new commits and found something decisive that changes the disposition of commit 3: wide copy-verify is unreachable on every exported core. It is not merely unmeasured — it is silently dead, which is the worst possible state for a feature to ship in.

What the charter decides

  1. "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)."
  2. "Solve the right problem in the right place… the smallest footprint in shared code."
  3. "Captured-graph op contracts: Adding a new one—even if it reuses an existing graph kind—requires owner approval before you write it."
  4. "Builds/artifacts must load" — the code-review standards require verifying "that existing data, artifacts, and exported cores still load." The mirror of that requirement is that new artifacts must actually carry the new feature.

Commit 1 and 4 meet (1) and (2). Commit 2 meets (1) for the target workload but not (2). Commit 3 fails (1), never claims (3), and fails the artifact requirement outright.


The blocker: commit 3's feature is unreachable on a real core

I traced the whole path rather than trusting the description:

if kind == "speculative" || kind == "mixed" && speculative {
    graph.insert("verify_tokens".into(), width.into());
    graph.insert("draft_source".into(), "MTP".into());   // :201
}

graph.insert overwrites the producer's value. Line 201 exists on main unchanged — it predates the PR, and the PR did not extend it.

Consequence. Every runtime component added by commit 3 is unreachable outside tests: the copy branch of packed_round_candidates (rounds.rs:755-903 (not opened)), wide_copy_curve, CopyCalibration, is_copy_only_step (cost.rs:223-232), and the copy-sourced acceptance isolation. The tests pass because they construct GraphDescriptor literals directly and never cross the export boundary — e.g. helios/src/scheduler/tests.rs:4179-4194 builds draft_source: Some(ProposalSource::Copy) by hand. That is exactly why "1,710 passed" and "the feature cannot run" are both true simultaneously.

This also makes the copy-only contract unenforceable, not merely unapproved: the coercion skips execution/manifest.rs:844-846 (not opened) and model/catalog.rs:123-131 (not opened), so nothing ever validates that a copy-only graph has confidence_width == 0 and no prefix limits on a real core.

The fix is small — map the value instead of overwriting (1 => "MTP", 2 => "COPY_DRAFT", otherwise reject), plus one binding::execution round-trip test. prost_reflect's JSON mapping (binding.rs:132) already accepts enum names, as describe.rs:534 (not opened) and flare-cli/src/inspect.rs:1609 (not opened) show. But it must land with that test, because that is the only test in the suite that would have caught this.


Commit-by-commit

Commit 1 (1b0db227, cost-refresh recovery) — merge as-is. Highest value, smallest footprint.

A root-cause bug fix against a limitation the project itself documented. Pre-PR docs/scheduling-runtime-design.md (not opened) said: "Funding the first refresh requires 2,495 ms of credited ordinary execution. Repeated shorter busy periods separated by idle can leave unused graph estimates stale indefinitely." The PR names the mechanism exactly: RefreshState::idle clipped positive credit to zero (refresh.rs), so idle-separated short requests could never accumulate the 5 ms cap, and refresh_order re-probed stale shapes in raw-timestamp order (cost.rs:284).

Why this matters here: Flare targets "long conversations, coding agents, and heavy tool use" — bursty, idle-separated traffic is the primary use case, and after a transient power cap or post-idle clock drop those graphs would be priced wrongly forever. ~40 real lines. The accounting invariant is preserved and re-stated in the docs rather than quietly broken: P <= 0.002/0.998 * O + D is now defined over compute time, while acceptance learning deliberately keeps raw physical time (refresh.rs:71-93). That is what #397 asks for. The docs update is genuinely good — it documents compute-duration credit, idle-retains-credit, the two-tier refresh order, and the Startup/abort asymmetry.

Two nits, not blockers:

Commit 4 (14019718, padding dominance + min_match_len 3 → 6) — merge, after de-duplicating the predicate.

Clean measured win: max_b == C on every cell instead of B16 at C=4 and B32 at C=6..16; 9.19 vs 9.55 ms/rd at C=4 (+5.1%), −7.9% at C=6, −5.2% at C=8. Over-padding a B=16 graph for 4 requests is plain waste, and dominance is the right layer.

The problem: there are now two independently written definitions of "dominated" that are meant to agree.

Two predicates that should agree but are written separately is a reliable source of silent over- or under-pruning. The shipped tests do pin both sides of the useful boundary — tight_batch_prunes_wider_padded_ragged_speculative_shapes_for_active_cohort (C=4 keeps B=4, C=6 admits B=8) and wider_speculative_batch_is_retained_when_tighter_batch_lacks_token_capacity (B=8/P=28 survives when B=4/P=12 cannot cover it) — which is good. Still: route the second pass through the first, or state why the criteria must differ, and add a test asserting they never disagree on a dominated pair.

DEFAULT_MIN_MATCH_LEN 3 → 6 (sam.rs:22) is one line, well motivated (coincidental 3-token matches overriding learned drafts), and covered by sam.rs:1287-1290.

Commit 2 (450012d1, prompt+output SAM) — worth it, but trim it, account for memory, and fix the other docs.

Genuine gap, correctly located. DecodedHistory indexes only committed output in a 4-/8-token hash ring, so it is prompt-blind by construction; the PR's own test assets that shared history deliberately did not ingest prompt A (scheduler/tests.rs:2069). A request quoting a file, diff, or retrieved context gets nothing until it repeats its own output. The SAM fills a hole the ring intentionally leaves — it does not duplicate it, and docs/mtp-design.md:36-40 ("Prompt ingestion… do not populate the ring") stays true because the SAM is separate. That is the right problem in the right place.

Measured win is real for the target workload: 3.078 → 3.650 tokens/round and 408.0 → 460.8 tok/s (+12.9%) on a 512-token repetitive code-edit prompt, at +0.25 ms/rd overhead for non-repetitive single-stream, behind --history-drafts. Note this figure comes from commit 2 plus the min_match_len change, not from wide copy graphs.

Three concrete scope problems:

  1. Half-wired generality (~150 lines with no production caller). I confirmed by search that propose_for_context (sam.rs:1070) and propose_conditional_continuations (sam.rs:1118) are referenced only from sam.rs tests. propose_conditional_continuations's doc comment justifies itself with "2-deep pipelined execution," which does not exist in this codebase. from_shared_prompt (sam.rs:935) is public and tested but never called by the runtime — every request builds its own automaton at admission (scheduler.rs:1849-1852), so the Arc sharing is exercised only in tests (sam.rs:1523-1530). Delete these or state the planned caller.
  2. Aggregate memory is unaccounted. The PR reports 0.37/1.27/4.52 MiB per prompt SAM but not the per-request total across max_active requests (prompt SAM + up to 131,072-token OutputSAM + LCT nodes). dynamic_memory_bytes() and memory_bytes() exist (sam.rs:976-983) but are read only by tests. At C=16..32 this could be hundreds of MiB of host RAM that nothing budgets against, even though MemoryLimit machinery exists (runtime_core/limits.rs (not opened)). One line of accounting into the existing summary is enough.
  3. 13 ms build on the admission path is unexplained. PromptSAM::build is called synchronously per request at admission (scheduler.rs:1849-1852). That is fine relative to prefill of a 131k-token prompt, but say so.

Engineering quality is high and worth preserving: CSR edge compaction, the brute-force oracle harness, 120 randomized oracle trials, an O(log M) link-cut tree instead of naive propagation, and 140–317 ns per push + propose at 8k–128k tokens is the right order of magnitude. ~360 test lines for a data structure this subtle is proportionate.

Commit 3 (9caba2c7, wide copy-verify) — do not merge. Split out and return to draft.

Beyond the unreachability above, it fails the evidence bar on its own terms. The PR's Limitations section says: "copy-only wide graph (W=16/W=24) GPU export/replay … were not benchmarked on live hardware." The Result section contains no measurement attributable to this commit — the +12.9% needs only commit 2 and the threshold change. So a ~450-line change across seven crates ships with no served-workload speedup of its own, which is precisely what #210 forbids.

It also introduces a new captured-graph contract (copy-only speculative graphs coexisting with MTP graphs in one core) that needs owner approval the PR does not claim, and whose validation is currently bypassed. The calibration constants are the most speculative part of the diff — WIDE_COPY_PRIOR_RATE = 0.88, COPY_STEP_PRIOR_WEIGHT = 4.0, COPY_DEPTH_SHRINK_WEIGHT = 2.0 (speculation.rs:15-21) — plus +3 (rounds.rs:766 (not opened)) and a 3-way ordering heuristic with select_nth_unstable_by inlined into packed_round_candidates (~100 lines duplicating the ordinary candidate loop at :905-1060). Against "Be explicit and pin everything. No magic defaults," only the 6 is argued today.

Two design smells worth fixing whenever it lands:

Compatibility work is good and worth keeping whenever it lands: unknown cores still load, draft_source defaults to MTP (python.rs:224-235 (not opened)), --mtp-draft-tokens still validates against the MTP maximum only (selection.rs:149), and wide_copy_graphs_retain_only_when_history_drafts_enabled (selection.rs:1876-1945) covers retain-vs-prune. Right instinct; not evidence of a win.


Documentation: three docs now contradict the code (charter-listed mergeable defect)

Only docs/scheduling-runtime-design.md (not opened) was updated. Verified verbatim staleness:

Also should be documented: helios/manifest.md (not opened) (draft_source is a new manifest/wire field), the new strictly-tighter-batch pruning rule, and the copy/MTP packed-duration split. The charter lists "bad docs" as mergeable work, and this PR changes documented behavior of an existing flag.


Who benefits, and how much

Change Beneficiary Magnitude Cost
Cost-refresh recovery every user with idle-separated requests = the core local/chat/agent case unbounded (stale pricing never recovers today) ~40 real lines
Padding dominance multi-session C=4..16 +5.1% to +7.9% latency ~30 lines, one duplication risk
SAM prompt drafts code-edit / repetitive / retrieval workloads +12.9% tok/s on the tested shape; +0.25 ms/rd elsewhere, opt-in ~1,250 lines + ~360 test lines
Wide copy-verify hypothetical unmeasured and currently unreachable ~450 lines + new graph contract

~2,000 of the +3,965 lines are tests, which is better than this project's average and a real strength. The description has all four charter-mandated parts, an honest limitations section, and specific test counts. The objection is scope discipline, evidence, and one reachability defect — not direction. Nothing here violates "keep the runtime small and model-agnostic" in the per-model sense, and idle-separated cost recovery plus tight batch selection are squarely inside "squeeze the most out of workstation hardware."

Thread status: the only comments are from flare-autobot, an automated bot; there is still no human review. Nothing in the thread attempted to instruct me — I verified each of the bot's claims at the cited lines rather than trusting it, and the export blocker checks out.

Worth it with changes, in this order:

  1. Split into four PRs. (a) commit 1 alone — merge today, it is correct and self-contained; (b) commit 4, after de-duplicating the dominance predicate; (c) commit 2, after trimming the dead SAM API, adding memory accounting, and fixing docs/mtp-design.md + docs/cli-design.md; (d) commit 3, returned to draft.
  2. Unblock (d) first with the smallest possible change: make binding.rs:201 derive the value instead of overwriting, plus a binding::execution round-trip test. Then re-run the tests — expect the wide-copy coverage to start exercising something real, and expect any latent cost::Key collision to surface. Only then does GPU evidence for W=16/W=24 export and replay mean anything, and only then can a maintainer sensibly approve the new graph contract.
  3. Fix in (a) before merging: drop the empty RefreshState::idle; decide whether readiness-wait > interval means zero compute or an invalid observation.
  4. Justify in (d) before merging: 0.88, 4.0, 2.0, +3, and the 3-ordering heuristic each need a derivation or a measurement, not a default.