minoosh commited on
Commit
a1080d1
·
verified ·
1 Parent(s): 5cd0f35

Model save

Browse files
Files changed (2) hide show
  1. README.md +61 -26
  2. model.safetensors +1 -1
README.md CHANGED
@@ -1,37 +1,72 @@
1
  ---
2
- language: en
3
  tags:
4
- - bert
5
- - classification
6
- - pytorch
7
- pipeline_tag: text-classification
 
 
 
 
 
8
  ---
9
 
10
- # BiEncoder Classification Model
 
11
 
12
- This model is a BiEncoder architecture based on BERT for text pair classification.
13
 
14
- ## Model Details
15
- - Base Model: bert-base-uncased
16
- - Architecture: BiEncoder with BERT base
17
- - Number of classes: 4
 
 
 
18
 
19
- ## Usage
20
 
21
- ```python
22
- from transformers import AutoTokenizer
23
- import torch
24
 
25
- # Load tokenizer
26
- tokenizer = AutoTokenizer.from_pretrained("minoosh/bert-clf-biencoder-focal_loss")
27
 
28
- # Load model weights
29
- state_dict = torch.load("pytorch_model.bin")
30
 
31
- # Initialize model (you'll need the BiEncoderModel class)
32
- model = BiEncoderModel(
33
- base_model=AutoModel.from_pretrained("bert-base-uncased"),
34
- num_classes=4
35
- )
36
- model.load_state_dict(state_dict)
37
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: transformers
3
  tags:
4
+ - generated_from_trainer
5
+ metrics:
6
+ - accuracy
7
+ - f1
8
+ - precision
9
+ - recall
10
+ model-index:
11
+ - name: bert-clf-biencoder-focal_loss
12
+ results: []
13
  ---
14
 
15
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
16
+ should probably proofread and complete it, then remove this comment. -->
17
 
18
+ # bert-clf-biencoder-focal_loss
19
 
20
+ This model is a fine-tuned version of [](https://huggingface.co/) on an unknown dataset.
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.1136
23
+ - Accuracy: 0.6602
24
+ - F1: 0.6596
25
+ - Precision: 0.6642
26
+ - Recall: 0.6602
27
 
28
+ ## Model description
29
 
30
+ More information needed
 
 
31
 
32
+ ## Intended uses & limitations
 
33
 
34
+ More information needed
 
35
 
36
+ ## Training and evaluation data
37
+
38
+ More information needed
39
+
40
+ ## Training procedure
41
+
42
+ ### Training hyperparameters
43
+
44
+ The following hyperparameters were used during training:
45
+ - learning_rate: 2e-05
46
+ - train_batch_size: 32
47
+ - eval_batch_size: 32
48
+ - seed: 42
49
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
50
+ - lr_scheduler_type: linear
51
+ - lr_scheduler_warmup_steps: 100
52
+ - num_epochs: 7
53
+
54
+ ### Training results
55
+
56
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
57
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
58
+ | 0.1571 | 1.0 | 78 | 0.1334 | 0.5761 | 0.5597 | 0.5846 | 0.5761 |
59
+ | 0.1019 | 2.0 | 156 | 0.1009 | 0.6472 | 0.6399 | 0.6660 | 0.6472 |
60
+ | 0.0711 | 3.0 | 234 | 0.0923 | 0.6861 | 0.6869 | 0.6910 | 0.6861 |
61
+ | 0.0475 | 4.0 | 312 | 0.0972 | 0.6602 | 0.6611 | 0.6746 | 0.6602 |
62
+ | 0.0258 | 5.0 | 390 | 0.1085 | 0.6602 | 0.6596 | 0.6699 | 0.6602 |
63
+ | 0.0188 | 6.0 | 468 | 0.1099 | 0.6634 | 0.6626 | 0.6667 | 0.6634 |
64
+ | 0.0155 | 7.0 | 546 | 0.1136 | 0.6602 | 0.6596 | 0.6642 | 0.6602 |
65
+
66
+
67
+ ### Framework versions
68
+
69
+ - Transformers 4.45.1
70
+ - Pytorch 2.4.0
71
+ - Datasets 3.0.1
72
+ - Tokenizers 0.20.0
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4e0d720c8758edd4177b6e68903d9884cfabcf6a5642137d2cfe10329fbffcd7
3
  size 437978280
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90f1f1375b8d1eda0e5d033ce68068eb4d8b3ccf89724de91e25df5e40f223f1
3
  size 437978280