An unofficial conversion of amazon/chronos-2 at revision 29ec3766d36d6f73f0696f85560a422f50e8498c, for forecasting inside a browser with ONNX Runtime Web (WebGPU or WASM). Amazon does not make or endorse this conversion.
The weights are unchanged: no fine-tuning and no quantization.
| File | Bytes | SHA-256 |
|---|---|---|
chronos2_fp32.onnx |
478,426,938 | dd19693d34d070859cf2ac0cc00b6cd03f75260eecc4d4a2d6a4ff3cac64d9bb |
manifest.json |
3,785 | b55b598332402823a770c2955b9e4e0a95ec049ac74374a77f0347c415fb58f6 |
model.safetensors) matched the official SHA-256 ddcda3c7508bf2528087723e98a20707cc04b7f370ae275a9fd88078ddba4f42.The ONNX graph holds only the network: patch embedding, [REG] token, 12 encoder blocks and the quantile head. Opset 17, dynamic batch and patch axes.
| Name | Type and shape |
|---|---|
input patches |
float32 [batch, n_patches, 48]: per 16-step patch, the time encoding, the scaled values and the observed mask |
input patch_mask |
float32 [batch, n_patches]: 1 if the patch has an observed value |
input future |
float32 [batch, m_patches, 48]: the time encoding 0 … 16m−1 divided by 8192, then the known future values of a covariate (scaled like its context) and their mask; zeros for targets and past-only covariates |
input group_ids |
int64 [batch]: rows with the same id attend to each other (a target row and its covariate rows) |
output quantiles |
float32 [batch, m_patches, 21 × 16] in the scaled space, laid out as (quantile, step) per patch |
The caller does the rest, as Chronos2Model._prepare_patched_context, _prepare_patched_future and forward do in chronos-forecasting:
arcsinh;−C … −1 divided by 8192;sinh and undo the standardisation.Covariates follow Chronos2Dataset: one group per forecast, with the target row first, then past-only covariates, then covariates known for the horizon. Give each group its own id; with one row per id, every row is an independent series.
Compared with Chronos2Pipeline.predict (chronos-forecasting 2.3.2, PyTorch 2.15.0, CPU, float32) with ONNX Runtime 1.31.1 on CPU. Synthetic series, some with missing values; the difference is the largest over all 21 quantiles and every step, relative to the largest forecast value.
| Covariates | Context | Horizon | Largest relative difference |
|---|---|---|---|
| none | 16 | 16 | 1.7e-6 |
| none | 37 | 64 | 1.8e-6 |
| none | 200 | 128 | 3.5e-6 |
| none | 1,000 | 512 | 2.9e-6 |
| none | 1,344 | 16 | 7.8e-7 |
| none | 3,000 | 1,024 | 3.6e-6 |
| none | 9,000 (cut to 8,192) | 16 | 2.0e-6 |
| rain and temperature, past only | 1,344 | 1 | 2.5e-7 |
| temperature past only, rain known for the horizon | 1,344 | 1 | 2.1e-7 |
| temperature past only, rain known for the horizon | 400 | 40 | 6.6e-7 |
A batch of 8 count series gave the same output as running them one at a time (largest difference 0).
Notice of modifications under Apache-2.0 §4(b):
Chronos2Pipeline.from_pretrained("amazon/chronos-2") to ONNX with the TorchScript exporter, using eager attention (the same math as the fused attention).group_ids a graph input, so that covariate rows can be grouped with their target.The conversion steps are adapted from scripts/export.py in VishalMysore/chronos-2-onnx-web (Apache-2.0).
Apache-2.0, the same as the original Chronos-2 weights (LICENSE, NOTICE).
@article{ansari2025chronos2,
title = {Chronos-2: From Univariate to Universal Forecasting},
author = {Abdul Fatir Ansari and others},
year = {2025},
url = {https://arxiv.org/abs/2510.15821}
}
amazon/chronos-2