File size: 775 Bytes
760a29b
62c8eea
760a29b
62c8eea
 
 
 
760a29b
 
62c8eea
760a29b
62c8eea
760a29b
62c8eea
 
 
 
760a29b
62c8eea
760a29b
62c8eea
 
 
760a29b
62c8eea
 
760a29b
62c8eea
 
760a29b
62c8eea
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
language: en
tags:
- bert
- classification
- pytorch
pipeline_tag: text-classification
---

# 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

```python
from transformers import AutoTokenizer
import torch

# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("minoosh/bert-clf-biencoder-cross_entropy")

# 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)
```