CoolFace
Modelpublic

Jorgeutd/bert-base-uncased-finetuned-surveyclassification

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
0likes44downloads
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. -->

bert-base-uncased-finetuned-surveyclassification

This model is a fine-tuned version of bert-base-uncased on a custom survey dataset. It achieves the following results on the evaluation set:

  • —Loss: 0.2818
  • —Accuracy: 0.9097
  • —F1: 0.9097

Model description

More information needed

Limitations and bias

This model is limited by its training dataset of survey results for a particular customer service domain. This may not generalize well for all use cases in different domains.

How to use

You can use this model with Transformers pipeline for Text Classification.

python
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
tokenizer = AutoTokenizer.from_pretrained("Jorgeutd/bert-base-uncased-finetuned-surveyclassification")
model = AutoModelForSequenceClassification.from_pretrained("Jorgeutd/bert-base-uncased-finetuned-surveyclassification")
text_classifier = pipeline("text-classification", model=model,tokenizer=tokenizer, device=0)
example = "The agent on the phone was very helpful and nice to me."
results = text_classifier(example)
print(results)

Training and evaluation data

Custom survey dataset.

Training procedure

SageMaker notebook instance.

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 3e-05
  • —trainbatchsize: 16
  • —evalbatchsize: 16
  • —seed: 42
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: linear
  • —lrschedulerwarmup_steps: 100
  • —num_epochs: 10
  • —mixedprecisiontraining: Native AMP

Training results

Training LossEpochStepValidation LossAccuracyF1
0.41361.09020.28180.90970.9097
0.22132.018040.29900.90770.9077
0.15483.027060.35070.90260.9026
0.10344.036080.46920.90110.9011

Framework versions

  • —Transformers 4.16.2
  • —Pytorch 1.8.1+cu111
  • —Datasets 1.18.3
  • —Tokenizers 0.11.0