Skip to main content

One-stop JAX foundation model repository

Project description

foundax

One-stop JAX foundation model hub for this workspace.

The source repositories are vendored locally under repos/, so foundax can run against internal copies instead of the separate sibling repositories.

This repository provides one convert script and one compare script that dispatch to vendored model repositories under repos/:

  • jax_morph
  • jax_mpp
  • jax_pdeformer2
  • jax_poseidon
  • jax_prose
  • jax_walrus
  • jax_dpot
  • jax_bcat

Python API

You can import foundax as a package and instantiate models via:

import foundax

# MORPH-Ti
model = foundax.morph.Ti()

# MPP-Base
model = foundax.mpp.B(n_states=12)

# Poseidon-L
model = foundax.poseidon.L(num_in_channels=1, num_out_channels=1)

Version/size namespaces (mirroring jno/architectures/models.py):

  • foundax.poseidon: T, B, L
  • foundax.walrus: base (aliases: default, v1)
  • foundax.morph: Ti, S, M, L
  • foundax.mpp: Ti, S, B, L
  • foundax.bcat: base (aliases: default, v1)
  • foundax.pdeformer2: small, base, fast
  • foundax.dpot: Ti, S, M, L, H
  • foundax.prose: fd_1to1, fd_2to1, ode_2to1, pde_2to1

Lowercase aliases are also available for size variants where useful (for example foundax.morph.ti(), foundax.poseidon.b(), foundax.dpot.h()).

Quick Start

From foundax/:

python scripts/convert.py morph -- --input /path/to/model.pth --output /path/to/model.msgpack --model-size Ti
python scripts/compare.py morph -- --model-size Ti --checkpoint /path/to/model.pth

Vendored repositories live at:

foundax/repos/jax_morph
foundax/repos/jax_mpp
foundax/repos/jax_pdeformer2
foundax/repos/jax_poseidon
foundax/repos/jax_prose
foundax/repos/jax_walrus
foundax/repos/jax_bcat
foundax/repos/jax_dpot

General pattern:

python scripts/convert.py <model> [model-options...]
python scripts/compare.py <model> [model-options...]

If model options contain flags that overlap with foundax flags, put -- before model options.

Examples:

# DPOT
python scripts/convert.py dpot -- --input ../jax_dpot/ogrepo/model_Ti.pth --output ./artifacts/dpot_ti.msgpack
python scripts/compare.py dpot -- --checkpoint ../jax_dpot/ogrepo/model_Ti.pth

# PROSE ODE
python scripts/convert.py prose --prose-variant ode -- --input /path/prose_ode.pth --output /path/prose_ode.msgpack
python scripts/compare.py prose --prose-variant ode -- --checkpoint /path/prose_ode.pth --msgpack /path/prose_ode.msgpack

# BCAT (conversion supported directly in foundax)
python scripts/convert.py bcat -- --checkpoint /path/bcat.pt --output /path/bcat.msgpack

Notes

  • compare for bcat is not available yet because there is no existing comparison script in jax_bcat.
  • This repo intentionally reuses each vendored model repo's conversion/validation logic instead of duplicating that code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foundax-0.1.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foundax-0.1.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file foundax-0.1.0.tar.gz.

File metadata

  • Download URL: foundax-0.1.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for foundax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6baa2c057881d43d68bfd9488ace647d5ac6718e41b13d307ee83b59e08e4f9e
MD5 60adfbd7f9ccb720b97b29a4d9f9ab9f
BLAKE2b-256 f484e27013e724526f2cf1bbfbd261f6c5884318665d69edda62376b6a31f2e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for foundax-0.1.0.tar.gz:

Publisher: publish.yml on FhG-IISB/foundax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file foundax-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: foundax-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for foundax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0fc7c01dccf44480f46def27e5e37af7225f6890613bf37946f93711cf37d98a
MD5 e67f0e667dafe4f78efa0ade575ab18e
BLAKE2b-256 109918cd05467196c99d4911fb3021e9d0fb174034cd74945023b26f5d74f454

See more details on using hashes here.

Provenance

The following attestation bundles were made for foundax-0.1.0-py3-none-any.whl:

Publisher: publish.yml on FhG-IISB/foundax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page