https://github.com/google-research/timesfm

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

https://github.com/google-research/timesfm

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary

Keywords from Contributors

transformer tensors reinforcement-learning deep-neural-networks distributed xgboost speech-recognition large-language-models anomaly-detection data-mining
Last synced: 6 months ago · JSON representation

Repository

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

Basic Info
Statistics
  • Stars: 6,518
  • Watchers: 53
  • Forks: 569
  • Open Issues: 147
  • Releases: 2
Created almost 2 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

TimesFM

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

This open version is not an officially supported Google product.

Latest Model Version: TimesFM 2.5

Archived Model Versions:

  • 1.0 and 2.0: relevant code archived in the sub directory v1. You can pip install timesfm==1.3.0 to install an older version of this package to load them.

Update - Sept. 15, 2025

TimesFM 2.5 is out!

Comparing to TimesFM 2.0, this new 2.5 model:

  • uses 200M parameters, down from 500M.
  • supports up to 16k context length, up from 2048.
  • supports continuous quantile forecast up to 1k horizon via an optional 30M quantile head.
  • gets rid of the frequency indicator.
  • has a couple of new forecasting flags.

Along with the model upgrade we have also upgraded the inference API. This repo will be under construction over the next few weeks to

  1. add support for an upcoming Flax version of the model (faster inference).
  2. add back covariate support.
  3. populate more docstrings, docs and notebook.

Install

  1. Clone the repository: shell git clone https://github.com/google-research/timesfm.git cd timesfm

  2. Create a virtual environment and install dependencies using uv: ```shell

    Create a virtual environment

    uv venv

    Activate the environment

    source .venv/bin/activate

    Install the package in editable mode with torch

    uv pip install -e .[torch]

    Or with flax

    uv pip install -e .[flax] ```

  3. [Optional] Install your preferred torch / jax backend based on your OS and accelerators (CPU, GPU, TPU or Apple Silicon).:

Code Example

```python import torch import numpy as np import timesfm

torch.setfloat32matmul_precision("high")

model = timesfm.TimesFM2p5200Mtorch.frompretrained("google/timesfm-2.5-200m-pytorch")

model.compile( timesfm.ForecastConfig( maxcontext=1024, maxhorizon=256, normalizeinputs=True, usecontinuousquantilehead=True, forceflipinvariance=True, inferispositive=True, fixquantilecrossing=True, ) ) pointforecast, quantileforecast = model.forecast( horizon=12, inputs=[ np.linspace(0, 1, 100), np.sin(np.linspace(0, 20, 67)), ], # Two dummy inputs ) pointforecast.shape # (2, 12) quantileforecast.shape # (2, 12, 10): mean, then 10th to 90th quantiles. ```

Owner

  • Name: Google Research
  • Login: google-research
  • Kind: organization
  • Location: Earth

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 174
  • Total Committers: 22
  • Avg Commits per committer: 7.909
  • Development Distribution Score (DDS): 0.649
Past Year
  • Commits: 69
  • Committers: 10
  • Avg Commits per committer: 6.9
  • Development Distribution Score (DDS): 0.551
Top Committers
Name Email Commits
Rajat Sen r****1@g****m 61
Yichen Zhou y****u@g****m 29
tanmayshishodia t****a@n****m 16
Justin Guese g****n@g****m 15
misha-chertushkin c****l@g****m 11
misha-chertushkin c****n@g****m 8
Kashif Rasul k****l@g****m 6
Killer3048 g****1@m****u 5
tanmayshishodia t****a@g****m 5
Funto-Adeyemi m****9@g****m 4
geetu040 r****0@g****m 2
periodLeo l****n@p****e 2
Jan Lebert s****c@u****m 1
Matthew Heidemann m****n@g****m 1
Nan Huang t****n@g****m 1
Sarthak Mishra s****5@g****m 1
Sarthak Mishra s****1@i****m 1
andreramosfdc a****c@g****m 1
azul f****z@g****m 1
dependabot[bot] 4****]@u****m 1
ram-from-tvl r****l@g****m 1
zgeor z****r@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 182
  • Total pull requests: 186
  • Average time to close issues: 12 days
  • Average time to close pull requests: 8 days
  • Total issue authors: 159
  • Total pull request authors: 36
  • Average comments per issue: 0.74
  • Average comments per pull request: 0.66
  • Merged pull requests: 100
  • Bot issues: 0
  • Bot pull requests: 29
Past Year
  • Issues: 88
  • Pull requests: 84
  • Average time to close issues: 6 days
  • Average time to close pull requests: 8 days
  • Issue authors: 74
  • Pull request authors: 19
  • Average comments per issue: 0.38
  • Average comments per pull request: 0.43
  • Merged pull requests: 42
  • Bot issues: 0
  • Bot pull requests: 19
Top Authors
Issue Authors
  • Arsa-Nik (4)
  • jobs-git (4)
  • JackeyLee007 (3)
  • AzulGarza (3)
  • veelion (2)
  • algomaschine (2)
  • sdmorrey (2)
  • aleksmaksimovic (2)
  • NidhiRavishankar (2)
  • androidwoman (2)
  • sebassaras02 (2)
  • zhousheng89 (2)
  • Mhdaw (2)
  • forhonourlx (2)
  • dafmdev (2)
Pull Request Authors
  • rajatsen91 (56)
  • dependabot[bot] (29)
  • siriuz42 (17)
  • misha-chertushkin (11)
  • kashif (6)
  • AzulGarza (5)
  • faisal-fida (4)
  • periodLeo (4)
  • abdulfatir (4)
  • sarthak405 (4)
  • JustinGuese (3)
  • TeddyHuang-00 (3)
  • jobs-git (2)
  • heidmotron (2)
  • Killer3048 (2)
Top Labels
Issue Labels
Pull Request Labels
dependencies (29) python (13)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 37,563 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 42
  • Total maintainers: 4
proxy.golang.org: github.com/google-research/timesfm
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.1%
Average: 6.3%
Dependent repos count: 6.5%
Last synced: 7 months ago
pypi.org: timecopilot-timesfm

Open weights time-series foundation model from Google Research.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,353 Last month
Rankings
Dependent packages count: 8.8%
Average: 29.3%
Dependent repos count: 49.8%
Maintainers (1)
Last synced: 6 months ago
pypi.org: timesfm

Open weights time-series foundation model from Google Research.

  • Versions: 37
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 36,210 Last month
Rankings
Dependent packages count: 10.9%
Average: 36.2%
Dependent repos count: 61.4%
Maintainers (3)
Last synced: 6 months ago

Dependencies

environment.yml pypi
  • datasetsforecast *
  • einshape *
  • fire *
  • huggingface_hub *
  • jax *
  • neuralforecast *
  • orjson *
  • paxml *
  • praxis *
  • statsforecast *
  • utilsforecast *
pyproject.toml pypi
  • jax >=0.4.26
  • numpy >=1.26.4
  • pandas >=2.1.4
  • paxml >=1.4.0
  • praxis >=1.4.0