You are viewing v1.7.3 version.
A newer version
v1.19.0 is available.
Single-HPU Training
Training on a single device is as simple as in Transformers:
- You need to replace the Transformers’
Trainer
class with theGaudiTrainer
class, - You need to replace the Transformers’
TrainingArguments
class with theGaudiTrainingArguments
class and add the following arguments:use_habana
to execute your script on an HPU,use_lazy_mode
to use lazy mode or not (i.e. eager mode),gaudi_config_name
to give the name of (Hub) or the path to (local) your Gaudi configuration file.
You can find several examples in the official repository for the following tasks:
- language modeling,
- question answering,
- summarization,
- text classification,
- translation,
- image classification,
- audio classification,
- speech recognition,
- contrastive image-text training.
To go further, we invite you to read our guides about accelerating training and pretraining.