google / timesfm-2.0-500m-pytorch

huggingface.co
Total runs: 75.9K
24-hour runs: 0
7-day runs: 44.8K
30-day runs: 44.7K
Model's Last Updated: April 16 2025
time-series-forecasting

Introduction of timesfm-2.0-500m-pytorch

Model Details of timesfm-2.0-500m-pytorch

TimesFM

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

Resources and Technical Documentation :

Authors : Google Research

This is not an officially supported Google product.

Checkpoint timesfm-2.0-500m

timesfm-2.0-500m is the second open model checkpoint:

  • It performs univariate time series forecasting for context lengths up to 2048 time points and any horizon lengths, with an optional frequency indicator. Note that it can go even beyond 2048 context even though it was trained with that as the maximum context.
  • It focuses on point forecasts. We experimentally offer 10 quantile heads but they have not been calibrated after pretraining.
  • It ideally requires the context to be contiguous (i.e. no "holes"), and the context and the horizon to be of the same frequency. In case there are nans we fill in the missing values with linear interpolation before calling the model.
Installation

This HuggingFace repo hosts TimesFm checkpoints. Please visit our GitHub repo and follow the instructions for the torch version to install the timesfm library for model inference.

Usage
Initialize the model and load a checkpoint.

Then the base class can be loaded as,

import timesfm

# For PyTorch
tfm = timesfm.TimesFm(
      hparams=timesfm.TimesFmHparams(
          backend=<backend>,
          per_core_batch_size=32,
          horizon_len=128,
          input_patch_len=32,
          output_patch_len=128,
          num_layers=50,
          model_dims=1280,
          use_positional_embedding=False,
      ),
      checkpoint=timesfm.TimesFmCheckpoint(
          huggingface_repo_id="google/timesfm-2.0-500m-pytorch"),
  )

Note that the five parameters are fixed to load the 500m model

input_patch_len=32,
output_patch_len=128,
num_layers=50,
model_dims=1280,
use_positional_embedding=False,
  1. The context_len here can be set as the max context length of the model . You can provide a shorter series to the tfm.forecast() function and the model will handle it. Currently, the model handles a max context length of 2048, which can be increased in later releases. The input time series can have any context length . Padding / truncation will be handled by the inference code if needed.

  2. The horizon length can be set to anything. We recommend setting it to the largest horizon length you would need in the forecasting tasks for your application. We generally recommend horizon length <= context length but it is not a requirement in the function call.

Perform inference

We provide APIs to forecast from either array inputs or pandas dataframe. Both forecast methods expect (1) the input time series contexts, (2) along with their frequencies. Please look at the documentation of the functions tfm.forecast() and tfm.forecast_on_df() for detailed instructions.

In particular, regarding the frequency, TimesFM expects a categorical indicator valued in {0, 1, 2}:

  • 0 (default): high frequency, long horizon time series. We recommend using this for time series up to daily granularity.
  • 1 : medium frequency time series. We recommend using this for weekly and monthly data.
  • 2 : low frequency, short horizon time series. We recommend using this for anything beyond monthly, e.g. quarterly or yearly.

This categorical value should be directly provided with the array inputs. For dataframe inputs, we convert the conventional letter coding of frequencies to our expected categories, that

  • 0 : T, MIN, H, D, B, U
  • 1 : W, M
  • 2 : Q, Y

Notice you do NOT have to strictly follow our recommendation here. Although this is our setup during model training and we expect it to offer the best forecast result, you can also view the frequency input as a free parameter and modify it per your specific use case.

Examples:

Array inputs, with the frequencies set to low, medium, and high respectively.

import numpy as np
forecast_input = [
    np.sin(np.linspace(0, 20, 100))
    np.sin(np.linspace(0, 20, 200)),
    np.sin(np.linspace(0, 20, 400)),
]
frequency_input = [0, 1, 2]

point_forecast, experimental_quantile_forecast = tfm.forecast(
    forecast_input,
    freq=frequency_input,
)

pandas dataframe, with the frequency set to "M" monthly.

import pandas as pd

# e.g. input_df is
#       unique_id  ds          y
# 0     T1         1975-12-31  697458.0
# 1     T1         1976-01-31  1187650.0
# 2     T1         1976-02-29  1069690.0
# 3     T1         1976-03-31  1078430.0
# 4     T1         1976-04-30  1059910.0
# ...   ...        ...         ...
# 8175  T99        1986-01-31  602.0
# 8176  T99        1986-02-28  684.0
# 8177  T99        1986-03-31  818.0
# 8178  T99        1986-04-30  836.0
# 8179  T99        1986-05-31  878.0

