time-series-forecasting · 7-channel multivariate PatchTST · 512 → 96 horizon · q8 · WASM · 0.77 MB

IBM Granite Time-Series PatchTST

IBM's Granite PatchTST (ibm-granite/granite-timeseries-patchtst, Apache-2.0) packs a 3-layer channel-independent Patch-12 Transformer into just 0.77 MB (q8 ONNX — 27× smaller than Timestral-5M). In a single ~14 ms CPU WebAssembly pass, it turns a 512-step × 7-channel lookback window into a synchronized 96-step × 7-channel forecast right in your browser.

Runs in browser · WASM time-series-forecasting 0.77 MB q8 ONNX Apache-2.0 7 channels · 512 → 96 steps

1 · On-device model (0.77 MB q8 WASM)

2 · Interactive 7-Channel Multivariate Telemetry Forecaster

Choose one of four deterministic 7-sensor scenarios — or upload your own 1-to-7 column CSV/TSV/JSON file. Granite PatchTST forecasts all 7 channels simultaneously with built-in per-channel scaling: "std" standardization.

7-channel telemetry scenarios (512-step lookback + 96-step held-out truth)

Prepare Granite PatchTST above to forecast all 7 channels in ~14 ms on CPU WASM.

Move your pointer across the +1..+96 forecast region (or click) to inspect step-by-step predictions.

Inference latency—
Tensor I/O[1, 512, 7] → [1, 96, 7]
Focused MAE—
vs Seasonal naive—
All-7 avg sMAPE—
Runtime / NaNsWASM q8 · 0.77 MB

3 · Model Card at a Glance & Source Code

Upstream checkpoint ibm-granite/granite-timeseries-patchtst (Apache-2.0)
Browser ONNX repo onnx-community/granite-timeseries-patchtst · onnx/model_quantized.onnx (773,922 B · 0.77 MB q8)
Task & architecture time-series-forecasting · PatchTSTForPrediction (3 layers, 16 heads, d_model=128, ffn=512, BatchNorm, GELU, sincos PE)
Patching & channels context_length=512, prediction_length=96, num_input_channels=7, patch_length=12, patch_stride=12 (42 patches + [CLS] = 43 tokens), channel_attention=false, scaling="std"
Execution backend @huggingface/transformers@3.7.5 · CPU WASM (device: "wasm", dtype: "q8") · off main thread in Web Worker
Pretraining benchmark Trained on ETTh1 (7 hourly electrical transformer channels: HUFL, HULL, MUFL, MULL, LUFL, LULL, OT); reported test-split MSE 0.3881 on 512→96 forecasting.
</> Show the code · AutoModel.from_pretrained("onnx-community/granite-timeseries-patchtst") & runForecast() worker.js · L71–160
</> Show the code · packPastValues() & unpackPredictions() patchtst-core.mjs · L392–469

4 · Use-case ladder — explore every rung