Changelog¶
All notable changes to TiRex-2 are documented here.
Unreleased¶
Improvements¶
- βοΈπ Faster CPU inference: Parallel mLSTM kernels replace chunkwise kernels and speed up CPU forecasts by 5β12%, with unchanged GPU performance and reference-test accuracy, in #125, contributed by Martin Loretz.
Documentation and development¶
- Documented the model file formats on Hugging Face (
safetensorsdefault, ONNX, legacyckpt), added the Python requirement and a documentation link to the README, and fixed TiRex/TiRex-2 naming in the README.
Security and CI¶
- Added test coverage collection with
pytest-covand Codecov reports for core and inference tests, with PR comments and no Codecov status checks, in #129, contributed by Maria Zuliani and Zhihao Dai.
0.5.0 - 2026-11-03¶
Forecasting and performance¶
- βοΈπ Faster GPU inference for small batches with CUDA Graphs and improved Triton kernels in #80, contributed by Martin Loretz and Zhihao Dai:
- Graph replays accelerate small batches by up to 5Γ. Enabled by default for up to 32 variate rows on CUDA; disable with
load_model(..., cuda_graphs=False). - Triton sLSTM kernels replace FlashRNN, with FP32 states and PyTorch fallbacks. Removed the
flashrnndependency. - Triton mLSTM kernels replace
mlstm_kernels. Removed themlstm_kernelsdependency. - CUDA Toolkit is no longer required. On Linux, a C compiler is needed for kernel compilation; on Windows, PyTorch fallbacks are used. See FAQ for details.
- Fused sLSTM gate and mLSTM input projections; existing checkpoints adapt on load.
pad_context=Falsenow pads to a multiple of 4 patches to reduce compilation and CUDA Graph capture overhead.- Added kernel and CUDA Graph tests. Benchmark scores remain unchanged.
- Graph replays accelerate small batches by up to 5Γ. Enabled by default for up to 32 variate rows on CUDA; disable with
- βοΈπ Faster GPU inference for medium batches: Preprocessing now runs on the CPU and handles all target rows at once, with trend detection via a closed-form least-squares fit. GPU forecasts of 32β512 series are 1.5β1.9Γ faster with identical outputs, in #111, contributed by Daniil Yefimov.
- βοΈπ€ Forecasting skill: Added a forecasting skill with Claude Code and Codex plugins, including dataframe and tensor examples in #84, contributed by Zhihao Dai.
- Monotonic quantile forecasts: Sort predictions across quantile levels to prevent quantile crossings in #101, contributed by Martin Loretz.
Deployment¶
- βοΈπ Inference server request queuing: Concurrent requests are queued and batched across configurable model workers (
MODEL_WORKERS), increasing throughput by up to 33Γ on CPU and 22Γ on GPU. Requests that exceed the queue wait limit (MAX_QUEUE_WAIT_S) receive HTTP 503, in #114, contributed by Martin Loretz. - βοΈπ¦ Smaller GPU Docker image: Switching to
python:3.12-slimwithout the CUDA Toolkit reduces image size by about 60% (26.3 GB β 10.3 GB). CPU/GPU images now share the same virtualenv setup and healthcheck, in #119, contributed by Daniil Yefimov. - βοΈπ ONNX inference: Added an π ONNX inference guide for univariate and multivariate forecasts on CPU and GPU in #75, contributed by Suad0.
Breaking changes¶
- βΌοΈβΌοΈ Legacy checkpoint support removed: Checkpoints must be in
jsonandsafetensorsformats, in #112, contributed by Martin Loretz and Zhihao Dai.- Legacy
yamlandckptformats are no longer supported. Usetirex-2<0.5.0for legacy checkpoints, or convert them locally with this script.
- Legacy
- βΌοΈ GPU Docker user changed: Both images run as
appuser(UID 1000). Update GPU volume mounts from/home/ubuntu/...to/home/appuser/..., in #119, contributed by Daniil Yefimov. - Removed the legacy conversion script in #113. Use the archived version.
- Moved example and benchmark dependencies from pip extras to Pixi environments and updated setup docs and notebooks in #115, contributed by Zhihao Dai.
Dependencies and development¶
- βοΈπ Added an In-Context Learning guide: how extending the context and adding covariates improves forecasting in #69, contributed by Maria Zuliani and Zhihao Dai.
- Migrated the documentation site to Zensical, preserving the classic theme, API reference, and existing preview/build commands, and added
docs-build-cleanPixi task in #123, contributed by Zhihao Dai. - PyYAML is no longer a direct runtime dependency; it remains explicitly required in the Pixi test and example environments, in #112, contributed by Martin Loretz and Zhihao Dai.
- Simplified Pixi CUDA setup, removed CUDA Toolkit dependencies, added
pixi run build, and validated minimum dependency versions in #117, contributed by Zhihao Dai. - Enabled Triton floating-point fusion in Pixi and modernized build license metadata in #117, contributed by Zhihao Dai.
- Simplified model code and tests in #80, contributed by Martin Loretz:
- Replaced the FlashRNN layer with
sLSTMLayerinslstm_block.py. - Removed
xLSTMMixedConfigandxLSTMLargeConfig;BiXLSTMnow takes plain arguments. - Renamed
conv_mLSTMLayerConfigtomLSTMLayerConfig. - Removed unused feed-forward and norm options.
- Switched CPU reference tests to relative norms to tolerate BF16 rounding differences across machines.
- Replaced the FlashRNN layer with
Security and CI¶
- Added Python 3.15 preview testing and refreshed Pixi dependencies in #116, contributed by Zhihao Dai.
- Added plugin CI checks for manifest validation, Codex installation, package contents, and version bumps in #100, contributed by Zhihao Dai.
- Simplified Docker image builds and consolidated CI to test CPU/GPU images before publishing in #82, contributed by Zhihao Dai.
- Updated CA certificates and CI tooling for the eMudhra/emSign security incident in #83, contributed by Zhihao Dai.
- Changed Dependabot updates to monthly and disabled separate inference dependency updates in #96 and #108, contributed by Zhihao Dai and Daniil Yefimov.
0.4.0 - 2026-10-20¶
Improvements¶
- βοΈπ Default
safetensorsweights: All checkpoints ship model configuration and weights injsonandsafetensorsformats.load_modelnow loads fromconfig.jsonandmodel.safetensors, which avoids unpickling and is faster. The legacyyamlandckptfiles are deprecated with aFutureWarningin #55, contributed by Suad0.- βΌοΈ Legacy yaml and ckpt formats will no longer be supported from v0.5.0 onwards.
- βοΈπ¦ Offline Docker images: Docker images for CPU/GPU inference servers now include the default model weights for offline deployment in #82, contributed by Zhihao Dai.
- Removed the
xlstmdependency to reduce the package footprint, in #71, contributed by Martin Loretz.
Documentation and development¶
- Refactored the sLSTM recurrence interface to support future kernel implementations and decoupled its configuration from FlashRNN in #70, contributed by Martin Loretz.
- Added the Intended Use, Limitations and EU AI Act Notice (
INTENDED_USE.md), linked from the README and the documentation, in #67, contributed by Lukas Fischer and Yipeng Sun. - Added a script to convert legacy checkpoints to new formats in #55, contributed by Suad0.
0.3.1 - 2026-10-05¶
Documentation and development¶
- Refactored internal prediction pipeline, and renamed
_predict_once(...)to_predict(...)for clarity in #62, contributed by Christian GanhΓΆr.
0.3.0 - 2026-09-28¶
Improvements¶
- βοΈπ Use
forecast_df()to forecast directly from pandas, Polars, PyArrow, and other supported eager dataframes. It handles multiple series, covariates, and batching, and returns results in the input dataframe library by default, in #18, contributed by Suad0 and Zhihao Dai. - βοΈπ Added a
pad_context=Falseoption toforecast(...)to skip padding to the default context length, enabling much faster inference for short contexts at a small accuracy cost, in #57, contributed by Daniil Yefimov. - βοΈπ Added opt-in recurrent-layer compilation with
load_model(..., compile=True)for faster repeated forecasts (up to 1.82x on CPU), in #47, contributed by Daniil Yefimov. - Added a
preserve_grad=Trueoption to_predict_once(...)and postprocessing for fine-tuning, preserving finite gradients through inverse differencing, in #58, contributed by Zhihao Dai. - Replaced
einopsrearrangements with native PyTorch operations and removed the directeinopsdependency in #41, contributed by Copilot and Zhihao Dai. - Removed a redundant
torch.no_grad()context from prediction code in #42, contributed by Zhihao Dai.
Documentation and development¶
- Added a dataframe forecasting guide for native dataframe forecasting via
forecast_df, contributed by Suad0 and Zhihao Dai. - Corrected deployment examples and guidance for covariates, model caching, compilation, and the HTTP API, and added an Open Source vs PRO feature comparison table with consistent PRO naming in #21, contributed by Lukas Fischer, Claude Sonnet 5, and Zhihao Dai.
- Made the default Windows CUDA Pixi platform use the cu130 PyTorch index and fail CUDA tests early when CUDA is unavailable, in #51, contributed by Yipeng Sun.
- Added FAQs covering CUDA setup, supported NVIDIA GPU architectures, and Windows MSVC compiler setup in #19, contributed by Yipeng Sun and Daniil Yefimov.
- Added a Pixi documentation environment and preview/build commands, migrated documentation deployment to GitHub Pages artifact actions, and updated contributor instructions in #37, contributed by Zhihao Dai.
- Removed the unused root
requirements.txtin #40, contributed by Copilot and Zhihao Dai. - Added named Pixi platforms for Linux and Windows CPU builds and CUDA 12.6, 13.0, and 13.2 builds, with matching CUDA toolchains and updated development and benchmark commands in #20, contributed by Zhihao Dai.
- Added GitHub issue and pull request templates in #25, contributed by Zhihao Dai.
Security and CI¶
- Migrated the cross-platform CPU test matrix to Pixi for Python 3.11 and 3.14, added lower-bound tests with Python 3.11 and PyTorch 2.8.0 and Python 3.15 preview coverage, and restricted test workflow permissions in #43, contributed by Zhihao Dai.
- Added a CPU test job using the frozen Pixi lockfile in #44, contributed by Zhihao Dai.
- Updated
requestsfrom 2.34.0 to 2.34.2 in the inference dependencies in #35, contributed by Dependabot and Zhihao Dai. - Hardened Pixi dependency resolution with a seven-day package release cooldown (except for
xlstm,mlstm_kernels, andflashrnn), disabled dependency wheel builds, and required Pixi 0.67.0 or newer in #24, contributed by Zhihao Dai and Copilot Autofix. - Enabled weekly Dependabot version updates for the root Python dependencies in #28, contributed by Zhihao Dai.
- Added a security policy documenting supported versions and private vulnerability reporting in #23, contributed by Copilot and Zhihao Dai.
- Pinned GitHub Actions to commit SHAs and updated action versions in #27, contributed by Copilot and Zhihao Dai.
- Added Visual Studio developer-shell initialization for Windows builds in #27, contributed by Copilot and Zhihao Dai.
0.2.1 - 2026-08-05¶
Improvements¶
- Fixed TiRex-2 functionality on macOS for CPU and MPS backends in #10, contributed by Suad0.
- Fixed TiRex-2 functionality on Windows for CPU and CUDA backends in #5, contributed by Daniil Yefimov.
- Relaxed package requirements to make installation via pip more flexible in #12 and #13, contributed by Daniil Yefimov.
- Added an option to use Flex Attention in #6, contributed by danieleb1861.
0.1.1 - 2026-07-02¶
Initial TiRex-2 release, contributed by martinloretzzz in the initial commit.