Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runing llama2.c on a microcontroller #480

Open
mahdi259 opened this issue Feb 9, 2024 · 1 comment
Open

Runing llama2.c on a microcontroller #480

mahdi259 opened this issue Feb 9, 2024 · 1 comment

Comments

@mahdi259
Copy link

mahdi259 commented Feb 9, 2024

Hi
Thanks for your valuable effort.
Is it possible to compile llama2.c project to be run on a microcontroller without operating system?

@mahdi259 mahdi259 changed the title Runing llama2.c without on a microcontroller Runing llama2.c on a microcontroller Feb 9, 2024
@trholding
Copy link
Contributor

It is theoretically possible, but almost all uC boards lack the flash to store the models and have insufficient ram. You'd need to design a uC board with sufficient RAM/PSRAM that has a decent uC such as ESP32. With some changes to llama2.c it could be built for baremetal using the toolchain (compiler) for your uC. You should use the 8bit quantized llama2.c if you plan to do so to save resources.

This project comes close: https://github.com/maxbbraun/llama4micro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants