Doing the loss reduction in foundry instead of in the loss functions. (#1079)
* setting loss_fn reduction to None
* fixing a unit test
* add error message
* adding test to check reduction
* adding test to check reduction
* Update llmfoundry/models/mpt/modeling_mpt.py
Co-authored-by: Vitaliy Chiley <6439018+vchiley@users.noreply.github.com>
* preserving batch dimension of targets
* minor change
---------
Co-authored-by: Vitaliy Chiley <6439018+vchiley@users.noreply.github.com>
Co-authored-by: Daniel King <43149077+dakinggg@users.noreply.github.com>