recursive-moirai-2 / README.md
emiliocantuc's picture
Upload Recursive Moirai 2 checkpoint
0a64295 verified
|
Raw History Blame Contribute Delete
3.01 kB
---
library_name: flax
pipeline_tag: time-series-forecasting
tags:
- time-series
- forecasting
- probabilistic-forecasting
- moirai
- jax
- flax
datasets:
- Salesforce/GiftEvalPretrain
- Salesforce/GiftEval
- autogluon/chronos_datasets
---
# Recursive Moirai 2
An independent, from-scratch implementation inspired by
[Moirai 2](https://arxiv.org/abs/2511.11698). Instead of autoregressing decoded
quantiles for long forecasts, it rolls the transformer's latent state forward.
- Parameters: 9.1M
- Direct prediction length: 64 observations
- Training reach: 12 rollouts / 768 observations
- Output: nine quantiles from 0.1 through 0.9
- Implementation: JAX and Flax NNX
See the [blog post](https://ecntu.com/posts/recursive-moirai) for motivation and
ablations, and the [exact training and evaluation
code](https://github.com/ecntu/recursive-tsfm/tree/ceb9e54fdaead0c0f4ef92a4eb6d9eb86782e18e)
for reproduction.
## GIFT-Eval results
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.
## Training
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`.
## Reproducing evaluation
Clone the code and download this repository into a run directory:
```bash
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.
## Limitations
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.
## Citation
```bibtex
@misc{cantu2026recursivemoirai2,
author = {Cantu Cervini, Emilio},
title = {To Improve Long-Horizon Time-Series Forecasting},
year = {2026},
url = {https://ecntu.com/posts/recursive-moirai}
}
```