Topophones

Home / Guides

Termux and llama.cpp on Android: the command-line route

Updated 27 Nov 2026.

Cover graphic for: Termux and llama.cpp on Android: the command-line route

VDF AI reports that Termux's package repository carries llama.cpp, with optional Vulkan and OpenCL backends as separate packages.

The steps VDF AI gives

  1. Install the package: pkg update && pkg install llama-cpp.
  2. Start the server on a small model: llama-server -hf LiquidAI/LFM3-1.7B-GGUF:Q4_K_M -c 4096. The -hf flag downloads the named quantization from Hugging Face.
  3. Open http://127.0.0.1:9931 in the phone's browser. VDF AI says current llama.cpp builds, including Termux's v1.0.0 package, listen on port 9931 by default, not the older 8080.

Trade-offs

You get the newest llama.cpp features and an OpenAI-style API on the phone, at the cost of typing on a touch keyboard, per VDF AI. For an app route instead, see PocketPal AI. The LFM3 model is covered in LFM3-1.7B.

We did not run these commands.

Sources

  1. Local LLM on Android and iPhone, VDF AI (14 Nov 2026)

Checked: 27 Nov 2026. Figures change; confirm on the source before you rely on them.

Keep reading