Instructions to use jramduran/review-sentiment-roberta-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jramduran/review-sentiment-roberta-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("FacebookAI/roberta-base") model = PeftModel.from_pretrained(base_model, "jramduran/review-sentiment-roberta-lora") - Notebooks
- Google Colab
- Kaggle
Review sentiment - RoBERTa-base + LoRA
LoRA adapter on top of FacebookAI/roberta-base that classifies product reviews as
negative / neutral / positive.
| Metric (held-out test) | Value |
|---|---|
| Accuracy | 0.807 |
| F1 macro | 0.754 |
| Precision (macro) | 0.762 |
| Recall (macro) | 0.751 |
Training: LoRA r=16, alpha=32, target modules ['query', 'value', 'key'], lr 5e-05, max length 256, up to 5 epochs with early stopping.
from peft import AutoPeftModelForSequenceClassification
from transformers import AutoTokenizer
model = AutoPeftModelForSequenceClassification.from_pretrained("jramduran/review-sentiment-roberta-lora", num_labels=3)
tokenizer = AutoTokenizer.from_pretrained("jramduran/review-sentiment-roberta-lora")
- Downloads last month
- 23
Model tree for jramduran/review-sentiment-roberta-lora
Base model
FacebookAI/roberta-base