Explore scratchpad · NVIDIA/hyperflare-inference #645

Raw Markdown for agents: https://autobot.eidonix.com/p/f85023a7-faa9-48ea-a784-d6fd154322f8.md

#1 [high] Change: PR #645 shape and what it touches

PR #645 (lukealonso, open, ready for review, head 05cccb6, base main, opened+updated 2026-11-30, CI passed, no reviews, no comments). Closes #485. 20 files, +1417/-127.

Files (from pr_files):

Citation: pr_diff, pr_files.

#2 [high] Why: closes #485 (voipmonitor prefill timing aliasing report)

#485 (voipmonitor, COLLABORATOR, open since 2026-11-23, labels area:scheduling/bug/performance/triage:design-review, updated 2026-11-30) reports flare_graph_launches_total{kind="prefill"} drifting up across consecutive 128k requests on DeepSeek-V4.1-Flash TP4 (18 -> 29 -> 31 prefill launches; 3942->4012 ms GPU) because ActionCosts keeps one 9-sample median per (kind,batch,tokens) regardless of KV history depth. Root cause named as cost.rs ReplayTimes.

#3 [high] Undeclared: new coalescing coefficient absent from documented PolicyConfig table and CLI

The PR adds PolicyConfig::coalescing_horizon_tokens (default 64.0, policy.rs:26,42; validated nonneg at policy.rs:225-230) — but the two places that enumerate PolicyConfig defaults to users were NOT updated:

#4 [high] Cost model: checkpoint pricing stride fast path silently lost once fills are non-constant

checkpoints.rs's O(1) "stride" fast path now depends on the fitted predictor being constant: interval_prefill_ns builds stride only from entry.non_terminal?.constant_ns()? (checkpoints.rs:222-232, changed line 225 from entry.non_terminal_ns?). PrefillPredictor::constant_nanos is Some only when the NNLS fit ends with theta1 == theta2 == 0 AND u_max >= 0.75 (cost.rs, fit(): let constant_nanos = (best_theta[1] == 0.0 && best_theta[2] == 0.0 && u_max >= 0.75).then_some(...)). Consequence: as soon as partial-fill samples (u <= 0.5) appear in any stratum, a prefill graph stops being "constant", the stride is None, and interval_prefill_ns falls back to the per-position loop that prices every catalog capacity at every chunk boundary (checkpoints.rs:270-338). Before this PR a prefill graph with any measured cost always qualified for the stride once all costs were known, so this is a checkpoint-pricing work regression path that the description does not mention (it says constant predictors "preserve checkpoints.rs's O(1) stride path and single-lookup budget", which is true only for the constant case). The existing budget tests still hold only in regimes where the predictor stays constant (checkpoints.rs:1292-1312 and 2375-2378 assert ENTRY_LOOKUPS == 0 / STRIDE_RUNS behaviour), i.e. the tests do not cover the non-constant regime introduced here. ENTRY_LOOKUPS is incremented in cost.rs:675 (ActionCosts::entry), so any per-capacity predictor lookup in the walk counts against that budget. Citations: helios/src/scheduler/checkpoints.rs:222-232, 270-338, 1292-1312, 2375-2378; helios/src/scheduler/cost.rs:675, PrefillCostModel::fit.

#5 [high] Change: two-frame nonterminal PREFILL pipelining sites, guards and reversed test

Two-frame prefill pipelining is implemented by widening three separate "non-barrier graph kind" lists from Decode | Speculative to Decode | Speculative | Prefill:

#6 [high] Change: PrefillCostModel math, plumbing and the altered estimate in an existing phase test

Cost model internals (helios/src/scheduler/cost.rs, +497 lines):

#7 [high] Change: coalescing bonus formula, when it applies, and how it is credited

Coalescing bonus mechanics (policy.rs:440-620 coalescing_prefill_log_bonus, utility.rs LaneValue):

#8 [high] Related work: #644 same-author same-day overlap on utility/service/LaneValue

