Skip to content

feat: prove the whole trainer bit-exact in C (== model == Verilog) - #1878

Merged
gHashTag merged 1 commit into
masterfrom
feat/trainer-c-bitexact
Aug 7, 2026
Merged

feat: prove the whole trainer bit-exact in C (== model == Verilog)#1878
gHashTag merged 1 commit into
masterfrom
feat/trainer-c-bitexact

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Extends cross-target bit-exactness from the GF-T primitives to the whole trainer. verify_trainer_c.py emits the microsequencer as a C program (C GF-T primitives via t27c gen-c + a microcode interpreter + the operand-modifier modf), runs a full 80-step training run (forward+backprop+update), and checks every output per step against the independent Python GF-T model: C trainer == model bit-exact for 2-layer (2,2,1), multi-output (2,4,2), and deep [2,4,3,1]. Verilog == model is already proven, so the entire training loop is bit-identical across {C, Verilog, model}. Verified the guard catches a corrupted modf (9/80 mismatches). Wired into emit-bitexact-gate. Refs #1764

Extends cross-target bit-exactness from the GF-T primitives to the WHOLE trainer.
verify_trainer_c.py emits the microsequencer as a C program (C GF-T primitives via
t27c gen-c + a microcode interpreter + the operand-modifier modf), runs a full
80-step training run (forward+backprop+update), and checks every output per step
against the independent Python GF-T model: C trainer == model bit-exact for 2-layer
(2,2,1), multi-output (2,4,2), and deep [2,4,3,1]. Verilog == model is already
proven, so the entire training loop is bit-identical across {C, Verilog, model}.
Verified the guard catches a corrupted modf (9/80 mismatches). Wired into
emit-bitexact-gate (SKIPs if cc/t27c absent).

Refs #1764

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

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-07 14:33:48 UTC

Summary

Status Count
Total Open PRs 13
PRs with Failing Checks 1
PRs with All Checks Green 12
READY 5
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=4c1aaad5309a != 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 4acc470 into master Aug 7, 2026
18 checks passed
@gHashTag
gHashTag deleted the feat/trainer-c-bitexact branch August 7, 2026 14:40
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.

1 participant