YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Multilabel Text Classification Model
This model is fine-tuned from DistilBERT for multilabel text classification.
Model Details
- Base Model: distilbert-base-uncased
- Parameters: ~774M (under 1B limit)
- Task: Multilabel Classification
- Number of Labels: 14
- Max Sequence Length: 157
Training Details
- Partial layer freezing applied
- Trained for 3 epochs
- Learning rate: 2e-5
- Batch size: 16
Usage
import torch
from transformers import DistilBertTokenizer
# Load model and tokenizer
tokenizer = DistilBertTokenizer.from_pretrained('multilabel-text-classifier')
model = torch.load('multilabel-text-classifier/pytorch_model.bin')
# Example prediction
text = "Your input text here"
inputs = tokenizer(text, return_tensors="pt", max_length=157, truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.sigmoid(outputs).numpy()
Labels
['amusement', 'anger', 'annoyance', 'caring', 'confusion', 'disappointment', 'disgust', 'embarrassment', 'excitement', 'fear', 'gratitude', 'joy', 'love', 'sadness']
- Downloads last month
- 4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support