Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("TrishanuDas/CE-7_512_MSELoss")

# Load model weights
model = AutoModelForSequenceClassification.from_pretrained("TrishanuDas/CE-7_512_MSELoss")

# Prepare input
inputs = tokenizer("Query", "Document", return_tensors="pt", padding=True, truncation=True)

# Get prediction
with torch.no_grad():
    # Get logits
    outputs = model(**inputs)
    logits = outputs.logits
    
    # Apply sigmoid to get probabilities
    scores = torch.sigmoid(logits)

Important Note

When loading this model, you need to manually apply the sigmoid function to the logits as shown in the example above.

Downloads last month
43
Safetensors
Model size
150M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support