stanfordnlp/sst2
Viewer • Updated • 70k • 55.2k • 172
How to use Sara-1990/distilbert-lora-sst2 with PEFT:
from peft import PeftModel
from transformers import AutoModelForSequenceClassification
base_model = AutoModelForSequenceClassification.from_pretrained("distilbert-base-uncased")
model = PeftModel.from_pretrained(base_model, "Sara-1990/distilbert-lora-sst2")Fine-tuned distilbert-base-uncased for binary sentiment classification
using parameter-efficient LoRA (r=8) via the PEFT library.
Accuracy: ~92% on SST-2 validation set
Trainable parameters: ~0.8% of total
from transformers import pipeline classifier = pipeline("text-classification", model="Sara-1990/distilbert-lora-sst2") classifier("The paper results are surprisingly strong.")