ele-sage/mdeberta-v3-base-name-classifier-v2
Browse files- README.md +30 -78
- model.safetensors +1 -1
- runs/Dec07_20-33-59_elesage-pc/events.out.tfevents.1765157729.elesage-pc.222739.0 +3 -0
- runs/Dec07_20-50-30_elesage-pc/events.out.tfevents.1765158719.elesage-pc.229949.0 +3 -0
- runs/Dec07_21-02-51_elesage-pc/events.out.tfevents.1765159462.elesage-pc.236720.0 +3 -0
- runs/Dec07_21-07-50_elesage-pc/events.out.tfevents.1765159760.elesage-pc.239632.0 +3 -0
- runs/Dec07_21-14-10_elesage-pc/events.out.tfevents.1765160138.elesage-pc.241974.0 +3 -0
- runs/Dec07_21-23-19_elesage-pc/events.out.tfevents.1765160688.elesage-pc.246729.0 +3 -0
- runs/Dec07_21-28-39_elesage-pc/events.out.tfevents.1765161008.elesage-pc.249831.0 +3 -0
- runs/Dec07_21-38-56_elesage-pc/events.out.tfevents.1765161626.elesage-pc.255681.0 +3 -0
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -4,9 +4,6 @@ license: mit
|
|
| 4 |
base_model: microsoft/mdeberta-v3-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
- name
|
| 8 |
-
- person
|
| 9 |
-
- company
|
| 10 |
metrics:
|
| 11 |
- accuracy
|
| 12 |
- precision
|
|
@@ -15,64 +12,32 @@ metrics:
|
|
| 15 |
model-index:
|
| 16 |
- name: mdeberta-v3-base-name-classifier-v2
|
| 17 |
results: []
|
| 18 |
-
datasets:
|
| 19 |
-
- ele-sage/person-company-names-classification
|
| 20 |
-
language:
|
| 21 |
-
- fr
|
| 22 |
-
- en
|
| 23 |
---
|
| 24 |
|
|
|
|
|
|
|
| 25 |
|
| 26 |
# mdeberta-v3-base-name-classifier-v2
|
| 27 |
|
| 28 |
-
This model is a fine-tuned version of [microsoft/mdeberta-v3-base](https://huggingface.co/microsoft/mdeberta-v3-base) on
|
| 29 |
-
|
| 30 |
-
|
| 31 |
It achieves the following results on the evaluation set:
|
| 32 |
-
- Loss: 0.
|
| 33 |
-
- Accuracy: 0.
|
| 34 |
-
- Precision: 0.
|
| 35 |
-
- Recall: 0.
|
| 36 |
-
- F1: 0.
|
| 37 |
|
| 38 |
## Model description
|
| 39 |
|
| 40 |
-
|
| 41 |
-
Its purpose is to distinguish between a **person's name** and a **company/organization name** with high accuracy.
|
| 42 |
-
|
| 43 |
-
### Direct Use
|
| 44 |
-
|
| 45 |
-
This model is intended to be used for text classification. Given a string, it will return a label indicating whether the string is a `Person` or a `Company`.
|
| 46 |
-
|
| 47 |
-
```python
|
| 48 |
-
from transformers import pipeline
|
| 49 |
-
|
| 50 |
-
classifier = pipeline("text-classification", model="ele-sage/mdeberta-v3-base-name-classifier-v2")
|
| 51 |
-
|
| 52 |
-
results = classifier([
|
| 53 |
-
"Satya Nadella",
|
| 54 |
-
"Global Innovations Inc.",
|
| 55 |
-
"Martinez, Alonso"
|
| 56 |
-
])
|
| 57 |
-
|
| 58 |
-
for result in results:
|
| 59 |
-
print(f"Text: '{result['text']}', Prediction: {result['label']}, Score: {result['score']:.4f}")
|
| 60 |
-
```
|
| 61 |
-
|
| 62 |
-
### Downstream Use
|
| 63 |
-
|
| 64 |
-
This model is a key component of a two-stage name processing pipeline. It is designed to be used as a fast, efficient "gatekeeper" to first identify person names before passing them to a more complex parsing model, such as `ele-sage/distilbert-base-uncased-name-splitter`.
|
| 65 |
-
|
| 66 |
-
### Out-of-Scope Use
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
-
|
| 71 |
|
| 72 |
-
|
| 73 |
-
- **Ambiguity:** Certain names can legitimately be both a person's name and a company's name (e.g., "Ford"). In these cases, the model makes a statistical guess based on its training data, which may not always align with the specific context.
|
| 74 |
-
- **Data Source:** The person name data is derived from a Facebook data leak and contains noise. While a rigorous cleaning process was applied, the model may have learned from some spurious data.
|
| 75 |
|
|
|
|
| 76 |
|
| 77 |
## Training procedure
|
| 78 |
|
|
@@ -81,44 +46,31 @@ This model is a key component of a two-stage name processing pipeline. It is des
|
|
| 81 |
The following hyperparameters were used during training:
|
| 82 |
- learning_rate: 1e-05
|
| 83 |
- train_batch_size: 128
|
| 84 |
-
- eval_batch_size:
|
| 85 |
- seed: 42
|
| 86 |
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 87 |
-
- lr_scheduler_type:
|
| 88 |
-
-
|
| 89 |
- num_epochs: 1
|
|
|
|
| 90 |
|
| 91 |
### Training results
|
| 92 |
|
| 93 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|
| 94 |
|:-------------:|:------:|:-----:|:---------------:|:--------:|:---------:|:------:|:------:|
|
| 95 |
-
| 0.
|
| 96 |
-
| 0.
|
| 97 |
-
| 0.
|
| 98 |
-
| 0.
|
| 99 |
-
| 0.
|
| 100 |
-
| 0.
|
| 101 |
-
| 0.
|
| 102 |
-
| 0.
|
| 103 |
-
| 0.
|
| 104 |
-
| 0.
|
| 105 |
-
| 0.
|
| 106 |
-
| 0.
|
| 107 |
-
| 0.
|
| 108 |
-
| 0.0228 | 0.5023 | 28000 | 0.0246 | 0.9937 | 0.9977 | 0.9910 | 0.9943 |
|
| 109 |
-
| 0.025 | 0.5382 | 30000 | 0.0226 | 0.9938 | 0.9978 | 0.9912 | 0.9945 |
|
| 110 |
-
| 0.0229 | 0.5740 | 32000 | 0.0229 | 0.9939 | 0.9982 | 0.9909 | 0.9945 |
|
| 111 |
-
| 0.0234 | 0.6099 | 34000 | 0.0237 | 0.9940 | 0.9991 | 0.9900 | 0.9946 |
|
| 112 |
-
| 0.0232 | 0.6458 | 36000 | 0.0230 | 0.9939 | 0.9975 | 0.9915 | 0.9945 |
|
| 113 |
-
| 0.0257 | 0.6817 | 38000 | 0.0228 | 0.9942 | 0.9988 | 0.9907 | 0.9947 |
|
| 114 |
-
| 0.0254 | 0.7175 | 40000 | 0.0221 | 0.9940 | 0.9979 | 0.9914 | 0.9946 |
|
| 115 |
-
| 0.0222 | 0.7534 | 42000 | 0.0223 | 0.9941 | 0.9979 | 0.9915 | 0.9947 |
|
| 116 |
-
| 0.0271 | 0.7893 | 44000 | 0.0219 | 0.9942 | 0.9981 | 0.9914 | 0.9948 |
|
| 117 |
-
| 0.0231 | 0.8252 | 46000 | 0.0222 | 0.9940 | 0.9975 | 0.9917 | 0.9946 |
|
| 118 |
-
| 0.0258 | 0.8610 | 48000 | 0.0214 | 0.9943 | 0.9986 | 0.9912 | 0.9949 |
|
| 119 |
-
| 0.0217 | 0.8969 | 50000 | 0.0219 | 0.9943 | 0.9983 | 0.9914 | 0.9949 |
|
| 120 |
-
| 0.0234 | 0.9328 | 52000 | 0.0215 | 0.9943 | 0.9983 | 0.9914 | 0.9948 |
|
| 121 |
-
| 0.0237 | 0.9687 | 54000 | 0.0215 | 0.9943 | 0.9984 | 0.9913 | 0.9949 |
|
| 122 |
|
| 123 |
|
| 124 |
### Framework versions
|
|
|
|
| 4 |
base_model: microsoft/mdeberta-v3-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
| 7 |
metrics:
|
| 8 |
- accuracy
|
| 9 |
- precision
|
|
|
|
| 12 |
model-index:
|
| 13 |
- name: mdeberta-v3-base-name-classifier-v2
|
| 14 |
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 18 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 19 |
|
| 20 |
# mdeberta-v3-base-name-classifier-v2
|
| 21 |
|
| 22 |
+
This model is a fine-tuned version of [microsoft/mdeberta-v3-base](https://huggingface.co/microsoft/mdeberta-v3-base) on an unknown dataset.
|
|
|
|
|
|
|
| 23 |
It achieves the following results on the evaluation set:
|
| 24 |
+
- Loss: 0.1317
|
| 25 |
+
- Accuracy: 0.9946
|
| 26 |
+
- Precision: 0.9989
|
| 27 |
+
- Recall: 0.9914
|
| 28 |
+
- F1: 0.9951
|
| 29 |
|
| 30 |
## Model description
|
| 31 |
|
| 32 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
## Intended uses & limitations
|
| 35 |
|
| 36 |
+
More information needed
|
| 37 |
|
| 38 |
+
## Training and evaluation data
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
More information needed
|
| 41 |
|
| 42 |
## Training procedure
|
| 43 |
|
|
|
|
| 46 |
The following hyperparameters were used during training:
|
| 47 |
- learning_rate: 1e-05
|
| 48 |
- train_batch_size: 128
|
| 49 |
+
- eval_batch_size: 512
|
| 50 |
- seed: 42
|
| 51 |
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 52 |
+
- lr_scheduler_type: cosine
|
| 53 |
+
- lr_scheduler_warmup_ratio: 0.05
|
| 54 |
- num_epochs: 1
|
| 55 |
+
- label_smoothing_factor: 0.05
|
| 56 |
|
| 57 |
### Training results
|
| 58 |
|
| 59 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|
| 60 |
|:-------------:|:------:|:-----:|:---------------:|:--------:|:---------:|:------:|:------:|
|
| 61 |
+
| 0.1375 | 0.0718 | 4000 | 0.1431 | 0.9909 | 0.9991 | 0.9847 | 0.9918 |
|
| 62 |
+
| 0.1391 | 0.1436 | 8000 | 0.1356 | 0.9930 | 0.9973 | 0.9902 | 0.9937 |
|
| 63 |
+
| 0.1344 | 0.2154 | 12000 | 0.1361 | 0.9934 | 0.9983 | 0.9899 | 0.9941 |
|
| 64 |
+
| 0.1387 | 0.2872 | 16000 | 0.1333 | 0.9937 | 0.9984 | 0.9903 | 0.9943 |
|
| 65 |
+
| 0.1353 | 0.3590 | 20000 | 0.1340 | 0.9940 | 0.9985 | 0.9907 | 0.9946 |
|
| 66 |
+
| 0.1337 | 0.4308 | 24000 | 0.1332 | 0.9939 | 0.9982 | 0.9909 | 0.9946 |
|
| 67 |
+
| 0.1332 | 0.5026 | 28000 | 0.1332 | 0.9940 | 0.9977 | 0.9916 | 0.9946 |
|
| 68 |
+
| 0.1359 | 0.5744 | 32000 | 0.1319 | 0.9943 | 0.9992 | 0.9907 | 0.9949 |
|
| 69 |
+
| 0.1314 | 0.6462 | 36000 | 0.1326 | 0.9943 | 0.9984 | 0.9914 | 0.9949 |
|
| 70 |
+
| 0.132 | 0.7180 | 40000 | 0.1318 | 0.9945 | 0.9990 | 0.9911 | 0.9950 |
|
| 71 |
+
| 0.1309 | 0.7898 | 44000 | 0.1319 | 0.9945 | 0.9989 | 0.9913 | 0.9951 |
|
| 72 |
+
| 0.1319 | 0.8616 | 48000 | 0.1318 | 0.9945 | 0.9988 | 0.9914 | 0.9951 |
|
| 73 |
+
| 0.1288 | 0.9334 | 52000 | 0.1317 | 0.9946 | 0.9989 | 0.9914 | 0.9951 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
|
| 76 |
### Framework versions
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1115268200
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60aa9aa53a0e36b245c5593dce8d7310a3f52c28f31c6edd7c2c5eabf260bcb5
|
| 3 |
size 1115268200
|
runs/Dec07_20-33-59_elesage-pc/events.out.tfevents.1765157729.elesage-pc.222739.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e18ad5fbfff1f448bdecc47ab7759f4c3eed7970aabc680c25c37d6e3f4e1da6
|
| 3 |
+
size 17824
|
runs/Dec07_20-50-30_elesage-pc/events.out.tfevents.1765158719.elesage-pc.229949.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2879a8efb1d54e147154736614053ac2063e5bc6071b49cce370793598480850
|
| 3 |
+
size 10431
|
runs/Dec07_21-02-51_elesage-pc/events.out.tfevents.1765159462.elesage-pc.236720.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92105e4dd6cf323869b8b6f92da44ceed8f751069d4a8ba737d505d3064a8833
|
| 3 |
+
size 10858
|
runs/Dec07_21-07-50_elesage-pc/events.out.tfevents.1765159760.elesage-pc.239632.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0beedb0686f58cb6302686e967459dba8220de99c716b6fd626196b02e188f6a
|
| 3 |
+
size 10225
|
runs/Dec07_21-14-10_elesage-pc/events.out.tfevents.1765160138.elesage-pc.241974.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:afb0e68fc3008a45ec6cceb0bdc9ad81980c185c71d237d6595fccbfd0aa5fb9
|
| 3 |
+
size 20029
|
runs/Dec07_21-23-19_elesage-pc/events.out.tfevents.1765160688.elesage-pc.246729.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf671854f23a0161592d75254ce15ff9e9ca83ad177cbfd224227998332a2165
|
| 3 |
+
size 15543
|
runs/Dec07_21-28-39_elesage-pc/events.out.tfevents.1765161008.elesage-pc.249831.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1425ba64feb3b6d5b4e3ab98460f322f84ac573425dc3f404eda5c31dbb148a
|
| 3 |
+
size 40652
|
runs/Dec07_21-38-56_elesage-pc/events.out.tfevents.1765161626.elesage-pc.255681.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36f4cbd783e9edc1399d009352f332b731e6265558950a50d0d95370d9d976bd
|
| 3 |
+
size 250095
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5841
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61a02fb851b1134ce920c19e3f3a46c6f21e569e6068dc37c5228abe0d993582
|
| 3 |
size 5841
|