Text Classification
Transformers
Safetensors
distilbert
Generated from Trainer
text-embeddings-inference
Instructions to use hazarsozer/distilbert-finetuned-imdb-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hazarsozer/distilbert-finetuned-imdb-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="hazarsozer/distilbert-finetuned-imdb-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("hazarsozer/distilbert-finetuned-imdb-sentiment") model = AutoModelForSequenceClassification.from_pretrained("hazarsozer/distilbert-finetuned-imdb-sentiment", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model description
This model is a fine-tuned version of distilbert-base-uncased on an IMDB dataset.
Intended uses & limitations
This model can be used for sentiment analysis of comments, and general texts. But since it is trained on an IMDB dataset it might not perform as well on other text than movie comments.
Training and evaluation data
This model has trained and evulauated on labeled IMDB data.
Training procedure
It has went through supervised training, as the labeled imdb data first tokenized then fed into the model with small batches.
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use adamw_torch_fused with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 1
Training results
It achieves following sentiment analysis results on the evaluation dataset:
- Loss: 0.1973
- Accuracy: 0.9279
- Precision: 0.9369
- Recall: 0.9175
- F1: 0.9271
Framework versions
- Transformers 4.55.0
- Pytorch 2.8.0+cu128
- Datasets 4.0.0
- Tokenizers 0.21.4
- Downloads last month
- 7
Model tree for hazarsozer/distilbert-finetuned-imdb-sentiment
Base model
distilbert/distilbert-base-uncased