16 llama.cpp
Andy Bunce edited this page 2026-06-01 18:13:17 +01:00

~/dev/llama_cpp_binaries

Install

  1. Download latest https://github.com/lemonade-sdk/llamacpp-rocm/releases for rocm-gfx1151
  2. expand zip below /home/andy/dev/llama_cpp_binaries
  3. Create or edit the service service

Service

sudo systemctl status llama-server
sudo sudo systemctl stop llama-server
sudo nano /etc/systemd/system/llama-server.service

then

sudo systemctl daemon-reload
sudo systemctl start llama-server
sudo systemctl status llama-server

evo-x2% cat /etc/systemd/system/llama-server.service

[Unit]
Description=Llama Server
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/home/andy/dev/llama_cpp_binaries
Environment="CUDA_VISIBLE_DEVICES=0"
ExecStart=/home/andy/dev/llama_cpp_binaries/llama-b1260-ubuntu-rocm-gfx1151-x64/llama-server \
  --models-dir /home/andy/.lmstudio/models/lmstudio-community  --tools all -ngl 999 \
  --host 0.0.0.0 --port 8877
Restart=on-failure
RestartSec=5s
StandardOutput=file:/home/andy/dev/llama_cpp_binaries/logs/llama-server.stdout.log
StandardError=file:/home/andy/dev/llama_cpp_binaries/logs/llama-server.stderr.log

[Install]
WantedBy=multi-user.target

config

Files

evo-x2% pwd
/home/andy/dev/llama_cpp_binaries
evo-x2% ll
total 28
drwxrwxr-x 4 andy andy 4096 May  9 11:33 .
drwxrwxr-x 4 andy andy 4096 Mar 25 23:05 ..
-rw-rw-r-- 1 andy andy  188 Apr  7 12:56 README.md
drwxrwxr-x 4 andy andy 4096 May  6 12:29 llama-b1260-ubuntu-rocm-gfx1151-x64
-rw-rw-r-- 1 andy andy  621 May  9 11:33 llama-server.service
drwxrwxr-x 2 andy andy 4096 May  9 11:24 logs
-rwxrwxr-x 1 andy andy  213 May  8 12:26 serve.sh