# Different loss values for trained and saved model

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdifferent-loss-values-for-trained-and-saved-model%2F36630%3E%5C
**Category:** Beginners\
**Created:** [April 14, 2023, 9:36pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdifferent-loss-values-for-trained-and-saved-model%2F36630 "2023-04-14T21:36:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vladyorsh](https://avatars.discourse-cdn.com/v4/letter/v/ee7513/32.png) [@vladyorsh](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fvladyorsh)%5C
**Post date:** [April 14, 2023, 9:36pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdifferent-loss-values-for-trained-and-saved-model%2F36630%2F1 "2023-04-14T21:36:41Z")

</div>

I’m training a custom BERT-like model via Trainer. Whenever I load a checkpoint the model shows results barely distinguishable from random prediction (~9.5 loss versus 10.3 for random), while during training the model reaches validation loss 2.5. I have tried both to leave “greater\_is\_better” to default and set to False, but it didn’t seem to have an effect. The validation dataset is custom and randomly shuffled; however, in the debug setup (small batch size, short eval periods) the checkpoint losses seem to correspond to model ones.
