Skip to content
Back to search

tirex2-plugins

MarketplaceWorks with Claude CodeGitHub

Time series forecasting skills for TiRex-2.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/NX-AI/tirex-2 with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/NX-AI/tirex-2'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/nx-ai--tirex-2/badge.svg)](/listings/nx-ai--tirex-2)

HTML

<a href="/listings/nx-ai--tirex-2"><img src="/api/listings/nx-ai--tirex-2/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

Via Pip

pip install tirex-2

Install with additional dependencies:

pip install "tirex-2[examples,fev,gluonts]"

The Python package installation is currently only tested on Linux and macOS. Docker usage is documented separately and includes Linux, macOS, and Windows Docker Desktop instructions.

Via Pixi

We use [Pixi](https://pixi.prefix.dev/latest/) for our development and benchmarking environment to ensure that it is set up correctly. Run the following command to install it on your machine (Linux/macOS):

# install Pixi
curl -fsSL https://pixi.sh/install.sh | sh
# install dependencies for TiRex-2
pixi install

Pixi selects a compatible platform automatically (PyTorch w/ CUDA 13.0 for Linux/Windows, PyTorch w/ default for macOS), or you can choose one explicitly, for example `-p linux-64-cuda-126`. Both environments and platforms are defined in [`pyproject.toml`](pyproject.toml).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 14 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "tirex2-plugins",
  3. "description": "Time series forecasting skills for TiRex-2.",
  4. "owner": {
  5. "name": "NXAI"
  6. },
  7. "plugins": [
  8. {
  9. "name": "tirex2",
  10. "source": "./plugins/tirex2",
  11. "description": "Time series forecasting with TiRex-2."
  12. }
  13. ]
  14. }
