5 Learning the language of time with Chronos

 

This chapter covers

  • Exploring the Chronos framework
  • Forecasting with Chronos
  • Fine-tuning Chronos
  • Anomaly detection with Chronos

In previous chapters, we explored TimeGPT and Lag-Llama, which are pretrained foundation models for time series forecasting. After the release of these two models, researchers from Amazon released Chronos. However, Chronos is technically not a model but a framework for pretrained probabilistic forecasting models [1]. This means that Chronos is a process in which time series data is scaled and quantized into a fixed vocabulary, such that it can be used to adapt existing language models, like T5 or GPT-2, to time series forecasting tasks.

However, the researchers already pretrained forecasting models based on the T5 family, and those models are loosely referred to as Chronos. Those models tend to perform best with series without strong trends. This will be explored in detail in the following sections. And unlike Lag-Llama, we can use the Chronos models through a Python package, making it more suitable in production-ready environments.

There is a lot to uncover about Chronos. We first dive into the details of the framework before moving on to applying it in our scenario of sales forecasting and anomaly detection.

5.1 Quickly discovering the T5 family

5.2 Exploring Chronos

5.2.1 Tokenization in Chronos

5.2.2 Training a model with Chronos

5.2.3 Tackling data scarcity with augmentation techniques

5.2.4 Examine the pretrained Chronos models

5.2.5 Selecting the appropriate Chronos model

5.3 Forecasting with Chronos

5.3.1 Zero-shot forecasting with Chronos

5.3.2 Cross-validation with Chronos

5.4 Fine-tuning Chronos

5.5 Anomaly detection with Chronos

5.6 Next steps

5.7 Summary