Fix T5/mT5 tests for TensorFlow
Some tests used `tf.reduce_sum()` on a per-token loss. Since we now return a scalar loss to enable XLA compilation and match PyTorch, the expected loss in these tests is wrong. If we change the tests to use `tf.reduce_mean()` and divide the expected value by the number of tokens, then the tests work with both the modern and legacy losses.
_The documentation is not available anymore as the PR was closed or merged._<|||||>@ydshieh I ran them all locally and they passed!