AventIQ-AI / roberta-based-sentiment-analysis-for-twitter-tweets

huggingface.co
Total runs: 15
24-hour runs: 0
7-day runs: 3
30-day runs: 11
Model's Last Updated: May 02 2025

Introduction of roberta-based-sentiment-analysis-for-twitter-tweets

Model Details of roberta-based-sentiment-analysis-for-twitter-tweets

RoBERTa-Base Quantized Model for Sentiment Analysis

This repository hosts a quantized version of the RoBERTa model, fine-tuned for sentiment-analysis-classification tasks. The model has been optimized for efficient deployment while maintaining high accuracy, making it suitable for resource-constrained environments.

Model Details
  • Model Architecture: RoBERTa Base
  • Task: Sentiment Analysis
  • Dataset: Custom Twitter Dataset ( twitter_training.csv )
  • Quantization: Float16
  • Fine-tuning Framework: Hugging Face Transformers
Usage
Installation
pip install transformers torch
Loading the Model
 
from transformers import RobertaTokenizerFast, RobertaForSequenceClassification, Trainer, TrainingArguments
import torch


 
# Load tokenizer

tokenizer = RobertaTokenizerFast.from_pretrained("roberta-base")
 
# Define a test sentence

test_sentence = "The food was absolutely delicious and the service was amazing!"
 
# Tokenize input

inputs = tokenizer(test_sentence, return_tensors="pt", padding=True, truncation=True, max_length=128)
 
# Ensure input tensors are in correct dtype

inputs["input_ids"] = inputs["input_ids"].long()  # Convert to long type

inputs["attention_mask"] = inputs["attention_mask"].long()  # Convert to long type

# Move inputs to the model's device

inputs = {key: value.to(device) for key, value in inputs.items()}
 
# Make prediction

with torch.no_grad():

    outputs = quantized_model(**inputs)
 
# Get predicted class

predicted_class = torch.argmax(outputs.logits, dim=1).item()

print(f"Predicted Class: {predicted_class}")
 
 
label_mapping = {0: "very_negative", 1: "nagative", 2: "neutral", 3: "Positive", 4: "very_positive"}   

#Example
 
predicted_label = label_mapping[predicted_class]

print(f"Predicted Label: {predicted_label}")
 
Performance Metrics
  • Accuracy: 0.82
Fine-Tuning Details
Dataset

The dataset is taken from Kaggle .

Training
  • Number of epochs: 3

  • Batch size: 8

  • Evaluation strategy: epoch

  • Learning rate: 2e-5

Quantization

Post-training quantization was applied using PyTorch's built-in quantization framework to reduce the model size and improve inference efficiency.

Repository Structure

.

├── model/               # Contains the quantized model files

├── tokenizer_config/    # Tokenizer configuration and vocabulary files

├── model.safensors/     # Fine Tuned Model

├── README.md            # Model documentation
Limitations
  • The model may not generalize well to domains outside the fine-tuning dataset.

  • Quantization may result in minor accuracy degradation compared to full-precision models.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you have suggestions or improvements.

Runs of AventIQ-AI roberta-based-sentiment-analysis-for-twitter-tweets on huggingface.co

15
Total runs
0
24-hour runs
0
3-day runs
3
7-day runs
11
30-day runs

More Information About roberta-based-sentiment-analysis-for-twitter-tweets huggingface.co Model

roberta-based-sentiment-analysis-for-twitter-tweets huggingface.co

roberta-based-sentiment-analysis-for-twitter-tweets huggingface.co is an AI model on huggingface.co that provides roberta-based-sentiment-analysis-for-twitter-tweets's model effect (), which can be used instantly with this AventIQ-AI roberta-based-sentiment-analysis-for-twitter-tweets model. huggingface.co supports a free trial of the roberta-based-sentiment-analysis-for-twitter-tweets model, and also provides paid use of the roberta-based-sentiment-analysis-for-twitter-tweets. Support call roberta-based-sentiment-analysis-for-twitter-tweets model through api, including Node.js, Python, http.

roberta-based-sentiment-analysis-for-twitter-tweets huggingface.co Url

https://huggingface.co/AventIQ-AI/roberta-based-sentiment-analysis-for-twitter-tweets

AventIQ-AI roberta-based-sentiment-analysis-for-twitter-tweets online free

roberta-based-sentiment-analysis-for-twitter-tweets huggingface.co is an online trial and call api platform, which integrates roberta-based-sentiment-analysis-for-twitter-tweets's modeling effects, including api services, and provides a free online trial of roberta-based-sentiment-analysis-for-twitter-tweets, you can try roberta-based-sentiment-analysis-for-twitter-tweets online for free by clicking the link below.

AventIQ-AI roberta-based-sentiment-analysis-for-twitter-tweets online free url in huggingface.co:

https://huggingface.co/AventIQ-AI/roberta-based-sentiment-analysis-for-twitter-tweets

roberta-based-sentiment-analysis-for-twitter-tweets install

roberta-based-sentiment-analysis-for-twitter-tweets is an open source model from GitHub that offers a free installation service, and any user can find roberta-based-sentiment-analysis-for-twitter-tweets on GitHub to install. At the same time, huggingface.co provides the effect of roberta-based-sentiment-analysis-for-twitter-tweets install, users can directly use roberta-based-sentiment-analysis-for-twitter-tweets installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

roberta-based-sentiment-analysis-for-twitter-tweets install url in huggingface.co:

https://huggingface.co/AventIQ-AI/roberta-based-sentiment-analysis-for-twitter-tweets

Url of roberta-based-sentiment-analysis-for-twitter-tweets

roberta-based-sentiment-analysis-for-twitter-tweets huggingface.co Url

Provider of roberta-based-sentiment-analysis-for-twitter-tweets huggingface.co

AventIQ-AI
ORGANIZATIONS

Other API from AventIQ-AI

huggingface.co

Total runs: 18
Run Growth: 14
Growth Rate: 77.78%
Updated:February 17 2025