Explore scratchpad · NVIDIA/hyperflare-inference #404

Raw Markdown for agents: https://autobot.eidonix.com/p/30f99807-8194-49a6-ae1b-9025d208dcf0.md

#1 [high] Change: what PR #404 does and its size

PR #404 "Add optional per-request activation steering for DeepSeek V4.1 cores" (open, ready for review, opened 2026-11-19, last updated 2026-11-25, head 8e5a1b0, base main, CI on head passed, review: changes requested by yatesdr). 49 files, +1794/-309.

What it does, in plain terms: a DeepSeek V4.1 core can be exported with --steering-sidecar <PATH> (safetensors, per-layer alpha/direction/attn_row_gain for decoder layers 4..36). The core then accepts a per-request steering_scale in [0,1]; nonzero scale applies directional ablation + row-gain rescaling inside the captured forward (attention output after reduction, and shared-expert partial before TP reduction). steering_scale rides in the existing ValueSource::SamplingParameters buffer as a 7th f32 column (6 without steering). Prefix-cache root digest is salted with the exact f32 bits of nonzero scale, so steered/unsteered prefixes never collide.

Files by area (pr_files): helios/src 16 files +661/-23; tests/recipes 2 files +421/-1 (one added: test_deepseek41_steering.py, +369); ignition/components 7 files +161/-68; ignition/recipes 6 files +202/-25 (new ignition/recipes/deepseek41/steering.py +112); ignition/direct 3 files +86/-24; docs 3 files +27; ignition/cli 4 files +17/-7; heliopause/src/export/binding.rs +30/-6; helios/proto/runtime_core.proto +4; helios/model-contract.md +5; ignition/preparation/runtime_core_pb2.py +132/-132 (regenerated).

Key code: ignition/recipes/deepseek41/steering.py (new, steering math), decoder.py (steer_attention / steer_shared_expert calls), helios/src/model/packing.rs (6-vs-7 column width derivation), helios/src/cache/hash.rs (PrefixHistory::with_steering_scale), helios/src/server/protocol/decode.rs (HTTP parse of steering_scale incl. chat_template_kwargs), helios/src/server/models.rs (advertise on /v1/models).

Note the description says "no capability flag on ServingContract or ModelConfig" — derivation is from the SamplingParameters binding width + sampling_ranges/defaults.steering_scale.

#2 [high] Claims and evidence: PR-stated validation vs what backs it

Claims in PR #404 description (author jcartu):

Gap: reviewer yatesdr (2026-11-20 14:47) notes tests "exercise the steering helpers on CPU. None runs the decoder with steering" — i.e. no test executes the steered decoder path. The steered forward on GPU was validated only on the pre-rebase revision.

#3 [high] Related work: main removed ignition/recipes entirely — #404 straddles the repo split

The PR touches ignition/recipes/deepseek41/* and tests/recipes/*, and adds ignition/recipes/deepseek41/steering.py.

On main, those paths no longer exist: main's combined commits da037284 (2026-11-22) "Stage hyperflare_recipes separation, slim core ignition..." and 17bb3c4a (2026-11-22) "Remove extracted hyperflare_recipes, qualification drivers, and model tests from core Flare", both by Luke Alonso, moved every recipe out to the local-inference-lab/hyperflare-recipes repository.

main now enforces it with a test: tests/preparation/test_core_boundary.py (main, lines 40-48) asserts not (ROOT/"ignition"/"recipes").exists(), that no ignition/**/*.py imports ignition.recipes or hyperflare_recipes, and (lines 51-59) that nothing under tests/ imports them. main's ignition/components/ is trimmed to a fixed allow-list (RETAINED_IGNITION_COMPONENTS, lines 11-26: capacity, collectives, completion, engram, flashinfer_sampling, logprobs, ngram_delivery, readiness, sampling, state, state_transfer, vision_delivery, vision_state).

