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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file torchpt-0.0.1.tar.gz
.
File metadata
- Download URL: torchpt-0.0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd38f6edbe410a7b2a11ff0d786e94df66bd2908041354e99f9d778d0ea66db3 |
|
MD5 | 46e8e51a223fb325f807c929462838bb |
|
BLAKE2b-256 | 3bb3f6bd7b5774744d68ce4af99eb1f150e92dd88b76a1bcea13782ecefb680a |