Skip to content

Releases: amazon-science/chronos-forecasting

1.4.0

02 Dec 11:09
47cac08
Compare
Choose a tag to compare

Key Changes

  • predict and predict_quantiles will return predictions on cpu in float32.

What's Changed

Full Changelog: v1.3.0...v1.4.0

1.3.0

28 Nov 12:41
ebaa13c
Compare
Choose a tag to compare

Highlight

Chronos-Bolt⚡: a 250x faster, more accurate Chronos model

Chronos-Bolt is our latest foundation model for forecasting. It is based on the T5 encoder-decoder architecture and has been trained on nearly 100 billion time series observations. It chunks the historical time series context into patches of multiple observations, which are then input into the encoder. The decoder then uses these representations to directly generate quantile forecasts across multiple future steps—a method known as direct multi-step forecasting. Chronos-Bolt models are up to 250 times faster and 20 times more memory-efficient than the original Chronos models of the same size.

The following plot compares the inference time of Chronos-Bolt against the original Chronos models for forecasting 1024 time series with a context length of 512 observations and a prediction horizon of 64 steps.

Chronos-Bolt models are not only significantly faster but also more accurate than the original Chronos models. The following plot reports the probabilistic and point forecasting performance of Chronos-Bolt in terms of the Weighted Quantile Loss (WQL) and the Mean Absolute Scaled Error (MASE), respectively, aggregated over 27 datasets (see the Chronos paper for details on this benchmark). Remarkably, despite having no prior exposure to these datasets during training, the zero-shot Chronos-Bolt models outperform commonly used statistical models and deep learning models that have been trained on these datasets (highlighted by *). Furthermore, they also perform better than other FMs, denoted by a +, which indicates that these models were pretrained on certain datasets in our benchmark and are not entirely zero-shot. Notably, Chronos-Bolt (Base) also surpasses the original Chronos (Large) model in terms of the forecasting accuracy while being over 600 times faster.

Chronos-Bolt models are now available on HuggingFace🤗 in four sizes—Tiny (9M), Mini (21M), Small (48M), and Base (205M)—and can also be used on the CPU. Check out the example in the README to learn how to use Chronos-Bolt models. You can use Chronos-Bolt models for forecasting in just a few lines of code.

import pandas as pd  # requires: pip install pandas
import torch
from chronos import BaseChronosPipeline

pipeline = BaseChronosPipeline.from_pretrained(
    "amazon/chronos-bolt-base", 
    device_map="cuda",  # use "cpu" for CPU inference
    torch_dtype=torch.bfloat16,
)

df = pd.read_csv(
    "https://raw.githubusercontent.com/AileenNielsen/TimeSeriesAnalysisWithPython/master/data/AirPassengers.csv"
)

# context must be either a 1D tensor, a list of 1D tensors,
# or a left-padded 2D tensor with batch as the first dimension
# Chronos-Bolt models generate quantile forecasts, so forecast has shape
# [num_series, num_quantiles, prediction_length].
forecast = pipeline.predict(
    context=torch.tensor(df["#Passengers"]), prediction_length=12
)

Note

We have also integrated Chronos-Bolt models into AutoGluon which is a more feature complete way of using Chronos models for production use cases. With the addition of Chronos-Bolt models and other enhancements, AutoGluon v1.2 achieves a 70%+ win rate against AutoGluon v1.1! In addition to the new Chronos-Bolt models, AutoGluon 1.2 also enables effortless fine-tuning of Chronos and Chronos-Bolt models. Check out the updated Chronos AutoGluon tutorial to learn how to use and fine-tune Chronos-Bolt models using AutoGluon.

What's Changed

New Contributors

Full Changelog: v1.2.0...v1.3.0

1.2.0

17 May 13:42
7a019b3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.1.0...v1.2.0

1.1.0

25 Mar 12:24
b4a6c0c
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.0.0...v1.1.0

1.0.0

25 Mar 11:38
73be250
Compare
Choose a tag to compare

Initial release

What's Changed

New Contributors

Full Changelog: paper-release...v1.0.0