forecast_df = tfm.forecast_on_df(
    inputs=input_df,
    freq="M",  # monthly
    value_name="y",
    num_jobs=-1,
)
Pretraining Data

It is important to list all the data sources in order to enable fair benchmarking. The TimesFM 2.0 series contains the pretraining set of TimesFM 1.0 along with these additional datasets (a subset of the LOTSA pretraining data that many other models are pretrained on):

Dataset Download Source
azure_vm_traces LOTSA Pretrain
residential_load_power LOTSA Pretrain
borg_cluster_data LOTSA Pretrain
residential_pv_power LOTSA Pretrain
q_traffic LOTSA Pretrain
london_smart_meters_with_missing LOTSA Pretrain
taxi_30min LOTSA Pretrain
solar_power LOTSA Pretrain
wind_power LOTSA Pretrain
kdd2022 LOTSA Pretrain
largest LOTSA Pretrain
era5 LOTSA Pretrain
buildings LOTSA Pretrain
cmip6 LOTSA Pretrain
china_air_quality LOTSA Pretrain
beijing_air_quality LOTSA Pretrain
subseasonal LOTSA Pretrain
kaggle_web_traffic_weekly LOTSA Pretrain
cdc_fluview_who_nrevss LOTSA Pretrain
godaddy LOTSA Pretrain

Runs of google timesfm-2.0-500m-pytorch on huggingface.co

75.9K
Total runs
0
24-hour runs
0
3-day runs
44.8K
7-day runs
44.7K
30-day runs

More Information About timesfm-2.0-500m-pytorch huggingface.co Model

More timesfm-2.0-500m-pytorch license Visit here:

https://choosealicense.com/licenses/apache-2.0

timesfm-2.0-500m-pytorch huggingface.co

timesfm-2.0-500m-pytorch huggingface.co is an AI model on huggingface.co that provides timesfm-2.0-500m-pytorch's model effect (), which can be used instantly with this google timesfm-2.0-500m-pytorch model. huggingface.co supports a free trial of the timesfm-2.0-500m-pytorch model, and also provides paid use of the timesfm-2.0-500m-pytorch. Support call timesfm-2.0-500m-pytorch model through api, including Node.js, Python, http.

timesfm-2.0-500m-pytorch huggingface.co Url

https://huggingface.co/google/timesfm-2.0-500m-pytorch

google timesfm-2.0-500m-pytorch online free

timesfm-2.0-500m-pytorch huggingface.co is an online trial and call api platform, which integrates timesfm-2.0-500m-pytorch's modeling effects, including api services, and provides a free online trial of timesfm-2.0-500m-pytorch, you can try timesfm-2.0-500m-pytorch online for free by clicking the link below.

google timesfm-2.0-500m-pytorch online free url in huggingface.co:

https://huggingface.co/google/timesfm-2.0-500m-pytorch

timesfm-2.0-500m-pytorch install

timesfm-2.0-500m-pytorch is an open source model from GitHub that offers a free installation service, and any user can find timesfm-2.0-500m-pytorch on GitHub to install. At the same time, huggingface.co provides the effect of timesfm-2.0-500m-pytorch install, users can directly use timesfm-2.0-500m-pytorch installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

timesfm-2.0-500m-pytorch install url in huggingface.co:

https://huggingface.co/google/timesfm-2.0-500m-pytorch

Url of timesfm-2.0-500m-pytorch

timesfm-2.0-500m-pytorch huggingface.co Url

Provider of timesfm-2.0-500m-pytorch huggingface.co

google
ORGANIZATIONS

Other API from google

huggingface.co

Total runs: 9.1M
Run Growth: -263.8K
Growth Rate: -2.89%
Updated:July 21 2026
huggingface.co

Total runs: 4.6M
Run Growth: -874.7K
Growth Rate: -19.07%
Updated:July 21 2026
huggingface.co

Total runs: 3.4M
Run Growth: -439.8K
Growth Rate: -13.05%
Updated:July 21 2026
huggingface.co

Total runs: 3.1M
Run Growth: -1.9M
Growth Rate: -60.23%
Updated:April 04 2025
huggingface.co

Total runs: 2.9M
Run Growth: -321.9K
Growth Rate: -11.07%
Updated:July 21 2026
huggingface.co

Total runs: 1.8M
Run Growth: 494.8K
Growth Rate: 27.99%
Updated:March 22 2025
huggingface.co

