Something went wrong. Try again.
Fork of https://github.com/xenova/microgpt.js
Something went wrong. Try again.
Optimize Zig port: remove @constCast, f64 inference fast path, readability improvements
- Eliminate all @constCast by changing [][]const *Value to [][]*Value - Add f64 fast-path for inference (doLinearF64, doSoftmaxF64, doRmsnormF64, doGptF64) - Break up dense Mersenne Twister expressions into readable intermediates - Use std.mem.swap in mtShuffle - Inline sum in doLinear to avoid temp allocation per row - Pre-size ArrayLists (tokens, losses) where lengths are known - Shrink Value.gen from u64 to u32
Author moderation Date (Feb 16, 2026, 12:49 AM UTC) Commit
Copy SHA
Parent e21de2f3 e21de2f3b6e4035f5d240e1c79e13c76e8428bd5