camembertav2-base-name-classifier-v2
Browse files
README.md
CHANGED
|
@@ -4,9 +4,6 @@ license: mit
|
|
| 4 |
base_model: almanach/camembertav2-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
- name
|
| 8 |
-
- person
|
| 9 |
-
- company
|
| 10 |
metrics:
|
| 11 |
- accuracy
|
| 12 |
- precision
|
|
@@ -15,63 +12,32 @@ metrics:
|
|
| 15 |
model-index:
|
| 16 |
- name: camembertav2-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 |
-
|
| 27 |
-
This model is a fine-tuned version of [almanach/camembertav2-base](https://huggingface.co/almanach/camembertav2-base) on [ele-sage/person-company-names-classification](https://huggingface.co/datasets/ele-sage/person-company-names-classification) dataset.
|
| 28 |
|
|
|
|
| 29 |
|
|
|
|
| 30 |
It achieves the following results on the evaluation set:
|
| 31 |
-
- Loss: 0.
|
| 32 |
-
- Accuracy: 0.
|
| 33 |
-
- Precision: 0.
|
| 34 |
-
- Recall: 0.
|
| 35 |
-
- F1: 0.
|
| 36 |
|
| 37 |
## Model description
|
| 38 |
|
| 39 |
-
|
| 40 |
-
Its purpose is to distinguish between a **person's name** and a **company/organization name** with high accuracy.
|
| 41 |
-
|
| 42 |
-
### Direct Use
|
| 43 |
-
|
| 44 |
-
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`.
|
| 45 |
-
|
| 46 |
-
```python
|
| 47 |
-
from transformers import pipeline
|
| 48 |
-
|
| 49 |
-
classifier = pipeline("text-classification", model="ele-sage/camembertav2-base-name-classifier-v2")
|
| 50 |
-
|
| 51 |
-
results = classifier([
|
| 52 |
-
"Satya Nadella",
|
| 53 |
-
"Global Innovations Inc.",
|
| 54 |
-
"Martinez, Alonso"
|
| 55 |
-
])
|
| 56 |
-
|
| 57 |
-
for result in results:
|
| 58 |
-
print(f"Text: '{result['text']}', Prediction: {result['label']}, Score: {result['score']:.4f}")
|
| 59 |
-
```
|
| 60 |
-
|
| 61 |
-
### Downstream Use
|
| 62 |
-
|
| 63 |
-
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`.
|
| 64 |
-
|
| 65 |
-
### Out-of-Scope Use
|
| 66 |
|
| 67 |
-
|
| 68 |
|
| 69 |
-
|
| 70 |
|
| 71 |
-
|
| 72 |
-
- **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.
|
| 73 |
-
- **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.
|
| 74 |
|
|
|
|
| 75 |
|
| 76 |
## Training procedure
|
| 77 |
|
|
@@ -91,30 +57,33 @@ The following hyperparameters were used during training:
|
|
| 91 |
|
| 92 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|
| 93 |
|:-------------:|:------:|:-----:|:---------------:|:--------:|:---------:|:------:|:------:|
|
| 94 |
-
| 0.
|
| 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.
|
| 109 |
-
| 0.
|
| 110 |
-
| 0.
|
| 111 |
-
| 0.
|
| 112 |
-
| 0.
|
| 113 |
-
| 0.
|
| 114 |
-
| 0.
|
| 115 |
-
| 0.
|
| 116 |
-
| 0.
|
| 117 |
-
| 0.
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
|
| 120 |
### Framework versions
|
|
@@ -122,4 +91,4 @@ The following hyperparameters were used during training:
|
|
| 122 |
- Transformers 4.57.1
|
| 123 |
- Pytorch 2.9.0+cu128
|
| 124 |
- Datasets 4.4.1
|
| 125 |
-
- Tokenizers 0.22.1
|
|
|
|
| 4 |
base_model: almanach/camembertav2-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
| 7 |
metrics:
|
| 8 |
- accuracy
|
| 9 |
- precision
|
|
|
|
| 12 |
model-index:
|
| 13 |
- name: camembertav2-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 |
+
# camembertav2-base-name-classifier-v2
|
| 21 |
|
| 22 |
+
This model is a fine-tuned version of [almanach/camembertav2-base](https://huggingface.co/almanach/camembertav2-base) on an unknown dataset.
|
| 23 |
It achieves the following results on the evaluation set:
|
| 24 |
+
- Loss: 0.0215
|
| 25 |
+
- Accuracy: 0.9942
|
| 26 |
+
- Precision: 0.9985
|
| 27 |
+
- Recall: 0.9910
|
| 28 |
+
- F1: 0.9947
|
| 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 |
|
|
|
|
| 57 |
|
| 58 |
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|
| 59 |
|:-------------:|:------:|:-----:|:---------------:|:--------:|:---------:|:------:|:------:|
|
| 60 |
+
| 0.0354 | 0.0359 | 2000 | 0.0313 | 0.9915 | 0.9973 | 0.9874 | 0.9923 |
|
| 61 |
+
| 0.0388 | 0.0718 | 4000 | 0.0369 | 0.9884 | 0.9934 | 0.9858 | 0.9896 |
|
| 62 |
+
| 0.0254 | 0.1076 | 6000 | 0.0279 | 0.9927 | 0.9981 | 0.9888 | 0.9934 |
|
| 63 |
+
| 0.0296 | 0.1435 | 8000 | 0.0251 | 0.9930 | 0.9980 | 0.9895 | 0.9937 |
|
| 64 |
+
| 0.0241 | 0.1794 | 10000 | 0.0243 | 0.9932 | 0.9980 | 0.9898 | 0.9939 |
|
| 65 |
+
| 0.027 | 0.2153 | 12000 | 0.0252 | 0.9933 | 0.9972 | 0.9907 | 0.9940 |
|
| 66 |
+
| 0.0245 | 0.2511 | 14000 | 0.0252 | 0.9934 | 0.9986 | 0.9896 | 0.9941 |
|
| 67 |
+
| 0.0259 | 0.2870 | 16000 | 0.0244 | 0.9934 | 0.9972 | 0.9909 | 0.9941 |
|
| 68 |
+
| 0.0255 | 0.3229 | 18000 | 0.0245 | 0.9934 | 0.9974 | 0.9907 | 0.9940 |
|
| 69 |
+
| 0.0238 | 0.3588 | 20000 | 0.0244 | 0.9934 | 0.9968 | 0.9913 | 0.9941 |
|
| 70 |
+
| 0.0253 | 0.3946 | 22000 | 0.0240 | 0.9936 | 0.9977 | 0.9908 | 0.9943 |
|
| 71 |
+
| 0.0242 | 0.4305 | 24000 | 0.0240 | 0.9937 | 0.9976 | 0.9910 | 0.9943 |
|
| 72 |
+
| 0.0234 | 0.4664 | 26000 | 0.0225 | 0.9937 | 0.9987 | 0.9899 | 0.9943 |
|
| 73 |
+
| 0.0209 | 0.5023 | 28000 | 0.0235 | 0.9938 | 0.9987 | 0.9901 | 0.9944 |
|
| 74 |
+
| 0.0243 | 0.5382 | 30000 | 0.0226 | 0.9938 | 0.9975 | 0.9914 | 0.9944 |
|
| 75 |
+
| 0.0195 | 0.5740 | 32000 | 0.0235 | 0.9939 | 0.9981 | 0.9909 | 0.9945 |
|
| 76 |
+
| 0.0218 | 0.6099 | 34000 | 0.0225 | 0.9939 | 0.9979 | 0.9912 | 0.9946 |
|
| 77 |
+
| 0.0207 | 0.6458 | 36000 | 0.0229 | 0.9939 | 0.9985 | 0.9906 | 0.9945 |
|
| 78 |
+
| 0.0243 | 0.6817 | 38000 | 0.0219 | 0.9940 | 0.9988 | 0.9905 | 0.9946 |
|
| 79 |
+
| 0.0239 | 0.7175 | 40000 | 0.0218 | 0.9940 | 0.9987 | 0.9905 | 0.9946 |
|
| 80 |
+
| 0.0225 | 0.7534 | 42000 | 0.0216 | 0.9941 | 0.9983 | 0.9911 | 0.9947 |
|
| 81 |
+
| 0.0224 | 0.7893 | 44000 | 0.0218 | 0.9941 | 0.9984 | 0.9910 | 0.9947 |
|
| 82 |
+
| 0.02 | 0.8252 | 46000 | 0.0216 | 0.9941 | 0.9984 | 0.9910 | 0.9947 |
|
| 83 |
+
| 0.0268 | 0.8610 | 48000 | 0.0213 | 0.9941 | 0.9985 | 0.9910 | 0.9947 |
|
| 84 |
+
| 0.0254 | 0.8969 | 50000 | 0.0214 | 0.9942 | 0.9983 | 0.9912 | 0.9948 |
|
| 85 |
+
| 0.0229 | 0.9328 | 52000 | 0.0215 | 0.9941 | 0.9985 | 0.9910 | 0.9947 |
|
| 86 |
+
| 0.0224 | 0.9687 | 54000 | 0.0215 | 0.9942 | 0.9985 | 0.9910 | 0.9947 |
|
| 87 |
|
| 88 |
|
| 89 |
### Framework versions
|
|
|
|
| 91 |
- Transformers 4.57.1
|
| 92 |
- Pytorch 2.9.0+cu128
|
| 93 |
- Datasets 4.4.1
|
| 94 |
+
- Tokenizers 0.22.1
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 444859368
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e237a2946663a6b9a3592521d661c7f8d8a14cfb2b80d3907134c21edd5d72b
|
| 3 |
size 444859368
|
runs/Dec07_18-02-34_elesage-pc/events.out.tfevents.1765148667.elesage-pc.162024.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d464fc34dbb277faa4b031e04bdf62bebcc5d9f39e1553b2dec9ae9c389753cd
|
| 3 |
+
size 78246
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5905
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb5fea22f5d88519a3c3707384cbbfcf8621a28c73aa27d28081e3ad64e17e09
|
| 3 |
size 5905
|