15
Cross-Validation
Cross-validation is a statistical technique used to assess how well a machine learning model generalizes to unseen data. It involves partitioning a dataset into multiple subsets or “folds,” training the model on some of these subsets while testing it on the remaining ones. This process is repeated to ensure a reliable performance estimate. This helps detect overfitting and provides a more robust evaluation than a single train-test split. In the context of LLMs, cross-validation must be adapted to address the complexities of pre-training, fine-tuning, few-shot learning, and domain generalization, making it an essential tool for evaluating model performance across varied tasks and data distributions.
In this chapter, you will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access