Installation¶
CircuitKit requires Python ≥ 3.10 and PyTorch ≥ 2.0.
Standard install (CPU)¶
GPU install (CUDA 12.6)¶
git clone https://github.com/Lexsi-Labs/circuitkit.git
cd circuitkit
pip install -e ".[gpu-cu126]" --extra-index-url https://download.pytorch.org/whl/cu126
For other CUDA versions, install core first, then your preferred torch wheel separately.
Install without cloning¶
Optional extras¶
pip install -e ".[benchmarks]" # lm-evaluation-harness integration
pip install -e ".[quantization]" # optimum-quanto quantisation backend
pip install -e ".[cdt]" # captum/lime/shap (CD-T research backend)
pip install -e ".[dev]" # pytest, black, flake8, mypy
pip install -e ".[docs]" # MkDocs documentation build
spaCy ships with the base install (it backs the Pillar 4 corruption strategies). Those strategies also need the small English model, which is a one-time download:
Combine extras:
| Extra | Enables |
|---|---|
| (core) | Discovery, evaluation, pruning, visualisation, robustness pillar (Pillar 4) with semantic/entity corruptions |
benchmarks |
GSM8K, MMLU, BoolQ, WinoGrande via lm-eval |
quantization |
Circuit-aware mixed-precision via optimum-quanto |
cdt |
CD-T research-tier discovery backend |
Verify¶
Platform notes¶
| Platform | Status |
|---|---|
| Linux | Full — recommended |
| macOS | Full — CPU or Metal |
| Windows | Partial — WSL2 recommended |
Troubleshooting¶
CUDA out of memory during install
Install CPU-only first, then swap in the GPU torch wheel:
Next steps¶
- Quick Start — run your first circuit in 5 minutes
- Core Concepts — understand circuits, tasks, and faithfulness