Update README.md

This commit is contained in:
Andrej
2023-07-22 22:30:25 -07:00
committed by GitHub
parent 60d32cf13a
commit 9148cae17d
+2 -2
View File
@@ -3,9 +3,9 @@
Have you ever wanted to inference a baby [Llama 2](https://ai.meta.com/llama/) model in pure C? No? Well, now you can!
![llama2c](assets/llama_cute.jpg)
<img src="assets/llama_cute.jpg" width="300" height="300">
Code in this repo first lets you train the Llama 2 architecture from scratch in PyTorch, then save the weights to a raw binary file, then load that into one ~simple 500-line C file that inferences the model, simply in fp32 for now.
The code in this repo first lets you train the Llama 2 architecture from scratch in PyTorch, then save the weights to a raw binary file, then load that into one ~simple 500-line C file that inferences the model, simply in fp32 for now.
Of course, this is not super fast, but it's not too bad either. E.g. on my cloud Linux devbox a dim 288 6-layer 6-head model (~15M params) inferences at ~18 tok/s in fp32, and about the same on my M1 MacBook Air.