sheepss/Datadog-Toto-Open-Base-1.0-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

Toto-Open-Base-1.0 on Ascend NPU (#NPU)

Zero-shot multivariate probabilistic time-series forecasting foundation model adapted to run on a single Ascend 910 NPU (npu:0).

  • Model: Datadog/Toto-Open-Base-1.0 (151M params, decoder-only transformer, proportional factorized space-time attention, Student-T mixture output)
  • Task: time-series forecasting (observability metrics), probabilistic (median + quantiles + samples)
  • License: apache-2.0
  • Revision: 0411ceb27bdf7fc3e4892e99edc8ad08192dc3c5

Model

Toto (Time Series Optimized Transformer for Observability) is a state-of-the-art zero-shot time-series foundation model for high-dimensional, sparse, non-stationary observability metrics. It produces both point forecasts and uncertainty estimates via a Student-T mixture model. This repo verifies real inference of the released checkpoint on an Ascend NPU, following the official TotoForecaster API.

Data Contract (input)

FieldValue
Inputmultivariate series tensor (variates, context_length) fp32
Variates7 observability metrics
Context length2048 (default)
Sampling interval900 s (15 min)
Outputmedian/mean (1, variates, prediction_length), samples (1, variates, prediction_length, num_samples), quantiles(0.1/0.9)
Axis order[batch, variate, time]

Environment

  • Hardware: Ascend 910 (single card, npu:0)
  • OS / arch: Linux aarch64
  • Software: torch 2.9.0, torch_npu 2.9.0, CANN 8.5.1, toto-ts 0.2.0

Installation

pip install toto-ts==0.2.0 jaxtyping gluonts[torch] rotary-embedding-torch lightning
# torch_npu + torch must be pre-installed for your Ascend CANN environment

NPU Inference

Weights must be downloaded first to a local model/ directory:

huggingface-cli download Datadog/Toto-Open-Base-1.0 --local-dir model
python inference.py --model_dir model --prediction_length 96 --num_samples 16

The script loads the checkpoint from local disk, moves the model to npu:0, and runs autoregressive probabilistic forecasting. It exits non-zero on any failure.

Real Results (npu:0)

  • Backbone params: 151.31M
  • Input: 7 variates x 2048 context
  • Forecast median shape: (1, 7, 96), samples shape: (1, 7, 96, 16)
  • Median (first variate, first 8 steps): [-0.0067, -0.0070, -0.0173, -0.0135, -0.0137, -0.0187, -0.0068, -0.0036]
  • 10th/90th percentile forecasts produced; quantiles are monotonic across steps
  • Inference wall time (96 steps, 16 samples): ~0.43 s
  • Status: OK

Consistency (CPU vs NPU)

Same weights, identical input values, dtype fp32, seed fixed. Deterministic point forecast (num_samples=None) compared:

  • shapes equal (1, 7, 96), all finite
  • max abs error: 1.92e-06, mean abs error: 3.64e-07
  • np.allclose(atol=1e-4, rtol=1e-3) → PASS

Sampling-based trajectories differ between devices due to RNG, as expected for a probabilistic model; the underlying distribution (loc/scale) and deterministic mean are numerically consistent.

Performance (npu:0, context 4096, prediction 336, 16 samples)

MetricValue
avg latency1.06 s
p501.06 s
p951.10 s
throughput~0.94 forecast/s

Evidence

  • assets/agent_workflow.png - end-to-end adaptation workflow log
  • assets/npu_device_call.png - NPU device / compute evidence
  • assets/model_result.png - default inference.py run on npu:0

Limitations

  • This is a zero-shot forecasting model; a fixed synthetic series is used as the demonstrable input. For your data, provide your own MaskedTimeseries following the data contract above.
  • toto-ts pins strict dependency versions; on the Ascend stack, newer compatible versions of gluonts/jaxtyping/rotary-embedding-torch/lightning were used while keeping torch_npu + torch 2.9.0 intact.