↑↓ move Enter open ⌘K find from any page 256 of 256 tabs
Series Loading…
Loading recorded inference…

Forecasting as language modelling

A forecasting model reads the recent past of a series and gives a distribution over its future. Chronos does this with an unmodified language model. It turns each value into one of a fixed set of tokens, trains a T5 encoder–decoder with ordinary cross-entropy to predict the next token, and forecasts by sampling tokens and turning them back into numbers. Trained on many series, one model can forecast series it has never seen, with no fitting (zero-shot).

The page records Chronos-T5 small (46,154,240 parameters; 6 encoder and 6 decoder blocks of width 512) on NOAA's monthly average temperature of the contiguous U.S. It reads 36 months of context, Sep 2022 to Aug 2025, and forecasts the next 12, Sep 2025 to Aug 2026, as 20 sample paths. The 12 observed months are held out: the model never sees them, and the page draws them against the forecast.

Mean scaling and uniform bins

Series come in any unit and at any level, so Chronos first divides by the mean absolute value of the context:

Here and °F. No mean is subtracted, so a series far from zero keeps its level and its scaled values sit near 1.

The scaled value is then quantised into one of 4,093 uniform bins between −15 and 15, with centres . The token id is the bin index plus 3: ids 0 and 1 are PAD and EOS and id 2 is unused, so the vocabulary has 4,096 entries. One bin is 0.00733 wide, which is 0.40 °F for this series. The 36 months become 36 ids plus EOS, 37 encoder tokens. The Tokenizer panel shows the three steps: °F, ÷ s, bin ids.

To the model the tokens are words. It never sees the numbers, and nothing in a cross-entropy over 4,096 classes says that neighbouring bins are close; any smoothness across bins is learned from data. The price is resolution: a forecast can only take bin centres times , so it moves in steps of one bin width times . Because the level is kept, a slow trend far above zero uses few bins; the trace notes that Mauna Loa CO₂ would have landed in only 6 bins of 3.1 ppm.

The T5 encoder–decoder

The encoder (Encoder Block row) runs bidirectional self-attention over the 37 tokens. Like T5, Chronos adds no position vector; each head adds a learned relative position bias to its scores (32 buckets, exact for short offsets and log-spaced out to 128) and does not divide by . The blocks are pre-norm with RMSNorm, the MLP is T5's original 512 → 2048 → 512 with ReLU, and no layer has biases.

The decoder (Decoder Block row) starts from a start token and reads its own sampled tokens under a causal mask, with its own relative bias. Its Cross Attention reads all 37 encoder tokens with no position bias; every decoder block projects the encoder's final hidden state into keys and values with its own weights. The page draws the 37 encoder tokens as 13 rows, one per three-month season plus EOS.

The output head is the token embedding, transposed (tied weights), applied to the final state scaled by , then a softmax over the 4,096 tokens:

Sample paths and quantiles

Each forecast step draws the next token from the 50 most likely at temperature and feeds it back to the decoder; EOS is blocked until the 12th token. Repeating this from the same encoder output gives 20 independent paths, and each sampled id becomes a value again by its bin centre:

At each month the 10th, 50th and 90th percentiles of the 20 values (linear interpolation) give the median and the 10–90 % band in the Next value fan chart. Its histogram shows the model's probability over bins for one month. A distribution over bins can take any shape, skewed or with several peaks, which a Gaussian output head cannot.

On this run the median is off by 1.8 °F on average over the 12 held-out months, and 9 of the 12 fall inside the 10–90 % band. The three outside, March, April and July 2026, were all warmer than the band. The manifest also records a seasonal naive forecast (repeat the last 12 months), which is off by 1.95 °F on average. One series and one seed say little about forecasting skill in general; the Chronos paper evaluates on 42 datasets.

Where it came from

Classical forecasting fits one model per series. DeepAR (Salinas et al.) trained one recurrent network across many related series with a probabilistic output. Pretrained forecasting models came next. Lag-Llama is a decoder-only transformer on lagged values; TimesFM is a decoder-only model over patches of the series. Chronos (Ansari et al., 2024) instead kept a language-model architecture as it is and changed only the tokeniser, pretraining T5 models from 20M to 710M parameters on public datasets plus synthetic series drawn from Gaussian processes.

The architecture is T5 (Raffel et al.), which the Encoder–decoder tab draws on text with the same components.

Papers

  1. Chronos: Learning the Language of Time Series Abdul Fatir Ansari et al. · TMLR 2024 Chronos: mean scaling, uniform bins and a T5 trained with cross-entropy, the model this page records.
  2. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer Colin Raffel et al. · JMLR 2020 T5: the encoder–decoder, its relative position bias and its ReLU feed-forward, which Chronos uses unchanged.
  3. DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks David Salinas, Valentin Flunkert, Jan Gasthaus, Tim Januschowski · International Journal of Forecasting 2020 One autoregressive network trained across many series with sampled probabilistic forecasts.
  4. A decoder-only foundation model for time-series forecasting Abhimanyu Das, Weihao Kong, Rajat Sen, Yichen Zhou · ICML 2024 TimesFM: a pretrained decoder-only forecaster over patches, the main alternative to tokenising single values.
  5. Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting Kashif Rasul et al. · arXiv 2023 A decoder-only transformer on lagged values with a distribution head, pretrained on many series.

See also