Inference backend (ONNX Runtime).
Pre-normalised patched inputs [batch][numPatches * inputPatchLen].
Patch masks [batch][numPatches * inputPatchLen].
Per-patch means [batchSize * numPatches].
Per-patch stds [batchSize * numPatches].
Running stats after last context patch (for AR decode start).
Forecast horizon.
Forecast config.
Model config.
Optionalsignal: AbortSignalOptional AbortSignal for cancellation.
Run the full decode loop.
Concurrency safety: This function is pure with respect to the engine — it reads from the engine but never mutates shared state. Multiple
decode()calls can run concurrently (e.g., main path + flip path inPromise.all) without races, provided the engine supports concurrentforward()calls. ONNX Runtime sessions are safe for concurrent use.