README.md · README · 200 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <h1 align="center">
  2. <img src="https://raw.githubusercontent.com/NX-AI/tirex-2/refs/heads/main/docs/images/tirex.svg" alt="TiRex emoji" height="48" /> TiRex-2: Generalizing TiRex to Multivariate Data and Streaming
  3. </h1>
  4. <div align="center">
  5. [![Paper](https://img.shields.io/static/v1?label=Paper&message=2607.01204&color=B31B1B&logo=arXiv)](https://arxiv.org/abs/2607.01204)
  6. [![Hugging Face](https://img.shields.io/badge/HuggingFace-TiRex--2-yellow?logo=huggingface)](https://huggingface.co/NX-AI/TiRex-2)
  7. [![PyPI](https://img.shields.io/pypi/v/tirex-2?color=blue)](https://pypi.org/project/tirex-2/)
  8. [![PyPI Downloads](https://static.pepy.tech/personalized-badge/tirex-2?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=BLUE&left_text=downloads)](https://pepy.tech/projects/tirex-2)
  9. [![Docker](https://img.shields.io/badge/GHCR-tirex2--cpu%20%2F%20tirex2--gpu-2496ED?logo=docker&logoColor=white)](https://github.com/NX-AI/tirex-2/pkgs/container/tirex2-cpu)
  10. [![License](https://img.shields.io/badge/license-Apache--2.0-green)](LICENSE)
  11. [![docs](https://img.shields.io/website?url=https%3A%2F%2Fnx-ai.github.io%2Ftirex-2%2F&label=docs&up_message=online&up_color=green&down_message=offline&down_color=red)](https://nx-ai.github.io/tirex-2/)
  12. [![Tests](https://github.com/NX-AI/tirex-2/actions/workflows/test.yaml/badge.svg)](https://github.com/NX-AI/tirex-2/actions/workflows/test.yaml)
  13. [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
  14. [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/NX-AI/tirex-2/blob/main/examples/getting_started.ipynb)
  15. [![TiRex-2 Demo](https://img.shields.io/badge/HuggingFace-TiRex--2%20Demo-yellow?logo=huggingface)](https://huggingface.co/spaces/NX-AI/TiRex-2-demo)
  16. </div>
  17. > [!NOTE]
  18. > 🎉 **News (Sep 2026):** TiRex-2 has been accepted as an **Oral** presentation (0.36%) at **NeurIPS 2026**!
  19. This repository provides the pre-trained multivariate forecasting model TiRex-2 introduced in the paper [TiRex-2: Generalizing TiRex to Multivariate Data and Streaming](https://arxiv.org/abs/2607.01204).
  20. > **TiRex-2 PRO:** This repository is our open-source release. TiRex-2 PRO extends it with dedicated support, streaming, hardware-optimized inference (edge, embedded, and industrial PCs, among others), fine-tuning, and classification & regression support — see [TiRex-2 PRO](#tirex-2-pro) below or contact us at [contact@nx-ai.com](mailto:contact@nx-ai.com).
  21. ## TiRex-2
  22. TiRex-2 is a **pretrained time series foundation model** that forecasts one or many target
  23. variates directly from their history, optionally conditioned on past and future-known
  24. covariates. A single checkpoint serves both univariate and multivariate forecasting, built
  25. on a recurrent architecture designed for efficient streaming settings — all zero-shot, with
  26. no task-specific training or fine-tuning.
  27. TiRex-2 generalizes our original univariate model, [TiRex](https://github.com/NX-AI/tirex), to
  28. multivariate forecasting with past and future covariates.
  29. ## Key facts
  30. - **Zero-shot multivariate forecasting**:
  31. TiRex-2 forecasts multiple target variates out of the box, without training or fine-tuning on your data.
  32. - **Past and future-known covariates**:
  33. TiRex-2 natively conditions on past covariates and future-known covariates, such as
  34. calendar features, holidays, promotions, or scheduled interventions.
  35. - **Small active footprint**:
  36. TiRex-2 activates 38.4M parameters in univariate mode and an additional 44.1M parameters
  37. for multivariate forecasting.
  38. ## Installation
  39. Requires Python 3.11 or newer. Install [PyTorch](https://pytorch.org/get-started/locally/) for your CPU or GPU, then TiRex-2:
  40. ```bash
  41. pip install tirex-2
  42. ```
  43. ## Documentation
  44. The full documentation, with how-to guides, deployment and the API reference, is available at <https://nx-ai.github.io/tirex-2/>.
  45. ## Model files
  46. The pretrained weights are hosted on [Hugging Face](https://huggingface.co/NX-AI/TiRex-2) in several formats:
  47. | File | Format | Notes |
  48. | --- | --- | --- |
  49. | [`model.safetensors`](https://huggingface.co/NX-AI/TiRex-2/blob/main/model.safetensors) + [`config.json`](https://huggingface.co/NX-AI/TiRex-2/blob/main/config.json) | [safetensors](https://github.com/huggingface/safetensors) | **Default.** Loaded by `load_model("NX-AI/TiRex-2")` and bundled in the Docker images. Avoids unpickling and loads faster. |
  50. | [`model.onnx`](https://huggingface.co/NX-AI/TiRex-2/blob/main/model.onnx) | ONNX | Run with only `numpy` and `onnxruntime`, no PyTorch needed. See the [ONNX guide](https://nx-ai.github.io/tirex-2/how-to/onnx/). |
  51. | `model.ckpt` + `model-config.yaml` | PyTorch checkpoint | Legacy format, kept on Hugging Face for older releases. Not supported by `tirex-2` 0.5.0 and later; use `tirex-2<0.5.0` to load it. |
  52. ## FAQ
  53. See the [FAQ](https://nx-ai.github.io/tirex-2/faq/) in the documentation.
  54. ## Agent plugin
  55. Forecast time series without training or writing code in Claude Code or Codex using the TiRex-2 plugin:
  56. **Claude Code**
  57. ```bash
  58. claude plugin marketplace add NX-AI/tirex-2
  59. claude plugin install tirex2@tirex2-plugins
  60. ```
  61. **Codex**
  62. ```bash
  63. codex plugin marketplace add NX-AI/tirex-2
  64. codex plugin add tirex2@tirex2-plugins
  65. ```
  66. Start a new session and ask to forecast with TiRex-2.
  67. ## Getting started
  68. The most easy way for you to get started is by checking out our ["Getting Started" notebook](examples/getting_started.ipynb). Moreover, you can jump straight into testing out TiRex-2 using [Google Colab](https://colab.research.google.com/github/NX-AI/tirex-2/blob/main/examples/getting_started.ipynb). If you have cloned this repository, you can also easily start the notebook via [Pixi](https://pixi.prefix.dev/latest/#installation) by running:
  69. ```bash
  70. pixi run notebook
  71. ```
  72. ### Minimal usage predicting a simple sine wave
  73. ```python
  74. import torch
  75. from tirex2 import TimeseriesType, load_model
  76. from tirex2.plotting import plot_multivariate # requires matplotlib to be installed
  77. # load model
  78. model = load_model("NX-AI/TiRex-2", device="cpu") # use `device="cuda"` if cuda is available
  79. # generate data - target expects time series of shape (n_targets, context_length)
  80. context = torch.sin(torch.arange(128).float() / 8)
  81. ts = TimeseriesType(target=context.unsqueeze(0), past_covariates=None, future_covariates=None)
  82. # perform forecast - each forecast is of shape (n_targets, 9 quantiles, prediction_length)
  83. forecast = model.forecast([ts], prediction_length=32, output_type="numpy")[0]
  84. # visualize result
  85. fig = plot_multivariate(ts, forecast, engine="matplotlib")
  86. fig.show()
  87. ```
  88. ![output of plot_multivariate function visualizing context and forecast](/resources/sine-wave-prediction.png)
  89. ### Covariate example
  90. This example originates from the "Getting Started" notebook, showing the value of additional covariates.
  91. ```python
  92. from tirex2 import load_model
  93. from tirex2.demo import Demo, plot_demo_forecast
  94. # load model
  95. model = load_model("NX-AI/TiRex-2", device="cpu") # use `device="cuda"` if cuda is available
  96. # load data
  97. demo = Demo.create_nonstationary_demo()
  98. ts_univariate = demo.to_timeseries_type(include_covariates=False)
  99. ts_multivariate = demo.to_timeseries_type(include_covariates=True)
  100. # perform forecast - each forecast is of shape (n_targets, 9 quantiles, prediction_length)
  101. forecasts = model.forecast(
  102. timeseries=[ts_univariate, ts_multivariate],
  103. prediction_length=demo.horizon,
  104. output_type="numpy",
  105. )
  106. # visualize result
  107. fig = plot_demo_forecast(demo, *forecasts, engine="matplotlib")
  108. fig.show()
  109. ```
  110. ![output of plot_multivariate function visualizing context and forecast of multivariate input](/resources/multivariate-prediction.png)
  111. ### Benchmarking
  112. To reproduce our results for the [GIFT-Eval](https://huggingface.co/spaces/Salesforce/GIFT-Eval) and [fev-bench](https://huggingface.co/spaces/autogluon/fev-bench) leaderboards, follow the instructions in
  113. [/examples/gifteval/](./examples/gifteval/README.md) and [/examples/fevbench/](./examples/fevbench/README.md), respectively.
  114. ## TiRex-2 Docker image
  115. For detailed instructions on building and running TiRex-2 in a Docker container, see the [Docker README](./inference/README.md).
  116. ## TiRex-2 PRO
  117. TiRex-2 already provides state-of-the-art performance for zero-shot prediction, so you can use this open-source release without training on your own data.
  118. TiRex-2 PRO extends this open-source release with:
  119. - **Support**: dedicated support and engagement from NXAI.
  120. - **Streaming**: incremental forecast updates as new observations arrive, without recomputing forecasts over the full history.
  121. - **Speed**: optimized inference, including hardware-specific optimizations for edge, embedded, and industrial PC deployments.
  122. - **Fine-tuning**: models adapted to your data or pretrained on different datasets for improved performance.
  123. - **Classification & Regression**: TiRex-2 adapted for classification and regression tasks.
  124. See the full feature comparison in the [docs](https://nx-ai.github.io/tirex-2/pro/), or contact us at [contact@nx-ai.com](mailto:contact@nx-ai.com).
  125. ## Cite
  126. If you use TiRex-2 in your research, please cite our work:
  127. ```bibtex
  128. @inproceedings{podest2026tirex2,
  129. title = {{TiRex-2}: Generalizing {TiRex} to Multivariate Data and Streaming},
  130. author = {Podest, Patrick and Pichler, Marco and B{\"u}rger, Elias and Z{\'o}lyomi, Levente and Voggenberger, Bernhard and Berghammer, Wilhelm and Klotz, Daniel and B{\"o}ck, Sebastian and Klambauer, G{\"u}nter and Hochreiter, Sepp},
  131. booktitle = {Advances in Neural Information Processing Systems},
  132. year = {2026},
  133. eprint = {2607.01204},
  134. archivePrefix = {arXiv},
  135. primaryClass = {cs.LG},
  136. url = {https://arxiv.org/abs/2607.01204}
  137. }
  138. ```
  139. ## Intended use and limitations
  140. This release supports time-series forecasting as [documented](https://nx-ai.github.io/tirex-2/). 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](./INTENDED_USE.md) for details. It does not change the licence or statutory obligations.
  141. ## License
  142. TiRex-2 is licensed under the [Apache License 2.0](./LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.