17,19c17,18
< Fine-tuning the library models for masked language modeling (BERT, ALBERT, RoBERTa...) on a text file or a dataset.
< 
< Here is the full list of checkpoints on the hub that can be fine-tuned by this script:
---
> Training the library models for masked language modeling (BERT, ALBERT, RoBERTa...) on a text file or a dataset.
> Here is the full list of checkpoints on the hub that can be trained by this script:
34,35d32
< from datasets import load_dataset
< 
36a34
> from datasets import load_dataset
45,48d42
<     Trainer,
<     TrainingArguments,
<     is_torch_tpu_available,
<     set_seed,
53a48,50
> from optimum.habana import GaudiConfig, GaudiTrainer, GaudiTrainingArguments
> from optimum.habana.utils import set_seed
> 
56c53
< check_min_version("4.29.0.dev0")
---
> check_min_version("4.28.0")
209c206
<     streaming: bool = field(default=False, metadata={"help": "Enable streaming mode"})
---
>     streaming: bool = field(default=False, metadata={"help": "Enable streaming mode."})
233c230
<     parser = HfArgumentParser((ModelArguments, DataTrainingArguments, TrainingArguments))
---
>     parser = HfArgumentParser((ModelArguments, DataTrainingArguments, GaudiTrainingArguments))
262a260,266
>     gaudi_config = GaudiConfig.from_pretrained(
>         training_args.gaudi_config_name,
>         cache_dir=model_args.cache_dir,
>         revision=model_args.model_revision,
>         use_auth_token=True if model_args.use_auth_token else None,
>     )
> 
265,266c269,271
<         f"Process rank: {training_args.local_rank}, device: {training_args.device}, n_gpu: {training_args.n_gpu}"
<         + f"distributed training: {bool(training_args.local_rank != -1)}, 16-bits training: {training_args.fp16}"
---
>         f"Process rank: {training_args.local_rank}, device: {training_args.device}, "
>         + f"distributed training: {bool(training_args.local_rank != -1)}, "
>         + f"mixed-precision training: {gaudi_config.use_habana_mixed_precision}"
268d272
<     # Set the verbosity to info of the Transformers logger (on main process only):
588c592
<     trainer = Trainer(
---
>     trainer = GaudiTrainer(
589a594
>         gaudi_config=gaudi_config,
595,598c600,601
<         compute_metrics=compute_metrics if training_args.do_eval and not is_torch_tpu_available() else None,
<         preprocess_logits_for_metrics=preprocess_logits_for_metrics
<         if training_args.do_eval and not is_torch_tpu_available()
<         else None,
---
>         compute_metrics=compute_metrics if training_args.do_eval else None,
>         preprocess_logits_for_metrics=preprocess_logits_for_metrics if training_args.do_eval else None,
651,655d653
< 
< 
< def _mp_fn(index):
<     # For xla_spawn (TPUs)
<     main()
