termux-llamacpp Logo

termux-llamacpp

v1.0.0 (GGUF Runtime)
PyPI (pip) GitHub

Quickstart & Recipes

Serve models locally and connect seamlessly with termux-aichain.

Recipe 1: Start OpenAI Server via CLI

termux-llama download qwen2.5-1.5b-instruct
termux-llama serve qwen2.5-1.5b-instruct --port 8080

Recipe 2: Connect from termux-aichain

from termux_aichain import LocalAgent

agent = LocalAgent.create(
    mode="connect",
    endpoint="http://127.0.0.1:8080"
)

reply = agent.run("Analyze system hardware.")
print(reply)