Skip to main content
FoundationForecast FoundationForecast
The API for the time series foundation era · Forecast · Cross-validation · Anomaly detection
CI PyPI versions license Join Discord

Why?

Forecasting and time series have entered their foundation era. But, just like in the LLM space, different models bring different inductive biases and perform differently across domains, datasets, and even horizons.

The world already uses different LLMs for different use cases. We're seeing the same thing in forecasting: there is no single model that dominates everywhere. Results change with the data distribution and forecasting horizon, as we've seen in Impermanent and other benchmarks such as GIFT-Eval and FEV.

At the same time, every lab also ships its own API, dependencies, data conventions, and learning curve. That fragmentation makes foundation models hard to compare fairly, and even harder to use together in production.

FoundationForecast removes that friction: one FoundationForecast class, one data format, and the same methods: forecast, cross_validation, and detect_anomalies, across time series foundation models. ✨

Developed with 💙 by the TimeCopilot crew.


Quick example

import pandas as pd
from foundationforecast import FoundationForecast
from foundationforecast.models import Chronos, Toto

df = pd.read_csv(
    "https://timecopilot.s3.amazonaws.com/public/data/air_passengers.csv",
)

ff = FoundationForecast(models=[Chronos(), Toto(context_length=256)])

fcst_df = ff.forecast(df, h=12, freq="MS", level=[90])
cv_df = ff.cross_validation(df, h=12, freq="MS", level=[90])
anomalies_df = ff.detect_anomalies(df, freq="MS", level=99)

Your DataFrame needs three columns: unique_id, ds, and y. For best results, ensure ds is a proper datetime dtype (e.g., pass parse_dates=["ds"] when reading) or an ISO-8601 string so sorting is correct; cross-validation/anomaly detection will also convert ds to datetime internally where needed.


Highlights

  • 🎯 Reproducible by design. FoundationForecast implementations are regression-tested against official GIFT-Eval submissions to ensure they continue to reproduce their benchmark behavior. CI automatically re-runs experiments/gift-eval on Modal GPU and verifies MASE and CRPS against Hugging Face reference CSVs for every change.
  • 🚀 GPU-native. Automatically runs on GPU when available, without model-specific device configuration.

Supported models

Every model supports forecast, cross-validation, and anomaly detection through the same API. Intervals means prediction intervals via level or quantile forecasts. Finetuning marks models that can adapt to your data at inference time. License is the weight/checkpoint license on the default Hugging Face repo (or provider terms for hosted APIs). See the note below for production use.

Pass any Hugging Face repo_id (or local checkpoint path) supported by the underlying model class.

Model Forecast CV Anomalies Intervals Finetuning License
Chronos ✓ ✓ ✓ ✓ ✓ Apache-2.0
FlowState ✓ ✓ ✓ ✓ Apache-2.0
Moirai ✓ ✓ ✓ ✓ CC-BY-NC-4.0
PatchTST-FM ✓ ✓ ✓ ✓ CC-BY-NC-SA-4.0
Sundial ✓ ✓ ✓ ✓ Apache-2.0
T0 ✓ ✓ ✓ ✓ Apache-2.0†
TabPFN ✓ ✓ ✓ ✓ TabPFN NC‡
Tafsut ✓ ✓ ✓ ✓ MIT
TiRex ✓ ✓ ✓ ✓ Community / Apache-2.0
TimeGPT ✓ ✓ ✓ ✓ ✓ Nixtla API§
TimesFM ✓ ✓ ✓ ✓ Apache-2.0
Toto ✓ ✓ ✓ ✓ Apache-2.0

Licenses verified against Hugging Face model cards. Check the model card for your repo_id when in doubt.

What this means for production
  • Apache-2.0, MIT: generally fine for commercial production (retain notices; T0† is also gated on Hugging Face: accept terms and set HF_TOKEN).
  • CC-BY-NC-4.0 (Moirai), CC-BY-NC-SA-4.0 (PatchTST-FM r1 checkpoints): non-commercial only; not for revenue-generating production without a separate agreement from the rights holder.
  • Apache-2.0 / OpenMDW 1.0 (Granite PatchTST-FM r2): commercial-friendly; choose either license per the model card.
  • TimesFM 3.0: weights for google/timesfm-3.0-pytorch are non-commercial; TimesFM 1.0–2.5 checkpoints remain Apache-2.0.
  • TabPFN NC‡: TabPFN-2.6+ and TabPFN-3 weights are non-commercial; production requires a Prior Labs commercial license or API. First LOCAL use requires accepting terms at ux.priorlabs.ai (TABPFN_TOKEN). TabPFN-3 is LOCAL-only today.
  • Community / Apache-2.0 (TiRex): TiRex 1.0 uses the NXAI Community License (commercial limits for large enterprises); TiRex 2.0 is Apache-2.0.
  • Nixtla API§: hosted service via NIXTLA_API_KEY; production under Nixtla terms/pricing, not open weights.

FoundationForecast itself is Apache-2.0 regardless of which model you plug in.

Some models require specific Python versions (e.g. FlowState 3.11-3.13, TabPFN < 3.13). See the Model Hub for details and default checkpoints.

