Skip to content

Commit

Permalink
test 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Cemberk committed Oct 10, 2024
1 parent 017b758 commit cea9253
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/pytorch/translation/run_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def main():
model_args.config_name if model_args.config_name else model_args.model_name_or_path,
cache_dir=model_args.cache_dir,
revision=model_args.model_revision,
#use_auth_token=True if model_args.use_auth_token else None,
use_auth_token=True if model_args.use_auth_token else None,
ort=True if training_args.ort else None,
token=model_args.token,
trust_remote_code=model_args.trust_remote_code,
Expand Down
6 changes: 3 additions & 3 deletions src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2495,9 +2495,9 @@ def _inner_training_loop(

# add remaining tr_loss
self._total_loss_scalar += tr_loss.item()
#effective_global_step = max(self.state.global_step, 0.001) # Avoid ZeroDivisionError
#train_loss = self._total_loss_scalar / effective_global_step
train_loss = self._total_loss_scalar / self.state.global_step
effective_global_step = max(self.state.global_step, 0.001) # Avoid ZeroDivisionError
train_loss = self._total_loss_scalar / effective_global_step
#train_loss = self._total_loss_scalar / self.state.global_step


metrics = speed_metrics("train", start_time, num_samples=num_train_samples, num_steps=self.state.max_steps,num_tokens=num_train_tokens,)
Expand Down
3 changes: 0 additions & 3 deletions src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ class TrainingArguments:
Use [Deepspeed](https://github.com/microsoft/deepspeed). This is an experimental feature and its API may
evolve in the future. The value is either the location of DeepSpeed json config file (e.g.,
`ds_config.json`) or an already loaded json file as a `dict`"
<<<<<<< HEAD
<Tip warning={true}>
If enabling any Zero-init, make sure that your model is not initialized until
Expand Down Expand Up @@ -600,8 +599,6 @@ class TrainingArguments:
If `True`, an `Accelerator` or `PartialState` must be initialized. Note that by doing so, this could lead to issues
with hyperparameter tuning.
=======
>>>>>>> origin/main_old
ortmodule (:obj:`bool`, `optional`):
Use `ORTModule <https://github.com/microsoft/onnxruntime>`__.
label_smoothing_factor (`float`, *optional*, defaults to 0.0):
Expand Down

0 comments on commit cea9253

Please sign in to comment.