This model is a fine-tuned version of distilbert-base-uncased post trained on a huge comments corpus for sentiment analysis.
The model is based on DistilBERT, a distilled version of BERT that is smaller, faster, and requires less computational resources while maintaining 97% of BERT's performance. This specific model has been fine-tuned to perform sentiment analysis on YouTube comments, classifying them into three categories: POSITIVE, NEUTRAL, and NEGATIVE.
The model is designed to understand the nuanced language used in social media comments, including slang, emojis, and informal speech patterns typically found in YouTube comment sections.
The model was trained on a custom dataset of YouTube comments with sentiment labels:
The model was fine-tuned using the Hugging Face Transformers library with Pytorch.
The following hyperparameters were used during training:
The model was evaluated on a test set of YouTube comments. The evaluation metrics are:
import torch
import transformers
from transformers import pipeline
def get_sentiment(text):
#Set to avoid warning messages.
transformers.logging.set_verbosity_error()
sentiment_classifier = pipeline(task="text-classification",
model="iam-tsr/distilbert-finetuned-sentiment-analysis",
tokenizer="iam-tsr/distilbert-finetuned-sentiment-analysis",)
return sentiment_classifier(text)
get_sentiment("I love programming!")
#[{'label': 'POSITIVE', 'score': 0.9759756326675415}]
This model is intended for analyzing sentiment in YouTube comments and similar social media text. It can be used for:
model.safetensors 268 MBlora-adapter/adapter_model.safetensors 3 MBlora-adapter/training_args.bin 5.7 kBdistilbert/distilbert-base-uncased