YuvarajK-g25ait2054/distilbert-goodreads-genres
08
DistilBERT Goodreads Genre Classification
Model Details
Developed by: Yuvaraj K Model type: DistilBERT for Sequence Classification Language: English Finetuned from: distilbert-base-cased Training platform: Kaggle GPU Experiment tracking: Weights & Biases
Model Description
This model is a fine-tuned DistilBERT transformer model for classifying Goodreads book reviews into genre categories.
The model was trained as part of an MLOps assignment to demonstrate an end-to-end machine learning workflow including:
- Kaggle GPU training
- experiment tracking with Weights & Biases
- model versioning with Hugging Face Hub
- reproducible project management with GitHub
DistilBERT was selected because it is lightweight, faster than full BERT, and suitable for free GPU environments while maintaining strong classification performance.
Training Results
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "YuvarajK-g25ait2054/distilbert-goodreads-genres"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "This book was amazing and full of suspense."
inputs = tokenizer(text, return_tensors="pt", truncation=True)
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=1)
print(prediction)Training Configuration
- Epochs: 3
- Batch Size: 16
- Learning Rate: 3e-5
- Weight Decay: 0.01
- Warmup Steps: 100
Intended Use
This model is intended for educational demonstration of MLOps workflows and text classification tasks.
Limitations
- Trained on a limited assignment dataset
- Performance may vary on unseen review domains
- Not intended for production deployment without further validation
