Views
No views yet
1import torch
2from tsfm.model.kairos import AutoModel
3
4# load model
5model = AutoModel.from_pretrained(
6 "mldi-lab/Kairos_50m", trust_remote_code=True
7)
8
9# forecasting configurations
10batch_size, context_length, prediction_length = 1, 2048, 96
11seqs = torch.randn(batch_size, context_length)
12
13prediction_length = 96
14forecast = model(
15 past_target=seqs.clone().detach().float(),
16 prediction_length=prediction_length,
17 generation=True,
18 preserve_positivity=True,
19 average_with_flipped_input=True
20)
21
22# extract the prediction results
23forecast = forecast["prediction_outputs"]
24print(forecast.shape)1@article{feng2025kairos,
2 title={Kairos: Toward Adaptive and Parameter-Efficient Time Series Foundation Models},
3 author={Feng, Kun and Lan, Shaocheng and Fang, Yuchen and He, Wenchao and Ma, Lintao and Lu, Xingyu and Ren, Kan},
4 journal={arXiv preprint arXiv:2509.25826v2},
5 year={2025}
6}