#NPU
ibm-granite/granite-timeseries-flowstate-r1 (FlowState) is a time-scale adjustable Time Series Foundation Model (TSFM) open-sourced by IBM Research. It combines a State Space Model (SSM) encoder with a Functional Basis Decoder (FBD) to forecast in a timescale-invariant coefficient space, seamlessly adjusting to any sampling rate.
[0.1 .. 0.9])scale_factorThis repository adapts the checkpoint to run on a single-card Ascend NPU (npu:0). All model parameters and every input/output tensor are explicitly placed on npu:0; inference.py runs the real weights on real, traceable data.
date, HUFL, HULL, MUFL, MULL, LUFL, LULL, OT — the OT (oil temperature) series is used for forecasting.scale_factor = 1.0 (per model card recommendations).(context, batch, n_ch), batch_first=False, n_ch == 1 (univariate, as supported by FlowState).OT column as float32. No train/test split is needed (zero-shot).(batch, quantiles, horizon, n_ch) quantile forecasts; the median (q=0.5) is reported.The data file is downloaded from the public ETDataset repository on first run; the model weights are loaded from the local checkpoint directory or downloaded from HuggingFace Hub (HF_ENDPOINT mirror).
npu:0), CANN 8.5.1 / Ascend Toolkitpip install -r requirements.txtpython inference.pyOptional arguments: --model-dir <local checkpoint>, --data <csv>, --context 2048, --prediction-length 168, --scale-factor 1.0, --iterations 3.
Default run on npu:0 with ETTh1 (OT, hourly), context=2048, horizon=168, scale_factor=1.0:
| Metric | Value |
|---|---|
| Device | npu:0 (Ascend910) |
| Params | 9.069M, FP32 |
| Input shape | (2048, 1, 1) |
| Output shape | (1, 9, 168, 1) |
| First run (compile+infer) | 1065 ms |
| Avg (warm) | ~790 ms |
| Min / Max | 789 / 799 ms |
| P50 / P90 / P95 | 791 / 795 / 797 ms |
| Throughput | 1.26 windows/s |
| Peak NPU memory | 210 MiB |
| Quantile monotonic | True |
| Median forecast mean (168h) | 9.33 (oil temperature) |
CPU (same weights, same seed, same input) vs NPU on ETTh1 context=2048 → horizon=168:
atol=1e-4, rtol=1e-3 → PASS)(1, 9, 168, 1); quantile ordering preserved on NPU.The three terminal screenshots below are rendered by xterm.js from the real logs of this adaptation run (workflow, NPU device probe, and the default python inference.py output).
assets/agent_workflow.png — reconnaissance, data inspection, CPU baseline, NPU inference, consistency, benchmark, submission validation.assets/npu_device_call.png — npu-smi, NPU availability, device name, model parameter device/dtype, input/output tensor device.assets/model_result.png — real python inference.py output on npu:0.

n_ch == 1) and zero-shot inference; multi-variate inputs raise an error.torch.npu.max_memory_allocated() for the inference process.