Repository navigation
Environment and Setup
- Windows 11 PowerShell / VS Code terminal
- Linux or macOS terminal
- JupyterLab / Google Colab
Python 3.11 or 3.12 is a sensible starting point. A GPU is optional. The initial model/tokenizer download requires internet access unless already cached.
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements-classifier.txt
python -m pip checkOn Linux/macOS, activate with source .venv/bin/activate instead.
The uploaded requirements.txt is preserved unchanged for provenance. It includes peft, trl, and bitsandbytes, which are not imported by this DistilBERT classifier, so requirements-classifier.txt is preferable for this application.
For a CUDA-enabled PyTorch wheel, use the official selector at https://pytorch.org/get-started/locally/ rather than assuming a generic pip install torch will provide GPU support.
python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())"Version compatibility with all future Transformers releases is not guaranteed; the source includes compatibility checks for several Trainer argument names.
Getting started
Architecture
- System Context
- High-Level Design
- Low-Level Design
- Model Components
- Training Sequence
- Data & Labels
- Tokenization
Training & results
Engineering reference