Views
No views yet
timesfm-2.5-200mtimesfm-2.5-200m is the third open model checkpoint.timesfm-2.5-200m is pretrained usingpip install from PyPI coming soon. At this point, please run1git clone https://github.com/google-research/timesfm.git
2cd timesfm
3pip install -e .1import numpy as np
2import timesfm
3model = timesfm.TimesFM_2p5_200M_torch.from_pretrained("google/timesfm-2.5-200m-pytorch", torch_compile=True)
4
5model.compile(
6 timesfm.ForecastConfig(
7 max_context=1024,
8 max_horizon=256,
9 normalize_inputs=True,
10 use_continuous_quantile_head=True,
11 force_flip_invariance=True,
12 infer_is_positive=True,
13 fix_quantile_crossing=True,
14 )
15)
16point_forecast, quantile_forecast = model.forecast(
17 horizon=12,
18 inputs=[
19 np.linspace(0, 1, 100),
20 np.sin(np.linspace(0, 20, 67)),
21 ], # Two dummy inputs
22)
23point_forecast.shape # (2, 12)
24quantile_forecast.shape # (2, 12, 10): mean, then 10th to 90th quantiles.