I saw a pretty cool project to run an llm on an esp32 device https://github.com/slvDev/esp32-ai
459 karma · joined November 17, 2018
I saw a pretty cool project to run an llm on an esp32 device https://github.com/slvDev/esp32-ai
afaik ollama relies on llama.cpp and mmap. mmap loads pages on demand and doesn't use the same explicit cache or parallel reads like my engine. Most likely ollama/llama.cpp will be way slower in this case
I think it will throttle quite soon, but I haven't tried runs longer than 30minutes with this engine.
However, there is no constant load on ssd or gpu. i/o and gpu work are alternating and there is a brief idle periods for each i/o and gpu during inference (because gpu waits for i/o and after that i/o waits for gpu)
Text was the last and most difficult part for me. It is not perfect (and this project is not perfect as well), but I believe it does the job of communicating my ideas
It was 83ms read per token for M2 and 12ms on M5 pro. Total is 163ms/tok vs 30ms/tok for M5. So yeah, there is a faster read and faster gpu processing
https://github.com/danveloper/flash-moe https://github.com/JustVugg/colibri
I believe it would be a perfect match!
Feel free to use any parts of my project or drop me a message. There’s my LinkedIn link at the end of the readme. Or I will drop you a message later!
With `mmap`, OS loads pages reactively as the model touches them. It doesn’t know which experts were selected or when their reads could overlap with GPU work
And common weights still use mmap for simplicity
So, I believe llama.cpp might run it under 2gb, but I assume it will be slower
My friend tried it on an M4 MacBook Pro and got 25–27 tok/s