Skip to content

feat: add support for T0 (theforecastingcompany/t0-alpha)#348

Draft
GeoffNN wants to merge 1 commit into
TimeCopilot:mainfrom
GeoffNN:feat/add-t0
Draft

feat: add support for T0 (theforecastingcompany/t0-alpha)#348
GeoffNN wants to merge 1 commit into
TimeCopilot:mainfrom
GeoffNN:feat/add-t0

Conversation

@GeoffNN

@GeoffNN GeoffNN commented Jun 12, 2026

Copy link
Copy Markdown

Summary

Adds T0, The Forecasting Company's open-weights time series foundation model, as a new foundation forecaster. T0 (t0-alpha, ~102M params, Apache-2.0) is a decoder-style patch transformer producing probabilistic multi-horizon quantile forecasts — currently #1 on the fev-bench leaderboard (skill score 42.2) and CRPS 0.4941 on GIFT-Eval.

(Disclosure: I work at The Forecasting Company.)

Changes

  • timecopilot/models/foundation/t0.pyT0 forecaster wrapping the tfc-t0 package, following the existing foundation-model pattern (_get_model context manager, TimeSeriesDataset batching, QuantileConverter for levels/quantiles). The model predicts 5 quantile knots and interpolates arbitrary requested levels in a single forward pass; the median is the point forecast. Ragged batches are left-padded with NaN, which T0 treats as missing.
  • pyproject.tomltfc-t0>=0.1.2 for Python 3.11–3.13 (the package's supported range), mirroring the TiRex/uni2ts marker pattern.
  • tests/models/conftest.pyT0(context_length=256, batch_size=2) added to the model matrix under a version guard, plus a test_t0_import_fails guard test mirroring TiRex/Sundial.
  • Docs: API reference entry + Model Hub listing.

Status

Note

Draft until tfc-t0 0.1.2 lands on PyPI (in flight): it's a metadata-only release relaxing the einops/jaxtyping floors so tfc-t0 coexists with timecopilot-uni2ts (einops==0.7.*, jaxtyping<0.3). Once published I'll regenerate uv.lock and mark this ready. With those floors, uv lock resolves cleanly (verified locally).

Validation

Run locally on macOS / Python 3.12 (with the 0.1.2 floors):

  • forecast with defaults, quantiles=[0.1, 0.5, 0.9], and level=[80] on multi-series daily data: correct columns, finite values, monotone quantiles, median == point forecast.
  • cross_validation(df, h=6): correct shape and columns.
  • uv run pytest tests/models/test_models.py::test_t0_import_fails (skips on 3.11–3.13, asserts ImportError outside).
  • ruff check + ruff format --check pass on the new/changed files.

🤖 Generated with Claude Code

Adds The Forecasting Company's open-weights T0 foundation model as a
foundation forecaster, via the tfc-t0 package (Python 3.11–3.13).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants