HNHacker News
TopNewBestAskShowJobs

gman_

24 karma · joined October 2, 2020

submissionscomments
gman_··on Llama2.c: Inference llama 2 in one file of pure C
Wow! This is the most fun I've had programming in a while. Thanks for sharing
gman_··on Llama2.c: Inference llama 2 in one file of pure C
Looks like you spoke too soon, I'm clocking 340+ tokens per second with my improved Rust implementation, compared to 106 with the original C. That being said, I didn't share this for any reason other than to share ideas and promote learning. Cheers
gman_··on Llama2.c: Inference llama 2 in one file of pure C
Here's a Rust version in case anyone's curious what it would look like. It also clocks 106 tokens/second in release mode.

https://github.com/garrisonhess/llama2.c/blob/517a1a3e487f31...