~/talk

Getting Started with Pytorch 2.0 and Hugging Face Transformers

Talkat PyTorch Conference 2023 · 2023-10-16..10-17· [machine-learning, python]
slides:none on file

Fine-tunes BERT-base-uncased on Banking77 (13k examples, 77 classes) using Hugging Face Transformers and shows that flipping one flag plus a faster optimizer yields big gains: set torch.compile true and use the fused Adam optimizer to run on NVIDIA A10 on AWS and drop training from 696s to ~475s (≈41% faster), raise throughput from ~30 to ~65.5 samples/s, and produce a slightly higher eval F1 (~93%), with identical code otherwise.

AI-written summary · about

  1. 0:00Introduction
  2. 1:25Session goals and agenda
  3. 2:07PyTorch 2.0 new features
  4. 3:54How TorchCompile works
  5. 4:59PyTorch 2.0 performance
  6. 5:41Hugging Face ecosystem
  7. 7:48Hugging Face Hub and datasets
  8. 8:51Fine-tuning setup
  9. 10:16Dataset loading and prep
  10. 11:21Text tokenization and processing
  11. 12:24Mapping labels
  12. 13:07Training evaluation metrics
  13. 13:50PyTorch 2.0 with Trainer
  14. 14:52Training arguments
  15. 16:18Training loop
  16. 17:02PyTorch 1.13 vs 2.0 performance
  17. 18:49PyTorch 2.0 in HF libraries
  18. 19:52Closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.