Consequence: #404's 6 files under ignition/recipes/deepseek41, its new steering.py, and its 2 files under tests/recipes are recipe-owned files that cannot land in this repository as-is. Also many of the shared files #404 edits no longer exist on main: ignition/components/{causal_draft,draft_sampling,markov_sampling,parallel_draft,vocabulary_sampling}.py and tests/components/{draft_score_reference,test_draft_scores_cuda,test_markov_sampling_cuda,test_vocabulary_sampling_cuda}.py are absent from main (verified via list_files on ref=main). ignition/components/sampling.py and tests/components/test_sampling_score_defaults_cuda.py and tests/components/sampling_score_reference.py do still exist on main.

This matches original-el8's triage comment on #404 (2026-11-24 21:46): the PR spans both repositories; the recipe portion needs a linked PR against hyperflare_recipes/, the runtime portion may stay here after removing recipe-owned files. Author has not yet restructured #404 (branch unchanged since 8e5a1b0, 2026-11-19).

#4 [high] Community: review history — changes requested twice, maintainers redirect to a generic design

Review 1, yatesdr, 2026-11-19 21:04, CHANGES_REQUESTED (on revision before 15ade6b9) [#404 discussion]:

  1. Shared Helios code selects behavior from a one-recipe capability — only deepseek41 can set steering_sidecar_sha256 (ignition/planning.py:211, :509), and Helios branched on it for width (helios/src/model/packing.rs:177-179), admission (model/admission.rs:77-78, :181-184), request handling (server/request.rs:100-107), model card (server/models.rs:67-74). Cites AGENTS.md "Architecture and ownership" (no default-false opt-ins / model allowlist metadata) and Principle 3 (shared input packing/admission).
  2. Core compatibility unproven (Principle 13) — PR loaded no previous core.
  3. Kernel callers not updated: _scores, _sampling_metadata, _admission_validate, _admission_finish gained a required PARAMETERS argument before SLOTS; tests/components/test_sampling_score_defaults_cuda.py:41-43 passed batch in that position; tests/recipes/test_completion_abi.py:105-111 omitted it.
  4. ignition/direct packs six parameters, no steering input → steering core over --direct could not apply a scale.
  5. Evidence: GPU results came from a tree with host-memory changes not in the PR; cargo test -p flare-helios --lib builds with no features (helios/Cargo.toml:17) so it doesn't compile the server/runtime-core tests the PR changes; TP4 commutation test ran in FP32 while each rank rounds to BF16 before reduction; "Boundary triggers" headline metric undefined.
  6. Principle 14: also covers model fusion / GPU execution optimization in optimized model paths, e.g. steering in ignition/recipes/deepseek41/decoder.py.
  7. No Discord: line.

Author replied 2026-11-20 08:29 listing fixes for each item in revision 15ade6b9 (contract-derived width/admission, /v1/models, PARAMETERS default, --direct wiring, BF16 rounding in commutation test, clean-head export, pre-change 6-column core served without re-export, Discord line).

Review 2, yatesdr, 2026-11-20 14:47 — still objects, recommends closing:

  1. Principle 1: design-review principle 1 requires approval before a new captured-graph operation contract is introduced, even one reusing an existing graph kind. Here the decoder layers read a per-request value inside the captured forward: paged_batch.py:48-56 and :305-309 per-token gather; decoder.py:237-241 and :253-254 steering after attention reduction and on the shared-expert partial. Existing captured operations read sampling values only in sampling, after logits. Asks the author to name the existing operation whose contract this matches.
  2. Purpose: unsteered 90/100 refused by keyword; at scale 1.0, 0/100 refused semantically. "a per-request switch that removes the model's refusals on a shared serving core… a significant step for the engine to take"; description should state intended use and argue why Flare should provide it per request.
  3. Change impact summary (see separate note).
  4. Cost: C=1 decode 2-8% slower at scale 1.0; scale 0 not timed although steering kernels run at every scale.
  5. Tests: exercise steering helpers on CPU; none runs the decoder with steering, so later changes to these paths have little protection. Recommendation: close; serve a weight-edited checkpoint as its own core; #404's only added value is serving both from one copy of the weights, which they judge not to outweigh the shared complexity. Left open for reply.

Author reply 2026-11-21 17:29 concedes Principle 1: "I can't name a matching captured operation... My description was wrong. This needs explicit approval from Luke Alonso." States deployment: 2 concurrent workloads (defensive security/config review at 0.0, authorized red-team at 1.0); 4x RTX PRO 6000 Blackwell, 384 GiB total, ~96 GiB/GPU for one TP4 core + ~23.7M-token KV pool, ~473 GiB on disk per core, core swap interrupts sessions ~2 min. Offers to close and maintain out of tree.

yatesdr 2026-11-21 18:01: "this is really cool work and I'm personally interested in it... forward looking... The above comments are the triage bot enforcing what it was told to enforce, but I do think this adds value if we can find a way to do it that will not cause major issues in flare for support and future models. For now please leave it open as a proposal."

lukealonso 2026-11-21 20:28 (maintainer, the approval gate): "See if your agent can implement this not as a hardcoded steering_scale parameter, but as a generic system by which model cores can expose scalar arguments that can then be provided on a per-request basis and bound dynamically into the graphs. All of this would be described in the model proto." → this is the direction that became #505, not a revision of #404.

#5 [high] Project fit: charter and design-review principles #404 touches

Project charter (read_charter) and docs/design-review.md (main, lines 14-124) set several explicit tests #404 meets or fails:

#6 [high] Related work: #505 is the maintainer-directed successor design competing with #404

#505 "Bind core-declared FP32 graph inputs per request", also by jcartu, opened 2026-11-25 00:38 as a draft, base c0c4f79, 33 files +2299/-276. It is the successor direction lukealonso asked for in #404: cores declare named FP32 scalar arguments in ModelContract.scalar_arguments with default and optional range; a SCALAR_ARGUMENT graph binding with row indexing; all four protocols accept a top-level request_scalars object (also under chat_template_kwargs); resolved bits (neg-zero normalized) join prefix-cache identity; /v1/models lists declarations under flare.request_scalars. The six-column sampling layout and sampling kernels are explicitly unchanged, and a core with no declarations keeps its prefix identity and rejects unknown names.

Key relationship facts:

#7 [high] Change: things the diff does that the description does not say

Undeclared/unlisted behaviour in #404 vs its description:

  1. HTTP protocol restriction not in the description: helios/src/server/protocol/decode.rs (new code after the chat_template_kwargs block) rejects steering_scale with unsupported(...) unless the protocol is Chat or Completions. So Responses and Messages requests carrying it get HTTP 400. docs/api.md does say "other protocols reject the field" — the description body doesn't.
  2. A second request spelling: chat_template_kwargs.steering_scale is consumed and removed from the template map (decode.rs: template.remove("steering_scale")), with exact-int vs f64 comparison logic (i128 + int_equals_float) to decide conflicts. yatesdr flagged this as "request parsing gains a second spelling through chat_template_kwargs (server/protocol/decode.rs:586-627)".
  3. Hard-coded 0..1 range in five places (per yatesdr's 2026-11-20 review): heliopause/src/export/binding.rs:773-786, helios/src/runtime_core/protobuf.rs:93-110 (twice), server/config.rs:119-125, model.rs:265. The range is validated as exactly {min:0,max:1} at export and load, i.e. it is not a general declared range.
  4. Direct-path signature changes: ignition/direct/scheduler.py changes Checkpoint.consumed to handle tuple keys (len(self.key[0]) if isinstance(self.key[0], tuple)), because cache keys become (prompt_tuple, steering_bits) for nonzero scale. Also Scheduler._cache_key is used in three cache sites. This touches direct-execution prefix cache semantics beyond adding a parameter.
  5. ignition/direct/server.py broadened number handling: new finite_f64/canonical_json_number helpers make all sampling numbers reject bools/non-numbers and accept arbitrarily large Python ints before clamping; number(name, value=None) now also serves steering_scale. That changes existing parameter parsing behaviour on the direct path.
  6. ignition/components/sampling.py admission kernel gains a PARAMETERS constexpr (default 6) threaded through _scores, _sampling_metadata, _admission_validate, _admission_finish; _admission_validate range-checks steering only if PARAMETERS == 7. DeviceRequestState.allocate and AdmissionBuffers.allocate gain steering: bool and 7-column allocation; RequestAdmission.parameter_values(count) rejects nonzero scale on 6 columns before mutating slots (atomicity claim backed by test_request_state_keeps_legacy_width_and_rejects_atomically).
  7. ignition/preparation/runtime_core_pb2.py regenerated (+132/-132) — protobuf codegen churn in the diff.
  8. ignition/direct/scheduler.py Layout.post_init now imports runtime_core_pb2 locally and computes parameter_width from bound SAMPLING_PARAMETERS buffer shapes, erroring unless widths agree and are 6 or 7.
  9. Docs the description does not mention: docs/api.md, docs/cli-design.md, docs/model-preparation.md (+27 lines total) and helios/model-contract.md (+5).
  10. New CLI flag plumbing across ignition/cli/{__init__,bench,preparation,serve}.py, ignition/planning.py (Plan field, Plan.post_init rejects non-deepseek41 and missing file, Plan.as_dict records the sidecar path), ignition/recipes/deepseek41/{recipe,bootstrap}.py. The bootstrap folds the sidecar sha256 into both the preparation session checkpoint identity and server_config["identity"], and adds "steering_sidecar_sha256" to preparation metadata.

Description claims the change does not deliver: the cross-reference "no new captured-graph operation contract" is contradicted by the PR's own per-token gather inside the captured forward — the author conceded this in the 2026-11-21 comment ("My description was wrong").

#11 [high] Reach: what #404 changes for cores, clients, operators and developers beyond DeepSeek

Reach of #404 if merged as written:

#12 [high] Process: #404 is stale, review-requested-changes stands, and the branch was never revised after the redirect

Process state of #404 (as of 2026-11-25):

#13 [high] The why: single-operator memory constraint, no linked issues, no breadth of demand

The "why": the problem #404 addresses and how long/widely it has been wanted.

#8 [medium] Project fit: where the repo split says this code belongs

#9 [medium] Recent activity: repo split plus DeepSeek/kernel churn in the same files

Recent main activity in the areas #404 touches, and how it bears:

#10 [medium] People: jcartu's history, and who owns the touched areas

Author: jcartu (Joshua Cartu), GitHub association with the repo: CONTRIBUTOR. Last 180 days: 2 merged PRs (#418 strict function-tool schemas for DSML/Qwen/GLM/TML parsers 2026-11-20; #416 refresh host prefix-cache recency on request completion 2026-11-20), 0 closed, 4 open: #520 (snapshot slot range assertion), #517 (issue: Xid 31 in _checkpoint_pages on Qwen3.8 Flash Next TP4 SM120), #505 (generic core-declared FP32 graph inputs draft), #461 (document strict tool selection and numeric range precision). Areas touched by merged PRs: docs (2), helios/src (2), helios/tests (1), selene/src (1). Discord: jcartu.

Standing: a recent, productive contributor with merged work in helios/frontend and docs, but no prior merged change to the DeepSeek V4.1 recipe, to ignition/components kernels, or to ignition/direct. The commit that landed on the branch is authored by "Joshua Cartu" (8e5a1b08, 2026-11-19), a single commit carrying the whole change.

People engaged so far: yatesdr (reviewer; the triage-bot-enforced review then a personal "leave it open as a proposal" endorsement), lukealonso (project owner; the Principle 1 approval gate; gave the generic-scalar direction), original-el8 (priority contributor per charter; repository-split triage note on #404).

Who usually works these areas: helios/src — Luke Alonso (207 commits/180d), Martin Vit (47), yatesdr (46); ignition/components — Luke Alonso (104), Martin Vit (54), jasonc (26); ignition/direct — Luke Alonso (15), jasonc (3), Martin Vit (1); ignition/recipes pre-split — Luke Alonso (167), Martin Vit (76), jasonc (32); heliopause/src — Luke Alonso (55), Martin Vit (10), Jason Cook (5); tests/components — Luke Alonso (113), Martin Vit (37), Jason Cook (8).

Note jcartu is not listed among frequent committers to any of these areas, and also has an open issue #517 about an Xid 31 fault in _checkpoint_pages attributed to the same TP4 SM120 host — potentially relevant colour on the validation environment.