# Install and run

PSI runs on Windows, macOS and Linux, with or without a GPU. Each engine uses the GPU through its own build, and Settings > Check the setup says what each one sees here and what to install when…

Canonical: https://parameterspaceinspector.com/docs/install/  
Updated: 2026-11-01  
Part of the Parameter Space Inspector (free, open-source desktop app) · section: https://parameterspaceinspector.com/docs/ · Site guide for AI: https://parameterspaceinspector.com/llms.txt

## Requirements 

 | Part | Needed for | Notes |
|---|---|---|
 | Node 22.23.4+, 24.22.1+ or 26.12.1+ | the browser server, the tools and `npm install` | The releases that fix the Brotli flaw (CVE-2026-111497). The desktop app runs on the Node inside Electron 44.10.0 (24.22.1). `npm install` once. |
 | llama.cpp | answering engine | A release with `llama-server`, built for your GPU: CUDA for NVIDIA, Vulkan for AMD, Intel or NVIDIA, ROCm (HIP) for AMD on Linux, Metal on a Mac (the Homebrew `llama.cpp` has it). Settings > Check the setup says which GPU it sees. See [Graphics cards and Macs](#hardware). |
 | A GGUF model | answering engine | None is included; built on `Qwen3-4B-Q8_0.gguf` (4.3 GB, from Hugging Face). Choose it in Settings > Models. |
 | Python 3.12 | inside-the-model engine | `torch` built for your GPU (CUDA, ROCm, MPS or XPU: [Graphics cards and Macs](#hardware)), `transformers` 5.3 (`>=5.3,<5.4`: 5.4 and later refuse to save a model loaded from a GGUF), `numpy`, `safetensors`. Tested: torch 2.6, transformers 5.3. |
 | Full-precision weights | inside-the-model engine | Unpacked once from the GGUF (8 GB for Qwen3-4B; command below). Set in Settings > Inside-the-model engine > weights folder; small models are converted for you. |
 | Pythia checkpoints | Emergence (and reusing its test in Sensing surface) | Downloaded from Hugging Face (EleutherAI/pythia-410m-deduped, or another size: one folder per size); set the folder in Settings > Inside-the-model engine > training checkpoints. |
 | GPU | speed | NVIDIA, AMD, Intel or Apple Silicon ([Graphics cards and Macs](#hardware)). About 9 GB free for the inside engine with Qwen3-4B; without room it falls back to the processor (slow). |
 | OpenRouter key | optional | Prometheus, frontier comparisons, fact checks, neuron names. Settings > External models. |
  

## Graphics cards and Macs 

PSI runs on Windows, macOS and Linux, with or without a GPU. Each engine uses the GPU through its own build, and **Settings > Check the setup** says what each one sees here and what to install when one falls back to the processor. 

 | Machine | Answering engine (llama.cpp) | Inside engine (PyTorch) | GPU strip and power |
|---|---|---|---|
 | NVIDIA (Windows, Linux) | CUDA or Vulkan build | CUDA build of torch | Memory, use, spill (Windows), power |
 | AMD on Linux | ROCm (HIP) or Vulkan build | ROCm build of torch | Memory and use (rocm-smi or amd-smi); power with ROCm’s amdsmi |
 | AMD on Windows | Vulkan build | The processor: PyTorch has no AMD GPU support on Windows (WSL2 with ROCm is the way) | Memory, use and spill from the Windows GPU counters; no power |
 | Intel Arc | Vulkan or SYCL build | XPU build of torch | Windows GPU counters; no power |
 | Mac with Apple Silicon | Any macOS build (Metal is on) | The standard torch (MPS), in half precision | Unified memory: the RAM’s figures, no spill; no power (macOS shows it only to an administrator) |
 | No GPU | Any build, on the processor | The processor, float32 | “no GPU” |
  

**Mixture-of-experts models** (gpt-oss, Qwen3-MoE, Mixtral…) that do not fit beside what is already on the GPU keep the experts of just enough layers on the processor (llama.cpp’s `--n-cpu-moe`), so nothing spills into shared memory; Settings > Models says how many. On an RTX 4080 SUPER with 3.9 GB held by other programs, gpt-oss-20b spilled and Generate took 107 s for 30 steps; with 2 of 24 layers’ experts on the processor, 3 s. The inside engine does not read mixture-of-experts models (their MLP is many experts) and says so before loading anything. 

The inside engine takes the GPU when the model fits in its free memory (the weights × 1.15 + 1 GB), else the processor, and says why. `PSI_DEVICE=cpu|cuda|mps|xpu` chooses by hand. `PSI_PYTHON` chooses the Python (otherwise the first of `python3` / `python` on the PATH; `python` first on Windows). Only NVIDIA has been tested on real hardware so far; the others follow each library’s documented interface and were tested with simulated readings. 

## Start 

```
npm install
npm start                     # the desktop app

node src/devserver.js         # the same app in a browser: http://127.0.0.1:4310
```
 

Unpacking the full-precision weights from a GGUF, once: 

```
python research/convert_bf16.py --gguf <model.gguf> --out <folder for the weights>
```
 

A first start has nothing set: Settings says what is missing. Where llama.cpp, the models, weights and checkpoints live is set in [Settings](/docs/settings/) while the app runs: Local model (the GGUF), Inside-the-model engine (weights folder, training checkpoints). 

 

**For developers: start-up defaults (environment variables)** 

 | Variable | What |
|---|---|
 | `PSI_MODEL` | the GGUF to answer with [none] |
 | `PSI_LLAMA_DIR` | the llama.cpp folder [none: `llama-server` on the PATH] |
 | `PSI_TRACE_MODEL` | the full-precision weights [none] |
 | `PSI_CHECKPOINTS` | the Pythia checkpoints [none] |
 | `PSI_MODELS_DIR` | the folder Settings scans for GGUF files [none] |
 | `PSI_CORPUS` | the text used to find each neuron’s examples [`<cache folder>/datasets/neuron-corpus.json`] |
 | `PSI_EXAMPLES_DIR` | where those examples are cached [`<cache folder>/psi`, else `.userdata/cache/`] |
 | `PSI_CACHE_DIR` | a cache folder for the Python engines (or `"cacheDir"` in settings.json): Hugging Face downloads go to `huggingface/` and temporary files to `tmp/` under it [none: the system defaults]. Useful when the system drive is small. |
 | `PSI_DATA_DIR` | settings, keys and names [`.userdata/` in the app folder] |
 | `PSI_DEV_PORT` | the browser server’s port [`4310`] |
 | `PSI_DEV_TOKEN` | the browser server’s token for the page’s `/psi/*` calls [new at each start, put in the page, never printed] |
 | `PSI_MCP_TOKEN` | the token for `/mcp` only [new and printed at each start]: an agent holding it reaches the MCP tools, never settings, keys, the spending cap or model start-up |
 | `PSI_ALLOWED_HOSTS` | host names the browser server answers besides 127.0.0.1 and localhost, comma-separated, served only through Cloudflare Access (or `"allowedHosts"` in settings.json) [none] |
  

Settings saved in the app take precedence for the model, weights and checkpoints. 

## Remote use 

The browser server answers only on this computer (127.0.0.1). It has no login of its own, so to use it from another device put it behind a proxy that authenticates you first (for example a Cloudflare Tunnel with Cloudflare Access, or an SSH tunnel), and add that host name to `PSI_ALLOWED_HOSTS`. A request to that host is answered only if it carries Cloudflare Access’s `Cf-Access-Jwt-Assertion` header; with another proxy, forward to 127.0.0.1:4310 (an SSH tunnel does). Never expose port 4310 directly.

---

From [The Emergence Machine](https://emergencemachine.com/). Newsletter: [subscribe on Substack](https://theemergencemachine.substack.com/subscribe). Use-case feed: https://parameterspaceinspector.com/feed.xml. Follow: [Substack](https://theemergencemachine.substack.com) · [YouTube](https://www.youtube.com/@emergencemachine) · [X](https://x.com/emergences4me) · [Bluesky](https://bsky.app/profile/emergencemachine.bsky.social) · [Reddit](https://www.reddit.com/r/emergencemachine/) · [Instagram](https://www.instagram.com/emergencemachine/) · [TikTok](https://www.tiktok.com/@emergencemachine) · [Kaggle](https://www.kaggle.com/emergencemachine/datasets).
