Text Classification
Transformers
Safetensors
English
distilbert
fashion
product-categorization
indian-ecommerce
text-embeddings-inference
Instructions to use roaringguts/DistilBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use roaringguts/DistilBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="roaringguts/DistilBERT")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("roaringguts/DistilBERT") model = AutoModelForSequenceClassification.from_pretrained("roaringguts/DistilBERT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,899 Bytes
3bb9495 994c0fb 3bb9495 994c0fb 3bb9495 b8861dc 994c0fb 3bb9495 a12c813 3bb9495 a12c813 994c0fb 3bb9495 994c0fb 1baebaa 994c0fb 3bb9495 994c0fb 3bb9495 994c0fb 3bb9495 994c0fb 3bb9495 994c0fb 3bb9495 994c0fb a12c813 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ---
license: cc-by-4.0
base_model: distilbert-base-uncased
library_name: transformers
tags:
- text-classification
- fashion
- product-categorization
- indian-ecommerce
language:
- en
---
# Fashion Category Classifier
DistilBERT fine-tuned to classify Indian fashion product titles into 11 categories.
## Credits
Built on [DistilBERT](https://huggingface.co/distilbert/distilbert-base-uncased) by Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf (Hugging Face), licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
## Labels
`Tops` `Bottoms` `Dresses` `Outerwear` `Footwear` `Bags` `Jewellery` `Ethnicwear` `Activewear` `Innerwear` `Headwear`
## Usage
```python
from transformers import pipeline
clf = pipeline("text-classification", model="roaringguts/DistilBERT")
clf("Nike Dry Fit Running Tshirt")
# [{'label': 'Activewear', 'score': 0.99}]
# batch
clf(["Lavie Women Tote Bag", "Malabar Gold Plated Necklace", "Clarks Oxford Shoes"])
```
## Training
- **Base model:** `distilbert-base-uncased`
- **Dataset:** ~63k real product titles from Myntra + synthetic samples generated for underrepresented categories
- **Split:** 80/10/10 train/val/test, stratified
- **Epochs:** 5 (early stopping, patience 2)
- **Batch size:** 64
- **Learning rate:** 3e-5
- **Precision:** fp16
## Evaluation
Evaluated on a held-out stratified test set.
| Metric | Score |
|--------|-------|
| Accuracy | **99.27%** |
## Limitations
- Trained on Indian e-commerce titles — may underperform on Western brand naming conventions
- Ethnicwear and Innerwear have some overlap (e.g. sports bras vs regular bras)
- Low sample count for Bags and Headwear in original data, partially filled with synthetic titles
## License
This model is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). The base DistilBERT weights it derives from are licensed under Apache 2.0. |