datadrivenscience/movie-genre-prediction
Viewer • Updated • 90k • 17 • 11
How to use pitangent-ds/GPT2-genre-detection with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="pitangent-ds/GPT2-genre-detection") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("pitangent-ds/GPT2-genre-detection")
model = AutoModelForSequenceClassification.from_pretrained("pitangent-ds/GPT2-genre-detection")This model is a fine-tuned version of gpt2 on the datadrivenscience/movie-genre-prediction dataset. It achieves the following results on the evaluation set:
Data-Driven Science organized a competition where in the goal was to fine tune a model that can predict the genre of a movie from a given synopsis. There were a total of 10 genres as follows:
{
"0": "horror",
"1": "adventure",
"2": "action",
"3": "crime",
"4": "mystery",
"5": "family",
"6": "scifi",
"7": "thriller",
"8": "fantasy",
"9": "romance"
}
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Matthews Correlation |
|---|---|---|---|---|---|
| 1.5765 | 1.0 | 10125 | 1.5562 | 0.4589 | 0.0899 |
| 1.5058 | 2.0 | 20250 | 1.5267 | 0.4593 | 0.1010 |
Base model
openai-community/gpt2