Instructions to use NX-AI/TiRex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TiRex
How to use NX-AI/TiRex with TiRex:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Commit ·
43ebaaf
1
Parent(s): 63c7409
docs: align model card with GitHub README and documentation (#6)
Browse files- docs: align model card with GitHub README and documentation (09d625d43e1a8e370cde476aa01b228456f37f00)
- docs: compact title and badge header for Hub rendering (ec386ada01e7c10b228da66de82fd64138c9c8a3)
- docs: remove extra spacing around badges (1dce4562d4d820fc703252df9d49d0276c752451)
Co-authored-by: Lukas Fischer <lukfischer@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -9,11 +9,27 @@ license_link: https://huggingface.co/NX-AI/TiRex/blob/main/LICENSE
|
|
| 9 |
license_name: nx-ai-community-license
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
This repository provides the pre-trained forecasting model TiRex introduced in the paper
|
| 15 |
[TiRex: Zero-Shot Forecasting across Long and Short Horizons with Enhanced In-Context Learning](https://arxiv.org/abs/2505.23719).
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
TiRex is a 35M parameter pre-trained time series forecasting model based on [xLSTM](https://github.com/NX-AI/xlstm).
|
| 18 |
|
| 19 |
### Key Facts:
|
|
@@ -26,7 +42,7 @@ TiRex is a 35M parameter pre-trained time series forecasting model based on [xLS
|
|
| 26 |
|
| 27 |
- **State-of-the-art Performance over Long and Short Horizons**:
|
| 28 |
TiRex achieves top scores in various time series forecasting benchmarks, see [GiftEval](https://huggingface.co/spaces/Salesforce/GIFT-Eval) and [ChronosZS](https://huggingface.co/spaces/autogluon/fev-leaderboard).
|
| 29 |
-
These
|
| 30 |
|
| 31 |
## Documentation
|
| 32 |
A detailed documentation of TiRex can be found here: https://nx-ai.github.io/tirex/
|
|
@@ -60,37 +76,48 @@ data = torch.rand((5, 128)) # Sample Data (5 time series with length 128)
|
|
| 60 |
quantiles, mean = model.forecast(context=data, prediction_length=64)
|
| 61 |
```
|
| 62 |
|
| 63 |
-
We provide an extended quick start example in [examples/quick_start_tirex.ipynb](./examples/quick_start_tirex.ipynb).
|
| 64 |
-
This notebook also shows how to use the different input and output types of
|
| 65 |
You can also run it in [Google Colab](https://colab.research.google.com/github/NX-AI/tirex/blob/main/examples/quick_start_tirex.ipynb).
|
| 66 |
|
| 67 |
-
We provide notebooks to run the benchmarks: [GiftEval](./examples/gifteval/gifteval.ipynb) and [Chronos-ZS](./examples/chronos_zs/chronos_zs.ipynb).
|
| 68 |
|
| 69 |
## TiRex Classification Model
|
|
|
|
| 70 |
|
| 71 |
-
For detailed instructions on using TiRex classification model please visit our [documentation page](https://nx-ai.github.io/tirex/how-to/classification/) and [quick start Notebook](./examples/quick_start_tirex_classification.ipynb).
|
| 72 |
|
| 73 |
-
|
|
|
|
|
|
|
| 74 |
|
| 75 |
## TiRex Docker image
|
| 76 |
|
| 77 |
-
For detailed instructions on building and running TiRex in a Docker container, see the [Docker README](./inference/README.md) or our [deployment documentation](https://nx-ai.github.io/tirex/deployment).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
## Finetuning TiRex
|
| 80 |
-
TiRex already
|
| 81 |
|
| 82 |
If you are interested in models fine-tuned on your data or with different pretraining, please contact us at [contact@nx-ai.com](mailto:contact@nx-ai.com)
|
| 83 |
|
| 84 |
-
## Troubleshooting
|
| 85 |
-
If you have problems please check the [documentation](https://nx-ai.github.io/tirex/) and feel free to create a GitHub issue or start a discussion.
|
| 86 |
-
|
| 87 |
|
| 88 |
## CUDA Kernels
|
| 89 |
|
| 90 |
-
|
| 91 |
These CUDA kernels are compiled when the model is loaded the first time.
|
| 92 |
The CUDA kernels require GPU hardware that support CUDA compute capability 8.0 or later.
|
| 93 |
-
We also highly suggest to use the provided [conda environment spec](./requirements_cu124.yaml).
|
| 94 |
The CUDA kernels are automatically used when the xlstm package is installed.
|
| 95 |
|
| 96 |
To install TiRex with the CUDA kernels run:
|
|
@@ -136,20 +163,24 @@ If you use TiRex in your research, please cite our work:
|
|
| 136 |
title = {{{TiRex}}: {{Zero-Shot Forecasting Across Long}} and {{Short Horizons}} with {{Enhanced In-Context Learning}}},
|
| 137 |
author = {Andreas Auer and Patrick Podest and Daniel Klotz and Sebastian B{\"o}ck and G{\"u}nter Klambauer and Sepp Hochreiter},
|
| 138 |
booktitle = {The Thirty-Ninth Annual Conference on Neural Information Processing Systems},
|
| 139 |
-
year = {2025}
|
| 140 |
url = {https://arxiv.org/abs/2505.23719},
|
| 141 |
}
|
| 142 |
```
|
| 143 |
```bibtex
|
| 144 |
@inproceedings{auer:25tirexclassification,
|
| 145 |
title = {Pre-trained Forecasting Models: Strong Zero-Shot Feature Extractors for Time Series Classification},
|
| 146 |
-
author = {Andreas Auer and Daniel Klotz and
|
| 147 |
booktitle = {NeurIPS 2025 Workshop on Recent Advances in Time Series Foundation Models (BERT2S)},
|
| 148 |
year = {2025},
|
| 149 |
url = {https://arxiv.org/abs/2510.26777},
|
| 150 |
}
|
| 151 |
```
|
| 152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
## License
|
| 154 |
|
| 155 |
-
TiRex is licensed under the [NXAI community license](./LICENSE).
|
|
|
|
| 9 |
license_name: nx-ai-community-license
|
| 10 |
---
|
| 11 |
|
| 12 |
+
<h1 align="center">TiRex: Zero-Shot Forecasting across Long and Short Horizons</h1>
|
| 13 |
+
|
| 14 |
+
<p align="center">
|
| 15 |
+
<a href="https://arxiv.org/abs/2505.23719"><img style="margin:2px 0;display:inline-block" src="https://img.shields.io/static/v1?label=Paper&message=2505.23719&color=B31B1B&logo=arXiv" alt="Paper"></a>
|
| 16 |
+
<a href="https://github.com/NX-AI/tirex"><img style="margin:2px 0;display:inline-block" src="https://img.shields.io/badge/GitHub-NX--AI%2Ftirex-181717?logo=github" alt="GitHub"></a>
|
| 17 |
+
<a href="https://pypi.org/project/tirex-ts/"><img style="margin:2px 0;display:inline-block" src="https://img.shields.io/pypi/v/tirex-ts?color=blue" alt="PyPI"></a>
|
| 18 |
+
<a href="https://pepy.tech/projects/tirex-ts"><img style="margin:2px 0;display:inline-block" src="https://static.pepy.tech/personalized-badge/tirex-ts?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=BLUE&left_text=downloads" alt="PyPI Downloads"></a>
|
| 19 |
+
<a href="https://huggingface.co/NX-AI/TiRex/blob/main/LICENSE"><img style="margin:2px 0;display:inline-block" src="https://img.shields.io/badge/license-nxai_community-green" alt="License"></a>
|
| 20 |
+
<a href="https://nx-ai.github.io/tirex/"><img style="margin:2px 0;display:inline-block" src="https://img.shields.io/website?url=https%3A%2F%2Fnx-ai.github.io%2Ftirex%2F&label=docs&up_message=online&up_color=green&down_message=offline&down_color=red" alt="docs"></a>
|
| 21 |
+
</p>
|
| 22 |
|
| 23 |
This repository provides the pre-trained forecasting model TiRex introduced in the paper
|
| 24 |
[TiRex: Zero-Shot Forecasting across Long and Short Horizons with Enhanced In-Context Learning](https://arxiv.org/abs/2505.23719).
|
| 25 |
|
| 26 |
+
> **TiRex-2:** A newer generation of this model is available, extending TiRex with native
|
| 27 |
+
> multivariate forecasting and past/future-known covariates. See the
|
| 28 |
+
> [TiRex-2 repository](https://github.com/NX-AI/tirex-2) and
|
| 29 |
+
> [paper](https://arxiv.org/abs/2607.01204).
|
| 30 |
+
|
| 31 |
+
## TiRex Model
|
| 32 |
+
|
| 33 |
TiRex is a 35M parameter pre-trained time series forecasting model based on [xLSTM](https://github.com/NX-AI/xlstm).
|
| 34 |
|
| 35 |
### Key Facts:
|
|
|
|
| 42 |
|
| 43 |
- **State-of-the-art Performance over Long and Short Horizons**:
|
| 44 |
TiRex achieves top scores in various time series forecasting benchmarks, see [GiftEval](https://huggingface.co/spaces/Salesforce/GIFT-Eval) and [ChronosZS](https://huggingface.co/spaces/autogluon/fev-leaderboard).
|
| 45 |
+
These benchmarks show that TiRex provides great performance for both long and short-term forecasting.
|
| 46 |
|
| 47 |
## Documentation
|
| 48 |
A detailed documentation of TiRex can be found here: https://nx-ai.github.io/tirex/
|
|
|
|
| 76 |
quantiles, mean = model.forecast(context=data, prediction_length=64)
|
| 77 |
```
|
| 78 |
|
| 79 |
+
We provide an extended quick start example in [examples/quick_start_tirex.ipynb](https://github.com/NX-AI/tirex/blob/main/examples/quick_start_tirex.ipynb).
|
| 80 |
+
This notebook also shows how to use the different input and output types of your time series data.
|
| 81 |
You can also run it in [Google Colab](https://colab.research.google.com/github/NX-AI/tirex/blob/main/examples/quick_start_tirex.ipynb).
|
| 82 |
|
| 83 |
+
We provide notebooks to run the benchmarks: [GiftEval](https://github.com/NX-AI/tirex/blob/main/examples/gifteval/gifteval.ipynb) and [Chronos-ZS](https://github.com/NX-AI/tirex/blob/main/examples/chronos_zs/chronos_zs.ipynb).
|
| 84 |
|
| 85 |
## TiRex Classification Model
|
| 86 |
+
[](http://arxiv.org/abs/2510.26777)
|
| 87 |
|
| 88 |
+
For detailed instructions on using TiRex classification model please visit our [documentation page](https://nx-ai.github.io/tirex/how-to/classification/) and [quick start Notebook](https://github.com/NX-AI/tirex/blob/main/examples/quick_start_tirex_classification.ipynb).
|
| 89 |
|
| 90 |
+
## TiRex Regression Model
|
| 91 |
+
|
| 92 |
+
For detailed instructions on using TiRex regression model please visit our [documentation page](https://nx-ai.github.io/tirex/how-to/regression/) or our [quick start Notebook](https://github.com/NX-AI/tirex/blob/main/examples/quick_start_tirex_regression.ipynb).
|
| 93 |
|
| 94 |
## TiRex Docker image
|
| 95 |
|
| 96 |
+
For detailed instructions on building and running TiRex in a Docker container, see the [Docker README](https://github.com/NX-AI/tirex/blob/main/inference/README.md) or our [deployment documentation](https://nx-ai.github.io/tirex/deployment).
|
| 97 |
+
|
| 98 |
+
## Model files
|
| 99 |
+
|
| 100 |
+
| File | Format | Notes |
|
| 101 |
+
| --- | --- | --- |
|
| 102 |
+
| [`model.ckpt`](https://huggingface.co/NX-AI/TiRex/blob/main/model.ckpt) | PyTorch checkpoint | Default. Loaded by `load_model("NX-AI/TiRex")`. |
|
| 103 |
+
| [`tirex.onnx`](https://huggingface.co/NX-AI/TiRex/blob/main/tirex.onnx) | ONNX | For optimized inference across different hardware platforms and frameworks. |
|
| 104 |
+
|
| 105 |
+
## ONNX Model
|
| 106 |
+
|
| 107 |
+
TiRex is available as an ONNX model (`tirex.onnx` in this repository) for optimized inference across different hardware platforms and frameworks. See the [ONNX notebook](https://github.com/NX-AI/tirex/blob/main/examples/tirex_onnx.ipynb) for more details.
|
| 108 |
|
| 109 |
## Finetuning TiRex
|
| 110 |
+
TiRex already provides state-of-the-art performance for zero-shot prediction. Hence, you can use it without training on your own data.
|
| 111 |
|
| 112 |
If you are interested in models fine-tuned on your data or with different pretraining, please contact us at [contact@nx-ai.com](mailto:contact@nx-ai.com)
|
| 113 |
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
## CUDA Kernels
|
| 116 |
|
| 117 |
+
TiRex can use custom CUDA kernels for the sLSTM cells.
|
| 118 |
These CUDA kernels are compiled when the model is loaded the first time.
|
| 119 |
The CUDA kernels require GPU hardware that support CUDA compute capability 8.0 or later.
|
| 120 |
+
We also highly suggest to use the provided [conda environment spec](https://github.com/NX-AI/tirex/blob/main/requirements_cu124.yaml).
|
| 121 |
The CUDA kernels are automatically used when the xlstm package is installed.
|
| 122 |
|
| 123 |
To install TiRex with the CUDA kernels run:
|
|
|
|
| 163 |
title = {{{TiRex}}: {{Zero-Shot Forecasting Across Long}} and {{Short Horizons}} with {{Enhanced In-Context Learning}}},
|
| 164 |
author = {Andreas Auer and Patrick Podest and Daniel Klotz and Sebastian B{\"o}ck and G{\"u}nter Klambauer and Sepp Hochreiter},
|
| 165 |
booktitle = {The Thirty-Ninth Annual Conference on Neural Information Processing Systems},
|
| 166 |
+
year = {2025},
|
| 167 |
url = {https://arxiv.org/abs/2505.23719},
|
| 168 |
}
|
| 169 |
```
|
| 170 |
```bibtex
|
| 171 |
@inproceedings{auer:25tirexclassification,
|
| 172 |
title = {Pre-trained Forecasting Models: Strong Zero-Shot Feature Extractors for Time Series Classification},
|
| 173 |
+
author = {Andreas Auer and Daniel Klotz and Sebastian B{\"o}ck and Sepp Hochreiter},
|
| 174 |
booktitle = {NeurIPS 2025 Workshop on Recent Advances in Time Series Foundation Models (BERT2S)},
|
| 175 |
year = {2025},
|
| 176 |
url = {https://arxiv.org/abs/2510.26777},
|
| 177 |
}
|
| 178 |
```
|
| 179 |
|
| 180 |
+
## Intended use and limitations
|
| 181 |
+
|
| 182 |
+
This release supports time-series forecasting, classification, and regression as [documented](https://nx-ai.github.io/tirex/). High-risk applications under EU AI Act Article 6 are outside NXAI's intended purpose. NXAI has not validated this release for high-risk compliance. Users and integrators must assess suitability and meet their legal obligations. Unlawful uses, including those prohibited by EU AI Act Article 5, are not permitted. See the [Intended Use Notice](https://github.com/NX-AI/tirex/blob/main/INTENDED_USE.md) for details. It does not change the licence or statutory obligations.
|
| 183 |
+
|
| 184 |
## License
|
| 185 |
|
| 186 |
+
TiRex is licensed under the [NXAI community license](https://huggingface.co/NX-AI/TiRex/blob/main/LICENSE).
|