NX-AI/TiRex-2 · Hugging Face
Log In<br>Sign Up
You need to agree to share your contact information to access this model<br>This repository is publicly accessible, but you have to accept the conditions to access its files and content.<br>Log in or Sign Up to review the conditions and access this model content.
TiRex-2
This repository provides the pretrained TiRex-2 model and inference code for zero-shot<br>multivariate forecasting with past and future-known covariates, as introduced in TiRex-2:<br>Generalizing TiRex to Multivariate Data and Streaming.
TiRex-2 is a pretrained time series foundation model that forecasts one or many target<br>variates directly from their history, optionally conditioned on past and future-known<br>covariates. A single checkpoint serves both univariate and multivariate forecasting and<br>operates in a streaming fashion as new observations arrive — all zero-shot, with no<br>task-specific training or fine-tuning.
Key facts
Zero-shot multivariate forecasting :<br>TiRex-2 forecasts multiple target variates out of the box, without training or fine-tuning on you data.
Past and future-known covariates :<br>TiRex-2 natively conditions on past covariates and future-known covariates, such as<br>calendar features, holidays, promotions, or scheduled interventions.
Small active footprint :<br>TiRex-2 activates 38.4M parameters in univariate mode and an additional 44.1M parameters<br>for multivariate forecasting.
Getting started
📖 For a detailed guide — including pip installation, a Google Colab demo, covariate<br>examples, and benchmark reproduction — see our GitHub repository.
The environment is managed by Pixi. Run the following to install it on your machine
curl -fsSL https://pixi.sh/install.sh | sh<br>git clone https://github.com/NX-AI/tirex-2 && cd tirex-2<br># activate the cpu-only env<br>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<br>from tirex2 import TimeseriesType, load_model
model = load_model("NX-AI/TiRex-2", device="cpu") # use `device="cuda"` if cuda is available<br>y = torch.sin(torch.arange(160).float() / 8)<br>ts = TimeseriesType(target=y[:128].unsqueeze(0), past_covariates=None, future_covariates=None)<br>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 minimal runs above code and creates a plot of the forecast.
pixi run comparison showcases 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.
Cite
If you use TiRex-2 in your research, please cite our work:
@misc{podest2026tirex2generalizingtirexmultivariate,<br>title={TiRex-2: Generalizing TiRex to Multivariate Data and Streaming},<br>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},<br>year={2026},<br>eprint={2607.01204},<br>archivePrefix={arXiv},<br>primaryClass={cs.LG},<br>url={https://arxiv.org/abs/2607.01204},
Other versions:
Alongside this pretrained checkpoint, we release decontaminated versions to enable fair<br>zero-shot evaluation on specific benchmarks by excluding their data from pretraining:
TiRex-2-g: excludes any overlap with<br>the GiftEval datasets (pretrain<br>and evaluation) from pretraining.
TiRex-2-gp: includes the<br>GiftEval-Pretrain collection<br>in the pretraining corpus (for comparison against TiRex-2-g).
TiRex-2-f: excludes all<br>fev-bench eval datasets<br>from pretraining, using the same approach as for GiftEval.
Downloads last month -
Downloads are not tracked for this model. How to track
Inference Providers NEW<br>Time Series Forecasting
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Datasets used to train NX-AI/TiRex-2<br>Viewer • Updated Jan 21, 2025 • 3.97M • 51.3k • 94
Viewer • Updated Mar 18, 2025 • 10.4M • 31.2k • 75
Paper for NX-AI/TiRex-2<br>Paper • 2607.01204 • Published 2 days ago