transformers tensorboard safetensors distilbert text-classification generated_from_trainer en dataset:Q-b1t/IMDB-Dataset-of-50K-Movie-Reviews-Backup base_model:distilbert/distilbert-base-uncased base_model:finetune:distilbert/distilbert-base-uncased license:apache-2.0 autotrain_compatible endpoints_compatible region:us
---
base_model: distilbert/distilbert-base-uncased
datasets:
- Q-b1t/IMDB-Dataset-of-50K-Movie-Reviews-Backup
language:
- en
license: apache-2.0
metrics:
- accuracy
tags:
- generated_from_trainer
model-index:
- name: isy503-a03
  results: []
---

<!-- 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. -->

# isy503-a03

This model is a fine-tuned version of [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) on the [IMDB Dataset of 50K Movie Reviews](https://www.kaggle.com/datasets/lakshmi25npathi/imdb-dataset-of-50k-movie-reviews) dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2328
- Accuracy: 0.9318

## Model description

A sentiment analysis model used on a academic excercise to learn and practice **Sentiment Analysis** using DistilBERT.

## Intended uses & limitations

It is only an academic excercise, which aims to be the foundation for other excercises such as improving the mdoel using multilanguage processing and multi-feature output (Likert Scale to improve output accuracy, rather than only POSITIVE and NEGATIVE)

## Training and evaluation data

The training has been done using the following tutorial: [Hugging Face: Text classification](https://huggingface.co/docs/transformers/en/tasks/sequence_classification).
And the evaluation has been done with a random sample of Movie and Amazon Product reviews.

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|:-------------:|:-----:|:----:|:---------------:|:--------:|
| 0.2251        | 1.0   | 1563 | 0.2154          | 0.9189   |
| 0.1463        | 2.0   | 3126 | 0.2328          | 0.9318   |


### Framework versions

- Transformers 4.40.1
- Pytorch 2.2.1+cu121
- Datasets 2.19.0
- Tokenizers 0.19.1