Overview

5 Learning the language of time with Chronos

Chronos is presented as a framework that adapts pretrained language models—principally the T5 family—to probabilistic time series forecasting by “learning the language of time.” It does so by tokenizing numeric sequences through mean scaling and uniform quantization, clipping scaled values to a fixed range and mapping them into a finite vocabulary (4094 bins), which enables sequence-to-sequence training without altering the language-model architecture. This turns regression into classification with cross-entropy as the objective. To address limited training data, the authors augment with TSMixup (convex combinations of real series) and KernelSynth (compositions of canonical kernels). Public Chronos models span multiple sizes, were trained on hundreds of thousands of univariate series across varied frequencies, and assume an input length of 512 and a forecasting horizon of 64 steps—factors that favor series without strong trends and shorter horizons. Model choice is a trade-off between performance and available hardware.

Practically, Chronos is easy to try via a Python package and a simple pipeline that consumes tensors, produces samples for probabilistic forecasts, and supports custom cross-validation logic. In zero-shot use on weekly retail sales, it delivered reasonable intervals but initially trailed alternatives. Fine-tuning—run efficiently on a GPU with Arrow-formatted data and a concise YAML configuration—significantly improved accuracy, reducing MAE and sMAPE and ultimately surpassing other foundation models under the same evaluation setup. The chapter emphasizes selecting model size to match compute constraints, respecting the 64-step horizon used during pretraining, and recognizing that performance improves meaningfully with targeted fine-tuning.

While not a native feature, anomaly detection is enabled by leveraging Chronos’s predictive intervals: points falling outside a high-confidence band (e.g., 99%) are flagged as anomalies. Applied to New York City taxi demand, Chronos caught all labeled anomalies but produced many false positives, yielding lower precision and F1 than a comparator despite perfect recall. Overall, Chronos stands out as an open-source, installable, and production-friendly framework for probabilistic forecasting and interval-based anomaly detection, albeit with some manual setup, no exogenous-features support at the time of writing, and sensitivity to hardware and horizon length. It is best suited for shorter horizons and series without strong upward drift, where fine-tuning can deliver strong gains.

Simplified visual of how T5 performs various NLP tasks. Here, the model performs translation since this is specified in the input sequence on the left.
Overview of the Chronos framework that adapts a language model for time series forecasting. The time series is first tokenized, which involves mean scaling and quantization. The output can then be used to train the language model.
Example of mean scaling. At the top, the data is in its original scale, and at the bottom, the data was mean scaled. Notice that the general pattern stays the same. The difference lies in the range of values.
Showing the result of quantization using 100 bins. Here, only the first 50 weeks of data are shown. Notice that the first two points of the quantized data are equal. However, this is not the case in the top figure. This is normal, since quantization is an approximation.
Impact of the number of bins on the resulting tokens. On top, we have a vocabulary of 100 possible bins, and at the bottom, we use only five bins. Of course, with five bins, we lose too much precision.
Illustrating TSMixup. On the top left, we have our weekly sales data. On the top right, we have daily traffic volume data. Both series are scaled and combined to generate a new series, shown on the bottom left.
Illustrating KernelSynth. At the top left, we have a linear kernel, and at the top right, we have a sinusoidal kernel. Both are combined using an addition, which results in the synthetic series shown at the bottom.
Weekly sales of four different Walmart stores.
Illustrates the content of the predictions variable. It is an array that contains the predictions for each store, where each is itself an array with 20 samples for each step in the forecast horizon.
Plotting the predictions from Chronos. The shaded area represents a 90% prediction interval.
Predictions obtained from running cross-validation with Chronos. We notice some overlap between the predictions and the actual values, which is a good sign. The shaded area represents the 90% prediction interval.
Comparing the MAE and sMAPE before and after fine-tuning Chronos. Lower is better.
Anomalies labeled in the daily number of customers of the New York city taxi service. The four dots indicated the labelled anomalies.
Detected anomalies by Chronos. Notice that all labeled anomalies were correctly detected, but other normal points were mislabeled as anomalies.
Comparing the performance of anomaly detection between TimeGPT and Chronos. Higher is better.

