TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
google/timesfm-3.0-pytorch.This open version is not an officially supported Google product.
Latest Model Version: TimesFM 3.0
Archived Model Versions:
src/timesfm.v1. You can pip install timesfm==1.3.0 to install an older version of this package to load
them.TimesFM 3.0 is out!
TimesFM 3.0 introduces native multivariate time-series forecasting, flexible covariate support (both past-only and past-and-future covariates), superior zero-shot generalist capabilities, and top performance across all three major time-series foundation model benchmarks.
Important: The TimesFM source code in this repository is licensed under Apache-2.0, and model weights up to version 2.5 remain Apache-2.0. However, for the time being, TimesFM 3.0 pretrained weights are distributed under the separate
timesfm-non-commercial-license-v1.0license and are restricted to non-commercial, non-production use. Commercial or production use of the default pretrained weights is not permitted.
Updated PyPI to timesfm=2.0.2. See
Install.
Added fine-tuning example using HuggingFace Transformers + PEFT (LoRA) — see
timesfm-forecasting/examples/finetuning/.
Also added unit tests (tests/) and incorporated several community fixes.
Shoutout to @kashif and @darkpowerxo.
Huge shoutout to @borealBytes for adding the support for AGENTS! TimesFM SKILL.md is out.
Added back the covariate support through XReg for TimesFM 2.5.
TimesFM 2.5 is out!
Comparing to TimesFM 2.0, this new 2.5 model:
frequency indicator.Since the Sept. 2025 launch, the following improvements have been completed for TimesFM 2.5:
timesfm-forecasting/).timesfm-forecasting/examples/finetuning/).tests/).PyPI# Install TimesFM with PyTorch
pip install timesfm[torch]
# Or, for MLX-native inference on Apple silicon (no PyTorch required)
pip install timesfm[mlx]
Clone the repository:
git clone https://github.com/google-research/timesfm.git
cd timesfm
Create a virtual environment and install with PyTorch:
# Using uv
uv venv
source .venv/bin/activate
# Install the package in editable mode with torch
uv pip install -e .[torch]
Pass a batch of 1D NumPy arrays of different context lengths to forecast univariate time series:
…
An MLX-native backend runs TimesFM 3.0 on Apple silicon without PyTorch. It mirrors the PyTorch
TimesFM3Forecaster interface (predict / predict_batch, univariate or multivariate, with
past-only and past-future covariates) and is numerically matched to it on
google/timesfm-3.0-pytorch. Median forecast / quantile max abs error, context 512: 9.5e-7 /
1.8e-6 at horizon 64, 2.3e-6 / 2.7e-6 at horizon 128 (longer horizons stitch multiple output
patches, so they are worth checking on their own).
import numpy as np
from timesfm3.mlx import TimesFM3Forecaster
forecaster = TimesFM3Forecaster.from_pretrained("google/timesfm-3.0-pytorch")
# Univariate, long horizon (>= 128 spans several output patches).
context = np.sin(np.linspace(0, 40, 512)).astype(np.float32)
out = forecaster.predict(context, horizon=128, return_quantiles=True)
print(out.forecast.shape) # (128,) median forecast
print(out.quantiles.shape) # (128, 9) 9 deciles
# Batch many series through one forward pass.
outs = list(forecaster.predict_batch([context] * 32, horizon=128))
Multivariate targets and covariates work the same way as on the PyTorch backend (matched to
1.7e-6 on the checkpoint):
…
Benchmarks (330M model, Apple M4 Max, context 512, horizon 64, fp32 with mx.compile):
| batch | p50 latency | throughput |
|---|---|---|
| 1 | 11.1 ms | 90 series/s |
| 8 | 19.7 ms | 406 series/s |
| 32 | 48.1 ms | 666 series/s |
Contexts longer than global_context (15,360) are truncated to their most recent points before
decode, matching the PyTorch backend. use_symmetric_averaging, use_znorm, and padding_mode
("none" / "edge") are all supported and numerically matched to the PyTorch backend, so the MLX
forecaster is a drop-in for the univariate and covariate forecasting paths.
Pass a 2D array of shape (num_variates, context_length) along with optional
past-only and past-and-future covariates:
…
No open issues yet, or sync has not completed.