What problem does it solve? Working with transformer models involves many error-prone details: choosing the right architecture, configuring tokenization correctly, fitting models into GPU memory, and optimizing inference for production. This Skill provides tested patterns for the entire Hugging Face Transformers workflow so you avoid common pitfalls like CUDA out-of-memory errors, missing attention masks, and slow tokenization. ## Core Features & Use Cases - Model Loading & Tokenization: Load pre-trained models (BERT, GPT, T5, LLaMA) with correct padding, truncation, quantization (4-bit/8-bit via BitsAndBytes), and special token handling. - Fine-Tuning Workflows: Full fine-tuning with the Trainer API, parameter-efficient LoRA tuning with PEFT, and custom PyTorch training loops with schedulers. - Inference Optimization & Deployment: Batch processing, mixed precision, ONNX export, dynamic quantization, and FastAPI serving patterns. - Use Case: You need to fine-tune a sentiment classifier on 5,000 labeled reviews with a single GPU. Use the LoRA pattern with 8-bit quantization to train without OOM errors, then export to ONNX for faster production inference. ## Quick Start Ask the agent to fine-tune a BERT model for text classification on your dataset using the Hugging Face Trainer with proper tokenization and evaluation metrics.