Skip to content

ADD T0 (t0-alpha) zero-shot forecasting solver#46

Open
GeoffNN wants to merge 1 commit into
benchopt:mainfrom
GeoffNN:feat/t0-alpha-solver
Open

ADD T0 (t0-alpha) zero-shot forecasting solver#46
GeoffNN wants to merge 1 commit into
benchopt:mainfrom
GeoffNN:feat/t0-alpha-solver

Conversation

@GeoffNN

@GeoffNN GeoffNN commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Adds theforecastingcompany/t0-alpha (~102M-param decoder-style patch transformer, Apache-2.0) as a local-inference forecasting solver, via the tfc-t0 package.

Design

  • Forecasting only — the package exposes no embedding API, so classification/AD are skipped via skip().
  • Native quantiles: requests the 5 levels the model was trained on (0.1, 0.25, 0.5, 0.75, 0.9) and returns them directly in ForecastOutput.
  • Batched inference: T0 treats NaN as missing, so variable-length histories are left-padded with NaN into rectangular (B, C, T_max) batches — all (series, cutoff) windows grouped by channel count, chunked by a batch_size parameter to bound memory. Multivariate series go through the model's native [B, V, T] joint-forecast path.
  • Model loading happens in set_objective (untimed), mirroring the Chronos-2 solver.

Testing

  • Verified end-to-end against the real HF weights: ragged univariate + multivariate inputs with multiple cutoffs produce correctly shaped (n_cutoffs, H, C, Q) outputs, finite values, monotone quantiles, and correct prediction_length override + empty-input handling.
  • benchopt test . -k T0: passes the same tests as the existing chronos2 solver (test_solver_class, test_solver_install_api); the remaining failures are the missing-test-dataset issue on main that ENH Fix running the test suite #44 fixes, and reproduce identically for chronos2.
  • ruff check clean.

🤖 Generated with Claude Code

Runs The Forecasting Company's open-weights T0 model
(theforecastingcompany/t0-alpha) locally via the tfc-t0 package.
Variable-length histories are left-padded with NaN (treated as missing
by the model) so all (series, cutoff) windows run as rectangular
batches, grouped by channel count and chunked by batch_size.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@GeoffNN GeoffNN requested a review from tomMoral June 12, 2026 22:20
@felixdivo

Copy link
Copy Markdown
Contributor

Awesome addition! It probably makes sense to wait a tiny bit to then build this directly on the simpler implementation provided by #42. This is less relevant for T0 because it does not expose forecasts, but it would still enable anomaly detection via residual error tracking.

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