Saving and Loading ModelsΒΆ

You can use the and load() methods to serialize and deserialize trained models. Note that if you use adapters or only train a subset of layers using the num_layers_trained configuration flag, your save files will be much smaller. This is because Finetune only saves out weights that are different than the default weights of the base model. If you are trying to optimize for save file size, check out Using Adapters and the DeploymentModel class.

model = Classifier(), train_labels)
model = Classifier.load(filepath)