Example checkpoints & API model IDs
  • Chronos: amazon/chronos-t5-{tiny,mini,small,base,large}, amazon/chronos-bolt-{tiny,mini,small,base}, amazon/chronos-2
  • FlowState: ibm-research/flowstate, ibm-granite/granite-timeseries-flowstate-r1
  • Moirai: Salesforce/moirai-{1.0,1.1,2.0}-R-{small,base,large}, Salesforce/moirai-moe-1.0-R-*
  • PatchTST-FM: ibm-research/patchtst-fm-r1, ibm-granite/granite-timeseries-patchtst-fm-r1, ibm-granite/granite-timeseries-patchtst-fm-r2 (r2 requires granite-tsfm>=0.3.9)
  • Sundial: thuml/sundial-base-128m
  • T0: theforecastingcompany/t0-alpha, theforecastingcompany/t0-beta (requires tfc-t0>=0.5.0)
  • TabPFN: default tabpfn-v2-regressor-2noar4o2.ckpt; TabPFN-3 via model_path="tabpfn-v3-regressor-v3_20260506_timeseries.ckpt" (LOCAL, TABPFN_TOKEN); or CLIENT mode with a Prior Labs API token
  • Tafsut: Tafsut-FM/tafsut-univariate-base
  • TiRex: NX-AI/TiRex, NX-AI/TiRex-2
  • TimeGPT: pass model= to TimeGPT(), e.g. timegpt-1, timegpt-1-long-horizon, timegpt-2-mini, timegpt-2, timegpt-2-pro
  • TimesFM: google/timesfm-{1.0-200m,2.0-500m,2.5-200m,3.0}-pytorch (3.0 weights are non-commercial)
  • Toto: Datadog/Toto-Open-Base-1.0, Datadog/Toto-2.0-{4m,22m,313m,1B,2.5B}

News

Recent additions and checkpoints (newest first). See the changelog for full release notes.

When What Checkpoint / detail
Sep 2026 Granite PatchTST-FM r2 ibm-granite/granite-timeseries-patchtst-fm-r2 — Apache-2.0 / OpenMDW; requires granite-tsfm>=0.3.9 (v0.1.8)
Sep 2026 T0 beta theforecastingcompany/t0-beta — requires tfc-t0>=0.5.0 (v0.1.8)
Sep 2026 TiRex-2 zeroshot (GIFT-Eval CI) NX-AI/TiRex-2-gifteval-zs added to gift-eval replication (v0.1.8)
Sep 2026 Shared panel processing Faster multi-model forecasts via reused panel path across forecasters (v0.1.8)
Sep 2026 TabPFN-3 (LOCAL) model_path="tabpfn-v3-regressor-v3_20260506_timeseries.ckpt" (v0.1.7)

Installation

Recommended: uv installs fast, locks dependencies reproducibly, and matches how this repo is developed and tested (especially useful with heavy ML stacks like torch and transformers).

uv add foundationforecast

Or with pip:

pip install foundationforecast

Requires Python 3.10+. Some models have additional version requirements; see the Model Hub.

Optional plotting support:

uv add "foundationforecast[plot]"
# or: pip install "foundationforecast[plot]"

Relationship to TimeCopilot

FoundationForecast TimeCopilot
Foundation models (Chronos, Moirai, …) ✓ ✓
Unified forecast / CV / anomaly API ✓ ✓
Statistical & ML baselines ✓
LLM agent & natural-language queries ✓
Ensembles & distributed inference ✓

Use FoundationForecast when you only need foundation models. Use TimeCopilot for the full forecasting agent.


Citation

To reference the software package:

@software{foundationforecast,
  title = {FoundationForecast: The API for time series foundation models},
  author = {Garza, Azul and Rosillo, Renée},
  year = {2026},
  url = {https://github.com/TimeCopilot/foundationforecast},
  license = {Apache-2.0},
}

Community

Questions, bugs, and contributions:

Developed across Salamanca · Mexico City · San Francisco.


License

FoundationForecast is licensed under Apache License 2.0. You may use, modify, and deploy the library in production, including commercial applications.

Model weights and hosted APIs have separate licenses. See the License column and production note in Supported models above.

Release files for foundationforecast 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for foundationforecast 0.1.8
File Size Uploaded
foundationforecast-0.1.8.tar.gz 3.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for foundationforecast 0.1.8
File Interpreter ABI Platform
foundationforecast-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 3.7 MB

Release files / foundationforecast-0.1.8.tar.gz

Download URL foundationforecast-0.1.8.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
b844e112abcb52e75849fccd630e78dd23c3ab5d0595fd174de85ed748b313c7
BLAKE2b-256 checksum
How to use checksums
63f9c2aa2c779cc24bb76a7f0bd118699b427a07ddadaa75b8699aea2de1a6f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / foundationforecast-0.1.8-py3-none-any.whl

Download URL foundationforecast-0.1.8-py3-none-any.whl
Size 73.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0130a96b7dbdb2be8bec42ce95a4ba22d750f44cacea4a649c47de8800dd92e
BLAKE2b-256 checksum
How to use checksums
6bfd1046c49acb09ace9e8b6d842001738fc663e57f65f674cd0606b28ccf983
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.1.9

2 release files

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page