CoolFace
Modelpublic

polodealvarado/late_interaction

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes27downloads
Model Card

Zero-Shot Text Classification — late_interaction

ColBERT-style token-level MaxSim scoring for fine-grained alignment.

This model encodes texts and candidate labels into a shared embedding space using BERT, enabling classification into arbitrary categories without retraining for new labels.

Training Details

ParameterValue
Base modelbert-base-uncased
Model variantlate_interaction
Training steps1000
Batch size2
Learning rate2e-05
Trainable params109,580,672
Training time354.7s

Dataset

Trained on polodealvarado/zeroshot-classification.

Evaluation Results

MetricScore
Precision0.8546
Recall0.9686
F1 Score0.9081

Usage

python
from models.late_interaction import LateInteractionModel

model = LateInteractionModel.from_pretrained("polodealvarado/late_interaction")

predictions = model.predict(
    texts=["The stock market crashed yesterday."],
    labels=[["Finance", "Sports", "Biology", "Economy"]],
)
print(predictions)
# [{"text": "...", "scores": {"Finance": 0.98, "Economy": 0.85, ...}}]