Edit model card

BiEncoder Classification Model

This model is a BiEncoder architecture based on BERT for text pair classification.

Model Details

  • Base Model: bert-base-uncased

  • Architecture: BiEncoder with BERT base

  • Number of classes: 4

Usage


from transformers import AutoTokenizer

import torch



# Load tokenizer

tokenizer = AutoTokenizer.from_pretrained("minoosh/bert-clf-biencoder-focal_loss")



# Load model weights

state_dict = torch.load("pytorch_model.bin")



# Initialize model (you'll need the BiEncoderModel class)

model = BiEncoderModel(

    base_model=AutoModel.from_pretrained("bert-base-uncased"),

    num_classes=4

)

model.load_state_dict(state_dict)
Downloads last month
6
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Examples
Unable to determine this model's library. Check the docs .