LLM Learning Hub

workspace/llm-course/home

Validation Loss

Validation loss is the loss computed on a held-out validation set, used to monitor generalisation and detect overfitting when training loss keeps decreasing but validation loss rises.

What is Validation Loss?

Validation loss is the loss computed on a held-out validation set, used to monitor generalisation and detect overfitting when training loss keeps decreasing but validation loss rises.

Validation loss is the loss computed on a held-out validation set, used to monitor generalisation and detect overfitting when training loss keeps decreasing but validation loss rises.

Where is it used?

Hugging Face `Trainer` with `eval_dataset` reports validation loss each epoch; early stopping callbacks trigger when validation loss stops improving.

How to build it

Pass `eval_dataset` to `Trainer`, set `eval_strategy="epoch"`, and monitor `eval_loss` in `wandb`; enable `EarlyStoppingCallback(early_stopping_patience=3)` to halt on overfit.