Skip to content

time-series-forecasting Β· tabular Β· PatchTSMixerForPrediction Β· Transformers.js 3.7.5 WASM Β· int8 Β· 0.29 MB Β· Apache-2.0

IBM Granite Time-Series PatchTSMixer

Forecast 7 synchronized multivariate channels Γ— 96 steps ahead from a 512-step context window in ~2.4 ms warm CPU WASM using onnx-community/granite-timeseries-patchtsmixer (upstream ibm-granite/granite-timeseries-patchtsmixer, Apache-2.0, 0.29 MB int8 β€” 293,870 B weights + 1,229 B config). All-MLP Patch-16 Γ— 32 mixing with gated attention runs natively in shared @huggingface/transformers@3.7.5 with zero server calls.

onnx-community/granite-timeseries-patchtsmixer time-series-forecasting WASM Β· int8 Β· 0.29 MB [1, 512, 7] β†’ [1, 96, 7] Apache-2.0

Interactive 7-channel 512 β†’ 96 multivariate horizon chart

Deterministic 7-channel presets (512-step lookback + 96-step held-out truth) or local CSV/JSON upload

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

Live 96-step PatchTSMixer output statistics across every active channel (0 NaN verified)
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

Model card at a glance & source code

Verified onnx-community/granite-timeseries-patchtsmixer contract and architecture parameters
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