Repository navigation
helios,ignition: implement additive packed multi-request prefill (Contract 3) - #715
original-el8 wants to merge 4 commits into
Conversation
|
Implemented additive Highlights (4× NVIDIA GB10, SM121, TP4, DeepSeek V4.1 Flash)
Full 15-cell A/B table, test results, and limitations are in the PR description above. |
|
A case file has been opened for 715. Future reviews will auto-run 90 minutes after code updates are pushed.
|
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedThe packed-prefill feature itself is well-built and correctly gated: geometry validation is complete and mutually consistent, the
Walkthrough
Merge Risk: High · up to
|
Solo prefill graphs (`GraphKind::Prefill` and `GraphKind::TerminalPrefill`)
require `batch_capacity == 1`, and `GraphKind::Mixed` admits at most one
prefill request per step. On memory-bandwidth-bound multi-host clusters such as
four NVIDIA GB10 GPUs running DeepSeek V4.1 Flash at TP4, reading MoE weights
dominates feed-forward latency up to 512–1,024 tokens (`3,947.3 us/layer` at 64
rows vs. `7,625.4 us/layer` at 1,024 rows on GB10 layer 3), so serializing
concurrent short or warm-prefix agentic bursts one request per replay inflates
p95/p99 TTFT.
Exact changes:
- Add `docs/packed-prefill-design.md`: specify a model-agnostic extension of
`GraphKind::Prefill` and `GraphKind::TerminalPrefill` reusing the
`(batch_capacity = B >= 2, token_capacity = W_req, packed_token_capacity = P)`
geometry established for `GraphKind::Speculative`, binding-derived text-only
eligibility via omitted `ValueSource::ImageFeatureSlot`, shared `ValueRate`
scheduler cohort packing across all cache schemes, and DeepSeek V4.1 recipe
integration without `PreparedDecoderSuffix` truncation for short bursts.
- No runtime, manifest, CLI, or recipe code is changed in this draft PR; it
requests project-owner approval on the operation contract, `ModelContract`
versioning, and non-terminal vs. terminal scope before implementation.
Expected benefit: enables design review and project-owner sign-off on packed
multi-request prefill before modifying Helios contracts, targeting a 3–6x
lossless reduction in concurrent short and warm-prefix burst TTFT on
bandwidth-constrained hardware with no impact on single-request prefill.
Evidence and material limitations:
- Single-GPU NVIDIA GB10 (SM121) layer-3 TP4 feed-forward CUDA-graph timings
(uncompressed native-scale DeepSeek V4.1 Flash checkpoint, median of 7
interleaved passes): 64 rows `3,947.3 us`, 128 rows `5,000.0 us`, 256 rows
`5,629.1 us`, 512 rows `6,619.4 us`, 1,024 rows `7,625.4 us`.
- Verified referenced file paths and symbols (`helios/src/model/{catalog,packing}.rs`,
`helios/src/scheduler/{cost,policy}.rs`, `helios/model-contract.md`) against
`origin/main` (`45e1c1ad`).
- Limitation: design document only; no runtime or recipe implementation or
end-to-end serving benchmark has been run yet.
Discord: el8
Design-Signed-Off-By: Antigravity (Gemini); design-review=2e5b
…tract 3)
Single-request prefill graphs (`GraphKind::Prefill` and
`GraphKind::TerminalPrefill` with `batch_capacity == 1`) serialize concurrent
short prompts and warm-prefix turns into separate full-model replays, and
`GraphKind::Mixed` admits at most one prefill lane per step. On
memory-bandwidth-bound GPUs, loading MoE expert weights dominates feed-forward
latency up to 512-1,024 tokens (`3,947.3 us/layer` at 64 rows vs.
`7,625.4 us/layer` at 1,024 rows on NVIDIA GB10 DeepSeek V4.1 layer 3 TP4).
Extending `Prefill` and `TerminalPrefill` additively within `ModelContract`
version 3 to accept `batch_capacity >= 2` with explicit `packed_token_capacity`
lets Helios pack concurrent text-only prefill lanes into one CUDA graph replay
without per-model flags, contract version bumps, or changes to single-request
or vision prefill.
Exact changes:
- Manifest, catalog, and selection (`helios/src/execution/manifest.rs`,
`helios/src/model/catalog.rs`, `helios/src/runtime_core/selection.rs`):
validate optional `Prefill` and `TerminalPrefill` graphs with
`batch_capacity` B >= 2, `1 <= W <= P`, and 64-aligned
`packed_token_capacity` P (`max(64, B) <= P <= B * W`,
`P <= prefill_chunk_size`, `draft_tokens == 0`); keep `B == 1` prefill
(`packed_token_capacity == 0`) and `ScoredPrefill` (`B == 1`) unchanged; and
filter `B >= 2` packed prefill graphs by `max_concurrency` (dropping them
when `--max-concurrency 1`).
- Input packing (`helios/src/model/packing.rs`, `helios/src/model/testing.rs`):
forbid vision bindings (`ImageFeatureSlot`, `ImageFeatureIndex`,
`ImageLeftContext`, `ImageRightContext`) on `B >= 2` prefill graphs, size
`InputIndexing::PackedToken` buffers to `packed_token_capacity` when nonzero,
and enforce `lane.tokens <= token_capacity`, `sum(lane.tokens) <=
packed_token_capacity`, and `image_slot.is_none()` during `pack_step`.
- Shared scheduler, cost model, and server runtime (`helios/src/scheduler.rs`,
`helios/src/scheduler/{cost,policy,checkpoints}.rs`,
`helios/src/server/runtime.rs`): register `B >= 2` packed prefill graphs in
`packed_prefill_catalog`, track per-shape durations via `ReplayTimes`, build
multi-lane text-only prefill cohorts greedily by marginal value rate and
value (with `Init`/`Restore` continuation valuation, padding pruning, refresh
probe validation, and `host_lengths` materialization), validate packed
prefill steps in `ScheduledStep::validate_mixed` and `commit`, and track
non-terminal packed prefill steps during checkpoint planning.
- Ignition and direct-mode scheduler (`ignition/preparation/execution.py`,
`ignition/cli/serve.py`, `ignition/direct/scheduler.py`): accept valid
`(B >= 2, W, P)` text-only prefill and `terminal_prefill` signatures while
rejecting vision inputs, scope `--packed-verification` checks to
`speculative` signatures, and key `B >= 2` packed prefill graphs separately
from `B == 1` solo prefill catalogs in `ignition.direct.scheduler.Layout`.
- Test compilation fix (`helios/src/runtime_core/cache_memory.rs`): populate
`external_extents: vec![]` in the `#[cfg(test)]` `Core` struct literal so
`--features runtime-core` unit tests compile.
- Documentation and unit tests (`helios/manifest.md`, `helios/model-contract.md`,
`docs/packed-prefill-design.md`, `helios/src/execution/tests.rs`,
`helios/src/model/tests.rs`, `helios/src/runtime_core/selection.rs`,
`helios/src/scheduler/policy_tests.rs`, `tests/preparation/test_execution.py`):
document the additive Contract 3 packed prefill rules and add tests covering
manifest/catalog/selection validation, multi-lane packing and vision
rejection, scheduler burst packing and isolation, and Ignition
`GraphSignature` validation.
Claimed benefit and result:
Before this change, Helios and Ignition rejected `batch_capacity >= 2` on
`Prefill` and `TerminalPrefill` graphs, forcing concurrent prefill requests to
execute one lane at a time. After this change, any prepared model declaring
text-only packed `(B >= 2, W, P)` prefill graphs within Contract 3 can coalesce
concurrent short or warm-prefix text requests into one CUDA graph replay under
the shared value-rate scheduler, while existing cores without `B >= 2` prefill
graphs load and serve unchanged. End-to-end TP4 burst TTFT reductions are
expected from amortizing MoE weight loads and remain unmeasured until an
exported packed-prefill core is benchmarked through `flare run`.
Supporting evidence and limitations:
- `cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core --lib`:
1,284 passed, 0 failed, 37 ignored (including in-crate lifecycle conformance
tests `scheduler_matches_lifecycle_model`, `bounded_cache_ownership_matches_tla`,
`scheduler_matches_speculative_accounting_model`, and
`async_transfer_scheduler_matches_lifecycle_model`).
- `cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib`:
1,894 passed, 49 ignored, 6 failures solely from unset `FLARE_TEST_TEMPLATE_DIR`.
- `cargo test --locked --release --manifest-path heliopause/Cargo.toml --lib`:
230 passed, 6 ignored; `cargo test --locked --release --manifest-path flare/Cargo.toml`
and `flare-cli`: all passed.
- Python suites (`pytest tests/preparation/test_execution.py tests/direct
tests/test_scheduling_sim.py tests/test_scheduling_continuation.py
tests/test_scheduling_timing.py tests/test_scheduling_utility.py
tests/test_scheduling_oracle.py tests/test_prefill_capacities.py
tests/test_design_review_hook.py`): 905 passed, 2 skipped across the combined
run (3 failures in `tests/cli` solely from an older installed
`flare_heliopause` wheel in the local venv).
- Companion recipe PR `local-inference-lab/hyperflare-recipes#153` passed 6/6
NVIDIA GB10 CUDA + CPU packed prefill tests and 112/112 DeepSeek V4.1 CPU
tests.
- Limitations: standalone `tla2tools.jar` TLC runs and `cargo-kani` were not
available on this host (only in-crate Rust conformance tests ran); full TP4
`ignition export --packed-prefill`, `flare run` serving benchmarks, and
pre-change exported core regression runs have not yet been executed.
Discord: el8
Design-Signed-Off-By: Antigravity (Gemini); design-review=2e5b
84f789a to
caaef5a
Compare
…al prefill Single-request prefill graphs (`batch_capacity == 1`) serialize concurrent short prompts and prefix-warmed turns into separate full-model replays. On memory-bandwidth-bound GPUs, loading MoE expert weights dominates feed-forward latency up to 512-1,024 tokens, leaving concurrent text bursts underutilized. Opting into packed multi-request `terminal_prefill` graphs within Contract 3 amortizes weight loads across concurrent text-only lanes without altering single-request or vision prefill execution. Exact changes: - `hyperflare_recipes/components/paged_batch.py`: allow `PreparedBatch` in `prefill` mode for `rows >= 2` when `validate_prefill is None` (text-only), validate per-lane `0 < lengths[i] <= max_query_tokens` and aggregate `sum(active lengths) <= token_capacity`, check prompt token bounds across all active packed tokens, and compute per-row rotary maxima in `RotaryBatch.commit_rotary` when `rows > 1`. - `hyperflare_recipes/recipes/deepseek41/decoder.py`: restrict vision injection, `PreparedDecoderSuffix` bounded-replay truncation, and row-sharded encoder DMA/RoCE to single-request or encoder-only/packed-suffix prefill graphs so packed multi-request `terminal_prefill` graphs run all 40 layers directly. - `hyperflare_recipes/recipes/deepseek41/recipe.py` and `hyperflare_recipes/recipes/deepseek41/bootstrap.py`: add opt-in `--packed-prefill` (`DeepSeek41Parameters.packed_prefill`, default `False`), prepare compact text-only `terminal_prefill` `(B, W_req, P)` shapes filtered to `max_concurrency` and `prefill_chunk_size`, and size prefill scratch, candidate buffers, and collective/DMA gather workspaces to cover the packed shapes. - `tests/recipes/test_deepseek41_packed_prefill.py` and `tests/recipes/test_deepseek41_packed_prefill_cuda.py`: add CPU parameter, catalog, and feedback-capture tests plus CUDA tests for `PreparedBatch` graph capture and validation, `RotaryBatch` per-row offsets, and `PreparedGlobalKV` serial-prefill parity (`ratio=1` and `ratio=2` with odd/even starts and inactive-row isolation). Claimed benefit and result: Before this change, `PreparedBatch` rejected multi-row prefill graphs and DeepSeek V4.1 could only prepare `batch_capacity == 1` prefill shapes. With `--packed-prefill`, DeepSeek V4.1 prepares compact text-only multi-request `terminal_prefill` shapes compatible with Helios's packed prefill scheduler while keeping default preparation (`--packed-prefill` off), single-request prefill, and vision prefill unchanged. End-to-end TP4 serving TTFT and throughput gains are expected from amortizing MoE weight loads across concurrent short prompts and remain unmeasured until an exported core is benchmarked through `flare run`. Supporting evidence and limitations: - NVIDIA GB10 (SM121), `FLARE_RUN_CUDA_TESTS=1 pytest -v tests/recipes/test_deepseek41_packed_prefill.py tests/recipes/test_deepseek41_packed_prefill_cuda.py`: 6 passed (`PreparedBatch` CUDA graph capture with zero steady-state allocations, `RotaryBatch` multi-row rotary commit, and `PreparedGlobalKV` numerical parity against serial solo prefill for both `ratio=2` and `ratio=1`). - DeepSeek V4.1 CPU suites (`test_deepseek41_packed_prefill.py`, `test_deepseek41_catalog.py`, `test_deepseek41_decoder_prefill.py`, `test_deepseek41_row_shard_prefill.py`, `test_deepseek41_dspark.py`): 112 passed, 1 skipped. - Limitations: depends on NVIDIA/hyperflare-inference#715 for Helios and Ignition packed prefill support; full multi-rank checkpoint export (`ignition export --packed-prefill`) and end-to-end TP4 `flare run` serving benchmarks have not yet been run. Discord: el8 Design-Signed-Off-By: Antigravity (Gemini); design-review=6fcc
…al prefill Single-request prefill graphs (`batch_capacity == 1`) serialize concurrent short prompts and prefix-warmed turns into separate full-model replays. On memory-bandwidth-bound GPUs, loading MoE expert weights dominates feed-forward latency up to 512-1,024 tokens, leaving concurrent text bursts underutilized. Opting into packed multi-request `terminal_prefill` graphs within Contract 3 amortizes weight loads across concurrent text-only lanes without altering single-request or vision prefill execution. Exact changes: - `hyperflare_recipes/components/paged_batch.py`: allow `PreparedBatch` in `prefill` mode for `rows >= 2` when `validate_prefill is None` (text-only), validate per-lane `0 < lengths[i] <= max_query_tokens` and aggregate `sum(active lengths) <= token_capacity`, check prompt token bounds across all active packed tokens, and compute per-row rotary maxima in `RotaryBatch.commit_rotary` when `rows > 1`. - `hyperflare_recipes/recipes/deepseek41/decoder.py`: restrict vision injection, `PreparedDecoderSuffix` bounded-replay truncation, and row-sharded encoder DMA/RoCE to single-request or encoder-only/packed-suffix prefill graphs so packed multi-request `terminal_prefill` graphs run all 40 layers directly. - `hyperflare_recipes/recipes/deepseek41/recipe.py` and `hyperflare_recipes/recipes/deepseek41/bootstrap.py`: add opt-in `--packed-prefill` (`DeepSeek41Parameters.packed_prefill`, default `False`), prepare compact text-only `terminal_prefill` `(B, W_req, P)` shapes filtered to `max_concurrency` and `prefill_chunk_size`, and size prefill scratch, candidate buffers, and collective/DMA gather workspaces to cover the packed shapes. - `tests/recipes/test_deepseek41_packed_prefill.py` and `tests/recipes/test_deepseek41_packed_prefill_cuda.py`: add CPU parameter, catalog, and feedback-capture tests plus CUDA tests for `PreparedBatch` graph capture and validation, `RotaryBatch` per-row offsets, and `PreparedGlobalKV` serial-prefill parity (`ratio=1` and `ratio=2` with odd/even starts and inactive-row isolation). Claimed benefit and result: Before this change, `PreparedBatch` rejected multi-row prefill graphs and DeepSeek V4.1 could only prepare `batch_capacity == 1` prefill shapes. With `--packed-prefill`, DeepSeek V4.1 prepares compact text-only multi-request `terminal_prefill` shapes compatible with Helios's packed prefill scheduler while keeping default preparation (`--packed-prefill` off), single-request prefill, and vision prefill unchanged. End-to-end TP4 serving TTFT and throughput gains are expected from amortizing MoE weight loads across concurrent short prompts and remain unmeasured until an exported core is benchmarked through `flare run`. Supporting evidence and limitations: - NVIDIA GB10 (SM121), `FLARE_RUN_CUDA_TESTS=1 pytest -v tests/recipes/test_deepseek41_packed_prefill.py tests/recipes/test_deepseek41_packed_prefill_cuda.py`: 6 passed (`PreparedBatch` CUDA graph capture with zero steady-state allocations, `RotaryBatch` multi-row rotary commit, and `PreparedGlobalKV` numerical parity against serial solo prefill for both `ratio=2` and `ratio=1`). - DeepSeek V4.1 CPU suites (`test_deepseek41_packed_prefill.py`, `test_deepseek41_catalog.py`, `test_deepseek41_decoder_prefill.py`, `test_deepseek41_row_shard_prefill.py`, `test_deepseek41_dspark.py`): 112 passed, 1 skipped. - Limitations: depends on NVIDIA/hyperflare-inference#715 for Helios and Ignition packed prefill support; full multi-rank checkpoint export (`ignition export --packed-prefill`) and end-to-end TP4 `flare run` serving benchmarks have not yet been run. Discord: el8 Design-Signed-Off-By: Antigravity (Gemini); design-review=6fcc
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedBetween Round 1 (
Walkthrough
Merge Risk: High · up to
|
…ort selection, and sync docs Ignition's `PreparedModel` did not reject packed prefill signatures whose `packed_token_capacity` exceeded `prefill_chunk_size` (which Helios rejects at load time), the twin packed-prefill cohort builders in `policy.rs` duplicated selection logic with a tie-break drift and allowed ready lanes to crowd out promoted lanes in `continuation_candidate`, `commit` repeated `validate_mixed` packed-prefill bounds checks, the `(B, W, P)` geometry conjunction was repeated across four modules, and `docs/scheduling-runtime-design.md` described `PrefillCostModel` without noting its `batch == 1` scope vs. `ReplayTimes` for packed prefill. Validate `packed_token_capacity <= prefill_chunk_size` in `PreparedModel.__init__` with a regression test in `test_execution.py`, share `valid_packed_prefill_geometry` from `helios/src/execution.rs` across `manifest.rs`, `catalog.rs`, `selection.rs`, and `scheduler.rs`, extract `select_packed_prefill_cohort` in `policy.rs` (reserving a promoted lane in continuation valuation and unifying tie-breaking, plus a unit test in `policy_tests.rs`), remove the unreachable packed-prefill re-validation in `commit`, use `binary_search_by_key` in `is_non_terminal_prefill_step`, and update `docs/scheduling-runtime-design.md` and `docs/packed-prefill-design.md`. Validated with `pytest tests/preparation/test_execution.py` (56 passed) and full Layer-1 `FLARE_TEST_TEMPLATE_DIR=... cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server` (1,918 lib + 62 integration passed, 0 failed). Owner approval for the widened Contract 3 prefill operation contract and Layer 2/3 simulator/conformance expansion remain pending. Discord: el8 Design-Signed-Off-By: Antigravity (Gemini); design-review=2e5b
|
Updated in
@flare-autobot please re-review. |
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedAt
Walkthrough
Merge Risk: High · up to
|
…mplify cohort/manifest paths
- Layer 3 formal conformance and mutation testing:
- Add packed_prefill_scheduler_matches_lifecycle_model to
helios/src/scheduler/lifecycle_tests.rs (322 states, 740 edges
covering pipelined non-terminal B=2 Prefill, feedback-exclusive B=2
TerminalPrefill, cancellation during in-flight packed prefill, and
stale packed-prefill plan rejection) and verify all 2,450 observed
Lifecycle.tla transitions via verification/helios-lifecycle/check.py.
- Add three packed-prefill safety-guard mutations to check.py
--mutations (image-conditioned lane bypass, aggregate packed token
cap bypass, and non-terminal classification bypass) and close the
corresponding negative pack_inputs tests in helios/src/model/tests.rs.
- Layer 2 scheduling simulator:
- Extend scripts/scheduling_sim/{model,timing,scheduler,learning_policy,
simulator,workloads,utility}.py with packed_prefill graph geometry
(prefill_batch_capacity, packed_token_capacity) and two-order greedy
cohort selection mirroring RequestScheduler::select_packed_prefill_cohort,
keeping solo prefill interpolation scoped to prefill_batch_capacity == 1.
- Add burst and budget tests in tests/test_scheduling_sim.py and run
the screen (16-seed) and validate (62-scenario x 64-seed) catalogs.
- Simplifications and nits:
- Remove duplicate valid_packed_prefill_geometry call in
ExecutionManifest::validate (helios/src/execution/manifest.rs).
- Unify packed prefill offer gathering (packed_prefill_offers) and
finishing-lane fill (fill_finishing_lanes) in policy.rs, and derive
PackedCohort counts from mask bitcounts.
- Consolidate the four manifest prefill filter passes in
helios/src/server/runtime.rs into one pass.
- Fail closed when prefill_chunk_size is absent for cores declaring
packed prefill in ignition/preparation/model.py (with test) and
simplify total_tokens > graph.packed_tokens in packing.rs.
Validated:
- Layer 1: helios release --features runtime-core,server with prepared
templates (1,919 lib + 62 integration passed, 0 failed); pytest on
test_execution.py and test_scheduling_*.py (894 passed, 0 failed).
- Layer 2: scripts/scheduling_sim/learning.py screen (7x3x16) and
validate (62x3x64, complete_core_suite=True, complete_validation_suite=True).
- Layer 3: verification/helios-lifecycle/check.py (all 9 TLA+ models,
2,450 Lifecycle.tla edges) and all 3 packed-prefill mutations detected.
Discord: el8
Design-Signed-Off-By: Antigravity (Gemini); design-review=2e5b
|
Updated in
Remaining non-code items: explicit project-owner approval from Luke Alonso for widening Contract 3 @flare-autobot please re-review. |
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedCommit
Walkthrough
Merge Risk: High · up to
|
Why
Single-request prefill graphs (
GraphKind::PrefillandGraphKind::TerminalPrefillwithbatch_capacity == 1) serialize concurrent short prompts and warm-prefix turns into separate full-model replays, andGraphKind::Mixedadmits at most one prefill lane per step. On memory-bandwidth-bound GPUs, loading MoE expert weights dominates feed-forward latency up to 512–1,024 tokens (3,947.3 µs/layerat 64 rows vs.7,625.4 µs/layerat 1,024 rows on NVIDIA GB10 DeepSeek V4.1 layer 3 TP4).Extending
PrefillandTerminalPrefilladditively withinModelContractversion 3 to allowbatch_capacity >= 2with explicitpacked_token_capacitylets Helios coalesce concurrent text-only prefill lanes into one CUDA graph replay without per-model flags, contract version bumps, or changes to single-request or vision prefill.Companion recipe PR: local-inference-lab/hyperflare-recipes#153.
What changed
helios/src/execution/manifest.rs,helios/src/model/catalog.rs,helios/src/runtime_core/selection.rs):PrefillandTerminalPrefillgraphs withbatch_capacitydraft_tokens == 0, and 64-alignedpacked_token_capacitypacked_token_capacity == 0) andScoredPrefill(B >= 2packed prefill graphs bymax_concurrency, dropping them when--max-concurrency 1.helios/src/model/packing.rs,helios/src/model/testing.rs):ImageFeatureSlot,ImageFeatureIndex,ImageLeftContext,ImageRightContext) onB >= 2prefill graphs.InputIndexing::PackedTokenbuffers topacked_token_capacitywhen nonzero, and enforceslane.tokens <= token_capacity,sum(lane.tokens) <= packed_token_capacity, andimage_slot.is_none()inpack_step.helios/src/scheduler.rs,helios/src/scheduler/{cost,policy,checkpoints}.rs,helios/src/server/runtime.rs):B >= 2packed prefill graphs inpacked_prefill_catalogand tracks per-shape replay durations viaReplayTimes.Init/Restorecontinuation valuation, padding pruning, refresh probe validation, andhost_lengthsmaterialization), competing on the same age-priced value-rate objective as soloPrefill,Decode/Speculative, andMixed.ScheduledStep::validate_mixedandcommit, and tracks non-terminal packed prefill steps during checkpoint planning.ignition/preparation/execution.py,ignition/cli/serve.py,ignition/direct/scheduler.py):(B >= 2, W, P)text-onlyprefillandterminal_prefillGraphSignaturegeometry and rejects vision inputs on packed prefill signatures.--packed-verificationchecks tospeculativesignatures and isolatesB >= 2packed prefill keys fromB == 1solo prefill catalogs inignition.direct.scheduler.Layout.helios/manifest.md,helios/model-contract.md,docs/packed-prefill-design.md,helios/src/execution/tests.rs,helios/src/model/tests.rs,helios/src/runtime_core/selection.rs,helios/src/scheduler/policy_tests.rs,tests/preparation/test_execution.py):GraphSignaturevalidation.Claimed benefit and result
Before this change, Helios and Ignition rejected
batch_capacity >= 2onPrefillandTerminalPrefillgraphs, forcing concurrent prefill requests to execute one lane per replay. After this change, any prepared model declaring text-only packed(B >= 2, W, P)prefill graphs within Contract 3 coalesces concurrent short or warm-prefix text requests into shared CUDA graph replays under the shared value-rate scheduler, while existing cores withoutB >= 2prefill graphs load and serve unchanged.On four NVIDIA GB10 GPUs (SM121, TP4, DeepSeek V4.1 Flash,
flare runwith identical binary and flags), enabling the six packedterminal_prefillshapes reduces concurrent short-prompt burst p95 TTFT by 1.68×–4.15× (3,590 ms → 865 msatC=16, 93-token chat turns;1,656 ms → 455 msatC=16, 69-token completions) and raises aggregate burst prefill throughput by 1.75×–4.23× (383 → 1,622 tok/satC=16chat;1,996 → 3,559 tok/satC=16, 238-token completions), at a KV capacity cost of-4.2%(7,631,232 → 7,310,848logical KV tokens/rank).Supporting evidence and limitations
Live four-GPU NVIDIA GB10 (SM121) TP4 A/B (
flare run, identical runtime binary84f789af,--max-concurrency 32 --mtp-draft-tokens 7 --mtp-adaptive-verification --mtp-max-verification-token-budget 256 --mtp-adaptive-verification-alpha 1.0 --scheduler-policy balanced --embedding-table-storage disk --embedding-table-resident-scales --embedding-table-cache-size 22GiB --embedding-table-workers 4 --kv-cache-limit memory --scheduler-checkpoint-extra-work-fraction 0.05):887785ad, confirming backward compatibility):7,631,232logical KV tokens/rank.4aea5c54,+6packedterminal_prefillshapes(4,128,512),(4,256,1024),(8,128,1024),(8,256,2048),(16,128,1024),(16,128,2048)):7,310,848logical KV tokens/rank.temperature=0):comp_w60_c1(solo control)0.94×)0.94×)comp_w60_c41.68×)2.20×)2.21×)2.20×)comp_w60_c81.37×)2.15×)2.17×)2.15×)comp_w60_c162.95×)3.64×)3.15×)3.09×)comp_w105_c41.07×)1.25×)1.28×)1.25×)comp_w105_c80.96×)1.25×)1.27×)1.25×)comp_w105_c161.51×)2.49×)2.67×)2.66×)comp_w185_c40.98×)1.32×)1.31×)1.32×)comp_w185_c81.12×)1.78×)1.77×)1.78×)comp_w185_c161.01×)1.68×)1.77×)1.78×)chat_w65_c4_tok162.09×)2.08×)1.64×)2.08×)chat_w65_c8_tok162.04×)2.05×)1.75×)2.05×)chat_w65_c16_tok163.28×)4.15×)2.92×)4.23×)chat_w185_c8_tok161.75×)2.01×)1.67×)2.01×)chat_w185_c16_tok161.62×)1.89×)1.62×)1.75×)4aea5c54):C=1cold prefill9,686 tok/s(8K,0.85sTTFT) and10,712 tok/s(32K,3.06sTTFT);8Ksustained decode73.8 tok/s(C=1),167.5 tok/s(C=4),329.4 tok/s(C=16).Unit, conformance, and recipe suites:
cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core --lib: 1,284 passed, 0 failed, 37 ignored (including in-crate lifecycle conformance suitesscheduler_matches_lifecycle_model,bounded_cache_ownership_matches_tla,scheduler_matches_speculative_accounting_model, andasync_transfer_scheduler_matches_lifecycle_model).cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib: 1,894 passed, 49 ignored, 6 failures solely from unsetFLARE_TEST_TEMPLATE_DIR.cargo test --locked --release --manifest-path heliopause/Cargo.toml --lib: 230 passed, 6 ignored;flareandflare-clisuites: all passed.tests/preparation/test_execution.py,tests/direct,tests/test_scheduling_*.py,tests/test_prefill_capacities.py,tests/test_design_review_hook.py): 905 passed, 2 skipped (3 failures intests/clifrom an older installedflare_heliopausewheel in the local venv).Limitations:
tla2tools.jarTLC runs andcargo-kaniwere not available on the build host (only in-crate Rust lifecycle conformance tests ran).887785ad) was exported from an earlier FlashInfer revision while the packed-prefill core (4aea5c54) was exported against FlashInfer5a8ceed80; both cores were served by the identicalflarebinary (84f789af), and theC=1solo control (comp_w60_c1) measured111.2 msvs.118.7 ms(0.94×).message_boundaryanchor checkpoints atC=4/8(chat_w65_c4/c8) currently run solo (~50 ms/lane) because the smallest packed graph hasP=512; a compact small-tail shape (e.g.,P=256) is a separate catalog-tuning opportunity.Discord: el8