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.
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
Repository
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
Basic Info
- Host: GitHub
- Owner: google-research
- License: apache-2.0
- Language: Python
- Default Branch: master
- Homepage: https://research.google/blog/a-decoder-only-foundation-model-for-time-series-forecasting/
- Size: 2.29 MB
Statistics
- Stars: 6,518
- Watchers: 53
- Forks: 569
- Open Issues: 147
- Releases: 2
Metadata Files
README.md
TimesFM
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
- Paper: A decoder-only foundation model for time-series forecasting, ICML 2024.
- All checkpoints: TimesFM Hugging Face Collection.
- Google Research blog.
- TimesFM in BigQuery: an official Google product.
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 canpip install timesfm==1.3.0to 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
frequencyindicator. - 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
- add support for an upcoming Flax version of the model (faster inference).
- add back covariate support.
- populate more docstrings, docs and notebook.
Install
Clone the repository:
shell git clone https://github.com/google-research/timesfm.git cd timesfmCreate a virtual environment and install dependencies using
uv: ```shellCreate 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] ```
[Optional] Install your preferred
torch/jaxbackend based on your OS and accelerators (CPU, GPU, TPU or Apple Silicon).:
- Install PyTorch.
- Install Jax for Flax.
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
- Website: https://research.google
- Repositories: 226
- Profile: https://github.com/google-research
Committers
Last synced: 6 months ago
Top Committers
| Name | 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
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
- Documentation: https://pkg.go.dev/github.com/google-research/timesfm#section-documentation
- License: apache-2.0
-
Latest release: v1.2.6
published over 1 year ago
Rankings
pypi.org: timecopilot-timesfm
Open weights time-series foundation model from Google Research.
- Homepage: https://github.com/google-research/timesfm
- Documentation: https://timecopilot-timesfm.readthedocs.io/
- License: apache-2.0
-
Latest release: 0.2.1
published 6 months ago
Rankings
Maintainers (1)
pypi.org: timesfm
Open weights time-series foundation model from Google Research.
- Homepage: https://github.com/google-research/timesfm
- Documentation: https://timesfm.readthedocs.io/
- License: apache-2.0
-
Latest release: 1.3.0
published 9 months ago
Rankings
Maintainers (3)
Dependencies
- datasetsforecast *
- einshape *
- fire *
- huggingface_hub *
- jax *
- neuralforecast *
- orjson *
- paxml *
- praxis *
- statsforecast *
- utilsforecast *
- jax >=0.4.26
- numpy >=1.26.4
- pandas >=2.1.4
- paxml >=1.4.0
- praxis >=1.4.0