Skip to content

Overview

Sudhanshu Shukla edited this page Nov 12, 2026 · 2 revisions

Project overview

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.

Training lifecycle

  1. Set a deterministic seed and choose CPU/CUDA.
  2. Build RAW_DATA and LABEL2ID / ID2LABEL.
  3. Perform a stratified train/validation split.
  4. Construct a DatasetDict; tokenize using the pretrained tokenizer.
  5. Configure DataCollatorWithPadding and Trainer.
  6. Run full fine-tuning; evaluate, save the best model and tokenizer, and classify test queries.
  7. Reload a fresh pretrained model, freeze its distilbert module, and train the classification head as a separate comparison.

Technologies

Python · PyTorch · transformers · datasets · scikit-learn · numpy · pandas · Jupyter/Colab.

See limitations for safe next steps.

Clone this wiki locally