Total runs: 1.4M
Run Growth: -204.4K
Growth Rate: -14.03%
Updated:July 17 2023
huggingface.co

Total runs: 1.1M
Run Growth: 485.4K
Growth Rate: 43.97%
Updated:October 29 2025
huggingface.co

Total runs: 757.2K
Run Growth: 185.4K
Growth Rate: 24.48%
Updated:August 28 2024
huggingface.co

Total runs: 717.9K
Run Growth: 114.1K
Growth Rate: 15.95%
Updated:February 29 2024
huggingface.co

Total runs: 676.9K
Run Growth: -56.3K
Growth Rate: -8.31%
Updated:August 28 2024
huggingface.co

Total runs: 676.8K
Run Growth: -86.8K
Growth Rate: -12.82%
Updated:July 16 2026
huggingface.co

Total runs: 638.8K
Run Growth: -588.8K
Growth Rate: -92.17%
Updated:March 22 2025
huggingface.co

Total runs: 622.2K
Run Growth: 248.0K
Growth Rate: 39.85%
Updated:July 16 2026
huggingface.co

Total runs: 618.1K
Run Growth: -914.1K
Growth Rate: -147.88%
Updated:August 14 2025
huggingface.co

Total runs: 436.3K
Run Growth: -195.2K
Growth Rate: -44.47%
Updated:October 11 2023
huggingface.co

Total runs: 401.1K
Run Growth: -100.5K
Growth Rate: -24.62%
Updated:July 17 2023
huggingface.co

Total runs: 377.0K
Run Growth: 106.4K
Growth Rate: 28.23%
Updated:January 25 2023
huggingface.co

Total runs: 347.8K
Run Growth: -354.7K
Growth Rate: -102.01%
Updated:March 22 2025
huggingface.co

Total runs: 256.3K
Run Growth: 79.9K
Growth Rate: 31.16%
Updated:August 18 2026
huggingface.co

Total runs: 250.7K
Run Growth: -362.5K
Growth Rate: -144.58%
Updated:September 18 2023
huggingface.co

Total runs: 231.2K
Run Growth: 66.4K
Growth Rate: 28.70%
Updated:January 25 2023
huggingface.co

Total runs: 220.0K
Run Growth: -76.2K
Growth Rate: -34.64%
Updated:January 25 2023
huggingface.co

Total runs: 206.7K
Run Growth: 81.6K
Growth Rate: 39.48%
Updated:January 25 2023
huggingface.co

Total runs: 189.1K
Run Growth: -19.0K
Growth Rate: -10.07%
Updated:July 03 2023
huggingface.co

Total runs: 186.5K
Run Growth: 43.3K
Growth Rate: 23.48%
Updated:November 28 2023
huggingface.co

Total runs: 171.1K
Run Growth: -116.6K
Growth Rate: -68.18%
Updated:August 08 2024
huggingface.co

Total runs: 168.3K
Run Growth: -194.0K
Growth Rate: -115.29%
Updated:July 14 2025
huggingface.co

Total runs: 156.7K
Run Growth: 45.4K
Growth Rate: 28.97%
Updated:September 27 2024
huggingface.co

Total runs: 155.3K
Run Growth: 53.9K
Growth Rate: 34.70%
Updated:July 16 2026
huggingface.co

Total runs: 145.2K
Run Growth: -361.0K
Growth Rate: -248.64%
Updated:April 29 2024
huggingface.co

Total runs: 125.2K
Run Growth: 34.9K
Growth Rate: 27.90%
Updated:May 27 2022
huggingface.co

Total runs: 114.8K
Run Growth: 32.7K
Growth Rate: 28.45%
Updated:July 16 2026
huggingface.co

Total runs: 96.1K
Run Growth: 12.0K
Growth Rate: 12.45%
Updated:March 22 2025
huggingface.co

Total runs: 82.6K
Run Growth: -168.2K
Growth Rate: -203.45%
Updated:July 10 2025
huggingface.co

Total runs: 73.6K
Run Growth: 55.3K
Growth Rate: 75.07%
Updated:January 25 2023
huggingface.co

Total runs: 70.8K
Run Growth: 8.8K
Growth Rate: 12.43%
Updated:March 22 2025
huggingface.co

Total runs: 61.8K
Run Growth: -162.8K
Growth Rate: -263.43%
Updated:November 27 2023
huggingface.co

Total runs: 60.6K
Run Growth: -2.3K
Growth Rate: -3.86%
Updated:August 08 2024