Overview
A product classification model built for the L'Oréal and KEDGE Hackathon (Jan 2026, L'Oréal, Paris, France).
Team: 5 people. I was the team lead.
The Problem
L'Oréal gave us 6,240 labelled product descriptions. Each product is tagged with the labels it suits, out of 33 in total: skin concerns, skin type, sensitivity, age group, gender and routine step (about 4 per product). The brief: run a sustainable ML model that recreates those labels from the description text as accurately as possible.
Approach
- Fine-tuned RoBERTa-large as a multi-label classifier, with a tuned decision threshold per label
- Distilled it into DistilRoBERTa (knowledge distillation): a smaller student model trained to mimic the large teacher's predictions
- Quantised the student to INT8 for a smaller saved model
- Tracked emissions with CodeCarbon for every training run
Results
Before splitting, rare age and gender labels were oversampled, taking the 6,224 cleaned descriptions to 6,745 rows. Scores are on a 20% test split of those rows (1,349). Weighted F1 averages the per-label F1 scores, weighted by how often each label appears. Jaccard is the overlap between the predicted and true label sets for each product.
| Model | Weighted F1 | Macro F1 | Jaccard | Parameters | Saved size | Training time | Training emissions |
|---|---|---|---|---|---|---|---|
| RoBERTa-large (teacher) | 78.2% | 77.0% | 55.8% | 355M | 1,360 MB | 214 min | 0.0318 kg CO₂ |
| DistilRoBERTa (student) | 76.3% | 74.5% | 52.6% | 82M | 190 MB (INT8) | 10.9 min | 0.0011 kg CO₂ |
The student keeps 97.6% of the teacher's weighted F1 (96.8% of its macro F1) with 77% fewer parameters.
What the savings compare
- Training time (−95%) and training emissions (−96.5%) compare training the student with training the teacher. Distillation needs the teacher trained first, so these figures do not include the teacher's own 214 minutes and 0.0318 kg CO₂. Across the whole pipeline, distillation costs more to train than the teacher alone.
- Emissions were measured with CodeCarbon during each training run.
- The lasting benefit is at prediction time. The student is about 4× smaller, and 190 MB once quantised versus 1,360 MB, so every prediction needs much less compute. We didn't benchmark prediction speed during the hackathon, so there's no milliseconds-per-prediction figure here.