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

Docs 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

Roadmap

  • Phase 1: core runtime (khaos.load(), Hub caching, ONNX inference, per-domain result containers)
  • Phase 2: flagship artifact (sec_10k_core trained on SEC EDGAR iXBRL data)
  • Phase 3: multi-modal expansion across the remaining verticals

Metadata

Release files for khaos-ml 1.0.0

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.0
File Size Uploaded Provenance Actions
khaos_ml-1.0.0.tar.gz 47.6 kB With provenance Details for khaos_ml-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 115.9 kB

Release files / khaos_ml-1.0.0.tar.gz

Download URL khaos_ml-1.0.0.tar.gz
Size 47.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3298389b9d3f40b0d704a06aba40997c875f24212625c4260650d34f7f2de2ef
BLAKE2b-256 checksum
How to use checksums
708c28a7e3160759151812b92e98337d0c235a7202667b1141e8852b295a580d
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.0-py3-none-any.whl

Download URL khaos_ml-1.0.0-py3-none-any.whl
Size 68.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6637f99b4317804fe456f9f552b5a6bd4335216aa4be6b501660c7be29bdc49a
BLAKE2b-256 checksum
How to use checksums
0c96d6c7a3cc88685600ffcbf483424aa71148bec5dbae9aace09d922641fbe0
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.0

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