ele-sage/mdeberta-v3-base-name-classifier
⚠️ DEPRECATED MODEL ⚠️
Please do not use this model for new projects.
This model has been superseded by a newer, more accurate version trained on a larger, cleaner dataset. It is maintained here for archival purposes only.
✅ Recommended Replacement:
Please switch to [ele-sage/mdeberta-v3-base-name-classifier-v2](https://huggingface.co/ele-sage/mdeberta-v3-base-name-classifier-v2) (Higher Accuracy).
mdeberta-v3-base-name-classifier
This model is a fine-tuned version of microsoft/mdeberta-v3-base on ele-sage/person-company-names-classification dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0305
- Accuracy: 0.9922
- Precision: 0.9957
- Recall: 0.9906
- F1: 0.9931
Model description
This model is a high-performance binary text classifier, fine-tuned from mdeberta-v3-base. Its purpose is to distinguish between a person's name and a company/organization name with high accuracy.
Direct Use
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.
from transformers import pipeline
classifier = pipeline("text-classification", model="ele-sage/mdeberta-v3-base-name-classifier")
results = classifier([
"Satya Nadella",
"Global Innovations Inc.",
"Martinez, Alonso"
])
for result in results:
print(f"Text: '{result['text']}', Prediction: {result['label']}, Score: {result['score']:.4f}")Downstream Use
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.
Out-of-Scope Use
- 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).
Bias, Risks, and Limitations
- 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.
- 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.
- 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.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 8e-06
- trainbatchsize: 64
- evalbatchsize: 64
- seed: 42
- optimizer: Use OptimizerNames.ADAMWTORCHFUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lrschedulertype: linear
- lrschedulerwarmup_steps: 2000
- num_epochs: 1
Training results
Framework versions
- Transformers 4.57.1
- Pytorch 2.9.0+cu128
- Datasets 4.4.1
- Tokenizers 0.22.1
