skillfed

timesfm

A time series foundation model.

timesfm v2.0.2 284.3K downloads/30d#8,064 on PyPI
Permissive license Apache-2.0 Active released

What it is and what it does

TimesFM is a decoder-only foundation model pretrained by Google Research specifically for time-series forecasting. It accepts historical time-series data and produces both point forecasts and quantile forecasts (percentile ranges) for future time steps. The model is available in different parameter sizes and supports context lengths up to 16k tokens, making it suitable for both short and long historical sequences.

The package provides a straightforward API: load a pretrained checkpoint from Hugging Face, configure forecast parameters (horizon, context length, quantile settings), and call forecast() with your time-series arrays. It supports optional backends (torch or Flax) for inference acceleration and optional covariate inputs via XReg. The model handles normalization internally and includes flags for specialized behaviors like flip invariance and quantile crossing fixes.

Use it for:

  • Generate multi-step-ahead forecasts with confidence intervals for financial or operational time series
  • Fine-tune the pretrained model on domain-specific data using LoRA and HuggingFace Transformers
  • Integrate time-series predictions into BigQuery ML or Google Sheets workflows via the open-source API
  • Build agentic systems that call TimesFM as a forecasting skill for automated decision-making
  • Benchmark decoder-only architectures against traditional or RNN-based forecasting methods

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

TimesFM is a pretrained time-series foundation model from Google Research that generates point and quantile forecasts for time-series data using a decoder-only transformer architecture.

Yes. TimesFM is actively maintained, has no known vulnerabilities, installs with low friction, and is backed by published research and Google's production deployments. Install it if you need a modern pretrained foundation model for time-series forecasting; the permissive Apache-2.0 license and optional backends (torch/Flax) make it flexible for both research and production use.

Install

timesfm on PyPI

pip

pip install timesfm

uv

uv add timesfm

poetry

poetry add timesfm

Installing timesfm

Before you install

Low friction installation via pip with optional torch or Flax backends. Active maintenance with recent updates (June 2026); requires Python 3.10 or later. Runtime dependencies are lightweight: numpy, huggingface_hub, and safetensors.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions. You may use, modify, and distribute the package freely provided you include the license notice.

Quickstart

pip install timesfm[torch]

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

Requires Python 3.10 or later; torch or Flax backend must be installed separately for inference acceleration.

Verify before relying

  • Whether the package includes built-in utilities for handling missing values or irregular time-series frequencies
  • Performance characteristics (inference speed, memory footprint) for different model sizes and context lengths
  • Whether XReg covariate support is production-ready or still experimental

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — numpy, huggingface_hub, safetensors
Maintenance actively maintained — 43 days since the last release
First released
Downloads 284,286/month — #8,064 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: timesfm-2.0.2-py3-none-any.whl

Tags

time series forecastingfoundation model forecastingpretrained time series modelquantile forecastingtransformer time seriestemporal predictionsequence forecasting
time-series-forecastingfoundation-modeltransformer

More Artificial Intelligence packages