Skip to main content

Unified model state dict and architecture checkpoints utils.

Project description

# Checkpointing Unified model state dict and architecture checkpoints utils.

Traditional model loading requires 1. Model architecture 2. model state dict.

Normally we only save the model state dict in the checkpoint file, this forces us to have the model architecture during inference. We can either load the model architecture by instaling the package which contains the architecture dependency or we can copy the architecture file to current repo. This creates additional dependencies for the production code.

One way to solve this problem is to save the model architecture to the checkpoint file itself and load both the model architecture and state dict from the same checkpoint file. This solves few development issues: 1. If model architecture is changed in the architecture repo we wont have to use some old commit of the repo. For any architecture change and there is no need to map checkpoints to architecture version. 2. Each checkpoint is self sufficient and independent.

Checkpointing add following utils: 1. Given a model architecture and state dict create a checkpointing checkpoint. 2. Given a checkpointing checkpoint return a the model with state dict loaded.

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

torchpt-0.0.3.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file torchpt-0.0.3.tar.gz.

File metadata

  • Download URL: torchpt-0.0.3.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for torchpt-0.0.3.tar.gz
Algorithm Hash digest
SHA256 fdf6dd79cd5dd770dc8e2c79c3fea27db85a083239a085feea5fa30b1604fe5c
MD5 fc8967c107537afebc0414eaf51a3af2
BLAKE2b-256 62deea774184660a614ea70a37da9be2510e88bcd0aa4b35aaa6ebe920acdff4

See more details on using hashes here.

Supported by

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