本仓库包含Timer-S1模型在昇腾NPU平台的完整迁移适配材料。
Timer-S1/
├── timer-s1-src/ # Timer-S1模型源码和权重
│ ├── model-00001~00004-of-00004.safetensors # 权重文件 (16.6GB)
│ ├── config.json
│ ├── modeling_TimerS1.py
│ └── configuration_TimerS1.py
├── Timer-source/ # Timer官方源码
│ ├── models/Timer.py
│ ├── exp/exp_forecast.py
│ ├── run.py
│ └── ...
├── timer-s1-adaptation/ # 迁移适配产物
│ ├── scripts/ # NPU训练推理脚本
│ │ ├── ascend_train.py
│ │ ├── ascend_train_ddp.py
│ │ └── ascend_infer.py
│ ├── docs/ # 文档
│ │ ├── Timer-S1-NPU迁移适配指导书.md
│ │ ├── Timer-S1-NPU迁移验证报告.md
│ │ └── Timer-S1-skill改进建议.md
│ ├── output/ # 训练产出
│ │ ├── finetune_1ep_timing.json
│ │ ├── ddp_timing.json
│ │ └── training_result.json
│ ├── model_analysis.json
│ ├── dataset_manifest.json
│ ├── weight_manifest.json
│ └── requirements.txt
├── Large-Time-Series-Model/ # 数据集和Timer checkpoint
│ ├── dataset/ETT-small/ # ETT数据集 (24MB)
│ │ ├── ETTh1.csv
│ │ ├── ETTh2.csv
│ │ ├── ETTm1.csv
│ │ └── ETTm2.csv
│ └── checkpoints/
│ └── Timer_forecast_1.0.ckpt # Timer预训练权重 (791MB)
└── README.md# 1. 克隆仓库
git clone https://atomgit.com/Ascend-SACT/Timer-S1.git
# 2. 安装依赖
pip install -r timer-s1-adaptation/requirements.txt
# 3. 执行训练(参照指导书)
torchrun --nproc_per_node=8 timer-s1-adaptation/scripts/ascend_train_ddp.py --epochs 1
# 4. 执行推理
python timer-s1-adaptation/scripts/ascend_infer.py请阅读 timer-s1-adaptation/docs/Timer-S1-NPU迁移适配指导书.md
| 项目 | 数值 |
|---|---|
| 模型名称 | Timer-S1 |
| 参数量 | 8.30B |
| 架构 | MoE Transformer (32专家) |
| Hidden | 1024 |
| Layers | 24 |
| dtype | bfloat16 |
| 指标 | 数值 |
|---|---|
| 训练Loss | 1.0139 |
| 训练时间 | 24.5分钟 (8卡DDP) |
| Throughput | 11.7 samples/s |
| 显存占用 | 48GB/卡 |