Skip to main content
Do you like Artifex? Give it a ⭐ star on GitHub!

Load a Model Checkpoint

Load a model checkpoint to perform inference with it. Only model that were trained with Artifex can be loaded.

Arguments


  • model_path
    str

    The local path to the model checkpoint to load. This should be a directory containing all the model files generated by Artifex, such as config.json and model.safetensors.
from artifex import Artifex

guardrail = Artifex().guardrail

# NOTE: you must have a model checkpoint to load. Only
# models that were trained with Artifex can be loaded.

guardrail.load("/path/to/model/checkpoint")
None