Repository navigation
Overview
Sudhanshu Shukla edited this page Nov 12, 2026
·
2 revisions
The repository teaches practical Hugging Face sequence classification with a small, labelled customer-support dataset. Implemented: a four-label DistilBERT classifier, full and frozen-backbone training, validation metrics, and prediction helpers.
- Set a deterministic seed and choose CPU/CUDA.
- Build
RAW_DATAandLABEL2ID/ID2LABEL. - Perform a stratified train/validation split.
- Construct a
DatasetDict; tokenize using the pretrained tokenizer. - Configure
DataCollatorWithPaddingandTrainer. - Run full fine-tuning; evaluate, save the best model and tokenizer, and classify test queries.
- Reload a fresh pretrained model, freeze its
distilbertmodule, and train the classification head as a separate comparison.
Python · PyTorch · transformers · datasets · scikit-learn · numpy · pandas · Jupyter/Colab.
See limitations for safe next steps.
Getting started
Architecture
- System Context
- High-Level Design
- Low-Level Design
- Model Components
- Training Sequence
- Data & Labels
- Tokenization
Training & results
Engineering reference