dair-ai/emotion
Viewer • Updated • 437k • 33.8k • 440
How to use Cohee/bert-base-uncased-emotion-onnx with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Cohee/bert-base-uncased-emotion-onnx") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Cohee/bert-base-uncased-emotion-onnx")
model = AutoModelForSequenceClassification.from_pretrained("Cohee/bert-base-uncased-emotion-onnx")nateraw/bert-base-uncased-emotion converted to ONNX and quantized using optimum.
bert-base-uncased finetuned on the emotion dataset using PyTorch Lightning. Sequence length 128, learning rate 2e-5, batch size 32, 2 GPUs, 4 epochs.
For more details, please see, the emotion dataset on nlp viewer.
Data came from HuggingFace's datasets package. The data can be viewed on nlp viewer.
...
val_acc - 0.931 (useless, as this should be precision/recall/f1)
The score was calculated using PyTorch Lightning metrics.