Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

What is the Proper Model Save Method? #1262

@CerebralSeed

Description

@CerebralSeed

The example given in the documentation shows downloading and archiving a pre-existing model from Pytorch. But if serving a custom-built model, what is the correct save method?

For example, on the Save/Loading Documentation, there are several save methods:

https://pytorch.org/tutorials/beginner/saving_loading_models.html

Should the model artifacts be saved as simply torch.save(model, PATH) or should it be saved as torch.save(model.state_dict(), PATH)?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions