SuperAPIAI Directory

timesfm

github.com · AI developer platforms

Google Research's open-source pretrained time-series foundation model for time-series forecasting. Supports long context (16k) and long-horizon forecasting up to 1k steps, which is widely used for financial and quantitative investment predictions.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

TimesFM (Time Series Foundation Model) is a pretrained time series foundation model developed by Google Research, aimed at time series forecasting tasks. The related paper "A decoder-only foundation model for time-series forecasting" was published at ICML 2024. This repository is the open-source implementation of this model.

[Purpose] TimesFM is mainly used for time series forecasting and can be applied in fields such as finance and quantitative investment forecasting. It supports zero-shot forecasting without the need for separate tuning for each task.

[Main Capabilities] According to official information, TimesFM 3.0 introduces the following capabilities:

  • Native multivariate and univariate forecasting: can seamlessly forecast multi-channel multivariate series as well as single univariate series.
  • Covariate support: natively supports past-only and past-and-future dynamic covariates without task-specific tuning.
  • Enhanced zero-shot general capabilities.
  • Benchmark performance: according to official statements, it ranks first overall on fev-bench (100 diverse real-world forecasting tasks); ranks first overall on the TIME Benchmark (50 domain datasets, 98 evaluation tasks); and ranks first among all foundation models on GIFT-Eval.

Capabilities of historical versions (TimesFM 2.5): uses 200M parameters (2.0 uses 500M); supports up to 16k context length (2.0 uses 2048); supports continuous quantile forecasting with up to 1k forecast horizon through an optional 30M quantile head; removes the frequency indicator; and adds several forecasting flags. 2.5 subsequently added a Flax version to accelerate inference, covariate support through XReg, documentation and examples, LoRA fine-tuning examples based on HuggingFace Transformers + PEFT, and unit tests for core layers, configuration, and utilities.

[Usage] Installation method (clone the repository and install using PyTorch): git clone https://github.com/google-research/timesfm.git cd timesfm Create a virtual environment and install using PyTorch:

Using uv

uv venv source .venv/bin/activate

Install the package in editable mode with torch

uv pip install -e .[torch] The PyPI package is timesfm; older versions can be installed via pip install timesfm==1.3.0.

Code example: a batch of one-dimensional NumPy arrays with different context lengths can be passed in to forecast univariate time series. Multivariate targets and covariates are used in the same way; pass in a two-dimensional array with shape (num_variates, context_length), and optionally attach past-only and past-and-future covariates.

There is also an MLX native backend, which can run TimesFM 3.0 on Apple chips without PyTorch, and its interface is consistent with PyTorch's TimesFM3Forecaster (predict / predict_batch, univariate or multivariate, supporting past-only and past-and-future covariates). Contexts exceeding global_context (15,360) are truncated to the most recent data points before decoding; use_symmetric_averaging, use_znorm, and padding_mode ("none" / "edge") are supported.

[Product Integration] TimesFM can be used in Google internal products: BigQuery ML (enterprise-grade SQL queries for scalability and reliability), Google Sheets (daily spreadsheets), and Vertex Model Garden (Dockerized endpoints for agent invocation).

[Versions and Licensing] The latest model version is TimesFM 3.0. Archived versions: the relevant code for 2.5 is located in src/timesfm; the code for 1.0 and 2.0 is archived in the v1 subdirectory. License notice: the source code in this repository is licensed under Apache-2.0, and as of version 2.5 the model weights remain Apache-2.0. However, the TimesFM 3.0 pretrained weights use a separate timesfm-non-commercial-license-v1.0 license, restricted to non-commercial, non-production use; commercial or production use of downloaded or self-hosted weights is not permitted. Commercial and production use of TimesFM 3.0 is available through authorized Google Cloud services (including BigQuery ML).

[Update log (based on official materials)]

  • September 2026: TimesFM 3.0 completed rollout on Google Cloud BigQuery ML, supporting commercial and production use.
  • August 2026: TimesFM 3.0 released.
  • July 2, 2026: PyPI updated to timesfm=2.0.2.
  • April 9, 2026: Added a fine-tuning example using HuggingFace Transformers + PEFT (LoRA), added unit tests, and incorporated several community fixes.
  • March 19, 2026: Added support for AGENTS, released TimesFM SKILL.md.
  • October 29, 2025: Re-added covariate support for TimesFM 2.5 via XReg.
  • September 15, 2025: TimesFM 2.5 released.

[Restrictions]

  • This open-source version is not an officially supported Google product.
  • TimesFM 3.0 pre-trained weights are limited to non-commercial, non-production use; commercial or production use requires authorized Google Cloud services.
  • Information regarding charges, pricing, specific usage steps, and results is not currently provided beyond the official materials above.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools