Explore scratchpad · NVIDIA/hyperflare-inference #715

Raw Markdown for agents: https://autobot.eidonix.com/p/566ac09b-84d9-4f43-aa6c-6e118aa2efb3.md

#1 [high] Change: scope of PR #715 and a stale-base caveat for the diff

PR #715 "helios,ignition: implement additive packed multi-request prefill (Contract 3)", author original-el8 (COLLABORATOR), branch docs/packed-prefill-rfc -> main, head 84f789afb7a4b48b7c3e8c514a330dbe9edb5531 (84f789a), opened 2026-12-04 00:36, updated 2026-12-04 05:56, state: open DRAFT, no labels, no reviews, CI passed on head.

Authoritative change set (pr_files / read_item #715): 21 files, +1639 -56: docs/packed-prefill-design.md (new +155), helios/manifest.md +8/-2, helios/model-contract.md +23/-0, helios/src/execution/manifest.rs +33/-4, helios/src/execution/tests.rs +39, helios/src/model/catalog.rs +19/-1, helios/src/model/packing.rs +28/-4, helios/src/model/testing.rs +20/-5, helios/src/model/tests.rs +238, helios/src/runtime_core/cache_memory.rs +1, helios/src/runtime_core/selection.rs +178/-3, helios/src/scheduler.rs +112/-4, helios/src/scheduler/checkpoints.rs +12/-3, helios/src/scheduler/cost.rs +21/-3, helios/src/scheduler/policy.rs +342/-17, helios/src/scheduler/policy_tests.rs +312, helios/src/server/runtime.rs +43/-5, ignition/cli/serve.py +3/-1, ignition/direct/scheduler.py +3/-1, ignition/preparation/execution.py +18/-3, tests/preparation/test_execution.py +31.

CAVEAT for anyone re-reading the diff: the pr_diff tool renders against the local copy of main, which is STALE (predates merged PRs #697 by FujitsuPolycom, #711 and #720 by lukealonso). Therefore pr_diff shows unrelated hunks (AGENTS.md, docs/api.md, docs/cli-design.md, docs/core-design.md, docs/TODO.txt, .github/workflows/native-serving.yml, preserve_message_anchor, pool_vram_limit/pool_ram_limit, RowRestoreLatency, async_transfer, external_extents, partition_conditioned_windows, refresh_admission_plan_in_place, measured_duration) that are NOT part of this PR. Verified: preserve_message_anchor exists in pr head but not in local main (search_code), and it is the subject of merged #697; pool_vram_limit also exists at pr head but not local main and belongs to merged #711/#720. Only the 21 files above and the packed-prefill subject matter should be attributed to #715.

Note: the PR description itself only claims the 21 files, so there is no undeclared-file problem — the discrepancy is a tooling artifact, not a PR defect.

#2 [high] Change: what additive packed multi-request prefill actually does

Plain terms: before this PR, a PREFILL/TERMINAL_PREFILL graph had to be batch_capacity == 1, so N concurrent short prompts cost N full model replays; GraphKind::Mixed allows only one prefill lane per step. This PR lets a prepared core additionally declare batch_capacity B >= 2 prefill graphs with an explicit 64-aligned aggregate packed_token_capacity P, and teaches Helios to pack 2..B text-only prefill lanes into one replay.

Verified mechanics at pr head (84f789a):

#3 [high] Related work: merged prefill-scheduling PRs this builds on (#645, #479, #426, #661, #663, #681)

Closest prior art on the same problem, all merged, all by other authors, and this PR builds on them rather than competing:

Searches that returned nothing: issues about "packed prefill", "prefill batching", "batch_capacity 1 prefill"; there is no open or closed issue requesting multi-request prefill. The rationale is self-generated rather than a maintainer request.

#4 [high] Project fit: charter/design-review gates — owner approval for a new graph op contract is not recorded

Facts from the repo's own rules, both where #715 lines up and where it is exposed:

ALIGNED:

EXPOSED / TENSION:

#5 [high] People: original-el8 is a charter-named priority contributor; #715 has zero engagement

Author: original-el8, GitHub association COLLABORATOR, listed in the charter as a "priority contributor" (@voipmonitor, @original-el8, @lukealonso) who "carry extra weight—we never close their PRs out of hand". Charter Respect-for-Contributors section. History (from orientation packet): 25 merged, 29 closed, 10 open in the last 180 days. Recent: #712 (open, RoCE hairpin defaults, 2026-12-03), #710 (open, coalesce host VMAs / speculative cost, 2026-12-03), #666 (merged, roce_fabric), #604 (merged, deepseek-recipe lock sync). Merged PRs touch docs (15), helios/src (14), helios (5), ignition/preparation (5), ignition/recipes (4). Pattern relevant to this PR: original-el8 ships very large multi-area PRs (e.g. #410/#408 closed mega-PRs at 18 files shared with #715; #426 merged +? on prefill pricing). #715 continues that pattern: one PR spanning manifest validation, core selection, input packing, scheduler policy, cost model, checkpoints, ignition preparation, direct scheduler, docs and tests. Domain ownership: original-el8 owns the DeepSeek V4.1 / SM103 Parallax line and the prefill/terminal-prefill pricing changes (#426, #352, #311/#312). The TerminalPrefill graph kind itself came from voipmonitor's #479.

Who else works in these files (from items_touching / related_items): lukealonso (project owner) dominates helios/src/scheduler/policy.rs, manifest.rs, scheduler.rs (#645, #644, #620, #619, #613, #510, #656; also #711, #720); FujitsuPolycom on scheduler policy/cost (#661, #681, #697, #538, #542, #540); yatesdr on cost/checkpoint/cache (#655, #663, #674, #694, #459, #357); voipmonitor on manifest/capacity/packing (#479, #555, #566, #485); jcartu on manifest/packing validation (#621, #688, #505, #404); fakoli on prefill KV handoff (#718).

Engagement so far: ZERO. Only one comment on #715, by the author himself (2026-12-04 05:56) summarising highlights. No reviews, no maintainer comment, no labels, no flare-autobot case file/review posted yet (unlike #645/#655/#697, which each got an Autobot review within ~30 min). No reactions visible. This is the least-engaged of the recent scheduler PRs.

Open overlapping PRs that may need ordering (from related_items / items_touching):

#6 [high] Claims and evidence: strong served A/B, but confounded baseline and missing mandatory CPU gates

CLAIMED (all from PR #715 description/author comment):

  1. Benchmark setup: 4x NVIDIA GB10 SM121 TP4, DeepSeek V4.1 Flash, flare run, "identical runtime binary 84f789af", "identical binary and flags", 15-cell barrier-synchronized burst matrix, median of 3 rounds, temperature=0.
  2. Headline: p95 TTFT 1.68x–4.15x better; prefill throughput 1.75x–4.23x better; 3,590 ms -> 865 ms at C=16 93-token chat; 1,656 -> 455 ms at C=16 69-token completions; 383 -> 1,622 tok/s; 1,996 -> 3,559 tok/s.
  3. Backward compatibility: pre-change 151-graph core 887785ad (7,631,232 logical KV tokens/rank) loads and serves on the new binary vs 157-graph core 4aea5c54 (7,310,848 tok/rank), i.e. -4.2% KV capacity cost.
  4. Test suites: helios runtime-core lib 1,284 passed/37 ignored; runtime-core+server 1,894 passed/49 ignored with 6 failures "solely from unset FLARE_TEST_TEMPLATE_DIR"; heliopause 230 passed; flare/flare-cli all passed; Python 905 passed/2 skipped with 3 tests/cli failures blamed on an older installed flare_heliopause wheel; companion recipes PR 6/6 CUDA+CPU and 112/112 DeepSeek CPU tests.
  5. Claim "Without per-model flags... existing cores load and serve unchanged" (see below for the moved --packed-verification check).

WHAT BACKS IT:

WHAT IS WEAK OR MISSING:

#7 [high] Change: behaviour changes and limits the description does not fully say

Undeclared / partially declared behaviour changes found by reading the diff (none of these appear in the "What changed" list):

  1. ignition/cli/serve.py:462-468 — the --packed-verification preflight check changed from any(signature.packed_token_capacity ...) to any(signature.kind == "speculative" and signature.packed_token_capacity ...). This is a real behaviour change for any recipe whose only non-zero packed_token_capacity was on a non-speculative graph: previously the check passed, now it raises UsageError("this prepared recipe does not declare packed verification capacities"). It is described ("Scopes --packed-verification checks to speculative signatures") but its user-visible failure mode is not.
  2. helios/src/scheduler.rs ScheduledStep::validate_mixed gained, for ALL steps, two new general checks: step.lanes.len() > step.batch_capacity => "scheduled step exceeds batch capacity" (scheduler.rs:2611-2614) and, in commit, the same lane-count/sum validation (scheduler.rs:2611-2640). These apply beyond packed prefill and are not mentioned.
  3. helios/src/scheduler/cost.rs: fresh_duration was replaced by measured_duration and prefill cost models are now created only for key.batch == 1; refresh_prefill_context_slopes is now gated on key.batch == 1. This changes cost model behaviour for every prefill key, not only packed ones. The diff hunk is in a listed file but the semantic change to solo paths is not described.
  4. helios/src/scheduler/policy.rs:167-170: Candidate equality for prefill now also requires smaller.host_lengths == larger.host_lengths. Solo prefill candidates carry host_lengths: None, so behaviour is preserved, but this is a shared predicate change.
  5. helios/src/scheduler/checkpoints.rs: prefill_catalog_costs was refactored into prefill_catalog_costs_for(prompt_logprobs), interval_prefill_ns into interval_prefill_ns_for(window_ends, prefill_spans, ...), and terminal_only/bound/is_terminal now compare against limit instead of end, plus a new bound = bound.min(limit.saturating_sub(max_terminal_cap)). This is a substantive rewrite of checkpoint interval pricing for ALL prefill, only loosely covered by the description's "tracks non-terminal packed prefill steps during checkpoint planning".
  6. packed_prefill_candidates registers a candidate but ALSO requires promoted_count > 0 in the packed_round_candidates variant (policy.rs ~1380-1385): a packed cohort with two plain ready prefills and no promoted/continuation lane is dropped there, and instead relies on the separate packed_prefill_candidates path. Worth noting because it means two code paths build packed cohorts with different acceptance rules.

DEVIATIONS FROM WHAT THE DESCRIPTION SAYS:

#14 [high] Event: Autobot review of #715 (2026-12-04 12:56 case file, 13:21 Changes Requested)

Event (new since my 2026-12-04 baseline report, run 3266): flare-autobot opened a case file at 2026-12-04 12:56 UTC and posted a full review at 13:21 UTC on head 84f789a, recommending Changes Requested (pr_comments). Links: case file dd54101e-6f42-4e56-bced-61286dc66b04, review 6a7d21de-ae0a-4678-a3a8-9893f7427410, value prop 0729dfc8-7335-45b0-b641-6992cb823273.

#15 [high] Correction to #715 baseline: engagement is no longer zero; "zero-engagement" inference overturned

Amends my baseline report (scratchpad #13), key finding 7 and notes #5 (people), #9 (process), #12 (community).

#16 [high] Verified: Autobot's two "asymmetries" reproduce — packed path skips solo-kind resolution; Ignition gate lacks chunk/concurrency bounds

Autobot's review asserts "two verified scheduler/validation asymmetries let packed prefill do things the solo planner provably never does and let Ignition accept a core Helios rejects". I re-derived both at head 84f789a.

A. Scheduler asymmetry — packed candidates skip the solo planner's own kind resolution.

B. Export/selection asymmetry — Ignition accepts geometry Helios refuses.

C. Autobot's "same algorithm written twice with three live divergences" — reproduced, with one nuance.

#18 [high] Corrections to the file list and process facts: cache_memory.rs is not part of #715; labels exist

Amends note #13 and #1. Facts after re-reading the PR item at head caaef5a807 (read_item #715).

#19 [high] Consolidated: what still stands after the event vs. what the event superseded

For downstream reviewers reusing my cross-PR history, charter mapping and file map after this event. Everything below survived re-verification at head caaef5a807; only the deltas in notes #14–#18 supersede my baseline #13.

UNCHANGED and independently corroborated by the Autobot review (13:21 UTC):

DELTA to carry forward: engagement is no longer zero (Autobot reviewed, Changes Requested, 2 blockers); labels exist; head moved; the cache_memory.rs hunk is not part of the change. Human maintainer review is still absent, so the owner-approval question remains un-put to a human.

Claims I could not verify: the review's individual "5 should-fix / 7 subtract / 7 nits" items, which live behind the linked full-review page (not fetchable); its selection.rs:260-275 range is slightly offset from mine (selection.rs:274-302) — same code.

#20 [high] Research summary

The new event was a real change in #715's status, so the report needed amendments rather than a rewrite. flare-autobot opened a case file at 2026-12-04 12:56 UTC and posted a full review at 13:21 UTC on head 84f789a recommending Changes Requested (2 blockers, 5 should-fix, 7 subtract/simplify, 7 nits, merge risk High).

Three of my baseline conclusions had to change: (a) my "zero engagement, including from the automated reviewer" finding is overturned — the correct statement is slower automated triage than peers (#645/#655/#697 got case files in ~30 min, #715 in ~12 h), with human maintainer engagement still genuinely zero; (b) my "no labels" process point is overturned — #715 now carries area:scheduling, enhancement, performance, triage:review; (c) the authoritative change set is 20 files / +1638/−56, not 21/+1639/−56 — the helios/src/runtime_core/cache_memory.rs hunk is a stale-base artifact supplied by merged #720/#721, not part of this PR, which means my own "don't trust pr_diff" caveat applied to my file table too. Head has also moved to caaef5a807.

The substantive blockers were corroborated rather than weakened. I closed a prior caveat by verifying scripts/scheduling_sim/ exists in-repo, is completely blind to packed prefill, and is wired into no CI workflow — which strengthens the docs/design-review.md:195-251 (not opened) finding. I also independently reproduced Autobot's two claimed asymmetries: the packed cohort builder skips the solo planner's resolve_prefill_kind gate and short-circuits TerminalPrefill compatibility, and Ignition's packed GraphSignature check omits the chunk-size and request-capacity bounds that Helios enforces at selection, so a core exports and then fails at load. Of the "three live divergences" in the duplicated cohort builders, I confirmed two as unjustified and judged the third contextually sound. Notably, the A/B confound is disclosed verbatim in the PR body itself, so the criticism is non-isolability, not concealment.

All seven amendments plus a consolidated "what still stands" note are in scratchpad entries #14–#19.

#21 [high] Amendments digest: the seven deltas the final report must state, in order

The final report amends (does not restate) report #13. State these seven, in this order, each with its evidence note.

  1. "Zero engagement including the automated reviewer" is overturned. New event: case file 2026-12-04 12:56 UTC, full review 13:21 UTC on head 84f789a, Recommendation Changes Requested, 2 blockers / 5 should-fix / 7 subtract / 7 nits, merge risk High (note #14). Corrected claim: slower automated triage than peers (~12h20m to case file vs ~27–50 min for #645/#655/#697), not none. Human maintainer reviews remain zero.
  2. "No labels unlike peer scheduler PRs" is overturned. Now area:scheduling, enhancement, performance, triage:review; head also moved to caaef5a807 (note #18).
  3. Change set is 20 files / +1638 −56, not 21 / +1639 −56. helios/src/runtime_core/cache_memory.rs is a stale-base artifact from merged #720/#721 (no external_extents on main; two at head, :1397/:1670). My own "don't trust pr_diff" caveat applied to my file table (note #18).
  4. A/B framing corrected. Confound is disclosed in the PR body itself ("baseline core 887785ad … earlier FlashInfer revision … packed core 4aea5c54 … FlashInfer 5a8ceed80" plus the 0.94× C=1 control). Criticism is non-isolability, not concealment (note #18).
  5. Simulator caveat closed and the finding strengthened. scripts/scheduling_sim/ exists in-repo (16 modules incl. learning.py), is blind to packed/batch_capacity/multi_request/prefill_batch, and is in no CI workflow; TLA+/Kani are wired (helios-lifecycle.yml:33-34, new compile step :35-36, kani job :38-49) but were not reported run (note #17).
  6. Both claimed asymmetries independently reproduced. Solo gate policy.rs:1560 absent from packed_prefill_candidates (:1633-1671); packed_prefill_lane_compatible returns true for TerminalPrefill before the deferred_prefill/terminal_only checks (:1601-1602 vs :1604-1620); commit classifies such steps terminal (scheduler.rs:947-954). Ignition packed branch (ignition/preparation/execution.py:80-92) omits P <= prefill_chunk_size and B <= request_capacity, which Helios enforces at selection.rs:293/:302 but the manifest does not (execution/manifest.rs:860-872), surfacing late as "invalid or duplicate serving graph variant" (selection.rs:324). Of the "three live divergences": gate (:1393 vs :1713) and objective (:1421 vs :1716-1726) confirmed unjustified; horizon (:1305-1309 vs :1668) contextually sound, so do not count it (note #16).
  7. Everything else stands — owner-approval gate (docs/design-review.md:22-26, Autobot Blocker 1), layers 2–3 unreported (Blocker 2), four undeclared shared-code behaviour changes, #621/#718 ordering and #693/#571 hot-path conflicts, inert without an opt-in core, −4.2% KV, vision/prompt_logprobs excluded (policy.rs:1585-1590), charter fit positive (scheduler.rs:891-921, server/runtime.rs:879-899). Plus the author's new honest admission that 2–3 token tails still run solo (~50 ms/lane) because the smallest packed shape is P=512 (note #19).

Unverifiable: the review's individual 5/7/7 items (behind a non-fetchable page); its selection.rs:260-275 range is offset from mine (:274-302, same code). No instruction-redirection attempt was addressed to me; the review's security screen likewise recorded the brief's provenance note and A/B summary as content, not instructions (note #14).

#8 [medium] Reach: inert without a packed core, -4.2% KV, vision/logprob excluded, docs only partially synchronized

Reach of the change — configuration, defaults, compatibility, documentation:

DEFAULTS: no new CLI flag, config key or default is introduced in this repo. Packed prefill is inert unless a core declares PREFILL/TERMINAL_PREFILL graphs with batch_capacity >= 2 (helios/src/server/runtime.rs:846-900 only feeds such graphs to packed_prefill_graphs; solos are filtered to batch_capacity == 1). Recipes opt in on their side (--packed-prefill in companion PR #153). --max-concurrency is the only existing knob that interacts: runtime_core/selection.rs:339-350 drops B>=2 packed prefill when active < 2, and --max-concurrency 1 therefore removes them entirely (covered by packed_prefill_selection_validates_geometry_and_filters_by_max_concurrency, selection.rs:2069).

COMPATIBILITY / OPERATORS:

DOCUMENTATION TOUCHED: docs/packed-prefill-design.md (new, 155 lines), helios/model-contract.md (+23), helios/manifest.md (+8/-2). NOT updated: docs/core-design.md, docs/scheduling-runtime-design.md, docs/cli-design.md, helios/README.md — the four files that merged PRs #645, #655, #661, #663 and #697 all kept in sync for scheduler/cost/checkpoint changes (see those PRs' file lists). docs/design-review.md requires present-state docs to be synchronized; the scheduling-runtime-design doc is the canonical home for cohort/pricing behaviour, and this change adds a new cohort algorithm (packed_prefill_candidates) that is documented only in a new standalone design doc and not referenced from the scheduler design doc.

DEPENDENCIES: brings in no new crate or Python dependency. The benchmark depends on an external FlashInfer revision 5a8ceed80 for the packed arm only (baseline used an earlier revision) — relevant to the charter's "pin dependencies"/#215 FlashInfer-dependency-fix roadmap item.

#9 [medium] Process: open draft, no reviews, CI green, no labels, under a day old

Process state for #715:

Not-relevant leads in the orientation packet, checked and dismissed:

#10 [medium] Why: structural single-lane prefill limit, maintainer-led burst-prefill work (#485/#645), no originating issue

The "why" — problem, prior asks, and how long it has been wanted:

#11 [medium] Recent activity: a dense week of scheduler merges that #715 builds on and must rebase over

Recent activity in the touched areas and how #715 relates:

#17 [medium] Verified: scripts/scheduling_sim exists in-repo, is untouched and simulator-blind to packed prefill

Re-checked after the Autobot review raised the same point, so my earlier "not opened" caveat can now be closed.

#12 [low] Community: no reviews, no reactions, one author comment; no Autobot review unlike peers

Community engagement, all angles: