Skip to main content

khaos: Pre-trained models for domain-specific tasks

khaos is a lightweight, modular, local-first machine learning framework for Python. It ships compact pre-trained models for specialized engineering, scientific and financial data, behind one small API, so you can run them on standard CPU/edge hardware without sending data to an external service.

Version: Khaos is on v1. The first release of every artifact is named v1; we do not use v0.x versions. The runtime, architectures and serving are in place, and artifacts are being trained and published domain by domain.

import khaos

nlp = khaos.load("sec_10k_core")
doc = nlp("path/to/10k_filing.html")
print(doc.ents)    # extracted metrics, debt tranches, maturity dates
# [Entity(label="Revenue", value="$12.4B"), ...]
print(doc.vector)  # dense filing embedding
# [ 0.12 -0.03  0.88 ... ]

Features

  • One khaos.load(...) interface for every domain
  • Pre-trained artifacts per vertical, fetched and cached from the Hugging Face Hub
  • ONNX inference behind a lightweight core runtime; export from PyTorch, TensorFlow or any other library
  • Heavy domain dependencies isolated as optional extras
  • Pipelines resolved through a registry, so new artifacts plug in without touching core
  • Built-in HTTP server (khaos serve) and Dockerfile for deployment
  • khaos command-line interface for inspecting, downloading, serving and evaluating artifacts
  • Domain-specific result containers: each vertical defines its own, with no shared base class

Verticals and artifacts

Extra Domain Example artifacts
khaos-ml[finance] SEC filings and XBRL extraction sec_10k_core, sec_8k_events, sec_form4_insider, sec_s1_ipo
khaos-ml[3d] CAD, meshes and point clouds geo_part_classifier, geo_mesh_embedding, geo_pointcloud_embedding
khaos-ml[tabular] Schema detection and entity resolution tab_column_types, tab_key_matching, tab_entity_dedupe, tab_anomaly_scoring
khaos-ml[telemetry] Industrial and IoT sensor time-series tele_sensor_vibration, tele_bio_ecg, tele_regime_shift
khaos-ml[graph] Graph and network topology encoders graph_node_embedding, graph_subgraph_embedding, graph_fraud_rings, graph_link_prediction
khaos-ml[chem] Molecular and material properties chem_mol_embedding, chem_logp, chem_solubility, chem_toxicity
khaos-ml (core) PDE simulation surrogates pde_darcy_flow_2d, pde_navier_stokes_steady_2d, pde_heat_diffusion_2d, pde_wave_evolution_2d
khaos-ml (core) Robot trajectory and kinematics encoders robo_kinematics_sm, robo_skill_segmentation, robo_failure_detection

See idea.txt for the full vision and roadmap.

Installation

Requires Python 3.10+. The package is named khaos-ml; the import is khaos.

pip install khaos-ml              # or: poetry add khaos-ml / uv add khaos-ml
pip install "khaos-ml[all]"       # everything needed to run every artifact

Serve it

Train elsewhere, export to ONNX, and serve:

pip install "khaos-ml[serve]"
khaos serve ./my-artifact --port 8000
curl -X POST localhost:8000/v1/artifacts/pde_darcy_flow_2d/predict \
  -H "Content-Type: application/json" -d '{"input": [[0.0, 0.1], [0.2, 0.3]]}'

See the docs for the artifact format, authentication and Docker.

Command line

khaos info                  # list known artifacts
khaos download <artifact>       # fetch an artifact from the Hugging Face Hub
khaos serve [artifact ...]      # serve artifacts over HTTP
khaos evaluate <artifact>       # evaluate an artifact (not implemented yet)

Repository layout

khaos/
├── pyproject.toml
├── khaos/              # importable package
│   ├── registry.py     # artifact registry and load()
│   ├── manifest.py     # artifact manifest (training -> runtime contract)
│   ├── modeling.py     # khaos.modeling.build(artifact)
│   ├── export.py       # export_artifact(): model -> manifest + ONNX
│   ├── layers.py       # ONNX-friendly transformer blocks
│   ├── pipeline.py     # BasePipeline, OnnxPipeline, ModalityProcessor
│   ├── serve/          # HTTP server
│   ├── cli/            # `khaos` command
│   └── finance/ geometry/ tabular/ telemetry/ graph/ chem/ physics/ robotics/
│                       # one subpackage per vertical (adapter, pipelines,
│                       # and its own containers.py)
├── artifacts/          # artifact definitions, one dir per domain
├── docs/               # documentation site (Mintlify)
├── training/           # per-artifact training and evaluation configs
└── tests/

Model weights are not stored in this repository; they are published to the Hugging Face Hub and cached under ~/.cache/khaos.

Documentation

Read the docs at https://khaos-ml.mintlify.site/. They live in docs/ and are built with Mintlify:

npm i -g mint
cd docs && mint dev     # http://localhost:3000

Run tests

pip install -e ".[dev]"
python -m pytest tests

Metadata

Release files for khaos-ml 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for khaos-ml 1.0.1
File Size Uploaded Provenance Actions
khaos_ml-1.0.1.tar.gz 47.8 kB With provenance Details for khaos_ml-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for khaos-ml 1.0.1
File Interpreter ABI Platform Actions
khaos_ml-1.0.1-py3-none-any.whl Python 3 none any Details for khaos_ml-1.0.1-py3-none-any.whl

Total release size: 116.2 kB

Release files / khaos_ml-1.0.1.tar.gz

Download URL khaos_ml-1.0.1.tar.gz
Size 47.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d2b3117c8b0433be74d5626ed12798fa81cca23fb48c33838c2f025b1f0d1bfe
BLAKE2b-256 checksum
How to use checksums
c30d945efd1aa6e44a7dcbfefe4a33f8ede88714d96706e3d23e41cba48c7bea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / khaos_ml-1.0.1-py3-none-any.whl

Download URL khaos_ml-1.0.1-py3-none-any.whl
Size 68.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b39ae9984798fca837765d88bca1a81b3a64b6ada7f103c4b3a66c4d921b87b4
BLAKE2b-256 checksum
How to use checksums
653efd618248bbb80e7389fc315176fd0d29730ad335babe9ede203e1e4a3a4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for khaos-ml 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for khaos_ml-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page