Model Description
This repository contains a fine-tuned sentiment analysis model based on the distilbert-base-uncased
architecture, trained on the "shawhin/imdb-truncated" dataset. The model is designed for text classification tasks in the English language.
Model Performance
The model's performance is evaluated based on accuracy, a common metric for text classification tasks. The specific performance metrics may vary depending on the use case and dataset.
Training Procedure
Framework Versions
- PEFT 0.5.0
Dataset
The model is trained on the "shawhin/imdb-truncated" dataset, which is a truncated version of the IMDb movie review dataset. It contains labeled movie reviews with binary sentiment labels (positive or negative).
Fine-Tuning Details
The model is fine-tuned using the distilbert-base-uncased
architecture, a smaller and faster version of BERT, well-suited for various NLP tasks.
How to Use
You can use this fine-tuned sentiment analysis model for various text classification tasks, including sentiment analysis, text categorization, and more. To use the model, you can easily load it with the Hugging Face Transformers library and integrate it into your Python applications.
Here's an example of how to load and use the model:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
# Load the fine-tuned model
model = AutoModelForSequenceClassification.from_pretrained("samadpls/sentiment-analysis")
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("your-model-name")
# Perform inference
text = "This is a great movie!"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
predicted_label = outputs.logits.argmax().item()
# Print the predicted sentiment label
print("Predicted Sentiment: Positive" if predicted_label == 1 else "Predicted Sentiment: Negative")
License
This model is distributed under the Apache License 2.0. For more details, see the LICENSE file.
- Downloads last month
- 28