{"id":50772039,"url":"https://github.com/NX-AI/tirex","last_synced_at":"2026-06-29T00:00:44.378Z","repository":{"id":296674736,"uuid":"991499215","full_name":"NX-AI/tirex","owner":"NX-AI","description":"TiRex: Zero-Shot Forecasting Across Long and Short Horizons with Enhanced In-Context Learning","archived":false,"fork":false,"pushed_at":"2026-05-11T06:00:57.000Z","size":7985,"stargazers_count":275,"open_issues_count":4,"forks_count":41,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-05-11T08:06:52.674Z","etag":null,"topics":["classification","forecasting","foundation-models","timeseries","timeseries-forecasting","xlstm"],"latest_commit_sha":null,"homepage":"https://nx-ai.github.io/tirex/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NX-AI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-27T18:05:21.000Z","updated_at":"2026-05-11T06:01:04.000Z","dependencies_parsed_at":"2025-11-29T15:01:09.704Z","dependency_job_id":null,"html_url":"https://github.com/NX-AI/tirex","commit_stats":null,"previous_names":["nx-ai/tirex"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/NX-AI/tirex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NX-AI%2Ftirex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NX-AI%2Ftirex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NX-AI%2Ftirex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NX-AI%2Ftirex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NX-AI","download_url":"https://codeload.github.com/NX-AI/tirex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NX-AI%2Ftirex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34907985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classification","forecasting","foundation-models","timeseries","timeseries-forecasting","xlstm"],"created_at":"2026-06-11T20:00:25.090Z","updated_at":"2026-06-29T00:00:44.373Z","avatar_url":"https://github.com/NX-AI.png","language":"Jupyter Notebook","funding_links":[],"categories":["Simulation, Forecasting and Macro Modeling"],"sub_categories":["Forecasting and Nowcasting"],"readme":"\u003cdiv align=\"center\"\u003e\n\n# TiRex: Zero-Shot Forecasting across Long and Short Horizons\n\n[![Paper](https://img.shields.io/static/v1?label=Paper\u0026message=2505.23719\u0026color=B31B1B\u0026logo=arXiv)](https://arxiv.org/abs/2505.23719)\n[![Hugging Face](https://img.shields.io/badge/HuggingFace-TiRex-yellow?logo=huggingface)](https://huggingface.co/NX-AI/TiRex)\n[![PyPI](https://img.shields.io/pypi/v/tirex-ts?color=blue)](https://pypi.org/project/tirex-ts/)\n[![PyPI Downloads](https://static.pepy.tech/personalized-badge/tirex-ts?period=total\u0026units=INTERNATIONAL_SYSTEM\u0026left_color=GREY\u0026right_color=BLUE\u0026left_text=downloads)](https://pepy.tech/projects/tirex-ts)\n[![License](https://img.shields.io/badge/license-nxai_community-green)](https://github.com/NX-AI/tirex-internal/blob/main/LICENSE)\n[![docs](https://img.shields.io/website?url=https%3A%2F%2Fnx-ai.github.io%2Ftirex%2F\u0026label=docs\u0026up_message=online\u0026up_color=green\u0026down_message=offline\u0026down_color=red)](https://nx-ai.github.io/tirex/)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![formatter: docformatter](https://img.shields.io/badge/formatter-docformatter-fedcba.svg)](https://github.com/PyCQA/docformatter)\n\n\u003c/div\u003e\n\n\nThis repository provides the pre-trained forecasting model TiRex introduced in the paper\n[TiRex: Zero-Shot Forecasting across Long and Short Horizons with Enhanced In-Context Learning](https://arxiv.org/abs/2505.23719).\n\n\n## TiRex Model\n\nTiRex is a 35M parameter pre-trained time series forecasting model based on [xLSTM](https://github.com/NX-AI/xlstm).\n\n### Key Facts:\n\n- **Zero-Shot Forecasting**:\n  TiRex is a pre-trained model that performs time series forecasting without requiring any training on your data. Simply download and use it.\n\n- **Quantile Predictions**:\n  TiRex provides both point estimates and quantile estimates.\n\n- **State-of-the-art Performance over Long and Short Horizons**:\n  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).\n  These benchmark show that TiRex provides great performance for both long and short-term forecasting.\n\n## Documentation\nA detailed documentation of TiRex can be found here: https://nx-ai.github.io/tirex/\n\n## Installation\n\n```sh\npip install tirex-ts\n```\n\nInstall with additional input/output adapter:\n```sh\npip install \"tirex-ts[gluonts,hfdataset]\"\n```\n\nYou can also install TiRex with all extras at once using:\n```sh\npip install \"tirex-ts[all]\"\n```\n\nTiRex is currently only tested on Linux and MacOS.\n\n## Quick Start\n\n```python\nimport torch\nfrom tirex import load_model, ForecastModel\n\nmodel: ForecastModel = load_model(\"NX-AI/TiRex\")\ndata = torch.rand((5, 128))  # Sample Data (5 time series with length 128)\nquantiles, mean = model.forecast(context=data, prediction_length=64)\n```\n\nWe provide an extended quick start example in [examples/quick_start_tirex.ipynb](./examples/quick_start_tirex.ipynb).\nThis notebook also shows how to use the different input and output types of you time series data.\nYou can also run it in [Google Colab](https://colab.research.google.com/github/NX-AI/tirex/blob/main/examples/quick_start_tirex.ipynb).\n\nWe provide notebooks to run the benchmarks: [GiftEval](./examples/gifteval/gifteval.ipynb) and [Chronos-ZS](./examples/chronos_zs/chronos_zs.ipynb).\n\n## TiRex Classification Model\n[![Paper](https://img.shields.io/static/v1?label=Paper\u0026message=2510.26777\u0026color=B31B1B\u0026logo=arXiv)](http://arxiv.org/abs/2510.26777)\n\nFor 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).\n\n## TiRex Regression Model\n\nFor 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](./examples/quick_start_tirex_regression.ipynb).\n\n## TiRex Docker image\n\nFor 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).\n\n## ONNX Model\n\nTiRex is available as an ONNX model for optimized inference across different hardware platforms and frameworks. See the [ONNX notebook](./examples/tirex_onnx.ipynb) for more details.\n\n## Finetuning TiRex\nTiRex already provide state-of-the-art performance for zero-shot prediction. Hence, you can use it without training on your own data.\n\nIf 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)\n\n\n## CUDA Kernels\n\nTirex can use custom CUDA kernels for the sLSTM cells.\nThese CUDA kernels are compiled when the model is loaded the first time.\nThe CUDA kernels require GPU hardware that support CUDA compute capability 8.0 or later.\nWe also highly suggest to use the provided [conda environment spec](./requirements_cu124.yaml).\nThe CUDA kernels are automatically used when the xlstm package is installed.\n\nTo install TiRex with the CUDA kernels run:\n```sh\npip install \"tirex-ts[cuda,gluonts,hfdataset]\"\n```\n\nExplicitly set the custom CUDA backend:\n```python\nmodel = load_model(\"NX-AI/TiRex\", backend=\"cuda\")\n```\n\n### Troubleshooting CUDA\n\n**This information is taken from the\n[xLSTM repository](https://github.com/NX-AI/xlstm) - See this for further details**:\n\nFor the CUDA version of sLSTM, you need to specify Compute Capability, see [https://developer.nvidia.com/cuda-gpus](https://developer.nvidia.com/cuda-gpus). Or just specify a range as in the example below:\n```bash\nexport TORCH_CUDA_ARCH_LIST=\"8.0;8.6;9.0\"\n```\n\nFor all kinds of custom setups with torch and CUDA, keep in mind that versions have to match. Also, to make sure the correct CUDA libraries are included you can use the `XLSTM_EXTRA_INCLUDE_PATHS` environment variable now to inject different include paths, for example:\n\n```bash\nexport XLSTM_EXTRA_INCLUDE_PATHS='/usr/local/include/cuda/:/usr/include/cuda/'\n```\n\nor within python:\n\n```python\nimport os\nos.environ['XLSTM_EXTRA_INCLUDE_PATHS']='/usr/local/include/cuda/:/usr/include/cuda/'\n```\n\n\n## Cite\n\nIf you use TiRex in your research, please cite our work:\n\n```bibtex\n@inproceedings{auer:25tirex,\n  title = {{{TiRex}}: {{Zero-Shot Forecasting Across Long}} and {{Short Horizons}} with {{Enhanced In-Context Learning}}},\n  author = {Andreas Auer and Patrick Podest and Daniel Klotz and Sebastian B{\\\"o}ck and G{\\\"u}nter Klambauer and Sepp Hochreiter},\n  booktitle = {The Thirty-Ninth Annual Conference on Neural Information Processing Systems},\n  year = {2025},\n  url = {https://arxiv.org/abs/2505.23719},\n}\n```\n```bibtex\n@inproceedings{auer:25tirexclassification,\n    title = {Pre-trained Forecasting Models: Strong Zero-Shot Feature Extractors for Time Series Classification},\n    author = {Andreas Auer and Daniel Klotz and Sebastinan B{\\\"o}ck and Sepp Hochreiter},\n    booktitle = {NeurIPS 2025 Workshop on Recent Advances in Time Series Foundation Models (BERT2S)},\n    year = {2025},\n    url = {https://arxiv.org/abs/2510.26777},\n}\n```\n\n## License\n\nTiRex is licensed under the [NXAI community license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNX-AI%2Ftirex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNX-AI%2Ftirex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNX-AI%2Ftirex/lists"}