Install
Install Gradian with the script or from source, understand the supported dependency window, and verify the environment with gradian doctor.
Gradian is installed from its GitHub repository. There is no package-index release yet, so the installer builds the project from a branch, tag or sha, and every install is pinned to a commit you can name.
The installer#
curl -fsSL https://raw.githubusercontent.com/gradian-ai/gradian/main/install.sh | shThat builds an isolated environment in ~/.gradian, picks the right PyTorch wheel for your hardware,
pins the supported dependency window, links gradian into ~/.local/bin, and finishes by running
gradian doctor. It touches nothing else except one PATH line in your shell rc.
Options cannot be flags through a pipe, because sh claims them as its own arguments. Use
environment variables instead:
URL=https://raw.githubusercontent.com/gradian-ai/gradian/main/install.sh
curl -fsSL $URL | GRADIAN_CPU=1 sh # force the CPU wheel
curl -fsSL $URL | GRADIAN_UNSLOTH=1 sh # add the unsloth trainer
curl -fsSL $URL | GRADIAN_REF=v0.1.0 sh # install a tag rather than main
curl -fsSL $URL | GRADIAN_UNINSTALL=1 sh # remove it againFrom source#
git clone https://github.com/gradian-ai/gradian && cd gradian
sh install.sh --localThat is an editable install with the same environment handling as the piped script, and it needs no
token beyond whatever git clone already used.
Managing the environment yourself#
pip install -e . # core: torch, transformers, peft
pip install -e ".[train]" # launch fine-tunes (trl, datasets, accelerate)
pip install -e ".[cluster]" # sentence-transformers and HDBSCAN
pip install -e ".[unsloth]" # train with unsloth (GPU only)
pip install -e ".[ekfac]" # the kronfluence cross-check engine
gradian doctor # verify the dependency matrix and devicesWithout the cluster extra, clustering falls back to TF-IDF, SVD and KMeans, which works but
produces less meaningful cluster labels.
The distribution is named gradian-ml. The import name and the CLI are both plain gradian, the
same split scikit-learn and sklearn use.
Supported dependency window#
| Package | Supported window |
|---|---|
torch |
2.4 to 2.11 |
transformers |
4.51 to 5.5 |
peft |
0.18 and above |
trl |
0.24 and below |
That is the window Gradian is developed and tested inside. The latest upstream releases sit above
parts of it, which is deliberate: a supported window that everything in the ecosystem agrees on is
worth more than being current. The exact pins live in constraints/, and gradian doctor warns when
your installed versions drift out of range.
Platform support#
| Platform | Status |
|---|---|
| Linux with CUDA | Fully supported, and what the GPU validation suite runs on |
| Linux or macOS, CPU only | Works for the audit and for small models. Attribution on a real model needs a GPU |
| Apple Silicon | The audit works. MPS is available if you set device explicitly, and is not selected automatically |
| Windows | Use WSL2 |
| Intel Macs | Not supported, since recent PyTorch has no wheel for them |
| ROCm | Not configured automatically. Install the ROCm PyTorch wheel yourself first |
Python 3.10, 3.11 and 3.12 are supported.
Verify the install#
gradian doctordoctor reports the installed package versions against the supported window, the visible devices,
determinism settings, and which training backends are available and why. If something later behaves
strangely, this is the first command to run and the first output to paste into an issue.