#644 (lukealonso, open, same day 2026-11-30, +649/-230) touches 7 of the same files: docs/scheduling-runtime-design.md, helios/src/scheduler/{policy.rs, policy_tests.rs, service.rs, utility.rs}, scripts/scheduling_sim/utility.py, tests/test_scheduling_utility.py. It rewrites LaneValue (adds decode_within, changes finish), delivery accounting (delivered = duration_ms, maximum_rate = 1.0), and the waiting-age/continuation in utility.rs, service.rs, policy.rs. #645 also adds a field to LaneValue (prefill_finish) and edits service.rs's service_rates and policy.rs's candidate scoring. They are not stacked (neither mentions the other) and both write utility.rs/service.rs in overlapping regions, so whoever merges second must rebase. #644 also states its own live measurements on 4x DGX Spark TP4 while #645's live run is on SM120; both touch the same simulator (scripts/scheduling_sim/utility.py) with different coefficient sets. #632 (original-el8, open, same day) touches policy_tests.rs and docs/scheduling-runtime-design.md:113-152 — different subsystem (rounds.rs calibration), additive; autobot noted "rebased over #620/#624, no conflicting open PR touching rounds.rs". #542/#408/#410/#334 (execution files) and #621 (model.rs/scheduler.rs) share files with #645 but on different concerns. Citations: related_items for 645; read_item 644, 632.

#9 [high] Related work: lineage of the three touched mechanisms (#619, #538/#550, #459/#426/#479/#582, #42/#43)

#12 [high] Project fit: charter evidence rule (#210) vs simulator-only A/B; magic defaults vs the "no magic defaults" rule

Charter (read_charter) statements relevant to #645, as facts:

#13 [high] Claims: which numbers have a baseline, which are simulator-only, which are not reproducible from the tree

Claims and what backs them:

  1. "burst_eight: 923.4 -> 1057.9 tok/s (+14.6%), max TTFT 920.0 -> 528.0 ms (-42.6%), 32/32 full B=8 rounds" — backed only by the Python simulator on the synthetic workloads.catalog() (scripts/scheduling_sim/workloads.py:9-22: prefill 2+p/64 ms, decode singleton 15/17.3/30 ms + 2*(batch-1)) with rate_history="service". Enforced as a test: tests/test_scheduling_utility.py:334-345 asserts max TTFT <= 528.0 exactly and every decode batch == 8. No Rust or live-GPU counterpart; the Rust burst test (policy_tests.rs:6489-6545) uses hand-set decode costs 27/30/37/48.5 ms for B=1/2/4/8 and only asserts "no sub-batch decode, >=120 full B=4 rounds, lower makespan".
  2. "8 x 8192 multi-chunk burst: 737.2 -> 831.2 tok/s (+12.8%), TTFT 1492 -> 1056 ms" — no workload in scripts/scheduling_sim/workloads.py is 8192 tokens (only 4096 bursts were added); the 8x8192 numbers are not reproducible from a checked-in workload, so they rest on an ad-hoc run.
  3. "#485 fixed: 100 consecutive 128-token tails (1.51 s) in a 3,584 graph neither evict nor undercut the 7.81 s full-chunk estimate over 1.76 s at 4,096" — fully backed by unit tests with those exact numbers (cost.rs tests, policy_tests.rs:6547-6581 short_prefill_tails_do_not_poison_full_chunk_graph_selection), but the numbers are inputs to the test, not measurements from a GPU; the 3,584/7.81 s vs 4,096/1.76 s figures are borrowed from #485's narrative.
  4. "46,509-token prompt, 12 consecutive nonterminal Prefill chunks over TP2, 2655.0 ms TTFT (~17,518 tok/s), clean SIGTERM rc=0" — the only live evidence that two-frame nonterminal prefill pipelining works end to end; single arm, no before/after, no metric that isolates the pipelining gain from prefill throughput.
  5. Live bursts 307.8 tok/s (B=4, 1121.2 ms max TTFT) / 363.4 (B=8, 2056.1 ms) — no baseline; on an SM120 host while the scenario that motivated the change (Nemotron-3.5-Super-VL on 2-Spark SM121) is declared unmeasured.
  6. Test suites: eos 2, selene 548, selene-manager 188, helios 1742 passed/46 ignored (one engram test needed --test-threads=4), flare/flare-cli all passed, lifecycle check with --mutations exit 0 over 8 TLA+ models, pytest 644 passed. Unrun: 6 chat-template tests (prepare_templates.py HTTP 403 on gated repo meta-models/Muse-Spark-Open-816B-A42B-NVFP4 — infra, unrelated to the diff), 64-seed learning validate sweep, live SM121 A/B. CI on head: passed (orientation packet). Citation: description; tests/test_scheduling_utility.py:334-345; policy_tests.rs:6489-6581; cost.rs tests; workloads.py:9-22,50-53.

