| English | Polski |
Automatic installer for llama.cpp with hardware-specific optimizations. The project detects your hardware type (Raspberry Pi 5, Raspberry Pi 4, Termux Android, Linux x86_64) and automatically selects optimal compilation flags for maximum performance.
Author: Fibogacci (https://fibogacci.pl)
License: MIT
Technologies: Python, Textual (GUI), Typer (CLI), Rich, psutil
Dynamic ⭐ - Automatic detection and optimization (RECOMMENDED)
⚠️ Warning: dynamic works only on x86_64. For ARM/Raspberry Pi use dedicated configurations (rpi5_8gb, rpi5_16gb, rpi4).
# Clone repository
git clone https://github.com/fibogacci/llamacpp-installer.git
cd llamacpp-installer
# Install dependencies globally
pip install -r requirements.txt
If you have issues with global installation or want to isolate dependencies:
# Clone repository
git clone https://github.com/fibogacci/llamacpp-installer.git
cd llamacpp-installer
# Create virtual environment
python -m venv venv-llamacpp-installer
# Activate virtual environment
source venv-llamacpp-installer/bin/activate
# Install dependencies in virtual environment
pip install -r requirements.txt
# To deactivate virtual environment (after finishing work)
deactivate
# Polish (default)
python main.py
# English
python main.py --lang en
# Hardware detection
python cli.py detect
python cli.py detect --lang en
# Automatic installation (recommended)
python cli.py install --hardware dynamic --dir /path/to/install
# Manual hardware selection
python cli.py install --hardware rpi5_8gb --dir /home/user/llama
python cli.py install --hardware x86_linux --dir /opt/llama --lang en
# Custom configuration
python cli.py install --config example_configs/x86_avx512.txt --dir /path/to/install
| Hardware | Type | Description |
|---|---|---|
| Raspberry Pi 5 8/16GB | rpi5_8gb |
Maximum performance with RPC |
| Raspberry Pi 5 4GB | rpi5_4gb |
Balanced optimization |
| Raspberry Pi 4 | rpi4 |
Cortex-A72 optimized |
| Linux x86_64 Auto | dynamic |
Automatic detection ⭐ |
| Linux x86_64 New | x86_linux |
AVX2 + OpenBLAS |
| Linux x86_64 Legacy | x86_linux_old |
AVX without AVX2 |
| Linux x86_64 Minimal | x86_linux_minimal |
Basic optimizations |
| No optimization | no_optimization |
Maximum compatibility |
| Termux Android | termux |
Mobile-optimized |
Create your own .txt files with CMAKE flags:
# example_configs/my_config.txt
-DGGML_NATIVE=ON
-DGGML_AVX2=ON
-DGGML_OPENMP=ON
-DGGML_OPENBLAS=ON
Usage:
python cli.py install --config my_config.txt --dir /path/to/install
After installation, the structure will be:
/your/chosen/path/
└── llama.cpp/
├── build/
│ └── bin/
│ ├── llama-cli
│ ├── llama-server
│ └── ...
├── logs/
│ └── llamacpp_installer_*.log
├── llama-cli.sh # Wrapper script
├── llama-server.sh # Wrapper script
└── llama-simple.sh # Wrapper script
# Polish (default)
python cli.py detect
python cli.py install --hardware dynamic --dir /path
# English
python cli.py detect --lang en
python cli.py install --hardware dynamic --dir /path --lang en
# Polish (default)
python main.py
# English
python main.py --lang en
python main.py --en
export LLAMACPP_INSTALLER_LANG=en
python main.py # Will use English
# Enable detailed logging
python cli.py detect --debug
python cli.py install --hardware dynamic --dir /path --debug
# Test hardware detection
python hardware_detector.py
# Test dynamic CPU detection
python dynamic_config.py
# Test optimization configs
python optimization_configs.py
--hardware x86_linux_old or --hardware dynamic{install_dir}/logs/sudo apt install build-essential cmake gitsudo apt install libopenblas-devsudo only if installing to system directoriespkg install python cmake git--hardware termux for mobile optimizationInstallation logs are saved in {installation_directory}/logs/ with format:
llamacpp_installer_YYYYMMDD_HHMMSS.log
MIT License - see LICENSE file for details.
Fibogacci
For Polish documentation, see README_PL.md