Skip to content

feat(spec): end-to-end GF-T classifier — MLP to GF-T logits to argmax to class (Refs #1764) - #1802

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

feat(spec): end-to-end GF-T classifier — MLP to GF-T logits to argmax to class (Refs #1764)#1802
1 commit merged into
masterfrom
feat/gft-classifier4

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What

specs/ternary/gft_classifier4.t27 (GftClassifier4) — the capstone: the whole GF-T stack in one module.

4 GF-T16 activations
  → hidden layer (2 BitNet neurons, sign→trit)
  → re-embed {N→−1.0, Z→0, P→+1.0}
  → output layer of 4 LOGIT-neurons (raw signed GF-T sum, NO activation → a real GF-T logit per class)
  → argmax over the 4 logits
  → predicted class index {0,1,2,3}

Fuses gft_mlp3 (deep BitNet×GF-T inference) with gft_argmax4 (the classification head): activations → MLP → GF-T logits → class. The output neurons keep their raw GF-T sum as a logit instead of quantizing to a trit — so the class scores carry full GF-T precision.

Verification

  • Bit-exact to the ideal oracle over 400 vectors (tests/gft_classifier4_vectors.txt), iverilog $fscanf in bootstrap/tests/gft_classifier4.rs.
  • Doubly-grounded / non-circular oracle: integer HW model and exact-float64 (logit-sum + argmax) agree — the re-embedded hidden acts are exact ±1.0/0, so the output sums are exact in float64. 0/400 disagreements.
  • Two in-spec tests (hand, all_zero) cross-checked against the Python oracle.
  • No compiler change (on_comb, 20 ports). Fresh seal (seal --verify → all MATCH). Integration test 400/400.

Refs #1764

⚠️ Note: GitHub Actions is having an infra incident (action-download Bad Gateway/Service Unavailable) that has been stalling the validate gate on sibling PR #1801. If validate stalls here too, it is the same infra issue, not this change.

🤖 Generated with Claude Code

…-> class)

specs/ternary/gft_classifier4.t27 (GftClassifier4): the capstone -- four GF-T16
activations -> hidden layer (2 BitNet neurons, sign->trit) -> re-embed -> output
layer of 4 LOGIT-neurons (raw signed GF-T sum, no activation -> a real-valued
GF-T logit per class) -> argmax over the 4 logits -> predicted class index
{0,1,2,3}. Fuses gft_mlp3 (deep BitNet x GF-T inference) with gft_argmax4 (the
classification head) into one module.

Bit-exact to the ideal oracle over 400 vectors (tests/gft_classifier4_vectors.txt),
iverilog $fscanf. Doubly-grounded oracle: integer HW model AND exact-float64
logit-sum + argmax agree (re-embedded hidden acts are exact +/-1.0/0 so output
sums are exact in float64 -> non-circular; 0/400 disagreements).

No compiler change (on_comb, 20 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 16:55:23 UTC

Summary

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

@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.

@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.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-06 22:26:35 UTC

Summary

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

@gHashTag gHashTag closed this pull request by merging all changes into master in 26d32a0 Aug 6, 2026
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