Run this model with HF Jobs
Run saibapanku/distilbert-sentiment on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/saibapanku/distilbert-sentiment. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/saibapanku/distilbert-sentiment on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use saibapanku/distilbert-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saibapanku/distilbert-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="saibapanku/distilbert-sentiment")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("saibapanku/distilbert-sentiment") model = AutoModelForSequenceClassification.from_pretrained("saibapanku/distilbert-sentiment", device_map="auto") - Notebooks
- Google Colab
- Kaggle
DistilBERT Sentiment Classifier (IMDb) β saibapanku/distilbert-sentiment
This is a fine-tuned DistilBERT model for binary sentiment classification trained on the IMDb dataset. The model classifies movie reviews as either positive or negative.
Model Details
- Model name:
saibapanku/distilbert-sentiment - Base model:
distilbert-base-uncased - Task: Sequence Classification (Sentiment Analysis)
- Dataset: IMDb
- Labels:
0: Negative1: Positive
How to Use
You can load and use the model directly with π€ Transformers:
from transformers import pipeline
classifier = pipeline("text-classification", model="saibapanku/distilbert-sentiment")
print(classifier("This movie was absolutely amazing!"))
Training Configuration
- Training method: Hugging Face Trainer
- Epochs: 3
- Batch size: 16
- Max sequence length: 256 tokens
- Learning rate: default
- Weight decay: 0.01
- Evaluation strategy: per epoch
- Metric used: Accuracy
- Subset used: 2,000 train / 1,000 test samples (for demo purposes)
Example Output: [{'label': 'positive', 'score': 0.9843}]
Limitations
This model was trained on a small subset of the IMDb dataset and may not generalize well to all types of reviews.
Performance on domain-specific or multi-lingual content is not guaranteed.
License
This model is distributed under the MIT License.
Feel free to fine-tune further or adapt it for your specific sentiment analysis tasks!
- Downloads last month
- 5
Model tree for saibapanku/distilbert-sentiment
Base model
distilbert/distilbert-base-uncased