Instructions to use Sanjeev2501/nyxar-roberta-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sanjeev2501/nyxar-roberta-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Sanjeev2501/nyxar-roberta-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Sanjeev2501/nyxar-roberta-sentiment") model = AutoModelForSequenceClassification.from_pretrained("Sanjeev2501/nyxar-roberta-sentiment") - Notebooks
- Google Colab
- Kaggle
NYXAR RoBERTa Sentiment Model
Model Description
A transformer-based sentiment classification model developed for the NYXAR AI Intelligence & Observability Platform. The model leverages a fine-tuned RoBERTa architecture optimized for customer feedback intelligence and predicts sentiment across three classes: Positive, Neutral, and Negative.
Framework: Hugging Face Transformers, ONNX Runtime, RoBERTa Language: English License: MIT Base Model: roberta-base
Training Data
The model was trained on SetFit/amazon_reviews_multi_en, an English Amazon reviews dataset commonly used for sentiment classification tasks.
Intended Use
This model is designed for customer feedback analysis, product review monitoring, support ticket intelligence, sentiment trend analysis, and enterprise AI intelligence workflows.
Limitations
The model may struggle with sarcasm, irony, ambiguous sentiment expressions, domain-specific terminology not represented in the training data, and highly subjective reviews. Predictions should be used as supporting signals rather than business-critical decisions.
Performance
| Metric | Score |
|---|---|
| Accuracy | 77.56% |
| Precision | 77.99% |
| Recall | 77.56% |
| F1 Score | 77.76% |
Usage
Assumes tokenizer and model_quantized.onnx are in ./onnx/
import numpy as np
import onnxruntime as ort
from transformers import AutoTokenizer
from scipy.special import softmax
model_path = "./onnx"
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_path)
# Load ONNX model
session = ort.InferenceSession(
f"{model_path}/model_quantized.onnx"
)
text = "The product exceeded expectations."
# Tokenize
inputs = tokenizer(
text,
return_tensors="np",
truncation=True,
padding=True
)
# Convert tokenizer outputs to ONNX inputs
ort_inputs = {
k: v.astype(np.int64)
for k, v in inputs.items()
}
# Run inference
outputs = session.run(None, ort_inputs)
# Get logits
logits = outputs[0]
# Compute probabilities
probs = softmax(logits, axis=-1)
prediction = int(np.argmax(probs, axis=-1)[0])
confidence = float(np.max(probs))
print(prediction, confidence)
- Downloads last month
- 109