TiRex-2 time series forecasting inference
Project description
TiRex-2: Generalizing TiRex to Multivariate Data and Streaming
This repository provides the pre-trained multivariate forecasting model TiRex-2 introduced in the paper TiRex-2: Generalizing TiRex to Multivariate Data and Streaming.
TiRex-2
TiRex-2 is a pretrained time series foundation model that forecasts one or many target variates directly from their history, optionally conditioned on past and future-known covariates. A single checkpoint serves both univariate and multivariate forecasting and operates in a streaming fashion as new observations arrive — all zero-shot, with no task-specific training or fine-tuning.
Key facts
-
Zero-shot multivariate forecasting: TiRex-2 forecasts multiple target variates out of the box, without training or fine-tuning on you data.
-
Past and future-known covariates: TiRex-2 natively conditions on past covariates and future-known covariates, such as calendar features, holidays, promotions, or scheduled interventions.
-
Small active footprint: TiRex-2 activates 38.4M parameters in univariate mode and an additional 44.1M parameters for multivariate forecasting.
Getting started
The environment is managed by Pixi. Run the following to install it on your machine
curl -fsSL https://pixi.sh/install.sh | sh
git clone https://github.com/NX-AI/tirex-2 && cd tirex-2
# activate the cpu-only env
eval "$(pixi shell-hook -e example)" # to execute on GPUs use `example-cu128` or `example-cu126`
Minimal usage predicting a simple sine wave:
import matplotlib.pyplot as plt, torch
from tirex2 import TimeseriesType, load_model
model = load_model("NX-AI/TiRex-2", device="cpu") # use `device="cuda"` if cuda is available
y = torch.sin(torch.arange(160).float() / 8)
ts = TimeseriesType(target=y[:128].unsqueeze(0), past_covariates=None, future_covariates=None)
forecast = model.forecast([ts], prediction_length=32, output_type="numpy")[0][0]
We provide predefined Pixi tasks showcasing examplary forecasts. These run in the CPU-only example environment by default:
pixi run minimalruns above code and creates a plot of the forecast.pixi run comparisonshowcases the additional benefit of future known covariates in forecasting a target.
For a more interactive demo of TiRex-2, we also provide a quick-start notebook.
To reproduce our results for GIFT-Eval and fev-bench follow the instructions in ./examples/gifteval/ or ./examples/fevbench/, respectively.
Cite
If you use TiRex in your research, please cite our work:
@misc{podest2026tirex2generalizingtirexmultivariate,
title={TiRex-2: Generalizing TiRex to Multivariate Data and Streaming},
author={Patrick Podest and Marco Pichler and Elias Bürger and Levente Zólyomi and Bernhard Voggenberger and Wilhelm Berghammer and Daniel Klotz and Sebastian Böck and Günter Klambauer and Sepp Hochreiter},
year={2026},
eprint={2607.01204},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2607.01204},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tirex_2-0.1.0.tar.gz.
File metadata
- Download URL: tirex_2-0.1.0.tar.gz
- Upload date:
- Size: 52.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f255dcd1ff0235176cca6bb343a19c2336615bcf97fadd5d73c197d24b1170ea
|
|
| MD5 |
1f5d5d7119ea7d7bac0abe0f4a38ce47
|
|
| BLAKE2b-256 |
398424ed876ad39414328dafeaaa1354e43f4280668f883c6c9a5bd325a128c4
|
Provenance
The following attestation bundles were made for tirex_2-0.1.0.tar.gz:
Publisher:
publish.yaml on NX-AI/tirex-2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tirex_2-0.1.0.tar.gz -
Subject digest:
f255dcd1ff0235176cca6bb343a19c2336615bcf97fadd5d73c197d24b1170ea - Sigstore transparency entry: 2045601265
- Sigstore integration time:
-
Permalink:
NX-AI/tirex-2@4883a0be9adb14dcddc17d549a578b924d2cd0a9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NX-AI
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@4883a0be9adb14dcddc17d549a578b924d2cd0a9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tirex_2-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tirex_2-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
454a90278eda2f1984098c0b898347ba757abb4598f7a66c2c33c4493cbf9b15
|
|
| MD5 |
e84f521f5a47293b238f957662eae3d7
|
|
| BLAKE2b-256 |
3485d65c0f6f5bca6c09dc0fe8fb08002dc5221a6ee3c23e673370bed997c8c9
|
Provenance
The following attestation bundles were made for tirex_2-0.1.0-py3-none-any.whl:
Publisher:
publish.yaml on NX-AI/tirex-2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tirex_2-0.1.0-py3-none-any.whl -
Subject digest:
454a90278eda2f1984098c0b898347ba757abb4598f7a66c2c33c4493cbf9b15 - Sigstore transparency entry: 2045601774
- Sigstore integration time:
-
Permalink:
NX-AI/tirex-2@4883a0be9adb14dcddc17d549a578b924d2cd0a9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NX-AI
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@4883a0be9adb14dcddc17d549a578b924d2cd0a9 -
Trigger Event:
workflow_dispatch
-
Statement type: