Repository navigation
Conversation
… and LAMB, writes MSLH checkpoints (Refs #10372) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 18, 2026
…the flat vector, xorshift guards zero (Refs #10372) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
added a commit
that referenced
this pull request
Oct 18, 2026
…d specs (Refs #10387) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
PR DashboardGenerated at: 2026-10-18 10:54:52 UTC
Summary
Seal Status
|
Contributor
PR DashboardGenerated at: 2026-10-18 11:01:23 UTC
Summary
Seal Status
|
This was referenced Oct 18, 2026
Merged
This was referenced Oct 18, 2026
Open
Merged
Contributor
PR DashboardGenerated at: 2026-10-18 12:53:38 UTC
Summary
Seal Status
|
This was referenced Oct 18, 2026
Merged
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #10372
What
specs/ml/train_hslm.t27. Itsmain()trains the whole 3-block HSLM fromnn/hslm(ctx 27, vocab 729, embed 243, ff 729, 3 heads), on the real HTOK corpus from #10380.It reuses these through
use, without copying them:nn/hslm: forward, backward and cross-entropynn/ternary_ste:quantize_twnnn/hslm_data: the MSLH header and layoutWhat the spec adds:
lambStepSlice.total. Global-norm clip 1.0. Batch is 66 windows of 27 tokens, with starts drawn from a pinned-seed xorshift64./tmp/hslm/train.cfgis optional and holdskey=valuelines. Keys:steps total warmup eval_every ckpt_every seed speed resume synth eval_windows. Defaults: 32000 / 32000 / 2000 / 500 / 2000 / 1729 / 2 / 0 / 0 / 243.eval_everysteps, one line goes to stdout. It carries the step, the minibatch train loss and its ppl, the mean train loss since the last line, the held-out loss over 243 fixed evenly spacedvalid.tokwindows and its ppl, tok/s, s/step, lr and the pre-clip gnorm.ckpt_everysteps and at the end:/tmp/hslm/ckpt_<step>.binis MSLH: thenn/hslm_dataheader plus its layout, 4971796 bytes./tmp/hslm/ckpt_<step>.stateholds the full resumable state, because MSLH has no attention matrices, embedding or gains. It is a 64-byteT27Sheader (step, rng, beta powers, loss), then p, m and v as f64 LE: 51123376 bytes.main()assert, which gives a nonzero exit.resume=<step>restarts from the.statefile and continues bit-identically.Speed: same model, honest kernels
nn/hslmreference kernels as they areternary_matmulas a branch-free row axpy (bit-identical);trit_intandouter_addbranch-free;ternary_matmul_t_addwith 4 partial sums (backward only)50-step measurement (real tokens, speed 2, seed 1729)
Data: train.tok has 8557893 tokens and valid.tok has 7689354.
I rebuilt at 47aff93 (the duplicate-body fix) and reran the 50 steps. Every printed loss matched to the last digit. This run measured 1.534 s/step and 1161 tok/s while test-report shared the box.
After 50 steps the learning rate is still only 2.5e-5 of a 2000-step warmup, so the held-out loss moves just 6.5952 -> 6.5916; ln 729 = 6.5917.
The checkpoints at steps 25 and 50 were written and read back byte-equal.
Resume check: I ran again with
resume=25to step 50. The resultingckpt_50.binandckpt_50.statematched the uninterrupted run undercmp.Tests
t27c test-report specs/ml/train_hslm.t27gives 14/14 pass, 0 vacuous. The tests:Differences from R5 / the Zig trainer (trinity-training @ 3e9648c)
nn/hslmsection 5).nn/hslm's hash.encode_f32.Lab commands (Railway fs-lab, t27c at /root/t27, zig 0.16.0)
/root/t27-hslm-train/train_hslm(sha256 549bb065...334c, built from 47aff93).train.cfg, the defaults run all 32000 steps.Nothing needed a compiler change. Host I/O uses the existing
host_open/read/write/close, with a NUL-terminated path buffer for the checkpoint names, and the clock is read from/proc/uptime.🤖 Generated with Claude Code