#14 [high] Change, reach and process: mixed/prefill guard details, continuation branch, harness sync, process facts

(1) Mixed-graph fixes: learning::optimistic_tokens now forecast_tokens(&self.powered_curve(request, true), width) (learning.rs:11-13) instead of summing speculative_curve, so it now honours adaptive_verification_alpha. Mixed decode rate/continuation paths gained a !prefill guard plus powered_curve/forecast_tokens (service.rs:232-260; policy.rs mixed loop ~791-806), and unmeasured prefill discovery switched to effective_prefill_catalog (policy.rs:341-352, used at 741-745, 966, 1270). Tests: policy_tests.rs:6583-6635 unmeasured_terminal_prefill_discovery_uses_terminal_catalog_and_mixed_respects_alpha. (2) Undeclared behaviour change in the mixed branch: else if r.generated_tokens > 0 became else if r.consumed_tokens >= r.prompt_tokens as u64 && r.generated_tokens > 0 (policy.rs:812-820 region) — prefilling lanes that already hold generated tokens no longer take the mixed decode branch. Not mentioned in the description. (3) continuation_candidate got a dedicated prefill branch (policy.rs:932-1010): per slot it calls prefill_entry(following, width) and predict(work, scheduled_consumed), treats following == TerminalPrefill as matching a promoted Prefill, and consults effective_prefill_catalog for the natural-fit filter. In add_candidate a prefill winner is now selected per capacity by ValueRate over each slot's predicted cost (policy.rs:1245-1315), and feedback is left optimistic (!matches!(kind, Decode|Speculative|Prefill)) with a comment that materialize recomputes the authoritative plan_requires_feedback (policy.rs:1288-1290, 1702-1711, 1797). (4) verification/helios-lifecycle/check.py:544-610 embeds verbatim source text of prefill_requires_terminal_completion/_from for the Rust↔TLA trace harness; that is why the verification dir is touched, and any later edit to the function must be mirrored there. (5) Reach: no Protobuf/core ABI change (description; file list has no .proto/ignition change). Because ActionCosts::get re-routes every single-lane prefill step through prefill_duration, each planned prefill's duration and expected_finish_ns now depends on live work + start_position, which feeds queue windowing (window_remaining, policy.rs:423-438) — so both pipelining depth and admission timing move, for every prefill-capable core, with no flag. Multi-lane prefill observations record only lane 0 (cost.rs:709-723). (6) Process: open, "ready for review", 0 reviews, 0 comments, no labels, opened and last updated the same day 2026-11-30, CI passed on head 05cccb6, a single commit 05cccb65 (no review-driven fixups yet). (7) Angle with nothing found: Community — no reactions, no reviews, no discussion, and no third-party engagement of any kind on #645.

#10 [medium] People: author standing, file ownership, and zero engagement

lukealonso (COLLABORATOR, listed as a priority contributor in the charter: "Priority contributors (@voipmonitor, @original-el8, @lukealonso) carry extra weight"): 26 merged PRs in the last 180 days, 2 open (#644, #643) plus #645; 229 of the commits on helios/src in the last 180 days and 384 on docs/ are theirs, i.e. they are the dominant author of exactly the scheduler/policy/cost files this PR rewrites (also authored #613, #619, #620, #626, #510, #608, #614). Cost.rs history is nearly all lukealonso (b9ad16b7, 18cb0efc, 8c117854, d796..., d7938c98, fd6c0f3b, 9a054b49) with yatesdr (#459) and Martin Vit (#555) interspersed. Other people active in these areas: Martin Vit (52 commits in helios/src), yatesdr/47, voipmonitor (issue #485 author, prototype branch), original-el8 (#426, #479, #632), FujitsuPolycom (#538, #542, #582), javieratomic (#334), jcartu (#621). Engagement so far on #645: none — no comments, no reviews, no labels, zero discussion. (Compare #619, #538, #632: each drew an autobot case-file comment and an autobot "Changes Requested" review within ~30-90 minutes with blockers about missing live A/B evidence.) Contact: "Discord: lukealonso" in the description.

#11 [medium] Recent activity: builds on a dense 10-day merge run in the same files (#510-#626)

Recent commits in the touched areas (up to head 05cccb6, 2026-11-30):