MOMENT-1-small is a time-series foundation model (385K params, 145M weight file) developed by Carnegie Mellon Auton Lab. It is a T5 encoder-based (flan-t5-small, d_model=512, 8 layers, 6 heads) foundation model trained on TimeSeries-PILE for general-purpose time-series analysis. This repository provides Ascend 910 NPU adaptation (910B, npu:0) validated for reconstruction (pre-training / imputation / anomaly detection) with seq_len=512, patch_len=8, patch_stride=8. The checkpoint contains model.safetensors (145MB) and pytorch_model.bin (145MB) plus config.json with T5 config. Licence MIT. Paper: https://arxiv.org/pdf/2402.03885.pdf .
Original weight URL: https://huggingface.co/AutonLab/MOMENT-1-small
GitCode NPU repository: this model repository (public, type=model, topics: NPU, Ascend, Ascend910).
reconstruction (also supports forecasting/classification/anomaly via MOMENTPipeline, NPU verified for reconstruction).[batch, n_channels, seq_len] float32, seq_len=512, n_channels=3 (validated, flexible 1~3), input_mask [batch, seq_len] with 1=valid, 0=masked.[B, C, T] strictly; no permutation to [B,T,C] without code change.reconstruction [B, C, T] float32, de-normalized (RevIN denorm), same shape as input.batch=2, seq_len=512, n_channels=3.torch.npu.is_available()==True, device npu:0 Ascend910_9362, device count 2MOMENTPipeline.from_pretrained(local_dir, model_kwargs={"task_name":"reconstruction"}) then model.to("npu:0"), all tensors explicitly moved to npu:0, torch.npu.synchronize() before/after timing.pip install -r requirements.txt
# requirements cover: torch, torch_npu, transformers, huggingface_hub, numpy, momentfm, safetensorsDefault command (verified on 910B):
python inference.pyworking/models/MOMENT-1-small if exists, otherwise downloads from AutonLab/MOMENT-1-small via snapshot_download (requires HF_ENDPOINT).npu:0, synchronizes.(2, 3, 512) device npu:0[0.5248, 0.5543, 0.6542, 0.7578, 0.7289][-0.07252, -0.10288, -0.13895, 0.60960, -0.13686] (CPU identical within 1.7e-06)python .opencode/skills/npu-adapt-skills/scripts/compare_outputs.py --cpu working/cpu_recon.npy --npu working/npu_recon.npy --task regression --atol 1e-4 --rtol 1e-3Three PNGs generated by xterm.js from real logs via node scripts/render_xterm_evidence.mjs --style raw (prompt atomgit@pod-a94f8701860f4700b161b00e290de466:~$):
assets/agent_workflow.png – workflow (env check, model fetch, NPU inference, consistency, benchmark).assets/npu_device_call.png – npu-smi info + check_npu.py + param device logs, proving calls on npu:0.assets/model_result.png – default python inference.py full stdout (input/output preview, sync timing, SUCCESS).
Images are xterm.js rendered from logs; not simulated via Pillow/Matplotlib.

ArgSort fallback to AICPU (warning) observed but not failing; timing includes it.npu:0 only; multi-NPU not tested.