Distributed Trainer: 2 little fixes
1) fix DDP access to `model.config`. We could also set `self.config = model.config` earlier in `__init__`
2) switch torch.Tensor -> torch.tensor. The latter "infers the dtype automatically"
After which the command in #7460 works.



CC @patil-suraj , @TevenLeScao 
Can we see when the config is accessed (in your error message)? `model.config` should be accessed as sparsely as possible in `Trainer` to work with any kind of model and I'll probably remove the requirement entirely soon.<|||||>`Seq2SeqTrainer` uses model.config 8 times. Mostly `pad_token_id` to avoid counting padding in the loss func.<|||||>It should add an assert the model is a `PreTrainedModel` at __init__ just to be clean, then for your specific problem, it should use the function `self._actual_model()` to grab the config to avoid your error (e.g., `self.model.config` -> `self._actual_model().config`).

`Trainer` is on its way to fully handle models without config, see #7464.<|||||>OK. I reduced scope of this PR to just the `Tensor` -> `tensor`.