A pretrained model that forecasts series it has never seen

TimesFM is Google Research’s foundation model for time-series forecasting. The pitch is the same one that LLMs made for text. You load one pretrained network and ask it for a forecast on data it never saw during training, which saves the per-series model fitting that classical forecasting needs. Point it at a sales curve, a sensor stream, or a demand history, give it the recent context, and it returns a forecast plus quantiles. The architecture is decoder-only, described in the ICML 2024 paper “A decoder-only foundation model for time-series forecasting.”

It has climbed past 22,000 stars as of 2026-06, with roughly 2,200 forks. That puts it well ahead of the other open time-series foundation models on GitHub, which matters less for accuracy than for the size of the example pool and the speed of community fixes.

Why it is worth a look now

Classical forecasting (ARIMA, Prophet, gradient-boosted features) needs a model trained for each series and re-tuned as data drifts. TimesFM moves that work to pretraining: the zero-shot baseline often lands close to models that were trained on the target series, which is enough to skip the per-series fitting for a first pass. The September 2025 release of TimesFM 2.5 is the version most new users should start from. It cut parameters to 200M from the previous 500M, raised the context window to 16k points from 2048, and added an optional 30M quantile head for continuous quantile forecasts out to a 1k horizon. It also dropped the frequency indicator that older versions required you to set by hand.

What you actually get

  • Zero-shot point forecasts plus quantile forecasts (the 10th through 90th percentiles), so you get an uncertainty band around each forecast.
  • Context up to 16k time steps in 2.5, which covers long daily or hourly histories without truncation.
  • Covariate support through XReg, added back for 2.5 in the October 2025 update, for feeding known regressors alongside the target series.
  • Two backends in one package: PyTorch and Flax (JAX). A Flax build was added for faster inference.
  • Production paths outside the repo: Google ships TimesFM inside BigQuery ML, Connected Sheets, and Vertex Model Garden, so a team already on Google Cloud can call it without managing checkpoints.

Install

The package is on PyPI and pulls the backend you ask for:

# PyTorch backend
pip install timesfm[torch]
# or the Flax (JAX) backend
pip install timesfm[flax]
# add covariate support
pip install timesfm[xreg]

For a local checkout the README uses uv:

git clone https://github.com/google-research/timesfm.git
cd timesfm
uv venv && source .venv/bin/activate
uv pip install -e .[torch]

One version detail trips people up. The PyPI package version and the model version are not the same number. The June 2026 PyPI release is timesfm 2.0.0, but that library loads the TimesFM 2.5 model checkpoints from Hugging Face. The older 1.0 and 2.0 model weights live in the v1 subdirectory, and you load them by pinning the package to timesfm==1.3.0. So “which version” has two answers, library and weights, and they move on separate tracks.

Quick start

import numpy as np
import timesfm

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,
    )
)
point_forecast, quantile_forecast = model.forecast(
    horizon=12,
    inputs=[np.linspace(0, 1, 100), np.sin(np.linspace(0, 20, 67))],
)
point_forecast.shape  # (2, 12)

You compile once with a ForecastConfig, then call forecast with a horizon and a list of input arrays. Backends install separately: pick a PyTorch or JAX build for your hardware, with CPU, GPU, TPU, and Apple Silicon all on the table.

Where it fits, and where it does not

Reach for TimesFM when you want a strong baseline across many series without training a model for each one, when an uncertainty band matters more than a single point, and when “good enough zero-shot, today” beats “optimal after a week of tuning.” The Apache-2.0 license clears commercial use.

Be careful in three situations. The repo states plainly that this open version is not an officially supported Google product, so treat it as research code with no SLA. Finance is the place to be most skeptical: the issue tracker shows steady interest in stock and trading use, but a model pretrained on broad time-series corpora has no edge on near-random-walk price returns, and a confident-looking forecast there is mostly noise dressed as signal. And if your problem has strong known drivers (say promotions or holidays), the covariate path through XReg is newer and less battle-tested than the plain univariate forecast, so validate it before trusting it.

TimesFM versus the other forecasting foundation models

TimesFMChronosMoirai (uni2ts)TimeGPT (Nixtla)
Stars22,6655,4791,5243,930
LicenseApache-2.0Apache-2.0Apache-2.0hosted API
BackersGoogle ResearchAmazon ScienceSalesforceNixtla
Weightsopenopenopenclosed, API only
Angledecoder-only, long contextT5-based, tokenized valuesmasked encoder, any-variatemanaged endpoint

Counts are from GitHub as of June 2026. Chronos reframes values as tokens and runs them through a T5-style model. Moirai (the uni2ts repo) takes a masked-encoder route. TimeGPT is a hosted API rather than open weights, so you trade self-hosting for a managed endpoint and a usage bill. TimesFM’s distinct position is the combination of fully open weights, the largest community, and the long 16k context in 2.5.

The star curve

The curve shows a steady climb since the April 2024 launch, with the slope picking up around the 2.5 release in late 2025 when the PyTorch path and longer context landed. That shape fits a research model that data teams adopted deliberately as it became easier to run.

What the issue tracker warns you about

Two pitfalls are worth knowing before you build on it. First, forecast isolation: issue #274 reports that forecast_with_covariates can return different results for the same input depending on which other series are batched with it. That breaks backtesting, where each window must be evaluated independently, so forecast one input at a time or pin your batch layout if you rely on covariates. Second, install friction has a history. The early JAX/praxis/lingvo dependency stack caused conflicts (issue #1) and a wave of “so many errors” reports (issue #23); the 2.5 PyTorch path is much smoother, so prefer it on a fresh setup. Fine-tuning was the other long-standing ask (issues #14, #119, #327), and an example using Hugging Face Transformers plus PEFT (LoRA) landed in April 2026, so out-of-the-box fine-tuning is now a documented path rather than a request.

For ML quant research that you would feed forecasts into, see microsoft/qlib. For LLM-driven trading and finance projects, see ai-hedge-fund and FinGPT. The LoRA fine-tuning path runs through huggingface/transformers. For the wider ML tooling landscape, see trending LLM tooling, and for what is climbing now, the daily digest and weekly report.

FAQ

Is TimesFM free and open source? Yes. The code and the model weights are released under Apache-2.0, which allows commercial use. The repo notes that this open version is not an officially supported Google product, so there is no support guarantee.

Which version should I install, 2.0 or 2.5? Use the 2.5 model, which is the current release and loads with the latest PyPI package (timesfm 2.0.0, a library version number that differs from the model number). For the older 1.0 or 2.0 weights, pin the package to timesfm==1.3.0 and use the v1 code.

Is TimesFM good for stock or financial forecasting? Interest is high in the issue tracker, but be skeptical. Asset price returns are close to a random walk, and no general forecasting model has a real edge there. It is more credible for demand, traffic, sensor, and operational series than for predicting markets.

TimesFM vs Chronos vs TimeGPT, which should I pick? TimesFM gives open weights, the largest community, and 16k context. Chronos (Amazon) tokenizes values through a T5-style model and is also open. TimeGPT (Nixtla) is a hosted API, so you avoid self-hosting in exchange for a usage bill. Pick by whether you need open weights or a managed endpoint.

Does it run on CPU or Apple Silicon? Yes. You install a PyTorch or JAX backend that matches your hardware, and CPU, GPU, TPU, and Apple Silicon are all supported. A GPU helps for long contexts and large batches but is not required for a single forecast.

Can I fine-tune TimesFM on my own data? Yes. A fine-tuning example using Hugging Face Transformers and PEFT (LoRA) was added in April 2026, so adapting the pretrained model to a specific domain is now a documented workflow.