Downloads · 30 days
11
38% of all-time downloads
leixiang25/hw2-perfume-occasion-distilbert
hw2-perfume-occasion-distilbert is a text classification model from leixiang25. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as cc-by-4.0.
Predicts the occasion a perfume suits — everyday, going out, formal, casual-relaxed — from a short English description of its notes and character. Built for CMU 24-679 Homework 2 to practice fine-tuning. Labels reflec…
Downloads · 30 days
11
38% of all-time downloads
All-time downloads
29
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
Predicts the occasion a perfume suits — everyday, going out, formal, casual-relaxed — from a short
English description of its notes and character. Built for CMU 24-679 Homework 2 to practice fine-tuning.
Labels reflect one person's opinion; not a perfume recommender.
ypolatog.split.json (reused by the Problem 4 prompting comparison).DistilBERT uncased tokenizer, truncation at 96 tokens, dynamic padding. No other cleaning.
distilbert-base-uncased + new 4-way classification head; full fine-tuning.| Model | Accuracy | Macro-F1 |
|---|---|---|
| Majority class | 0.280 | – |
| TF-IDF + logistic regression | 0.680 | 0.494 |
| DistilBERT (this model) | 0.560 | 0.428 |
Confusion matrix and per-class metrics are in the training notebook. One test text ≈ 4 accuracy points, so differences of a few points are within noise.
formal texts; synthetic copies add typos, not new meaning.going out), and many texts share the opening "Prominent notes…"; the model may rely on these.from transformers import pipeline
clf = pipeline("text-classification", model="leixiang25/hw2-perfume-occasion-distilbert")
clf("Prominent notes of iris and saffron. Elegant and refined, suits evening events.")
Google Colab, NVIDIA T4 GPU, a few minutes of training.
Code and this card were drafted with Claude (Anthropic) and reviewed, run, and interpreted by the author.
Dataset by ypolatog (CMU 24-679, Fall 2026). Base model by Hugging Face (DistilBERT, Apache-2.0).