.CKPT File Extension
PyTorch Lightning Checkpoint
3.5 | 4 Votes
|Format||Text and Binary|
What is a CKPT file?
A CKPT file is a checkpoint file created by PyTorch Lightning, a PyTorch research framework. It contains a dump of a PyTorch Lightning machine learning model. Developers create CKPT files to preserve the previous states of a machine learning model, while training it to its final state.
PyTorch Lightning is a Python library that acts as an interface for PyTorch, a popular machine learning framework developed by Meta. It allows developers to run deep learning experiments and create scalable deep learning models.
While creating a model, developers can save that model's current state as a CKPT, or checkpoint, file. Doing so allows the developer to revert to and use that version of the model in the future. Each CKPT file contains everything needed to load that version of the model, including its current epoch, global step, and LightningModule's state_dict.
How to open a CKPT file
CKPT files are not meant to be opened. They are meant to be loaded and used as PyTorch Lightning (multiplatform) models. For example, to use PyTorch Lightning to load the model a CKPT file contains, use the following command:
model = MyLightningModule.load_from_checkpoint("/Path/To/YourFile.ckpt")