Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion optimum/habana/transformers/models/detr/modeling_detr.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def gaudi_DetrConvModel_forward(self, pixel_values, pixel_mask):
"""
Copied from modeling_detr: https://github.com/huggingface/transformers/blob/main/src/transformers/models/detr/modeling_detr.py#L398
The modications are:
The modifications are:
- Use CPU to calculate the position_embeddings and transfer back to HPU
"""

Expand Down
2 changes: 1 addition & 1 deletion optimum/habana/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ def _maybe_log_save_evaluate(self, tr_loss, _grad_norm, model, trial, epoch, ign
tr_loss -= tr_loss
logs["loss"] = round(tr_loss_scalar / (self.state.global_step - self._globalstep_last_logged), 4)

# This grad_norm block was outside of _maybe_log_save_evaluate method causing perf degradataion.
# This grad_norm block was outside of _maybe_log_save_evaluate method causing perf degradation.
# Moving it here so the grad tensor is only copied when it's needed.
if self.accelerator.distributed_type == GaudiDistributedType.DEEPSPEED:
grad_norm = model.get_global_grad_norm()
Expand Down
4 changes: 2 additions & 2 deletions optimum/habana/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class GaudiTrainingArguments(TrainingArguments):
non_blocking_data_copy (`bool`, *optional*, defaults to `False`):
Whether to enable async data copy when preparing inputs.
profiling_warmup_steps (`int`, *optional*, defaults to 0):
Number of steps to ignore for profling.
Number of steps to ignore for profiling.
profiling_steps (`int`, *optional*, defaults to 0):
Number of steps to be captured when enabling profiling.
"""
Expand Down Expand Up @@ -235,7 +235,7 @@ class GaudiTrainingArguments(TrainingArguments):

profiling_warmup_steps: Optional[int] = field(
default=0,
metadata={"help": ("Number of steps to ignore for profling.")},
metadata={"help": ("Number of steps to ignore for profiling.")},
)

profiling_steps: Optional[int] = field(
Expand Down