Welcome to the 🤗 Optimum-TPU training guide! This section covers how to fine-tune models using Google Cloud TPUs.
See Supported Models.
Before starting the training process, ensure you have:
pip install optimum-tpu -f https://storage.googleapis.com/libtpu-releases/index.html
export PJRT_DEVICE=TPU
You can now follow one of our several example scripts to get started:
Gemma Fine-tuning:
LLaMA Fine-tuning:
We recommend fine-tuning using bf16 on TPU, as those operations are often extremely fast while keeping the training stable and precise enough.