Granite PatchTST-FM 是 IBM Granite 系列的时序预测基础模型(r1 版本),
输入 8192 步历史序列,输出未来 64 步预测。本仓库为 华为昇腾 NPU
(Ascend 910B 系列)推理适配版,支持 npu:0 一键推理。
| 项目 | 说明 |
|---|---|
| 模型 | ibm-granite/granite-timeseries-patchtst-fm-r1(PatchTSTFMForPrediction) |
| 架构 | PatchTST(Transformer 补丁化时序基础模型) |
| 规模 | 257.9 M 参数(FP32) |
| 输入 | 时序 (B, 8192, 1) |
| 输出 | 未来 64 步预测 (B, 64, 1) + 分位数 |
| 任务 | 时间序列预测(零样本) |
| 原始仓库 | huggingface.co/ibm-granite/granite-timeseries-patchtst-fm-r1 |
| License | Apache-2.0 |
| 项目 | 要求 |
|---|---|
| 硬件 | Ascend 910B 系列(≥1 卡,本仓库基于 910B4 验证) |
| CANN | ≥ 8.0 |
| Python | 3.10 – 3.11 |
| torch / torch_npu | 2.9.0 / 2.9.0.post2 |
| transformers | 5.15.0 |
| 依赖库 | IBM tsfm 源码(tsfm_public/models/patchtst_fm) |
注意:本仓库不包含模型权重文件(
model.safetensors约 0.96GB)。
权重请从以下镜像获取:
git clone --depth 1 https://gitcode.com/hf_mirrors/ibm-granite/granite-timeseries-patchtst-fm-r1.git model_srcpython3 inference.py --device npu [--model_path ./model_src]$ python3 inference.py --device npu
[info] device = npu:0
[info] model arch : PatchTSTFMForPrediction
参数: 257.9 M
[info] input : (1, 8192, 1)
[info] inference done : 321.0 ms on npu
[info] 输出字段 : ['prediction_outputs', 'quantile_outputs']
[info] 预测输出 : (1, 64, 1)
[info] 设备确认 : npu:0
[PASS] granite-timeseries-patchtst-fm-r1 NPU inference OKgh_mirrors/ts/tsfm 镜像获取),无 CUDA 特有 API。all_tied_weights_keys = {} 兼容 tied-weights 检查,
并直接用 PatchTSTFMConfig 类加载(AutoConfig 不识别 patchtst_fm)。local_files_only=True 完全离线。