Skip to content

spec(hslm): nn/hslm runs the per-block VSA stream (Closes #10099) - #10100

Merged
gHashTag merged 2 commits into
masterfrom
feat/hslm-vsa-ste
Oct 17, 2026
Merged

gHashTag merged 2 commits into
masterfrom
feat/hslm-vsa-ste

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #10099

Follows #10068, which gave nn/hslm the trained shape. This PR adds the per-block VSA stream of trinity-training's HSLM (@3e9648c1). The ternary STE update is out of scope here: it belongs to its own lane (#10076, PR #10086).

What changes

  • VSA stream per block (trinity_block.zig, model.zig forwardTrain): the block binds and rotates the trit sequence and gates on max_sim >= PHI_INV. When the gate fires, it adds 0.1 * project(context) to the output, and the next block takes that output as its input. At position 0 every gate fires and the stream passes its input on unchanged. The offset never reads a float parameter, so the existing finite-difference gradient checks still hold with the stream on.
  • own_model: the forward-pass cell goes from 85 to 95 percent, on top of spec(nn): ternary STE, training step and data/checkpoint layout in t27 (Closes #10076) #10086's STE cells 15-17. Lens 2 goes from 68 to 70; overall stays 48, and METRICS_BYTES stays 624. own_model_board mirrors this. The "add the VSA path" gap row becomes "Batched f32 HSLM trainer".
  • duplicate-bodies: the VSA probe's copy_floats had copy_trits' body, so it is now save_block_out. master already fails this gate on four groups that were copied from nn/hslm into nn/attention (spec(nn): make attention.t27 compile and pass with 0 vacuous tests (Closes #10094) #10095) and nn/hslm_backward (spec(nn): ternary STE, training step and data/checkpoint layout in t27 (Closes #10076) #10086): fill, ternary_matmul, matmul_probe, matmul_rect_probe. dupe_scan --bless records them, and the ledger gains exactly those four lines.
  • Deletes conformance/nn_hslm_vectors.json. It described the 6-layer, FF 972, ctx 81 model, and nothing read it.

Measured on the Railway lab (same t27c as #10068)

spec result
specs/nn/hslm.t27 61/61 tests pass, 12 invariants proved, 0 FAIL, 0 vacuous (master: 46 tests)
specs/igla/own_model.t27 9/9 pass, 0 vacuous (after merging master)
specs/igla/own_model_board.t27 6/6 pass, 0 vacuous

Mutation control. Each mutant ran as a separate copy:

mutant tests failed
gate max_sim > PHI_INV instead of >= 2 (hslm_vsa_gate_threshold_is_phi_inverse, hslm_vsa_gate_counts)
VSA_GAIN = 0.0 1 (hslm_vsa_offset_is_gain_times_projection)

Seals. t27c seal specs/nn/hslm.t27 --save re-saved .trinity/seals/nn_HSLM.json and .trinity/seals/HSLM.json. Both were copied back with matching sha256.

t27b-native-ratchet is red on master as well (238 findings in master run 39062420129, including the same three hslm UNLISTED rows: nn/hslm blocked on ExprCall(undeclared fn)). The ledger-steward job adds those rows from master runs, so this PR does not hand-edit docs/reports/t27b_expectations.json.

Still not in the spec: f32, batches, the data loader, and the trainer's STE update (#10076).

🤖 Generated with Claude Code

Adds the per-block VSA stream of trinity-training's HSLM (@3e9648c1,
trinity_block.zig, model.zig forwardTrain) to nn/hslm: bind and rotate,
the max_sim >= PHI_INV gate, +0.1 * project(context) when it fires, and
the block output handed to the next block. The offset never reads a
float parameter, so the existing finite-difference gradient checks
still hold with the stream on.

The ternary STE update is left to its own lane (#10076, PR #10086).

nn/hslm on the Railway lab: 61/61 tests pass, 12 invariants proved,
0 vacuous (master: 46 tests). Mutation control: gate > for >= fails 2
tests, VSA gain 0 fails 1. HSLM and nn_HSLM are re-sealed on the lab.

own_model: the forward-pass cell goes 85 to 95 percent (lens 2 now 58,
overall still 44); own_model_board mirrors it. Cells 15-17 (STE) are
untouched. Both pass 8/8 and 6/6, 0 vacuous.

Deletes conformance/nn_hslm_vectors.json: it described the 6-layer,
FF 972, ctx 81 model and nothing read it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-17 19:17:10 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 48
PRs with All Checks Green 2
READY 0
FAILING 48
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 48 + 0 + 0 = 48, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e769ef021713 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

…#10099)

Conflicts in specs/igla/own_model.t27 and own_model_board.t27 with #10086
(ternary STE, training step, data layout): kept #10086's cells 15-17
(85/75/55/40 -> STE cells 75/55/40) and its MEASURED bullet, plus this
PR's forward-pass cell 14 at 95 and its VSA bullet. Lens 2 re-derived:
mean of 9..17 = 630 / 9 = 70 (was 68 on master); overall stays 48 and
METRICS_BYTES stays 624 (no digit count changed). The "add the VSA path"
gap row becomes "Batched f32 HSLM trainer".

duplicate-bodies: copy_floats in nn/hslm had copy_trits' body; it is
now save_block_out, which copies act_out into block_out_scratch. The
four groups master already failed on (fill, ternary_matmul,
matmul_probe, matmul_rect_probe: nn/hslm's helpers copied into
nn/attention and nn/hslm_backward) are recorded in the ledger with
dupe_scan --bless; the ledger gains exactly those four lines.

Railway lab after the merge: nn/hslm 61/61 tests, 12 invariants,
own_model 9/9, own_model_board 6/6, all 0 FAIL, 0 vacuous. HSLM and
nn_HSLM re-sealed on the lab, sha256 matched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-17 19:45:18 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 49 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3b53d48ddb52 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit cd9018c into master Oct 17, 2026
29 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nn/hslm: add the per-block VSA stream of the trained HSLM

1 participant