Timestral in the browser

How it works

Timestral is a forecasting model from Mistral AI. This site runs it in your browser, or on your computer with Docker.

The model

HistoryTransformerForecastUp to 32,768 steps, in patches of 32Forecast tokensread the history21 quantiles per step

Mistral reports that the 209M model ranks first on the GIFT-Eval, TIME and fev-bench benchmarks, and that the 28M model beats Chronos-2, a model about four times its size, on GIFT-Eval and TIME.

Two ways to run it

This websiteYour browser tabWeb Workeronnxruntime-web, 4 threadsONNX, 5M or 28M13 or 59 MB, cachedDocker on your computerYour browser tabPython serverofficial timestral packageWeights, 5M to 209Mfull precision

In the browser

Browsers can't run PyTorch, so the model is exported to ONNX and run with onnxruntime-web, compiled to WebAssembly. Your data never leaves the page.

The ONNX file holds one decoding pass. The rest of the forecast, about 200 lines of the official Python code, is ported to JavaScript. A test suite compares both on 18 cases: the largest difference is 0.03% of the largest forecast value. An 8-bit version was rejected because it moved forecasts by up to 84%.

What had to change for the export

Four changes, none of which changes the math:

With Docker

The Docker image serves the same page, but forecasts come from the official Python package on your computer: all four sizes, full precision, and up to 16,384 steps of history. Weights download from Hugging Face the first time you use a size. Instructions are in the README on GitHub.

Reading the results

HistoryForecast start: drag it80% range50% rangeMedianWhat happenedEnd of the dataFuture: no data yet

To use covariates past the end of your own data, add rows at the end with the covariates filled in and the forecast columns left empty.

Limits and license

Try a forecast