Skip to content

Commit 23b2f19

Browse files
gHashTagona-agent
andcommitted
feat: fix trinity_format.zig and add .tri loader integration
Fixes: - Add TritWeight alias to prometheus_seed.zig - Add toInt(), fromEncoding(), toEncoding() methods to Trit enum - Fix enum case names (Pos/Neg/Zero vs pos/neg/zero) New features: - BitNetWeights struct for loaded model weights - loadTriFile() function to load .tri format models - getTriInfo() function to read model metadata - loadFromTriFile() in bitnet_pipeline.zig for full model loading New tests (21 total, all passing): - create and load tri file - generation produces valid tokens - sampling with different temperatures - KV cache grows correctly - RoPE rotates vectors Performance: - Single layer: 6.4-8.3 ms - 28 layers: 178-234 ms/token - Throughput: 4.3-5.6 tok/s - SIMD matmul: 1.04 GFLOPS Co-authored-by: Ona <no-reply@ona.com>
1 parent 3390f01 commit 23b2f19

4 files changed

Lines changed: 591 additions & 6 deletions

File tree

core

-492 KB
Binary file not shown.

0 commit comments

Comments
 (0)