> ## 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.

# Datasets and training

> How the v1 datasets are built and the models are trained.

Every artifact has a dataset and a training script in the repository. The first
release of every artifact is **v1**.

## Layout

```text theme={null}
training/
├── common.py            # paths, dataset cards, parquet writing
├── trainer.py           # fit loop, ONNX export, model card
└── <domain>/
    ├── datasets.py      # builds datasets/<artifact>/
    └── train.py         # trains models/<artifact>/v1/
datasets/<artifact>/     # data/<split>.parquet and README.md (dataset card)
models/<artifact>/v1/    # manifest.json, model.onnx, model.pt, metrics.json, README.md
```

`datasets/` and `models/` are generated and git-ignored.

## Build a dataset

```bash theme={null}
uv sync --extra train --extra data
uv run python -m training.chem.datasets chem_solubility
```

Each builder downloads its public sources, applies the filters described in the
dataset card, splits the data, and writes parquet files plus a card with sources,
licenses, construction steps, columns and limitations.

## Train a model

```bash theme={null}
uv run python -m training.chem.train chem_mol_embedding
```

The trainer writes everything a deployment needs into `models/<artifact>/v1/`:
`model.onnx` and `manifest.json` (serve it with `khaos serve`), the PyTorch weights, a
`metrics.json` with the full training history, and a model card with test results.

## Data sources

| Domain | Sources |
| - | - |
| Finance | Real SEC filings from the TeraflopAI/SEC-EDGAR mirror (10-K, 8-K, Form 4, S-1) across many years and companies, and FiNER-139 XBRL-tagged numbers from 10-K and 10-Q filings |
| Physics | PDEBench and Fourier Neural Operator Darcy data, plus finite-volume, finite-difference and spectral solvers run under randomized boundary conditions |
| Robotics | LeRobot ALOHA bimanual demonstrations, simulated and real |
| Telemetry | CWRU bearings and rover IMU vibration (industrial and IoT), MIT-BIH and PTB-XL ECG (healthcare), SKAB testbed, UCI HAR wearables |
| Graph | Social (Reddit, Weibo, Tolokers), citation (Cora, CiteSeer, PubMed, ogbn-arxiv) and page-link (WikiCS, Wikipedia chameleon, squirrel, crocodile) graphs |
| Chemistry | ZINC250k, PubChem, AqSolDB, ESOL, Tox21, ClinTox, Lipophilicity |
| Geometry | ModelNet40 CAD shapes, DeepCAD mechanical parts, ScanObjectNN real scans |
| Tabular | SOTAB web-table columns, RelBench relational databases, entity-matching benchmarks (Abt-Buy, DBLP-ACM and others), ADBench anomaly tables |

Some labels are gold (taken from the source), some are exact (taken from structure),
and some are silver (produced by patterns or heuristics). Every dataset card says
which, and the model cards repeat it next to the results.

## Evaluation

Splits are made to avoid leakage: by scaffold for molecules, by company for filings,
by episode for robots, by recording for sensors, by database for join keys, by dataset for tabular anomalies. Most datasets also include a split of
held-out graphs, tasks or fault severities that never appear in training. Where a
simple baseline exists, such as random forests on fingerprints, Adamic-Adar for link
prediction, or a velocity-threshold stall detector, the model card reports it next to
the model.

> [!NOTE]
>
> These are first-release v1 models trained on a single consumer GPU. Read the
> limitations in each model card before relying on one.


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