Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ Licenses verified against Hugging Face model cards. Check the model card for you
<details><summary><strong>What this means for production</strong></summary>

- **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): **non-commercial** only; not for revenue-generating production without a separate agreement from the rights holder.
- **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](https://huggingface.co/ibm-granite/granite-timeseries-patchtst-fm-r2).
- **TimesFM 3.0**: weights for `google/timesfm-3.0-pytorch` are [non-commercial](https://huggingface.co/google/timesfm-3.0-pytorch/blob/main/LICENSE); 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](https://docs.priorlabs.ai/models). First LOCAL use requires accepting terms at [ux.priorlabs.ai](https://ux.priorlabs.ai) (`TABPFN_TOKEN`). TabPFN-3 is LOCAL-only today.
- **Community / Apache-2.0** (TiRex): TiRex 1.0 uses the [NXAI Community License](https://huggingface.co/NX-AI/TiRex/blob/main/LICENSE) (commercial limits for large enterprises); TiRex 2.0 is Apache-2.0.
Expand All @@ -101,7 +102,7 @@ Some models require specific Python versions (e.g. FlowState 3.11-3.13, TabPFN &
- **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`
- **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
Expand Down
21 changes: 21 additions & 0 deletions docs/changelogs/v0.1.8.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
### Features

* **Granite PatchTST-FM r2 support**: The shared [`PatchTSTFM`](../api/models/foundation/models.md#foundationforecast.models.patchtst_fm.PatchTSTFM) wrapper now supports [`ibm-granite/granite-timeseries-patchtst-fm-r2`](https://huggingface.co/ibm-granite/granite-timeseries-patchtst-fm-r2) (~385M). r2 adds Conformer blocks, overlapping patches (`patch_stride=8`), and a 99-quantile head on top of r1. Requires `granite-tsfm>=0.3.9`. GIFT-Eval CI replicates `Granite-PatchTST-FM-r2` on `m4_weekly/short`.

```python
import pandas as pd
from foundationforecast.models.patchtst_fm import PatchTSTFM

df = pd.read_csv(
"https://timecopilot.s3.amazonaws.com/public/data/air_passengers.csv",
parse_dates=["ds"],
)
model = PatchTSTFM(
repo_id="ibm-granite/granite-timeseries-patchtst-fm-r2",
alias="Granite-PatchTST-FM-r2",
context_length=8192,
batch_size=32,
)
fcst = model.forecast(df, h=12, freq="MS")
assert "Granite-PatchTST-FM-r2" in fcst.columns
```

* **T0 beta support**: The shared [`T0`](../api/models/foundation/models.md#foundationforecast.models.t0.T0) wrapper now works with [`theforecastingcompany/t0-beta`](https://huggingface.co/theforecastingcompany/t0-beta) (~256M). Register it in gift-eval `models.yaml`; GIFT-Eval CI still replicates `t0-alpha` until leaderboard results exist for beta.

```python
Expand All @@ -25,6 +45,7 @@
### Dependencies

* Bumped `tfc-t0` from `>=0.2.3` to `>=0.5.0` (required for t0-beta; still supports t0-alpha).
* Replaced `timecopilot-granite-tsfm` with `granite-tsfm>=0.3.9` (required for PatchTST-FM r2 overlapping-patch inference).

---

Expand Down
5 changes: 4 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ When adding a new foundation model:
**foundationforecast** uses forked Python packages maintained under custom names on PyPI:

- **chronos-forecasting** — [`timecopilot-chronos-forecasting`](https://pypi.org/project/timecopilot-chronos-forecasting/)
- **granite-tsfm** — [`timecopilot-granite-tsfm`](https://pypi.org/project/timecopilot-granite-tsfm/)
- **timesfm** — [`timecopilot-timesfm`](https://pypi.org/project/timecopilot-timesfm/)
- **tirex** — [`timecopilot-tirex`](https://pypi.org/project/timecopilot-tirex/)
- **toto** — [`timecopilot-toto`](https://pypi.org/project/timecopilot-toto/)
- **uni2ts** — [`timecopilot-uni2ts`](https://pypi.org/project/timecopilot-uni2ts/)

FlowState and PatchTST-FM use upstream [`granite-tsfm`](https://pypi.org/project/granite-tsfm/)
(`>=0.3.9`; PatchTST-FM r2 requires overlapping-patch support). The former
`timecopilot-granite-tsfm` fork is no longer a dependency.

See the [TimeCopilot contributing guide](https://timecopilot.dev/community/contributing/) for upstream fork links.
2 changes: 1 addition & 1 deletion docs/model-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Below is the list of available foundation models. Click a model name for API det
- [Chronos](api/models/foundation/models.md#foundationforecast.models.chronos.Chronos) ([arXiv:2403.07815](https://arxiv.org/abs/2403.07815))
- [FlowState](api/models/foundation/models.md#foundationforecast.models.flowstate.FlowState) ([arXiv:2508.05287](https://arxiv.org/abs/2508.05287)) — Python 3.11–3.13
- [Moirai](api/models/foundation/models.md#foundationforecast.models.moirai.Moirai) ([arXiv:2402.02592](https://arxiv.org/abs/2402.02592))
- [PatchTST-FM](api/models/foundation/models.md#foundationforecast.models.patchtst_fm.PatchTSTFM) ([arXiv:2602.06909](https://arxiv.org/abs/2602.06909)) — Python 3.11–3.13
- [PatchTST-FM](api/models/foundation/models.md#foundationforecast.models.patchtst_fm.PatchTSTFM) ([arXiv:2602.06909](https://arxiv.org/abs/2602.06909)) — Python 3.11–3.13; [`ibm-research/patchtst-fm-r1`](https://huggingface.co/ibm-research/patchtst-fm-r1), [`ibm-granite/granite-timeseries-patchtst-fm-r1`](https://huggingface.co/ibm-granite/granite-timeseries-patchtst-fm-r1) (CC-BY-NC-SA-4.0), and [`ibm-granite/granite-timeseries-patchtst-fm-r2`](https://huggingface.co/ibm-granite/granite-timeseries-patchtst-fm-r2) (Apache-2.0 / OpenMDW 1.0; requires `granite-tsfm>=0.3.9`)
- [Sundial](api/models/foundation/models.md#foundationforecast.models.sundial.Sundial) ([arXiv:2502.00816](https://arxiv.org/pdf/2502.00816))
- [T0](api/models/foundation/models.md#foundationforecast.models.t0.T0) ([t0-alpha](https://huggingface.co/theforecastingcompany/t0-alpha), [t0-beta](https://huggingface.co/theforecastingcompany/t0-beta); requires `tfc-t0>=0.5.0` for beta) — Python 3.11–3.13
- [TabPFN](api/models/foundation/models.md#foundationforecast.models.tabpfn.TabPFN) ([arXiv:2501.02945](https://arxiv.org/abs/2501.02945)) — Python 3.10–3.12; TabPFN-2 (default) and TabPFN-3 via `model_path`; TabPFN-3 is LOCAL-only; weights use the [TabPFN NC license](https://ux.priorlabs.ai) (`TABPFN_TOKEN`)
Expand Down
5 changes: 3 additions & 2 deletions experiments/gift-eval/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ uv run python -m src.runners.run_model \

## CI subset

[`configs/ci_subset.yaml`](configs/ci_subset.yaml) defines **10 jobs**: Chronos on
[`configs/ci_subset.yaml`](configs/ci_subset.yaml) defines **13 jobs**: Chronos on
`m4_weekly/short` and `m4_hourly/short`, plus one representative `model_key` each for
TimesFM, TiRex, Moirai, Toto, FlowState, PatchTST-FM, T0, and Tafsut (all on `m4_weekly/short`).
TimesFM 2.5/3.0, TiRex 1.1 and TiRex-2-Zeroshot, Moirai, Toto, FlowState, PatchTST-FM r1,
Granite PatchTST-FM r2, T0, and Tafsut (all on `m4_weekly/short`).
Each job runs on Modal GPU and is **HF-verified** in pytest (metrics must match the
official GIFT-Eval reference CSV).

Expand Down
7 changes: 7 additions & 0 deletions experiments/gift-eval/configs/ci_subset.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Representative CI subset for replication verification (Chronos on two datasets).
# Every job is HF-verified in tests/test_replication.py after Modal run_ci.
# New models (TiRex-2, Granite PatchTST-FM r2) are added alongside existing entries.
jobs:
- model_key: amazon--chronos-bolt-small
dataset_name: m4_weekly
Expand All @@ -16,6 +17,9 @@ jobs:
- model_key: NX-AI--TiRex-1.1-gifteval
dataset_name: m4_weekly
term: short
- model_key: NX-AI--TiRex-2-gifteval-zs
dataset_name: m4_weekly
term: short
Comment on lines 17 to +22
- model_key: Salesforce--moirai-1.1-R-base
dataset_name: m4_weekly
term: short
Expand All @@ -28,6 +32,9 @@ jobs:
- model_key: ibm-research--patchtst-fm-r1
dataset_name: m4_weekly
term: short
- model_key: ibm-granite--granite-timeseries-patchtst-fm-r2
dataset_name: m4_weekly
term: short
- model_key: theforecastingcompany--t0-alpha
dataset_name: m4_weekly
term: short
Expand Down
9 changes: 9 additions & 0 deletions experiments/gift-eval/configs/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@ models:
repo_id: ibm-granite/granite-timeseries-patchtst-fm-r1
batch_size: 32

ibm-granite--granite-timeseries-patchtst-fm-r2:
class: foundationforecast.models.patchtst_fm.PatchTSTFM
reference_slug: Granite-PatchTST-FM-r2
max_length: 8192
kwargs:
repo_id: ibm-granite/granite-timeseries-patchtst-fm-r2
context_length: 8192
batch_size: 32

# --- Other foundation models ---
theforecastingcompany--t0-alpha:
class: foundationforecast.models.t0.T0
Expand Down
10 changes: 10 additions & 0 deletions experiments/gift-eval/tests/test_models_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,13 @@ def test_t0_beta_registered_in_models_yaml():
assert entry["reference_slug"] is None
assert entry["kwargs"]["repo_id"] == "theforecastingcompany/t0-beta"
assert entry["kwargs"]["alias"] == "t0-beta"


def test_granite_patchtst_r2_registered_in_models_yaml():
models = load_models_config()
entry = models["ibm-granite--granite-timeseries-patchtst-fm-r2"]
assert entry["class"] == "foundationforecast.models.patchtst_fm.PatchTSTFM"
assert entry["reference_slug"] == "Granite-PatchTST-FM-r2"
assert entry["max_length"] == 8192
assert entry["kwargs"]["repo_id"] == "ibm-granite/granite-timeseries-patchtst-fm-r2"
assert entry["kwargs"]["context_length"] == 8192
Loading
Loading