BERT Fine-tuned on IMDB Reviews

Fine-tuned BERT-base-cased for binary sentiment classification on movie reviews.

This model is a fine-tuned version of google-bert/bert-base-cased on Stanford IMDB dataset.

Test Results:

  • Accuracy: 92.8%
  • Loss: 0.2904

Model description

This model classifies movie reviews as positive or negative sentiment. Fine-tuned from google-bert/bert-base-cased on the IMDB dataset using HuggingFace Trainer.

Intended uses & limitations

Uses:

  • Sentiment analysis on movie reviews
  • General sentiment classification on similar review-style text

Limitations:

  • Trained specifically on movie reviews - may not generalize well to other domains
  • Binary classification only (positive/negative)
  • Maximum sequence length: 512 tokens

Training and evaluation data

  • Dataset: Stanford IMDB
  • Size: 50,000 reviews total
  • Split: 20,000 train / 5,000 validation / 25,000 test
  • Classes: Binary (0=Negative, 1=Positive), perfectly balanced

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-05
  • train_batch_size: 16
  • eval_batch_size: 32
  • seed: 42
  • optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lr_scheduler_type: linear
  • num_epochs: 3

Training results

Training Loss Epoch Step Validation Loss Accuracy
0.247 1.0 1250 0.2467 0.907
0.1241 2.0 2500 0.3196 0.9212
0.0574 3.0 3750 0.3944 0.9178

Framework versions

  • Transformers 4.57.3
  • Pytorch 2.9.1+cu128
  • Datasets 4.4.1
  • Tokenizers 0.22.1
Downloads last month
17
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for knightscode139/bert-base-cased-imdb-sentiment

Finetuned
(2716)
this model

Dataset used to train knightscode139/bert-base-cased-imdb-sentiment

Space using knightscode139/bert-base-cased-imdb-sentiment 1

Evaluation results