ele-sage commited on
Commit
3a2bd2e
·
verified ·
1 Parent(s): 78bbff0

ele-sage/mdeberta-v3-base-name-classifier-v2

Browse files
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,63 +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
- # mdeberta-v3-base-name-classifier-v2
26
-
27
- This model is a fine-tuned version of [microsoft/mdeberta-v3-base](https://huggingface.co/microsoft/mdeberta-v3-base) on [ele-sage/person-company-names-classification](https://huggingface.co/ele-sage/person-company-names-classification).
28
 
 
29
 
 
30
  It achieves the following results on the evaluation set:
31
- - Loss: 0.0269
32
- - Accuracy: 0.9927
33
- - Precision: 0.9966
34
- - Recall: 0.9906
35
- - F1: 0.9936
36
 
37
  ## Model description
38
 
39
- This model is a high-performance binary text classifier, fine-tuned from `mdeberta-v3-base`.
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/mdeberta-v3-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
- - This model is not a general-purpose classifier. It is highly specialized for distinguishing persons from companies and will not perform well on other classification tasks (e.g., sentiment analysis).
68
 
69
- ## Bias, Risks, and Limitations
70
 
71
- - **Geographic & Cultural Bias:** The training data is heavily biased towards North American (Canadian) person names and Quebec-based company names. The model will be less accurate when classifying names from other cultural or geographic origins.
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.0495 | 0.0411 | 2000 | 0.0448 | 0.9881 | 0.9963 | 0.9826 | 0.9894 |
95
- | 0.0433 | 0.0821 | 4000 | 0.0427 | 0.9906 | 0.9955 | 0.9879 | 0.9917 |
96
- | 0.0385 | 0.1232 | 6000 | 0.0397 | 0.9900 | 0.9973 | 0.9851 | 0.9912 |
97
- | 0.0315 | 0.1642 | 8000 | 0.0328 | 0.9913 | 0.9961 | 0.9885 | 0.9923 |
98
- | 0.0326 | 0.2053 | 10000 | 0.0317 | 0.9914 | 0.9944 | 0.9905 | 0.9924 |
99
- | 0.0331 | 0.2464 | 12000 | 0.0317 | 0.9917 | 0.9965 | 0.9888 | 0.9926 |
100
- | 0.0383 | 0.2874 | 14000 | 0.0302 | 0.9919 | 0.9947 | 0.9909 | 0.9928 |
101
- | 0.0299 | 0.3285 | 16000 | 0.0296 | 0.9919 | 0.9953 | 0.9904 | 0.9929 |
102
- | 0.0299 | 0.3696 | 18000 | 0.0294 | 0.9921 | 0.9959 | 0.9901 | 0.9930 |
103
- | 0.0322 | 0.4106 | 20000 | 0.0297 | 0.9921 | 0.9970 | 0.9890 | 0.9930 |
104
- | 0.0323 | 0.4517 | 22000 | 0.0288 | 0.9922 | 0.9959 | 0.9903 | 0.9931 |
105
- | 0.0309 | 0.4927 | 24000 | 0.0292 | 0.9921 | 0.9972 | 0.9889 | 0.9930 |
106
- | 0.0325 | 0.5338 | 26000 | 0.0284 | 0.9921 | 0.9949 | 0.9912 | 0.9930 |
107
- | 0.0292 | 0.5749 | 28000 | 0.0279 | 0.9923 | 0.9961 | 0.9903 | 0.9932 |
108
- | 0.0265 | 0.6159 | 30000 | 0.0289 | 0.9923 | 0.9953 | 0.9911 | 0.9932 |
109
- | 0.0291 | 0.6570 | 32000 | 0.0279 | 0.9924 | 0.9963 | 0.9903 | 0.9933 |
110
- | 0.0307 | 0.6981 | 34000 | 0.0276 | 0.9926 | 0.9965 | 0.9904 | 0.9934 |
111
- | 0.0286 | 0.7391 | 36000 | 0.0273 | 0.9926 | 0.9967 | 0.9903 | 0.9935 |
112
- | 0.0287 | 0.7802 | 38000 | 0.0269 | 0.9927 | 0.9970 | 0.9901 | 0.9935 |
113
- | 0.0284 | 0.8212 | 40000 | 0.0278 | 0.9925 | 0.9958 | 0.9910 | 0.9934 |
114
- | 0.0258 | 0.8623 | 42000 | 0.0274 | 0.9927 | 0.9965 | 0.9905 | 0.9935 |
115
- | 0.0245 | 0.9034 | 44000 | 0.0273 | 0.9927 | 0.9967 | 0.9904 | 0.9935 |
116
- | 0.0324 | 0.9444 | 46000 | 0.0269 | 0.9927 | 0.9964 | 0.9907 | 0.9935 |
117
- | 0.0311 | 0.9855 | 48000 | 0.0269 | 0.9927 | 0.9966 | 0.9906 | 0.9936 |
 
 
 
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: 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.0216
25
+ - Accuracy: 0.9942
26
+ - Precision: 0.9983
27
+ - Recall: 0.9913
28
+ - F1: 0.9948
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.047 | 0.0359 | 2000 | 0.0390 | 0.9903 | 0.9974 | 0.9851 | 0.9912 |
61
+ | 0.0322 | 0.0718 | 4000 | 0.0346 | 0.9921 | 0.9968 | 0.9890 | 0.9929 |
62
+ | 0.0325 | 0.1076 | 6000 | 0.0293 | 0.9924 | 0.9970 | 0.9893 | 0.9932 |
63
+ | 0.0342 | 0.1435 | 8000 | 0.0264 | 0.9927 | 0.9973 | 0.9895 | 0.9934 |
64
+ | 0.0301 | 0.1794 | 10000 | 0.0260 | 0.9929 | 0.9967 | 0.9905 | 0.9936 |
65
+ | 0.0291 | 0.2153 | 12000 | 0.0259 | 0.9931 | 0.9984 | 0.9893 | 0.9938 |
66
+ | 0.0246 | 0.2511 | 14000 | 0.0263 | 0.9931 | 0.9971 | 0.9905 | 0.9938 |
67
+ | 0.0321 | 0.2870 | 16000 | 0.0264 | 0.9934 | 0.9988 | 0.9893 | 0.9940 |
68
+ | 0.0256 | 0.3229 | 18000 | 0.0250 | 0.9935 | 0.9980 | 0.9903 | 0.9941 |
69
+ | 0.0234 | 0.3588 | 20000 | 0.0260 | 0.9934 | 0.9969 | 0.9912 | 0.9940 |
70
+ | 0.0246 | 0.3946 | 22000 | 0.0246 | 0.9935 | 0.9975 | 0.9909 | 0.9942 |
71
+ | 0.0238 | 0.4305 | 24000 | 0.0252 | 0.9932 | 0.9961 | 0.9917 | 0.9938 |
72
+ | 0.0263 | 0.4664 | 26000 | 0.0238 | 0.9936 | 0.9976 | 0.9910 | 0.9943 |
73
+ | 0.0234 | 0.5023 | 28000 | 0.0250 | 0.9936 | 0.9972 | 0.9913 | 0.9943 |
74
+ | 0.0241 | 0.5382 | 30000 | 0.0230 | 0.9939 | 0.9978 | 0.9912 | 0.9945 |
75
+ | 0.0238 | 0.5740 | 32000 | 0.0228 | 0.9939 | 0.9984 | 0.9907 | 0.9945 |
76
+ | 0.0243 | 0.6099 | 34000 | 0.0239 | 0.9939 | 0.9993 | 0.9897 | 0.9945 |
77
+ | 0.023 | 0.6458 | 36000 | 0.0228 | 0.9939 | 0.9980 | 0.9911 | 0.9945 |
78
+ | 0.0252 | 0.6817 | 38000 | 0.0230 | 0.9941 | 0.9987 | 0.9907 | 0.9947 |
79
+ | 0.0251 | 0.7175 | 40000 | 0.0223 | 0.9940 | 0.9977 | 0.9915 | 0.9946 |
80
+ | 0.0217 | 0.7534 | 42000 | 0.0226 | 0.9940 | 0.9976 | 0.9916 | 0.9946 |
81
+ | 0.0269 | 0.7893 | 44000 | 0.0220 | 0.9941 | 0.9981 | 0.9914 | 0.9947 |
82
+ | 0.0227 | 0.8252 | 46000 | 0.0224 | 0.9939 | 0.9972 | 0.9918 | 0.9945 |
83
+ | 0.026 | 0.8610 | 48000 | 0.0216 | 0.9942 | 0.9986 | 0.9911 | 0.9948 |
84
+ | 0.0213 | 0.8969 | 50000 | 0.0220 | 0.9942 | 0.9983 | 0.9913 | 0.9948 |
85
+ | 0.0233 | 0.9328 | 52000 | 0.0217 | 0.9942 | 0.9982 | 0.9913 | 0.9948 |
86
+ | 0.0239 | 0.9687 | 54000 | 0.0216 | 0.9942 | 0.9983 | 0.9913 | 0.9948 |
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:02d71895127bf87a397715d67156bbefc506e22026071ff2db5ff13db737b7e8
3
  size 1115268200
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d5ecdd680e0075b26d4581c96dcbf1455fcf75a0b7bb7548b57338f95cfe3ff
3
  size 1115268200
runs/Dec07_13-56-05_elesage-pc/events.out.tfevents.1765133854.elesage-pc.82189.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ca49cb174101b6a1596874346c2d251848548c3b4b2323d2e7c3fb4b97e407b
3
+ size 133900
runs/Dec07_15-25-19_elesage-pc/events.out.tfevents.1765139207.elesage-pc.107385.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:600002ad42a878176c7e3e6da1ee89e95e326aee6358202d4cb4e8d58dbf95fc
3
+ size 137700
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e5b886612046c84317d796c1c594c913fc79f0f7cb81f9824a5eab83d5381180
3
  size 5841
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3a42922beacf2f404ba513e3e3c2ce76e99396da3422c7fa9f433887eee7574
3
  size 5841