Hi, it's Ivo.
What you need first
- A Google account. Google Colab runs in the browser and Google says it's free of charge to use (with usage limits).
- One number you count every month: sales, orders, bookings, visitors. Plain numbers, oldest month first.
- At least 12 months of history. 24 is better, because then the model sees each season twice.
The 3 copy-paste Colab cells
Go to colab.research.google.com and click New notebook. Each block below goes into its own cell. Click into a cell, paste, then press the play button (or Shift + Enter). Run them in order.
- Cell 1: install TimesFM. It takes a minute or two.
python
!pip install -q timesfm
If Colab says Restart session, click it, then go on with cell 2.
- Cell 2: your numbers. Replace the sample numbers with yours, oldest month first, separated by commas. No currency signs, no spaces inside a number.
months_aheadis how far you want to look.
python
sales = [
8120, 7640, 8705, 9310, 10450, 12980,
14210, 13870, 10920, 9450, 8730, 11890,
8540, 8010, 9120, 9880, 11020, 13650,
15010, 14430, 11380, 9820, 9100, 12470,
]
months_ahead = 3
- Cell 3: the forecast. The first run downloads the model from Hugging Face (about 900 MB), so give it a few minutes. A yellow warning about
HF_TOKENis normal; you can ignore it.
```python import numpy as np import timesfm import matplotlib.pyplot as plt
model = timesfm.TimesFM_2p5_200M_torch.from_pretrained("google/timesfm-2.5-200m-pytorch") model.compile(timesfm.ForecastConfig( max_context=1024, max_horizon=256, normalize_inputs=True, use_continuous_quantile_head=True, force_flip_invariance=True, infer_is_positive=True, fix_quantile_crossing=True, ))
point, quantiles = model.forecast(horizon=months_ahead, inputs=[np.array(sales, dtype=float)]) best = point[0] low = quantiles[0, :, 1] # 10% line high = quantiles[0, :, 9] # 90% line
for i in range(months_ahead): print(f"Month +{i+1}: about {best[i]:,.0f} (likely between {low[i]:,.0f} and {high[i]:,.0f})")
n = len(sales) plt.figure(figsize=(9, 4)) plt.plot(range(n), sales, label="your history") plt.plot(range(n - 1, n + months_ahead), [sales[-1], *best], "--", label="forecast") plt.fill_between(range(n, n + months_ahead), low, high, alpha=0.3, label="likely range") plt.legend() plt.show() ```
With the sample numbers above, our test run on 24 Oct 2026 printed:
Month +1: about 9,035 (likely between 8,386 and 9,739)
Month +2: about 8,643 (likely between 7,908 and 9,405)
Month +3: about 9,831 (likely between 9,049 and 10,707)
Your own numbers will give different results.
How to read the range
- "About" is the model's best guess for that month.
- "Likely between" is the 10% line and the 90% line. Most months, the real number should land between them.
- The range gets wider the further ahead you look. Month 3 is less certain than month 1. That's normal.
- Plan between the two lines. The low line is the month you should be ready to survive; the high line is the busy month you'd want stock and people for.
- Test it on your own past first. Delete your last 3 months from cell 2, run it, and compare the forecast with what really happened. If it was far off, trust it less.
When not to trust it
- Promotions and price changes. It only sees your history. It doesn't know about next month's offer.
- New products. No history, no line to continue.
- One-off events. A closure, a renovation, a new competitor. The model doesn't know unless your numbers show it.
- Very short history. A few months can't show a season.
It's a guide for planning. It is not financial advice, and it doesn't replace your own judgment or your accountant.
The license check
- The TimesFM code on GitHub is Apache-2.0, and the README says the open version is not an officially supported Google product.
- Version 2.5 (the one in cell 3,
google/timesfm-2.5-200m-pytorch): the weights are Apache-2.0, so you can use them for your business. - Version 3.0 (the newest, August 2026): the downloadable weights are under a non-commercial license. It says the results can't be used in commercial decision-making. Planning your stock or your staff with it doesn't fit that.
- Business use of 3.0 is allowed through Google Cloud (BigQuery ML, and Connected Sheets on top of it). That's a different, paid path.
As of October 2026. Libraries change, so if a cell breaks, check the TimesFM README.
Sources: github.com/google-research/timesfm (README, license notice) · huggingface.co/google/timesfm-2.5-200m-pytorch (Apache-2.0) · huggingface.co/google/timesfm-3.0-pytorch (TimesFM Non-Commercial License v1.0) · research.google.com/colaboratory/faq.html