Commit
·
00ca9a5
1
Parent(s):
1498187
Initial model commit
Browse files- README.md +113 -0
- model.ckpt +3 -0
README.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
datasets:
|
| 3 |
+
- autogluon/chronos_datasets
|
| 4 |
+
- Salesforce/GiftEvalPretrain
|
| 5 |
+
pipeline_tag: time-series-forecasting
|
| 6 |
+
library_name: tirex
|
| 7 |
+
license: other
|
| 8 |
+
license_link: https://huggingface.co/NX-AI/TiRex/blob/main/LICENSE
|
| 9 |
+
license_name: nx-ai-community-license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Changes from 1.0 to 1.1
|
| 13 |
+
|
| 14 |
+
The 1.1 release introduces **long period normalisation**, a method applied solely during inference.
|
| 15 |
+
|
| 16 |
+
## Version 1.1-gifteval
|
| 17 |
+
|
| 18 |
+
This specific version (1.1-gifteval) includes all 1.1 improvements plus the pretraining dataset has been cleaned
|
| 19 |
+
to remove overlaps with the GIFT-Eval test dataset.
|
| 20 |
+
|
| 21 |
+
# TiRex
|
| 22 |
+
|
| 23 |
+
TiRex is a **time-series foundation model** designed for **time series forecasting**,
|
| 24 |
+
with the emphasis to provide state-of-the-art forecasts for both short- and long-term forecasting horizon.
|
| 25 |
+
TiRex is **35M parameter** small and is based on the **[xLSTM architecture](https://github.com/NX-AI/xlstm)** allowing fast and performant forecasts.
|
| 26 |
+
The model is described in the paper [TiRex: Zero-Shot Forecasting across Long and Short Horizons with Enhanced In-Context Learning](https://arxiv.org/abs/2505.23719).
|
| 27 |
+
|
| 28 |
+
### Key Facts:
|
| 29 |
+
|
| 30 |
+
- **Zero-Shot Forecasting**:
|
| 31 |
+
TiRex performs forecasting without any training on your data. Just download and forecast.
|
| 32 |
+
|
| 33 |
+
- **Quantile Predictions**:
|
| 34 |
+
TiRex not only provides point estimates but provides quantile estimates.
|
| 35 |
+
|
| 36 |
+
- **State-of-the-art Performance over Long and Short Horizons**:
|
| 37 |
+
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).
|
| 38 |
+
These benchmark show that TiRex provides great performance for both long and short-term forecasting.
|
| 39 |
+
|
| 40 |
+
## Quick Start
|
| 41 |
+
|
| 42 |
+
The inference code is available on [GitHub](https://github.com/NX-AI/tirex).
|
| 43 |
+
|
| 44 |
+
### Installation
|
| 45 |
+
|
| 46 |
+
TiRex is currently only tested on *Linux systems* and Nvidia GPUs with compute capability >= 8.0.
|
| 47 |
+
If you want to use different systems, please check the [FAQ in the code repository](https://github.com/NX-AI/tirex?tab=readme-ov-file#faq--troubleshooting).
|
| 48 |
+
It's best to install TiRex in the specified conda environment.
|
| 49 |
+
The respective conda dependency file is [requirements_py26.yaml](https://github.com/NX-AI/tirex/blob/main/requirements_py26.yaml).
|
| 50 |
+
|
| 51 |
+
```sh
|
| 52 |
+
# 1) Setup and activate conda env from ./requirements_py26.yaml
|
| 53 |
+
git clone github.com/NX-AI/tirex
|
| 54 |
+
conda env create --file ./tirex/requirements_py26.yaml
|
| 55 |
+
conda activate tirex
|
| 56 |
+
|
| 57 |
+
# 2) [Mandatory] Install Tirex
|
| 58 |
+
|
| 59 |
+
## 2a) Install from source
|
| 60 |
+
git clone github.com/NX-AI/tirex # if not already cloned before
|
| 61 |
+
cd tirex
|
| 62 |
+
pip install -e .
|
| 63 |
+
|
| 64 |
+
# 2b) Install from PyPi (will be available soon)
|
| 65 |
+
|
| 66 |
+
# 2) Optional: Install also optional dependencies
|
| 67 |
+
pip install .[gluonts] # enable gluonTS in/output API
|
| 68 |
+
pip install .[hfdataset] # enable HuggingFace datasets in/output API
|
| 69 |
+
pip install .[notebooks] # To run the example notebooks
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
### Inference Example
|
| 73 |
+
|
| 74 |
+
```python
|
| 75 |
+
import torch
|
| 76 |
+
from tirex import load_model, ForecastModel
|
| 77 |
+
|
| 78 |
+
model: ForecastModel = load_model("NX-AI/TiRex-1.1-gifteval")
|
| 79 |
+
data = torch.rand((5, 128)) # Sample Data (5 time series with length 128)
|
| 80 |
+
forecast = model.forecast(context=data, prediction_length=64, resample_strategy="frequency")
|
| 81 |
+
```
|
| 82 |
+
|
| 83 |
+
We provide an extended quick start example in the [GitHub repository](https://github.com/NX-AI/tirex/blob/main/examples/quick_start_tirex.ipynb).
|
| 84 |
+
|
| 85 |
+
### Troubleshooting / FAQ
|
| 86 |
+
|
| 87 |
+
If you have problems please check the FAQ / Troubleshooting section in the [GitHub repository](https://github.com/NX-AI/tirex)
|
| 88 |
+
and feel free to create a GitHub issue or start a discussion.
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
### Training Data
|
| 92 |
+
|
| 93 |
+
- [chronos_datasets](https://huggingface.co/datasets/autogluon/chronos_datasets) (Subset - Zero Shot Benchmark data is not used for training - details in the paper)
|
| 94 |
+
- [GiftEvalPretrain](https://huggingface.co/datasets/Salesforce/GiftEvalPretrain) (Subset - details in the paper)
|
| 95 |
+
- Synthetic Data
|
| 96 |
+
|
| 97 |
+
## Cite
|
| 98 |
+
|
| 99 |
+
If you use TiRex in your research, please cite our work:
|
| 100 |
+
|
| 101 |
+
```bibtex
|
| 102 |
+
@article{auerTiRexZeroShotForecasting2025,
|
| 103 |
+
title = {{{TiRex}}: {{Zero-Shot Forecasting Across Long}} and {{Short Horizons}} with {{Enhanced In-Context Learning}}},
|
| 104 |
+
author = {Auer, Andreas and Podest, Patrick and Klotz, Daniel and B{\"o}ck, Sebastian and Klambauer, G{\"u}nter and Hochreiter, Sepp},
|
| 105 |
+
journal = {ArXiv},
|
| 106 |
+
volume = {2505.23719},
|
| 107 |
+
year = {2025}
|
| 108 |
+
}
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
## License
|
| 112 |
+
|
| 113 |
+
TiRex is licensed under the [NXAI community license](./LICENSE).
|
model.ckpt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d9a62f5669e64e9d6e7a4395e109db11e374faf31f8cfafdd1d93dbf6880e9bb
|
| 3 |
+
size 141230262
|