πŸ“’ DistilBERT Fine-Tuned for Sentiment Analysis 🎭

This model is a fine-tuned DistilBERT for sentiment analysis on movie review texts. It classifies texts as positive or negative with high accuracy.

πŸ“– Dataset

The model was trained on the IMDb dataset, which contains 50,000 movie reviews balanced between positive and negative labels.

πŸ“Š Evaluation

The model's performance was evaluated on a test set of 25,000 reviews, achieving the following results:

Metric Value
Accuracy 93.2%
Precision 93%
Recall 93%
F1-score 93%

These metrics indicate that the model correctly predicts movie reviews in most cases.

πŸ“Š Confusion Matrix

The confusion matrix below shows the model's performance on predictions:

Confusion Matrix

πŸš€ How to Use

To use the model, simply load it with transformers and use the text classification pipeline:

from transformers import pipeline

model_name = "gabrielnkl/fine-tuned-bert"

classifier = pipeline("text-classification", model=model_name)

text = "This movie was amazing! I really liked the acting and the storyline."
result = classifier(text)

print(result)
# [{'label': 'POSITIVE', 'score': 0.98}]


O notebook usado para treinar este modelo estΓ‘ disponΓ­vel no GitHub:

(https://github.com/Gabrielnkl/fine-tuned-bert-model/blob/main/finetuning.py)

Downloads last month
11
Safetensors
Model size
67M params
Tensor type
F32
Β·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.