You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

my_distilbert_model

This model is a fine-tuned version of distilbert-base-uncased on an cornell-movie-review-data/rotten_tomatoes dataset. It achieves the following results on the evaluation set:

  • Loss: 0.5379
  • Accuracy: 0.8424
  • F1: 0.8424
  • Precision: 0.8424
  • Recall: 0.8424

Model description

How to use the model

!pip install -q  transformers

from huggingface_hub import notebook_login
notebook_login()#after running this line enter the access token generated on your hugging face account

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("gokarn09/my_distilbert_model")
model = AutoModelForSequenceClassification.from_pretrained("gokarn09/my_distilbert_model")

from transformers import pipeline
text=["This is wonderful movie!", "The movie was really bad; I didn't like it."]
classifier = pipeline("sentiment-analysis", model="gokarn09/my_distilbert_model")
classifier(text)

Training and evaluation data

More information needed

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: Use adamw_torch 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 F1 Precision Recall
0.4193 1.0 534 0.4263 0.8180 0.8162 0.8311 0.8180
0.2548 2.0 1068 0.4289 0.8377 0.8376 0.8383 0.8377
0.1582 3.0 1602 0.5379 0.8424 0.8424 0.8424 0.8424

Framework versions

  • Transformers 4.47.1
  • Pytorch 2.5.1+cu121
  • Datasets 3.2.0
  • Tokenizers 0.21.0
Downloads last month
98
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for gokarn09/my_distilbert_model

Finetuned
(7164)
this model

Dataset used to train gokarn09/my_distilbert_model