
Introducing Best Fit
December 10, 2024Faster Training — Same Great Quality!
Speed is a top priority when it comes to training your models. “Best Fit” is a new feature designed to save you time and our compute resources. When you toggle “Best Fit” on, we run an early stopping algorithm to determine the optimal number of epochs for your model. This means you can train your models faster and with the same accuracy.
We monitor the validation loss and perform early stopping when it stops decreasing over a certain number of epochs. This enables us to stop training when your model has converged and ensures that it is not overfitting to the training data.
Overfitting means creating a model that matches (memorizes) the training set so closely that the model fails to make correct predictions on new data.
We ran a series of tests on a variety of models trained on TONE3000 to determine if and when validation loss stopped decreasing. We also monitored training loss to measure if the models were overfitting past this point (training loss decreasing while validation loss was increasing).
Above is an example graph showing the validation and training loss of a model trained with 1,000 epochs. The marker on the graph indicates the optimal number of epochs determined by early stopping. From our tests, we were able to determine a conservative patience value (number of epochs to wait before stopping) that works well for all models.
Using “Best Fit,” we were able to re-run the tests, stopping training early while still maintaining the same level of accuracy (ESR) as models trained with a fixed number of epochs.
Example training with and without Best Fit enabled:
- Without Best Fit: 1000 epochs, ESR = 0.00063, 19 min
- With Best Fit: Early stopping at 712 epochs, ESR = 0.00063, 13 min
Result: Training time reduced by 6 minutes (32%) while maintaining the same accuracy!