> ## Documentation Index
> Fetch the complete documentation index at: https://khaos-ml.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install Khaos from PyPI, with optional extras.

Khaos requires Python 3.10+. The package on PyPI is named **`khaos-ml`**; the import is `khaos`.

```bash pip theme={null}
pip install khaos-ml
```

```bash poetry theme={null}
poetry add khaos-ml
```

```bash uv theme={null}
uv add khaos-ml
```

```python theme={null}
import khaos

pipe = khaos.load("pde_darcy_flow_2d")   # downloads the model on first use
```

The core install is small (numpy, onnxruntime and huggingface\_hub) and runs the physics, robotics,
telemetry, graph and geometry artifacts. The others need one extra package each.

## Optional extras

Heavy dependencies are isolated as extras so you only install what you use.

| Extra | Adds | Needed by |
| - | - | - |
| `finance` | transformers (tokenizer), XML parsing | `sec_*` |
| `tabular` | pandas, transformers | DataFrame input, `tab_entity_dedupe` |
| `chem` | rdkit | `chem_*` |
| `3d` | trimesh | mesh files and `trimesh` objects in `geo_mesh_embedding` |
| `serve` | FastAPI, uvicorn | [`khaos serve`](https://khaos-ml.mintlify.site/usage/serving) |
| `all` | everything needed to run every artifact, and to serve them | |
| `train` | PyTorch, transformers and onnx | the [model architectures](https://khaos-ml.mintlify.site/usage/architectures.md) |
| `dev` | pytest | running the tests |

```bash pip theme={null}
pip install "khaos-ml[all]"
```

```bash poetry theme={null}
poetry add "khaos-ml[chem,finance]"
```

```bash uv theme={null}
uv add "khaos-ml[all]"
```

## Model cache

Model weights are downloaded from the Hugging Face Hub on first use (public repositories under
[`fletxcher`](https://huggingface.co/fletxcher), no token needed) and cached under
`~/.cache/khaos`. Set `KHAOS_HOME` to move the cache.

## From source

```bash theme={null}
git clone <repo-url> khaos && cd khaos
uv sync --extra dev
```

## Verify

```python theme={null}
import khaos
print(khaos.__version__)
# 1.0.0
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.