CoolFace
Modelpublic

BluSerK/bert-base-uncased-news-classification

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
0likes10downloads
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-news-classification

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

  • —Loss: 0.2074
  • —F1: 0.9721
  • —Accuracy: 0.972

Model description

Intended uses: This model is intended for classifying English news articles into categories similar to those present in the BBC News dataset. It can be used as a baseline for text classification tasks on news content or as a component in larger NLP pipelines.

Intended uses & limitations

  • —Domain Specificity: The model's performance may degrade significantly when applied to text from domains vastly different from news articles.
  • —Bias: As with any model trained on real-world data, it may inherit biases present in the BBC News dataset. Users should be aware of potential biases in classification results.

Training and evaluation data

The model was trained and evaluated using the SetFit/bbc-news dataset.

  • —Training data: The 'train' split of the dataset, containing 1225 samples.
  • —Evaluation data: The 'test' split of the dataset, containing 500 samples (after being split from an initial test set of 1000 samples).

The dataset contains news articles with corresponding category labels (politics, sport, entertainment, tech, business). The label_text column was mapped to numerical IDs for training.

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 5e-05
  • —trainbatchsize: 8
  • —evalbatchsize: 8
  • —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
  • —num_epochs: 3.0
  • —mixedprecisiontraining: Native AMP

Training results

Training LossEpochStepValidation LossF1Accuracy
No log1.01540.37150.95250.952
No log2.03080.18980.97410.974
No log3.04620.21680.97220.972

Framework versions

  • —Transformers 5.13.1
  • —Pytorch 2.11.0+cu128
  • —Datasets 4.0.0
  • —Tokenizers 0.22.2