thuml/sundial-base-128m is a 128M-parameter generative time-series foundation model (Sundial/Timer 3.0) pretrained on 1 trillion time points. Decoder-only Transformer with 12 layers, hidden 768, 12 heads, input patch 16, multi-patch horizon 720. Flow-matching (TimeFlow) head generates probabilistic forecasts.
Precision: FP32 (torch_dtype float32), also stable in FP16/BF16 on NPU
Max context: 2880, Patch 16, Horizon 720 (single-pass), extended via autoregression
Data Contract
Input source: Synthetic univariate series with fixed seed 0, lookback 96, 5min frequency. SHA256 of generation script deterministic; example traceable via seed. No personal data.
Axis order: [batch, time] (Sundial expects 2D), not [B,T,C]. Channel is implicit 1. For multi-variate, would be [B, T, C] flattened but this model is univariate foundation – multi-series batched as independent windows.
Time contract: ascending order, no duplicate timestamps, no missing steps, frequency 5min synthetic. Real data should provide same ordering; gaps should be imputed before feeding.
Preprocessing: No external scaling – model applies RevIN (means/stdev per sequence) internally in generate(revin=True) default. Input raw float32; output inverse-scaled. Column order fixed; missing column raises shape error.
HF cache: snapshot_download local_dir_use_symlinks=False, mirror via local cache, trust_remote_code=True required
Device validation: torch.npu.is_available()==True, device_count==2, torch.npu.get_device_name(0)==Ascend910_9362, all 212 params on npu:0, no CPU fallback
Installation
pip install -r requirements.txt
# requires CANN toolkit at /usr/local/Ascend/cann-8.5.1 and torch_npu
# tokenizers patched to >=0.19 allowed for 4.40.1 compatibility
Threshold rationale: FP32 atol 1e-4 rtol 1e-3 standard; observed error 1e-6 well within, proves no fallback and deterministic flow sampling. Quantile monotonic not needed (point samples), forecasting task.
Reproducibility: same preprocessing (none), same dtype float32, eval mode, seed 0, sync timing. No CPU fallback detected (all params verified on npu:0).
Performance
Method: torch.npu.synchronize() before/after each model.generate; warmup 3, test 10.
Compile/first-run: 0.3496s (first) vs 0.085s stable (compile amortized). Earlier raw benchmark warmup1 0.356s stable 0.082s.
Stable: avg 0.0852s, p50 0.0859s, p95 0.0864s, throughput 11.74 windows/s per single window (96 context -> 96 forecast, 5 samples). First second-run 0.0832s.
Peak HBM: ~3795 MB, model resident ~490 MB safetensors + overhead, well within 65536 MB.
Preprocessing: not included (synthetic generation ~0.001s); timing only model forward+flow sampling (synchronized).
Windows/s vs rows/s: windows/s used for time-series; rows/s would be 96/0.085=1129 rows/s context rows but windows reported per skill.
Evidence Images
All three PNGs generated by scripts/render_xterm_evidence.mjs --style raw from real logs (xterm.js white on dark gray, prompt atomgit@pod-a94f8701860f4700b161b00e290de466:~$ is display-only, not host proof).