Downloads · 30 days
11
3% of all-time downloads
Sukuna404/deberta-emotion-quantized-int8
deberta-emotion-quantized-int8 is a text classification model from Sukuna404. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Fine-tuned and quantized version of DeBERTa for 6-class emotion classification.
Downloads · 30 days
11
3% of all-time downloads
All-time downloads
347
Public
Parameters
184M
738 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors738 MB · 99%
From the Hugging Face model README
Fine-tuned and quantized version of DeBERTa for 6-class emotion classification.
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo_id = "Sukuna404/deberta-emotion-quantized-int8"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(repo_id).to("cpu")
model.eval()
def predict(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding="longest")
with torch.no_grad():
outputs = model(**inputs)
pred_id = outputs.logits.argmax().item()
return model.config.id2label[pred_id]
print(predict("I am so happy today!")) # joy