rlogh/superhero-texts
Viewer • Updated • 1.2k • 7
How to use ecopus/superhero-distilbert-predictor with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="ecopus/superhero-distilbert-predictor") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("ecopus/superhero-distilbert-predictor")
model = AutoModelForSequenceClassification.from_pretrained("ecopus/superhero-distilbert-predictor")This model is a fine-tuned version of distilbert-base-uncased on the superhero-texts dataset. This model maps brief descriptions of popular superheroes to their respective comic book universes.
It achieves the following results on the evaluation set:
This model is strictly intended for educational use. Do not use this model to draw real world conclusions.
This model was trained on an augmented set of 1100 synthetically generated superhero descriptions and their respective universe label. This model was validated against a set of 100 original, human curated descriptions.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 0.4148 | 1.0 | 88 | 0.2780 | 0.9489 | 0.9299 | 0.9127 | 0.9489 |
| 0.0861 | 2.0 | 176 | 0.0616 | 0.9830 | 0.9771 | 0.9721 | 0.9830 |
| 0.0227 | 3.0 | 264 | 0.0174 | 1.0 | 1.0 | 1.0 | 1.0 |
| 0.0118 | 4.0 | 352 | 0.0099 | 1.0 | 1.0 | 1.0 | 1.0 |
| 0.0074 | 5.0 | 440 | 0.0088 | 1.0 | 1.0 | 1.0 | 1.0 |
Base model
distilbert/distilbert-base-uncased