Summary

  • Chronos is a framework to train existing language models for time series forecasting. It simply tokenizes the time series data using mean scaling and uniform binning to feed it to a language model.
  • There are existing pretrained models based on the T5 architecture.
  • Forecasting beyond 64 timesteps may degrade the quality of the forecasts. Also, Chronos does not support exogenous features.
  • Selecting the right pretrained model depends on the available hardware. If a GPU is available for inference, and you have the necessary memory space, then opting for the largest model will lead to the best results.

References

FAQ

What is Chronos and how is it different from a single model?Chronos is a framework that adapts existing language models (e.g., T5) for probabilistic time series forecasting by turning numeric sequences into a finite token vocabulary. Researchers also released several pretrained T5-based forecasting models commonly referred to as “Chronos.” These models are easy to use via a Python package and tend to work best on series without strong trends.
How does Chronos adapt language models to time series?Chronos tokenizes time series in two steps: mean scaling (divide each value by the mean absolute value to normalize scale) and quantization (clip scaled values to [-15, 15] and map them into 4094 uniformly spaced bins). This creates a finite “language of time” so a text model can learn to predict future tokens. Training uses the language-model objective (cross-entropy) to predict token sequences; numeric forecasts are recovered by dequantizing and unscaling at the end.
What are the main limitations of Chronos I should keep in mind?- Strong trends: Quantization with fixed bins can cause forecasts to plateau because the model can’t produce tokens beyond the maximum bin.
- Horizon: Pretrained models were trained with a 64-step horizon; much longer horizons can degrade performance.
- Features/frequencies: At the time of writing, exogenous features aren’t supported; quarterly frequency wasn’t seen in pretraining.
- Hardware: Speed and accuracy depend on your compute; larger models need more memory/GPU.
How does Chronos tackle limited training data?Two data augmentation methods were used during pretraining: TSMixup (creates new series by mixing random scaled segments from existing series via convex combinations) and KernelSynth (generates synthetic series by randomly sampling and combining fundamental pattern kernels such as trend and seasonality). These expand diversity and volume of training data.
Which pretrained Chronos models are available and how do I choose?Chronos provides T5-based variants from tiny/mini/small to base and large. Larger models generally deliver better zero-shot performance but require more memory and GPU for reasonable latency. If you’re on CPU or limited RAM, start with small or mini; if you have a capable GPU, prefer large. Using bfloat16 for inference often speeds things up with minimal precision loss.
How do I install Chronos and run a zero-shot forecast?Install the package from the official repository, prepare your target as torch tensors (one tensor per series), and create a ChronosPipeline with a chosen pretrained model (e.g., amazon/chronos-t5-small). Call predict with your context, the prediction_length, and num_samples to obtain probabilistic forecasts. Device can be CPU, Apple Silicon, or CUDA GPU; bfloat16 is recommended for speed.
How do I control forecast uncertainty and extract point forecasts?Set num_samples in predict to draw multiple probabilistic trajectories. Compute quantiles (e.g., 10th/50th/90th) across samples to form prediction intervals. The median (50th percentile) is used as the point forecast. More samples yield stabler intervals at the cost of slower inference.
How should I evaluate Chronos with cross-validation?Chronos doesn’t ship with a built-in CV helper, so implement your own windowing: iterate over multiple non-overlapping (or rolling) windows, update the context each time, call predict, and collect quantiles. Compare predictions to actuals across windows using metrics such as MAE and sMAPE for a robust assessment.
How do I fine-tune Chronos on my dataset?Use a GPU for practical training times. Convert your data to Arrow format (start timestamp + target array per series), prepare a YAML config (prediction_length, context_length, max_steps, tokenizer MeanScaleUniformBins with limits [-15, 15], n_tokens ≈ 4096, and a T5 model ID), then run the provided training script. Load the checkpoint with ChronosPipeline for inference. Fine-tuning typically improves MAE/sMAPE versus the base pretrained model.
Can Chronos do anomaly detection, and how?Yes, via prediction intervals: run forecasts with a high confidence level (e.g., 99%) and flag points where actuals fall outside the interval as anomalies. This approach can achieve high recall but may produce false positives; adjust the confidence level and windowing to balance precision and recall for your use case.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Time Series Forecasting Using Foundation Models ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Time Series Forecasting Using Foundation Models ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Time Series Forecasting Using Foundation Models ebook for free