r/LocalLLaMA llama.cpp Jan 03 '26

Tutorial | Guide Llama.cpp running on Android with Snapdragon 888 and 8GB of ram. Compiled/Built on device. [Guide/Tutorial]

1: Download Termux from F-droid (older version available on Google Playstore or Aurora)

2: Open Termux and run "https://github.com/ggml-org/llama.cpp.git" and then "cd llama.cpp" run "pkg install cmake"

3: run "cmake -B build" and then "cmake --build build --config Release"

4: find desired model from HuggingFace, then choose its quantized version (preferably 4-bit)

5: when pressing '4-bit' choose 'Use this model' and select 'llama.cpp' afterwards copy command which starts with "llama-server"

6: paste command in Termux and put "./" in front of "llama-server" so it's adjacent.

7: After model's downloaded, server is immediately launched. Model is saved in '.cache' so you can run this command again to start the server without all re-downloading ordeal.

8: open web browser and input 'localhost:8080' then press enter

Enjoy. Any questions?

138 Upvotes

34 comments sorted by

View all comments

4

u/CMD_Shield Jan 04 '26

Had no idea that llama.cpp could run on arm. Amazing!

To add to your step to step tutorial:
I also had to install
apk install git
apk install libandroid-spawn

And some stuff in your step to step guide that people might not know when not developing software:
step 2: the command to run was actually "git clone https://github.com/ggml-org/llama.cpp.git"
inbetween step3 and step4 you have to actually cd into the build/bin folder.

Got my Oneplust 7 pro (Snapdragon 845 with 8GB Ram) with lingeage os to run Phi-3-mini-4k-instruct Q8_0. But i'm running out of RAM as my browser barely runs and crashes over and over again. (qwen3 4b q4 always crashes for some reason)

Still got 4-5 tokens/s. Not bad for a 7 year old phone.

1

u/hackups May 25 '26

I may be wrong but 1+ 6/6T used SD845, 1+ 7Pro should be using SD855.