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].
In short, Chronos designs a process in which time series data is scaled and quantized into a fixed vocabulary, such that it can be used to train existing language models, like T5 or GPT-2.
Luckily for us, the researchers already pretrained forecasting models based on the T5 family, and those models are loosely referred to as Chronos.
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
It is important to understand the T5 family of models, as they are the models behind Chronos. We will keep this exploration to a minimum such that we can focus on time series forecasting. If you are already familiar with T5, feel free to jump right into the next section of the chapter.
Now, T5 represents a group of language models developed by Google Research [2]. T5 actually stands for Text-to-Text Transfer Transformer.