CoolFace
Modelpublic

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

sourceHugging Facemitupdated 10mo agoView on Hugging Face
0likes51downloads
Model Card

⚠️ 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.

python
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

Training LossEpochStepValidation LossAccuracyPrecisionRecallF1
0.05920.020320000.05260.98770.99120.98720.9892
0.04730.040640000.04290.98910.99400.98680.9904
0.04910.061060000.04070.98930.99490.98630.9906
0.03830.081380000.03860.98980.99540.98680.9911
0.04150.1016100000.03780.99040.99500.98810.9915
0.03150.1219120000.04100.99050.99550.98770.9916
0.04160.1422140000.03870.99080.99500.98880.9919
0.02920.1625160000.03830.99080.99640.98740.9919
0.03810.1829180000.03570.99070.99590.98780.9918
0.02660.2032200000.03950.99090.99380.99020.9920
0.0350.2235220000.03920.99090.99560.98850.9920
0.03330.2438240000.03560.99100.99350.99070.9921
0.03210.2641260000.03430.99090.99470.98940.9920
0.03080.2845280000.03600.99120.99540.98920.9923
0.03170.3048300000.03480.99120.99410.99050.9923
0.03590.3251320000.03460.99130.99590.98890.9924
0.04370.3454340000.03330.99120.99570.98890.9923
0.04010.3657360000.03340.99140.99540.98950.9924
0.04190.3861380000.03210.99150.99570.98950.9926
0.0320.4064400000.03390.99140.99470.99020.9925
0.03670.4267420000.03140.99160.99480.99040.9926
0.02760.4470440000.03550.99150.99540.98970.9925
0.03730.4673460000.03210.99160.99540.98990.9926
0.03640.4876480000.03270.99150.99660.98850.9925
0.03170.5080500000.03110.99140.99340.99150.9924
0.03550.5283520000.03070.99170.99570.98980.9927
0.02760.5486540000.03210.99180.99520.99040.9928
0.03420.5689560000.03190.99180.99560.99000.9928
0.03160.5892580000.03140.99180.99490.99060.9928
0.03220.6096600000.03150.99160.99420.99120.9927
0.03570.6299620000.03090.99210.99550.99050.9930
0.02960.6502640000.03260.99190.99550.99030.9929
0.03240.6705660000.03120.99190.99580.99000.9929
0.02660.6908680000.03190.99200.99580.99020.9930
0.0280.7112700000.03210.99200.99610.98990.9930
0.02760.7315720000.03190.99190.99630.98950.9929
0.02880.7518740000.03160.99200.99520.99080.9930
0.02950.7721760000.03040.99200.99550.99040.9930
0.03050.7924780000.03090.99200.99630.98960.9929
0.02980.8127800000.03120.99210.99620.98990.9930
0.02410.8331820000.03120.99210.99540.99070.9930
0.03320.8534840000.03080.99200.99550.99060.9930
0.02810.8737860000.03010.99220.99570.99050.9931
0.02740.8940880000.03050.99210.99520.99080.9930
0.02630.9143900000.03000.99220.99580.99050.9931
0.02150.9347920000.03040.99210.99520.99090.9931
0.03670.9550940000.02970.99220.99560.99070.9931
0.02980.9753960000.03020.99220.99550.99080.9931
0.02020.9956980000.03050.99220.99570.99060.9931

Framework versions

  • Transformers 4.57.1
  • Pytorch 2.9.0+cu128
  • Datasets 4.4.1
  • Tokenizers 0.22.1