transformers
e54a1b49 - `model.tie_weights()` should be applied after `accelerator.prepare()` (#18676)

Comment changes are shownComment changes are hidden
Commit
2 years ago
`model.tie_weights()` should be applied after `accelerator.prepare()` (#18676) * `model.tie_weights()` should be applied after `accelerator.prepare` Weight tying should be done after the model has been moved to XLA device as mentioned on PyTorch/XLA Troubleshooting guide [here](https://github.com/pytorch/xla/blob/master/TROUBLESHOOTING.md#xla-tensor-quirks) * format code
Author
Parents
  • examples/pytorch/language-modeling
    • File
      run_mlm_no_trainer.py