Skip to content

spec(ml): hslm_f32_study -- f32 vs f64 HSLM trainer, 2000 steps same seed (Closes #10844) - #10946

Merged
gHashTag merged 1 commit into
masterfrom
claude/hslm-f32-6cf297
Oct 19, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/hslm-f32-6cf297

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10844

What this lands

specs/ml/hslm_f32_study.t27 (+ its seal): the measurement the owner asked for on 2026-10-19 -- f32 instead of f64 in the HSLM trainer -- as constants and tests. It does not change the trainer: specs/ml/train_hslm.t27 and specs/nn/hslm.t27 have 0 lines changed here.

Method

Two runs on the Railway lab, side by side, same seed 1729, same TinyStories-V2 HTOK token files, release schedule (total 8000, warmup 2000), 2000 steps, held-out eval every 100 steps on the same 243 windows.

  • f64 control: train_hslm.t27 unmodified except that its file paths point to a private directory. It reproduces the release log (playra/hslm-t27-2m) at steps 500/1000/1500/2000 to every printed digit (12 of 12 numbers; tested).
  • f32 run: scratch copy of train_hslm, nn/hslm and nn/ternary_ste with the f64 type token replaced by f32 (mechanical sed) plus two hand fixes that keep the state file's f64 byte layout. Everything is f32, LAMB moments and loss accumulators included -- no destabilization (no NaN, gnorm tracks f64).

Result

f64 f32
overall tok/s (done line) 313.9 361.2 (1.1507x)
peak RSS (VmHWM) 124676 kB 79920 kB (0.641x)
held-out full loss, step 2000 5.1755 5.1814 (gap 0.0059)
largest held-out full-loss gap 0.0127 at step 1900

Every one of the 20 intervals is faster in f32 (min 1.046x). The curves coincide to 1.5e-3 nats until step 1400; the gap opens inside the lr peak (steps 1600-1900).

Verdict: REJECT by the rule stated before the numbers were read: ADOPT iff largest valid_full gap <= 0.01 nats AND speed-up >= 1.10. Speed passes, the gap is over by 0.0027 nats. This is "not yet", not "f32 trains worse": one seed, one run each; a second seed would show whether the 0.0059 final gap is precision or seed. No trainer change is proposed from this file; that decision is the owner's.

The lab was loaded (load average ~90 on 48 cores) so absolute tok/s is noisy; both runs shared the conditions, so the ratio is the fair figure.

Checks

  • Lab test-report of the spec: 11/11 pass, 0 vacuous.
  • Negative control on the lab: F32_FULL[19] 5.3134 -> 5.3200 makes 3 tests fail (8/11 pass), including the verdict-tie test.
  • Seal saved on the lab and committed.

🤖 Generated with Claude Code

…ps same seed: 1.15x faster, 0.64x peak RSS, largest held-out gap 0.0127 nats, verdict REJECT by the stated 0.01 threshold (Closes #10844)

Two runs on the Railway lab, side by side: the f64 control (reproduces the
release log at steps 500/1000/1500/2000 to every printed digit) and a
mechanical f64->f32 copy of train_hslm, nn/hslm and nn/ternary_ste with
everything f32, LAMB moments and loss accumulators included (no
destabilization). The spec holds both curves, tok/s and VmHWM as constants;
its tests re-derive the speed-up, the largest gap and tie the verdict to the
threshold. train_hslm.t27 and nn/hslm.t27 are not touched.

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 08:05:16 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=88b8cb73ceda != 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 enabled auto-merge (squash) October 19, 2026 08:11
@gHashTag
gHashTag merged commit 2aea729 into master Oct 19, 2026
32 of 35 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.

ml: measure f32 against f64 for the HSLM trainer -- loss curves, tok/s, peak RSS, a verdict spec

1 participant