Skip to main content

🌱 SEED

A portable bundle format for machine learning models.

SEED packages a model's weights, config, tokenizer, and any other artifacts into a single .seed file — a self-contained zip with a structured manifest. Built with language models in mind, generic enough for anything.

No more juggling separate .pth, .json, and custom pickle files. One file, everything inside.


Author

Artheme Gauthier-Villars (agauthier@ethz.ch)

Install

pip install seedfile

Quickstart

from seedfile import sd

# Save everything in one shot
sd.save("my_model.seed", {
    "model":     model.state_dict(),   # PyTorch state dict
    "config":    CONFIG,               # dict, dataclass, or custom object
    "tokenizer": tokenizer,            # any Python object
})

# Load it back anywhere
data = sd.load("my_model.seed")

model.load_state_dict(data.get("model"))
CONFIG    = data.get("config")
tokenizer = data.get("tokenizer")

The bundle knows what it contains:

print(data)
# SeedBundle(version=v1.0.0, components=['model', 'config', 'tokenizer'])

"model" in data   # True
len(data)         # 3

Why SEED?

Training a language model produces a lot of artifacts that belong together:

Artifact Typical format Problem
Model weights .pth Detached from the config it was trained with
Tokenizer custom class / HF files Separate directory, easy to lose
Generation config .json No guarantee it matches the weights
Training history dict / CSV Usually just forgotten

SEED bundles all of it. When you share or archive a .seed file, everything travels together.


Serialisation

SEED picks the right format automatically — no configuration needed:

Object type Saved as
PyTorch state_dict .pth via torch.save
torch.Tensor .pth
numpy.ndarray .npy via np.save
dict, list, primitives .json
Custom objects .json (via __dict__) → pickle fallback

Custom serialisers

For objects that need special handling, pass a serializers dict:

def save_tokenizer(obj, tmp_dir):
    path = tmp_dir / "tokenizer.model"
    obj.save(str(path))
    return "tokenizer.model"

sd.save("my_model.seed", {"model": model.state_dict(), "tokenizer": tokenizer},
        serializers={"tokenizer": save_tokenizer})

Updating a single component

sd.update("my_model.seed", "config", new_config)

Manifest

Every .seed file contains a manifest.json:

{
  "format_version": "v1.0.0",
  "metadata": {
    "created_at": "2026-05-12T10:30:00+00:00",
    "python_version": "3.10.4"
  },
  "components": {
    "model":     "model.pth",
    "config":    "config.json",
    "tokenizer": "tokenizer.pkl"
  }
}

SEED warns on load if the format version or Python version differs from what was used at save time.


Zero hard dependencies

SEED has no required dependencies. torch and numpy are used only if already present in your environment.


License

MIT

Metadata

Release files for seedfile 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 seedfile 1.0.0
File Size Uploaded Provenance Actions
seedfile-1.0.0.tar.gz 6.5 kB Without provenance Details for seedfile-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 13.0 kB

Release files / seedfile-1.0.0.tar.gz

Download URL seedfile-1.0.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6821d4e18e5ad6bda6e3b92db6bf147ec275026d9c162aca2425260ed5916bce
BLAKE2b-256 checksum
How to use checksums
0eb2004b89e11696fddaed9cf01f5ab7b983debcd59947dd9e42b979cf479412
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / seedfile-1.0.0-py3-none-any.whl

Download URL seedfile-1.0.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7045058e8988cd1df4b5f164a3519527c2c895d57c8175b8988e6315892ecbfc
BLAKE2b-256 checksum
How to use checksums
e1400712b9db2bd5434334ecf920c2f97fb3e04063b1a7f41a0e2a1bf1a420e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Security for seedfile 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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 No 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