CoolFace
Modelpublic

RawMean/farsi_lastname_classifier_bert

sourceHugging Faceapache-2.0updated 4y agoView on Hugging Face
0likes7downloads
Model Card

farsilastnameclassifier_bert

This model is trained to classify Iranian last names. To use it, type a last name in the space provided on the right and then click on "compute". The model computes probability of the last name being Persian. The compute takes a few seconds to load for the first try (because it needs to load the model first). Subsequent attempt should take only milliseconds. In practice the model can compute the results for an entire batch of data (last names) in a fraction of a second.

It achieves the following results on the evaluation set:

  • Loss: 0.0863
  • Accuracy: 0.976

Model description

Model is based on Bert ("bert-base-cased")

The following hyperparameters were used during training:

  • learning_rate: 1e-05
  • trainbatchsize: 128
  • evalbatchsize: 256
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lrschedulertype: cosine
  • lrschedulerwarmup_ratio: 0.1
  • num_epochs: 10
  • mixedprecisiontraining: Native AMP

Training results

Training LossEpochStepValidation LossAccuracy
No log1.0120.63250.588
No log2.0240.34140.952
No log3.0360.24960.97
No log4.0480.16740.976
No log5.0600.11600.976
No log6.0720.09170.972
No log7.0840.08960.974
No log8.0960.08740.974
No log9.01080.08690.974
No log10.01200.08630.976

Framework versions

  • Transformers 4.24.0
  • Pytorch 1.12.1+cu113
  • Datasets 2.6.1
  • Tokenizers 0.13.2