Skip to content

Installation

Phronesis runs locally, on CPU. It sends no network traffic on its own and can analyze Nmap XML you have already collected.

Requirements

Use case What you need
Analyze an existing XML file Python 3.10 or later (3.11 tested), PyTorch, the project dependencies, the model weights
Run a live scan Everything above, Nmap installed, explicit authorization for the target
Live scan on Windows Native Nmap on the PATH, or WSL with Nmap in the distribution you use

The Safetensors model is about 988 MB, the GGUF Q8_0 about 506 MB. You don't need a GPU to analyze XML. RAM must cover the model plus the context you send.

Minimum configuration

Resource Minimum Recommended
System Windows 10, Linux or macOS, 64-bit
Python 3.10 3.11
CPU x86-64 or ARM64 supported by PyTorch, 4 cores 8 cores or more
RAM, Safetensors (phronesis, suggest) 6 GB 8 GB
RAM, GGUF via llama.cpp 2 GB 4 GB
Disk 3 GB: Safetensors weights, CPU PyTorch, dependencies and NSE library 4 GB with the GGUF
GPU none optional, CUDA
Nmap only for live scans

These figures come from a real measurement. On CPU, Phronesis loads the weights in float32: the process uses 2.3 GB of RAM after loading, peaking at 3.2 GB when scoring a port with 14 candidates. The GGUF llama.cpp server peaks at 650 MB. The test machine is an 8-core, 16-thread Intel Core running Windows 11, with Python 3.11 and PyTorch 2.6. Scoring takes a median of 1.7 to 2.6 s per port with 3 to 5 candidates, and about 6.8 s with 14 candidates. A slower CPU makes these times longer without changing the results.

PyTorch is installed separately

requirements.txt doesn't pin PyTorch, so it won't break an existing CUDA install. Install the right build for your machine from the official PyTorch selector, then the rest.

PyTorch without a GPU

On Linux, pip install torch downloads a large CUDA build by default. For CPU only: pip install torch --index-url https://download.pytorch.org/whl/cpu. On Windows, the default wheel works fine for CPU.

Get the code and install

python -m pip install torch --index-url https://download.pytorch.org/whl/cpu   # Linux, CPU only
python -m pip install phronesis-nse
phronesis doctor

On Windows and macOS, skip the PyTorch line: pip install phronesis-nse installs it. The first run downloads the weights from Hugging Face into the user cache (about 1 GB) and checks their SHA-256. PHRONESIS_MODEL_DIR points to a folder you already have. phronesis doctor reports what is missing and never downloads.

Tested so far: Windows 11 with Python 3.11, and Kali Linux with Python 3.14. Not tested yet: macOS, Python 3.10 and 3.12.

Where the files are

Item Location
Downloaded weights (pip install) %LOCALAPPDATA%\phronesis\model on Windows, ~/.cache/phronesis/model elsewhere
Safetensors weights, tokenizer and chat template ship/hf/
Alternative weights model/, used if ship/hf/ is missing
Bundled NSE library nse-library/
Offline scan example examples/quickstart-scan.xml

Model somewhere else on disk

--model-dir chemin/vers/le/dossier points to any folder containing model.safetensors, tokenizer.json and chat_template.jinja. The 34zY/Phronesis model card is still private: request access from the Phronesis GitHub repository.

Check the installation

phronesis --xml examples/quickstart-scan.xml --top 8

The model loads, picks a script or STOP, then prints the matching Nmap command without running it. This command sends no traffic. After the model loads, scoring on CPU takes a median of 1.7 to 2.6 s per port with 3 to 5 candidates, and about 6.8 s with 14 candidates.

To check the NSE library and its state:

phronesis --catalog
phronesis update-db --check

--catalog lists the available scripts. update-db --check verifies the integrity of the local library (hashes and manifest) without reading the registry and without changing anything.

Common problems

Symptom Likely cause Fix
modèle Phronesis introuvable ship/hf/ folder missing or incomplete Pass --model-dir pointing to a folder that contains the weights
phronesis not found after install Virtual environment not activated Reactivate .venv or run python nmap_select.py
Nmap not found on Windows Nmap is neither on the PATH nor in WSL Install Nmap, or pass the XML you already collected
Very slow analysis Running on CPU, several ports Lower --top, or use a GPU with --device cuda
CUDA error on load PyTorch installed without CUDA Reinstall PyTorch with the right CUDA build

Next steps

The code and issue tracking are on the Phronesis GitHub repository. The model card is on Hugging Face.