Skip to content

feat(spec): GF-T argmax classification head — 4 logits to class index (Refs #1764) - #1801

Merged
gHashTag merged 1 commit into
masterfrom
feat/gft-argmax4
Aug 6, 2026
Merged

feat(spec): GF-T argmax classification head — 4 logits to class index (Refs #1764)#1801
gHashTag merged 1 commit into
masterfrom
feat/gft-argmax4

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What

specs/ternary/gft_argmax4.t27 (GftArgmax4) — a spec-first classification head over four signed GF-T16 logits → the index {0,1,2,3} of the maximum real value (lowest index wins ties, strict >).

This is the final stage of a GF-T classifier: gft_mlp3 emits a vector of logits, argmax picks the predicted class. No arithmetic — just a total order on the GF-T encoding: the low 16 bits (offset<<9 | mant) are monotonic in the real magnitude and raw 0 is the only zero, so the order is negatives < zero < positives (positives by ascending bits, negatives by descending bits). gt(a,b) uses a 3-way sign category (neg=0, zero=1, pos=2).

Verification

  • Bit-exact to the ideal exact-float64 argmax over 400 vectors (tests/gft_argmax4_vectors.txt), iverilog $fscanf in bootstrap/tests/gft_argmax4.rs.
  • Vectors (including injected exact zeros to exercise the zero category) emitted only where the integer comparator and the float argmax agree — 0/400 disagreements.
  • Four in-spec tests: pick-positive, pick-last, zero-beats-negatives, tie-lowest-index.
  • No compiler change (on_comb, 4 ports). Fresh seal (seal --verify → all MATCH).

Completes the end-to-end GF-T classifier: activations → MLP → logits → argmax → class.

Refs #1764

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-06 15:37:34 UTC

Summary

Status Count
Total Open PRs 1
PRs with Failing Checks 0
PRs with All Checks Green 1
READY 0
FAILING 0
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).

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

@gHashTag

gHashTag commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Merge deferred — GitHub Actions infrastructure incident, not a code issue.

The validate (Validate JSON Schemas) job repeatedly failed during Set up job with Bad Gateway / Service Unavailable / Failed to resolve action download info — GitHub could not download the workflow's actions. Reran 3×; same infra error each time. All other required gates are green: check ✅, check-linked-issue ✅, check-now-freshness ✅, Check L1 TRACEABILITY ✅.

Locally verified independently of CI:

  • iverilog $fscanf conformance: 400/400 bit-exact to the doubly-grounded oracle.
  • seal --verify → all hashes MATCH; seal JSON key-structure identical to the sibling GftMlp3 seal that passed validate last cycle.

No --admin bypass (required-gate policy). Will re-run validate and merge once GitHub's runner infra recovers.

specs/ternary/gft_argmax4.t27 (GftArgmax4): four signed GF-T16 logits -> the
index {0,1,2,3} of the maximum real value (lowest index wins ties, strict >).
The final stage of a GF-T classifier: gft_mlp3 emits logits, argmax picks the
predicted class. No arithmetic -- a total order on the GF-T encoding: the low 16
bits (offset<<9 | mant) are monotonic in real magnitude and raw 0 is the only
zero, so negatives < zero < positives. gt(a,b) via a 3-way sign category.

Bit-exact to the ideal exact-float64 argmax over 400 vectors
(tests/gft_argmax4_vectors.txt), iverilog $fscanf. Vectors (incl. injected exact
zeros) emitted only where the integer comparator AND the float argmax agree
(0/400 disagreements). Completes the end-to-end GF-T classifier.

No compiler change (on_comb, 4 ports). Fresh seal (seal --verify MATCH).

Refs #1764

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

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-06 20:54:50 UTC

Summary

Status Count
Total Open PRs 8
PRs with Failing Checks 1
PRs with All Checks Green 7
READY 1
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 efb2b9e into master Aug 6, 2026
40 of 44 checks passed
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

1 similar comment
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

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

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