Step 5 of 8

Hyperparameter tuning

Sweep λ presets × k values on the validation set and pick the configuration with the lowest perplexity.

You need a training and validation split first. Split the corpus.

Experiment table

Includes your current LM2 settings plus presets: 20 configurations.

Click Run sweep to populate.

Perplexity vs k

Average across λ presets. Lower is better.

Run sweep to see chart