Name: ibm-research/flowstate (FlowState v1.1) HF: https://huggingface.co/ibm-research/flowstate Paper: https://arxiv.org/abs/2508.05287 Architecture: S5 SSM Encoder + LEGs Decoder Parameters: ~9M (9,069,312) Type: Time Series Foundation Model (zero-shot forecasting)
FlowState is the first time-scale adjustable Time Series Foundation Model, combining a State Space Model (SSM) Encoder with a Functional Basis Decoder. It transitions into a timescale-invariant coefficient space and makes continuous forecasts, seamlessly adjusting to all possible sampling rates.
| Dep | Version | Note |
|---|---|---|
| Python | >=3.10 | 3.11 recommended |
| torch | >=2.1.0 | PyTorch |
| torch_npu | >=2.1.0 | Ascend NPU backend |
| safetensors | >=0.4.0 | weight loading |
| numpy | <2.0 |
| CANN | 8.0+ | 8.5.1 recommended |
Install: pip install torch>=2.1.0 torch_npu>=2.1.0 safetensors>=0.4.0 numpy<2.0.0
npu-smi info
python3 -c "import torch_npu; print(torch.npu.device_count(), torch.npu.get_device_name(0))"huggingface-cli download ibm-research/flowstate --local-dir ./model_cache# Standard forecast (context=2048, pred_len=960, scale=0.25)
python inference.py --model-path ./model_cache --device npu --prediction-length 960 --scale-factor 0.25
# Short forecast
python inference.py --model-path ./model_cache --device npu --prediction-length 96 --scale-factor 1.0| Param | Default | Description |
|---|---|---|
| --model-path | required | checkpoint dir |
| --device | npu | npu/cpu/cuda |
| --context-length | 2048 | input timesteps |
| --prediction-length | 960 | forecast horizon |
| --scale-factor | 0.25 | temporal scale |
| --batch-size | 1 | batch size |
| --n-channels | 1 | channels |
| --seed | 42 | random seed |
[Model] ibm-research/flowstate
[Device] Ascend910_9362 (npu:0)
[Input] context=2048, channels=1, scale_factor=0.25
[Output] (1, 9, 960, 1) batch x quantiles x pred_len x channels
[Time] 7201.78 ms
[Status] SUCCESSpred_len= 96: 5920.3ms output=(1, 9, 96, 1)
pred_len= 192: 5922.0ms output=(1, 9, 192, 1)
pred_len= 336: 6075.5ms output=(1, 9, 336, 1)
pred_len= 720: 6808.0ms output=(1, 9, 720, 1)
pred_len= 960: 7201.8ms output=(1, 9, 960, 1)python inference.py --model-path ./model_cache --device npu --prediction-length 960 --scale-factor 0.25Output:
输出 shape: (1, 9, 960, 1)
推理耗时: 7201.78 ms
预测值范围: min=-262.3329, max=15.7595, mean=-37.4078
各分位数预测均值 (前5步):
步长 q0.1 q0.2 q0.3 q0.4 q0.5 q0.6 q0.7 q0.8 q0.9
t=1 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
t=2 1.3843 1.5806 1.4096 1.3438 0.8274 0.4663 0.3287 -0.1217 -0.8358
t=3 1.7180 2.4204 2.2112 2.0450 1.3269 0.5962 0.1438 0.0909 -1.0805
t=4 1.6329 2.8549 2.8972 2.7896 2.1379 1.3958 0.8096 0.8434 -0.2109
t=5 2.9130 4.2228 4.5362 3.9090 3.1055 2.1397 1.7134 1.8109 1.8198python inference.py --model-path ./model_cache --device npu --prediction-length 192 --scale-factor 1.0Output: shape=(1, 9, 192, 1), time=5922.0ms, SUCCESS



Metrics:
| Metric | Value | Note |
|---|---|---|
| Parameters | 9,069,312 | ~9M |
| Model Size | 34.6 MB | safetensors |
| Inference (960 steps) | 7201.78 ms | Ascend910 NPU |
| Inference (96 steps) | 5920.3 ms | Ascend910 NPU |
| Quantiles | 9 | q0.1 to q0.9 |
| SSM Hidden Dim | 512 | S5 state space |
| Context Length | 2048 | input timesteps |
Command:
python inference.py --model-path ./model_cache --device npu --prediction-length 960 --scale-factor 0.25Output:
输出 shape: (1, 9, 960, 1)
推理耗时: 7201.78 ms
预测值范围: min=-262.3329, max=15.7595, mean=-37.4078
[状态] SUCCESS