#NPU · Model: NX-AI/TiRex (revision 63c740922493f5fbe60b277609ec62babfba2762) · Task: Zero-shot probabilistic time-series forecasting
TiRex is a 35.29M parameter pre-trained time series forecasting model based on
xLSTM (sLSTM blocks). It performs zero-shot forecasting without any training on
your data, returning both point estimates (median) and quantile estimates for
every horizon step. This repository adapts TiRex to run real inference on a
single Ascend NPU (npu:0, Ascend910_9362).
ETTh1.csvOT (oil temperature)[batch, horizon, num_quantiles], mean [batch, horizon]f18de3ad269cef59bb07b5438d79bb3042d3be49bdeecf01c1cd6d29695ee0662.9.0+cpu, torch_npu 2.9.0.post18.5.1, npu-smi 25.5.5, device Ascend910_9362 (2 devices, uses npu:0)3.11.14pip install tirex-ts
# weights are auto-downloaded from HuggingFace Hub (or place model.ckpt at ./weights/model.ckpt)python inference.py # default: npu:0, ETTh1 OT, context=512, horizon=64
python inference.py --bench # stable latency benchmark (warmup 3, runs 10)
python inference.py --consistency # CPU vs NPU consistency check
python inference.py --device cpu # CPU baselineThe model and all participating tensors are moved to npu:0. The internal
sLSTM cell computes in bfloat16 (as in the official torch backend).
npu:0, dtype float32; peak NPU memory ≈ 162 MB (64 GB device)(1, 512) → horizon (1, 64), quantiles (1, 64, 9)[9.2944, 9.0842, 8.9638, 8.9246, 8.8980][9.2944, 9.0842, 8.9638, 8.9246, 8.8980]Same weights, input, dtype and seed on CPU and npu:0:
atol=0.05, rtol=0.01 (BF16 sLSTM path)torch.npu.synchronize())| Asset | Description |
|---|---|
assets/agent_workflow.png | Full adaptation workflow: discovery, dataset, CPU/NPU, consistency, benchmark, validation |
assets/npu_device_call.png | npu-smi, NPU availability, device name, param device/dtype, input/output tensors |
assets/model_result.png | Real python inference.py output: schema, forecasts, latency, status |
OT data.