feat(spec): end-to-end GF-T classifier — MLP to GF-T logits to argmax to class (Refs #1764) - #1802
Merged
1 commit merged intoAug 6, 2026
Merged
feat(spec): end-to-end GF-T classifier — MLP to GF-T logits to argmax to class (Refs #1764)#18021 commit merged into
1 commit merged into
Conversation
…-> 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>
gHashTag
force-pushed
the
feat/gft-classifier4
branch
from
August 6, 2026 16:11
45e80f0 to
4d65a1a
Compare
Contributor
PR DashboardGenerated at: 2026-08-06 16:55:23 UTC
Summary
Seal Status
|
gHashTag
enabled auto-merge
August 6, 2026 18:00
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
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.
What
specs/ternary/gft_classifier4.t27(GftClassifier4) — the capstone: the whole GF-T stack in one module.Fuses
gft_mlp3(deep BitNet×GF-T inference) withgft_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
tests/gft_classifier4_vectors.txt), iverilog$fscanfinbootstrap/tests/gft_classifier4.rs.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.tests (hand,all_zero) cross-checked against the Python oracle.on_comb, 20 ports). Fresh seal (seal --verify→ all MATCH). Integration test 400/400.Refs #1764
🤖 Generated with Claude Code