← PyTorch learning path
PyTorch · Module 8 of 10

NLP and Transformers with PyTorch

Use Hugging Face Transformers on top of PyTorch.

📖 Key ideas

  1. Hugging Face Transformers provides thousands of PyTorch models.
  2. AutoTokenizer and AutoModel load models by name.
  3. Trainer API simplifies fine-tuning.
  4. Datasets library loads and processes text data.
  5. PEFT/LoRA fine-tunes large models cheaply.
💡 Real-life example: Hugging Face is a giant app store of pretrained language brains ready for PyTorch.
AutoTokenizerLoads matching tokenizer
AutoModelLoads a pretrained model
TrainerHigh-level training API
PEFTParameter-efficient fine-tuning