Loading & export#
Load trained models and turn checkpoints into portable artifacts. See Load, run, and fine-tune a model and Export and publish a model for guides.
Top-level functions#
Load a pimm model from a local export, Hub repo, or raw checkpoint. |
|
Save model weights to a directory as bare serialized tensors. |
|
Upload an exported pimm model directory to the Hugging Face Hub. |
State-dict helpers#
Lower-level helpers in pimm.export for partial loads and key
remapping.
Load pretrained weights into model with flexible key matching. |
|
Load state dictionary from checkpoint file. |
|
Load checkpoint metadata (everything except state_dict). |
|
Remove DDP and torch.compile prefixes from state dict keys. |
|
Filter state dict to only include keys with given prefix. |
|
Remap state dict keys according to mapping. |