Downloads · 30 days
20
43% of all-time downloads
emiliocantuc/recursive-moirai-2
recursive-moirai-2 is a time series forecasting model from emiliocantuc. Use it for the time series forecasting task on the model card, and read the license before you ship it in a product. It is set up for flax.
An independent, from-scratch implementation inspired by Moirai 2. Instead of autoregressing decoded quantiles for long forecasts, it rolls the transformer's latent state forward.
Downloads · 30 days
20
43% of all-time downloads
All-time downloads
46
Public
Repo size
100 MB
Likes
0
Public
Click a slice to open those files.
Other100 MB · 100%
From the Hugging Face model README
An independent, from-scratch implementation inspired by Moirai 2. Instead of autoregressing decoded quantiles for long forecasts, it rolls the transformer's latent state forward.
See the blog post for motivation and ablations, and the exact training and evaluation code for reproduction.
The checkpoint was evaluated on all 97 GIFT-Eval dataset-horizon combinations. Metrics below are normalized by Seasonal Naive; lower is better.
| Metric | Overall | Short | Medium | Long |
|---|---|---|---|---|
| CRPS | 0.5345 | 0.5638 | 0.5012 | 0.4956 |
| MASE | 0.7709 | 0.7487 | 0.7923 | 0.8096 |
Overall calibration error is 0.0534.
The model trained for 100,000 steps with batch size 64. Its training mixture was:
| Source | Weight |
|---|---|
| GIFT-Eval Pretrain | 10% |
| Chronos TSMixup | 50% |
| Chronos KernelSynth | 20% |
| GIFT-Eval train/validation histories | 20% |
GIFT-Eval test regions were excluded. Because the model uses GIFT-Eval training histories, it is a pretrained rather than zero-shot submission under the benchmark's definitions.
The exact recipe is stored in config.json, and dataset revisions and generation
parameters are recorded in data_manifest.json.
Clone the code and download this repository into a run directory:
git clone https://github.com/ecntu/recursive-tsfm.git
cd recursive-tsfm
git checkout ceb9e54fdaead0c0f4ef92a4eb6d9eb86782e18e
hf download emiliocantuc/recursive-moirai-2 --local-dir runs/recursive-moirai-2
uv run --script scripts/prep_eval_data.py --context_len 8192
uv run python gifteval.py eval_windows --run_dir runs/recursive-moirai-2
The checkpoint uses Orbax format. gifteval.py reconstructs the architecture
from config.json and restores the latest checkpoint automatically.
The model is univariate and produces quantile forecasts rather than samples. It was trained and evaluated at research scale; performance can vary substantially across domains, frequencies, and forecast lengths. This checkpoint has not been validated for safety-critical decisions.
@misc{cantu2026recursivemoirai2,
author = {Cantu Cervini, Emilio},
title = {To Improve Long-Horizon Time-Series Forecasting},
year = {2026},
url = {https://ecntu.com/posts/recursive-moirai}
}