Skip to content

OpenSTEF/openstef-checkpoints

openstef-checkpoints

Tooling to export, verify, and publish the ONNX foundation-model checkpoints used by OpenSTEF.

Overview

OpenSTEF runs pre-trained forecasting foundation models through ONNX Runtime. This project produces those ONNX checkpoints from their upstream source models and publishes them to Hugging Face, where OpenSTEF resolves them at runtime. The first supported model is Chronos-2.

For each model it:

  • converts the upstream model to ONNX in several variants: dynamic or static shapes, in fp32, fp16, or int8;
  • writes a metadata file describing each variant (tensor names, context length, quantiles, precision, shapes);
  • checks every variant against the original model on representative inputs, so one that drifts beyond tolerance is never published;
  • uploads the selected variants and a generated model card to a per-model Hugging Face repository.

The published checkpoint metadata follows the same schema OpenSTEF reads, kept in sync by a JSON-Schema conformance test on both sides rather than a shared dependency.

Project layout

Path Contents
src/openstef_checkpoints/ Model-agnostic machinery: export, verification, publishing, metadata schema, and the CLI.
src/openstef_checkpoints/models/<model>/ Model-specific code: the export wrapper and the variant and sizing configuration.

Installation

The project uses uv. The base install provides the metadata schema, ONNX-graph verification, publishing, and the CLI. Exporting a checkpoint additionally requires the source-model stack, provided by the chronos extra:

uv sync                  # base environment
uv sync --extra chronos  # add torch and chronos-forecasting to run exports

Usage

The openstef-checkpoints command exposes three subcommands:

openstef-checkpoints list                  # show the configured models and variants
openstef-checkpoints export chronos-2      # export and verify all variants
openstef-checkpoints publish chronos-2     # upload the verified variants to Hugging Face

Exports are written to checkpoints/<model>/. See openstef-checkpoints <command> --help for the available options.

Development

Tasks are defined with poethepoet and run through uv:

uv run poe lint
uv run poe type
uv run poe tests
uv run poe all --check   # full CI sequence

License

Licensed under the Mozilla Public License 2.0. Published checkpoints carry the license of their upstream source model.

About

Repository for creating / maintaining of onnx checkpoints for openstef-foundation-models

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors