PythiloLesson 1 of 6 · progress kept in this browser

Practice in Lab: Project: Fine-tune pretrained BERT →

Download complete project source →

Project: Fine-tune pretrained BERT

Full fine-tuning updates all 4.39 million classifier parameters. The random classification head is initialized once, while the encoder starts from Google’s published BERT-Tiny weights. AdamW state is substantially larger than the exported model because each trainable parameter receives optimizer moments. This project uses real positive and negative review sentences rather than a synthetic token rule.

Your task

Update the complete pretrained encoder; select a checkpoint on validation macro-F1 and evaluate the test once. Implement run_project(output, quick=False). Follow the reference report/artifact schema; the checks run quick=True with actual pretrained weights and real data. The full dataset is the default.

This lesson uses pythilo_finetune and torch, which Python in this browser does not include. Read it here, and run and check it in the Pythilo app on iPhone or iPad.