Going further
Fine-tuning
If your series follow patterns of their own, such as your promotions or paydays, tune adapts the model to your
history. It takes seconds to a few minutes on a CPU, and the original model is left unchanged.
tuned = model.tune(df, h=7)tuned.report # how the tune did on your held-out historyfc = tuned.forecast(df, h=7)How it works
Section titled “How it works”- The last
hsteps of each series are held out. - Small adapters are trained on the rest of your history, with the pretrained weights frozen.
- The tuned model is kept only if it forecasts the held-out steps better than the pretrained model, by 2% by default. Otherwise you get the pretrained model back, with a warning.
- The tune is then retrained on the whole history and merged into a copy of the weights, so a tuned model forecasts as fast as the original.
Options
Section titled “Options”- h: the horizon you will forecast; it is also the length of the held-out part.
- steps: training steps (default 300).
- min_gain: how much better the tune must be on the held-out steps to be kept (default 0.02).
- preset, cross_series: the forecast settings the tune is checked with. Use the ones you will forecast with.
- past, known and the column names work as in
forecast.
The report
Section titled “The report”tuned.report says whether the tune was kept (used), the held-out loss and WAPE of the pretrained and the tuned
model, how many steps were kept, and how long it took.
Save and load
Section titled “Save and load”tuned.save("my-tuned/")model = ChakraTS.from_pretrained("my-tuned/")The folder holds the weights, the config and the model’s license files. A tuned model stays under the license of the
model it was tuned from, and save writes a notice saying it was modified.

