IMDb Sentiment Classifier

This model, jaxay-imdb-distilbert, is a fine-tuned version of distilbert-base-uncased by Jaxay for binary sentiment classification. It is trained on the IMDb dataset to classify movie reviews as either positive or negative.

Model Details

  • Model Architecture: DistilBERT
  • Task: Binary Sentiment Classification (Positive/Negative)
  • Dataset: IMDb Movie Reviews
  • Training Procedure: Fine-tuned with the Hugging Face Trainer API for 3 epochs.

Model Performance

The model was fine-tuned on a balanced subset of the IMDb dataset, consisting of positive and negative movie reviews. It is designed to be lightweight and efficient, making it suitable for applications requiring quick inference times.

Intended Use

This model is ideal for classifying movie reviews into positive and negative categories. It can be used in applications like:

  • Analyzing movie review sentiments
  • Building sentiment-based recommendation systems
  • Conducting social media sentiment analysis

Usage Example

Here’s how to use the model for inference:

from transformers import AutoTokenizer, AutoModelForSequenceClassification

# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("Jaxay/jaxay-imdb-distilbert")
model = AutoModelForSequenceClassification.from_pretrained("Jaxay/jaxay-imdb-distilbert")

# Define the input text
text = "The movie was fantastic! A true masterpiece."

# Tokenize the input and make a prediction
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
outputs = model(**inputs)

# Get the predicted label
predicted_class = outputs.logits.argmax().item()
label = "Positive" if predicted_class == 1 else "Negative"
print(f"Sentiment: {label}")
Downloads last month
4
Safetensors
Model size
67M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Jaxay/jaxay-imdb-distilbert

Finetuned
(12362)
this model