Interactive 7-channel 512 β 96 multivariate horizon chart
Move pointer across the +1..+96 horizon (or focus chart and press Left/Right arrow keys) to inspect step-by-step predictions.
Prepare IBM Granite PatchTSMixer above to forecast all 7 channels Γ 96 steps locally on CPU WASM.
Raw [1, 96, 7] per-channel prediction stats, MAE & RMSE
| Channel | Pred Min | Pred Mean | Pred Max | MAE | RMSE | sMAPE | NaNs |
|---|---|---|---|---|---|---|---|
| Run PatchTSMixer above to populate raw [1, 96, 7] channel statistics. | |||||||
Why sub-300 KB neural forecasting in the browser matters
- Edge SRE & observability dashboards Project CPU, memory, latency, and error budgets 96 hours forward inside any Grafana-style web console without shipping operational metrics to third-party inference APIs.
- Private industrial & grid SCADA portals Forecast transformer load, oil temperature, or HVAC chiller demand offline in air-gapped browser kiosks at ~2.4 ms per 7-channel pass.
- Interactive what-if scenario sandboxes Because each 672-value forecast finishes in ~2.4 ms on CPU WASM, analysts can test covariate ablations and stress regimes live without GPU hardware.
- Tiny multi-model ensembles (< 1.1 MB total) Combine 0.29 MB PatchTSMixer with 0.77 MB PatchTST directly in the browser to cross-check all-MLP vs self-attention forecasts locally.
Model card at a glance & source code
| Browser ONNX repo |
onnx-community/granite-timeseries-patchtsmixer
Β· onnx/model_int8.onnx (293,870 B + config.json 1,229 B = 295,099 B Β· 0.29 MB int8)
|
|---|---|
| Upstream checkpoint |
ibm-granite/granite-timeseries-patchtsmixer
Β· License: apache-2.0 Β· Paper: Ekambaram et al., KDD 2023 (arXiv:2306.09364)
|
| Task & model class |
time-series-forecasting Β· PatchTSMixerForPrediction (model_type: "patchtsmixer")
|
| Architecture config |
context_length=512, prediction_length=96, num_input_channels=7,
patch_length=16, patch_stride=16 (32 patches, 0 remainder),
d_model=48, expansion_factor=3, num_layers=2,
gated_attn=true, mode="common_channel", scaling=true
|
| Execution runtime |
Shared @huggingface/transformers@3.7.5 via lib/webai.js Β· CPU WASM
(device: "wasm", dtype: "int8") Β· off main thread in module Web Worker
|
| Pretraining benchmark |
Trained on ETTh1 (7 hourly electrical transformer channels:
HUFL, HULL, MUFL, MULL, LUFL, LULL, OT); upstream reported MSE 0.37 on the 512 β 96 test split.
|
Show the code β AutoModel.from_pretrained("onnx-community/granite-timeseries-patchtsmixer") & runForecast() in worker.js
Show the code β packPastValues() packing 1β7 telemetry streams into [1, 512, 7] float32
Use-case ladder β explore all 4 interactive rungs
Hold flat or corrupt 1 vs 3 exogenous covariate channels, measure live target-channel forecast shifts, and inspect all 32 Patch-16 tokens.
Practical Β· Multi-Asset Batch Forecast Queue & Anomaly AlertsForecast a 6-asset fleet with Pause / Resume / Cancel controls, Z-score anomaly alerting, local CSV upload, and OWASP-safe CSV/JSON exports.
Wild Β· 5-Regime Multivariate Stress SuiteStress-test PatchTSMixer against step shocks, zero-dropouts, Gaussian sensor noise, phase shifts, and 3.2Γ scale spikes while auditing MAE/RMSE & 0 NaN.
Multi-model Β· PatchTSMixer (0.29 MB) vs PatchTST (0.77 MB)Run two independent Granite WASM workers side-by-side (1.06 MB combined), plot per-model + 50/50 ensemble MAE/RMSE, and verify Stage 1 Release isolation.