docs(tutorials): ternary networks getting started (Pi-native, 16x smaller weights) - #1163
Merged
Merged
Conversation
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
…a Pi The user-facing walkthrough for the vendored NeoGPU ternary path (#1136): train a sequential-DSL classifier in FP32, ternarize with TernaryCodec.encodeBitNet (~16x smaller weights, exact math), and run it natively on a Raspberry Pi 4 through the linuxArm64 cinterop bridge — one install() call per deployment shape, no changes to model code or the dispatcher. Includes the BITNET_B1_58 layout, the memory arithmetic, honest accuracy/threading expectations, and the status/roadmap (#1140, #1141, transformers#335). NativeTernaryF32GemvKernel goes internal → public so the JVM row of the bridge table is true — the same install() surface JniTernaryF32Gemv and NativeKnTernaryF32Gemv already expose publicly. Refs #1141, #1136 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
michalharakal
force-pushed
the
feature/1141-ternary-getting-started
branch
from
August 26, 2026 11:07
f707c65 to
db16a91
Compare
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
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.
Part of #1141 / #1136. Best merged after #1161 (the tutorial's bridge table names
JniTernaryF32Gemv/NativeKnTernaryF32Gemvfrom that PR; everything else stands on already-merged code).What
New tutorial
tutorials/ternary-getting-started.adoc(registered in nav): the user-facing story for the ternary f32 path —sequential { }DSL (unchanged),TernaryCodec.encodeBitNet— layout diagram + memory table (~397 KB → ~25 KB for the MNIST-shaped MLP, ≈16×),linuxArm64+NativeKnTernaryF32Gemv.install()), with the Android/JVM one-liners alongside,API change
NativeTernaryF32GemvKernel(FFM) goes internal → public so the JVM row of the bridge table is true — the same publicinstall()surface its JNI and Kotlin/Native siblings already have. Verified: ternary jvmTest suite green after the change.🤖 Generated with Claude Code