#1 [high] PR #404 shape, scope and history
PR #404 "Add optional per-request activation steering for DeepSeek V4.1 cores" by jcartu (CONTRIBUTOR), open, pr/per-request-steering -> main, head 8e5a1b0, +1794/-309 in 49 files.
History (pr_comments):
- yatesdr review 2026-11-19 CHANGES_REQUESTED: shared Helios branching on one-recipe capability; core compatibility unproven; kernel callers not updated; --direct not wired; evidence from out-of-PR tree; Principle 14 question; missing Discord line.
- jcartu 2026-11-20 pushed 15ade6b9 addressing items (moved width/admission to declared ValueSource::SamplingParameters binding + sampling_ranges.steering_scale).
- yatesdr 2026-11-20 14:47: "As the PR stands, we don't think it should [merge]." Two decisive questions: (1) Principle 1 — new captured-graph operation contract because decoder layers read a per-request value inside captured forward (paged_batch.py:48-56, :305-309; decoder.py:237-241, :253-254); existing captured ops read sampling values only in the sampling stage after logits. (2) What the steering is for — 90/100 keyword refusals unsteered vs 0/100 semantic refusals at scale 1.0; description must state intended use. Recommendation: close and serve a weight-edited checkpoint as its own core. Change-impact list: sampling width 6-or-7 (packing.rs:176-190), second spelling via chat_template_kwargs (decode.rs:586-627), admission + /v1/models change for every core, prefix keys gain a scale salt, 0..1 range enforced in 5 places, kernel stride threaded through score/admission/draft/Markov/vocabulary kernels, C=1 decode 2-8% slower at 1.0 (0.0 untimed), tests never run the decoder with steering.
- jcartu 2026-11-21: concedes Principle 1 — "I can't name a matching captured operation... My description was wrong. This needs explicit approval from Luke Alonso." Explains deployment: 4x RTX PRO 6000 (384 GiB), one TP4 DeepSeek-V4.1-Flash-1017 core + ~23.7M-token KV pool = ~96 GiB/GPU, no room for a second core; each core ~473 GiB on disk, swap interrupts sessions ~2 min. Use case: keep defensive security/config reviews at 0.0, 1.0 for authorized red-team analysis.
- yatesdr 2026-11-21 18:01: personally interested/forward looking; "leave it open as a proposal."
- lukealonso 2026-11-21 20:28: "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."
- jcartu 2026-11-21: leaves #404 as design proposal; lists three options: (1) one mode per core applied at export, no Helios/wire changes; (2) per-batch profile on one loaded model with a second graph ladder; (3) per-slot conditioning (Principle 1 exception) only if same-batch mixing required.
- jcartu 2026-11-23 14:57 + 16:59: generic scalar prototype + core-declared FP32 inputs measured; mixed-batch qualification incomplete (C32 logprob mismatch at 330/4096 positions, chat parity not established).
- original-el8 2026-11-24: repository-split triage — recipe part belongs in hyperflare-recipes repo, runtime part can stay here "after removing recipe-owned files."
- jcartu 2026-11-25: opened draft #505 with the generic engine interface, no steering recipe.
#2 [high] Charter rules that decide #404
Charter (read_charter): "Keep the runtime small and model-agnostic... Helios (the runtime) handles scheduling, caches, and requests, and shouldn't accumulate per-model branches (#267, #334)." "Solve the right problem in the right place... Look for the smallest footprint in shared code, or a way to solve it without new code at all." "Don't silently ignore API fields... either implement it according to the spec or reject it." "Bring real evidence" (#210). Non-goals list requires maintainer sign-off. Mergeable work: maintainer request, roadmap item, reproducible bug, measured perf/memory issue, bad docs.
docs/design-review.md:
- Principle 1 (lines 16-26): model-specific execution behavior belongs in Ignition/captured programs; "Introducing a captured-graph operation family requires prior explicit approval from project owner Luke Alonso"; "A new operation contract requires approval even if it reuses a graph kind or enum value. A design acknowledgment does not grant approval."
- Principle 3 (lines 31-49): shared input packing/request handling stay shared; reject per-model boolean policy flags, "Enums, callbacks, schema names, and metadata fields cannot serve as alternative model allowlists."
- Principle 12 (lines 94-102): evidence honesty, disclose unrun checks/limitations.
- Principle 13 (103-110): previous cores must load and serve without re-export.
- Principle 15 (122-133): reject scope expansion, cannot waive invariants with flags/tests/temporary paths.
- Principle 16/17: four-part description order + Discord line (both satisfied now).
tools/search_items: #505 "Bind core-declared FP32 graph inputs per request" (draft, +2299/-276, 33 files) is the maintainer-requested generic alternative; it keeps the six-column sampling layout and the sampling kernels unchanged.
#3 [high] Code-level evidence for the #404 verdict
Concrete findings gathered while reading the diff:
- Per-request value read inside the captured forward (the Principle 1 trigger): ignition/components/paged_batch.py:48-56 (gather_token_steering_scale), :306-309 (PreparedBatch.begin), :129-134 (Metadata.set), :160-166 (Metadata.pack); decoder applied at ignition/recipes/deepseek41/decoder.py:237-241 (attention), :253-254 (shared expert), :375-377 (requires metadata.steering_scale), :399 (suffix gather). Author concedes on PR: "I can't name a matching captured operation... needs explicit approval from Luke Alonso." No approval recorded anywhere; Luke's 2026-11-21 20:28 comment asks for a generic core-declared scalar instead, and draft #505 is that.
- Sampling width now 6-or-7, derived from the declared ValueSource::SamplingParameters binding: helios/src/model/packing.rs:177-193 (uniform width, 6|7 only), :273-286 (metadata/binding symmetry), :506-530 (nonzero scale needs 7 cols; packed bits must match planned PrefixHistory;
.take(input.width)). - The 0..1 / zero-default invariant is duplicated ~7 times: heliopause/src/export/binding.rs:773-786; helios/src/runtime_core/protobuf.rs:92-110 (two checks); helios/src/server/config.rs:119-125; helios/src/model.rs:265 + in_steering_bounds :229-237; ignition/components/sampling.py RequestAdmission.validate (:64-66 "steering_scale must lie in [0, 1]"); ignition/direct/scheduler.py SamplingParameters.post_init ("0 <= steering_scale <= 1").
- Silent field drop on non-steering cores: helios/src/server/request.rs:530-538 clamps via sampling_number (:557-580), which falls back to SamplingRange::fixed(default=0.0) when the core declares no range, so {"steering_scale":0.8} on a 6-column core returns HTTP 200 with scale 0.0. Asserted as intended in tests/recipes/test_deepseek41_steering.py:275. Conflicts with charter "Don't silently ignore API fields... Never accept it and quietly drop it (#417)".
- Shared protocol gains a recipe-named template-keyword carve-out: helios/src/server/protocol/decode.rs:585-628 pulls
steering_scaleout of chat_template_kwargs for every core and errors on Responses/Messages (:630-636). A chat template that really takes asteering_scalevariable would be stolen silently. - Kernel stride threading (default PARAMETERS=6) in ignition/components: sampling.py (_scores, _sampling_metadata, _admission_validate, _admission_finish, PreparedSampling/PreparedAdmission), draft_sampling.py (5 kernels), vocabulary_sampling.py (2), markov_sampling.py; DeviceRequestState.allocate/AdmissionBuffers.allocate gain
steering=. - Prefix identity: helios/src/cache/hash.rs:38-48 (root digest salted with FP32 bits only when nonzero), scheduler.rs:1415-1455 plan_admission_with_steering, LiveRequest.steering_scale :265-271; direct path key = (tokens, bits) in ignition/direct/scheduler.py:400-403, :746-760. Recipe folds sidecar SHA-256 into core identity: ignition/recipes/deepseek41/bootstrap.py:411-415, :620-628; steering.py:19-23.
- Test coverage gap: tests/recipes/test_deepseek41_steering.py has 7 tests, all helper/CPU (sidecar validation, gather, steer_attention/steer_shared_expert math, Metadata.pack under torch.compile fullgraph, direct scheduler cache keys, request-state width). No test runs PreparedDecoder with steered weights, and none runs a 7-column core through native packing + replay.
- Evidence/head mismatch: head is 8e5a1b0 (rebased on 6555f939); all GPU evidence is on 15ade6b9 with base 69858cd1, core SHA 235e2891 exported from that worktree; description states CUDA suites and the 4-GPU core re-export were not repeated after the rebase.
- Performance: no speedup claimed; C=1 decode 2-8% lower at scale 1.0 vs the geometric mean of two 6-column baseline runs (different core), and C=1 at 0.0 was not timed although gated steering kernels launch at every scale on a steered core.