Skip to content

MLSTAC

A single, consistent way to publish and consume machine learning models, built on the STAC MLM extension and Safetensors.

Get started Quickstart

Experimental

The API may still change between minor versions.


Why MLSTAC

  • Models as metadata


    Every model is a STAC Item described with the MLM extension. The weights travel as Safetensors, so the description and the data stay in sync.

  • Many backends, one call


    Load from HTTP(S), local disk, Amazon S3 or Google Cloud Storage. mlstac.load figures out how to reach the model for you.

  • Metadata first, weights later


    Inspect a model before downloading a single byte. Pull the files only when you are ready, straight from the loader.

  • Ensembles out of the box


    Point at a list of .pt2 files and MLSTAC builds an ad-hoc ensemble with a minimal STAC description on the fly.


Install

pip install mlstac

In 30 seconds

import mlstac

# 1. Load only the metadata (no weights yet)
model = mlstac.load("https://example.com/my-model/mlm.json")

# 2. Look before you leap
print(model.get_model_summary())
model.print_schema()

# 3. Download, then build a usable model
net = model.download("./my-model").compiled_model()

Explore the docs

  • Getting Started


    Install MLSTAC and run your first load.

    Installation

  • User Guide


    Loading from any source, and downloading the right way.

    Loading models

  • API Reference


    Every class and function, generated from the source.

    ModelLoader