Hi!
I rewrote your C code to Rust, and Metal, just for learning (yes, that's one of the many rewrites). What's different is that I added some diagrams illustrating how the code works, plus other learning materials. If you find it an added educational value for your readers, consider linking the repo in your README (so I can piggyback on your recognition).
https://github.com/jakub-m/llama2-rs
Otherwise, ignore. Have a great day, cheers!
Jakub