Team Ai
Modelpublic

roberthsu2003/for_classification

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

<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->

for_classification

This model is a fine-tuned version of google-bert/bert-base-chinese on an unknown dataset. It achieves the following results on the evaluation set:

  • —Loss: 0.2366
  • —Accuracy: 0.9189
  • —F1: 0.9415

模型實作

python
from transformers import pipeline

id2_label = {'LABEL_0':"負評",'LABEL_1':"正評"}
pipe = pipeline('text-classification', model="roberthsu2003/for_classification")

sen="服務人員都很親切"
print(sen,id2_label[pipe(sen)[0]['label']])

sen1="服務人員都不親切"
print(sen1,id2_label[pipe(sen1)[0]['label']])

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 2e-05
  • —trainbatchsize: 64
  • —evalbatchsize: 128
  • —seed: 42
  • —optimizer: Use OptimizerNames.ADAMWTORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizerargs=No additional optimizer arguments
  • —lrschedulertype: linear
  • —num_epochs: 3

Training results

Training LossEpochStepValidation LossAccuracyF1
0.28861.01100.22690.90090.9272
0.17992.02200.22180.91120.9356
0.13953.03300.23660.91890.9415

Framework versions

  • —Transformers 4.50.0
  • —Pytorch 2.6.0+cu124
  • —Datasets 3.5.0
  • —Tokenizers 0.21.1