Why isn't the pre-trained model loading?

Hi Everyone!

I’m somewhat new to hf, wondering why when running this block (see below)

# Load SetFit model from Hub
model = SetFitModel.from_pretrained("sentence-transformers/paraphrase-mpnet-base-v2")

# Create trainer
trainer = SetFitTrainer(
    num_iterations=20, # Number of text pairs to generate for contrastive learning
    num_epochs=1 # Number of epochs to use for contrastive learning

that I am getting this returned

model_head.pkl not found on HuggingFace Hub, initialising classification head with random weights. You should TRAIN this model on a downstream task to use it for predictions and inference.

What does it mean that model_head.pkl is not found? I’m trying to use SetFit for label prediction based on user reviews.

Let me know!

1 Like