Skip to main content

Chronos: Pretrained models for time series forecasting

Project description

Disclaimer

This is a personal fork of chronos-forecasting, maintained to support custom changes for timecopilot and publish pypi wheels at timecopilot-chronos-forecasting. It may diverge from upstream.

Credits

This project is a fork of by Original Author(s).
All credit for the original code belongs to them. This fork is maintained independently to support TimeCopilot-specific changes.

Chronos: Pretrained Models for Time Series Forecasting

preprint preprint huggingface huggingface fev aws faq License: MIT

🚀 News

  • 5 Jun 2026: ☁️ Deploy Chronos-2 to AWS with AutoGluon-Cloud — real-time, serverless, or batch inference in 3 lines of code, pandas DataFrames in, forecasts out. See the new deployment guide.
  • 30 Dec 2025: 🧠 Deploy Chronos-2 to AWS with Amazon SageMaker JumpStart — production-ready real-time endpoints on CPU or GPU, ready to integrate into your existing AWS workflows. See the deployment tutorial.
  • 20 Oct 2025: 🚀 Chronos-2 released. It offers zero-shot support for univariate, multivariate, and covariate-informed forecasting tasks. Chronos-2 achieves the best performance on fev-bench, GIFT-Eval and Chronos Benchmark II amongst pretrained models. Check out this notebook to get started with Chronos-2.
  • 12 Dec 2024: 📊 We released fev, a lightweight package for benchmarking time series forecasting models based on the Hugging Face datasets library.
  • 26 Nov 2024: ⚡️ Chronos-Bolt models released on HuggingFace. Chronos-Bolt models are more accurate (5% lower error), up to 250x faster and 20x more memory efficient than the original Chronos models of the same size!
  • 13 Mar 2024: 🚀 Chronos paper and inference code released.

✨ Introduction

This package provides an interface to the Chronos family of pretrained time series forecasting models. The following model types are supported.

  • Chronos-2: Our latest model with significantly enhanced capabilities. It offers zero-shot support for univariate, multivariate, and covariate-informed forecasting tasks. Chronos-2 delivers state-of-the-art zero-shot performance across multiple benchmarks (including fev-bench and GIFT-Eval), with the largest improvements observed on tasks that include exogenous features. It also achieves a win rate of over 90% against Chronos-Bolt in head-to-head comparisons. To learn more about Chronos, check out the technical report.
  • Chronos-Bolt: A patch-based variant of Chronos. 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. To learn more about Chronos-Bolt, check out this blog post.
  • Chronos: The original Chronos family which is based on language model architectures. A time series is transformed into a sequence of tokens via scaling and quantization, and a language model is trained on these tokens using the cross-entropy loss. Once trained, probabilistic forecasts are obtained by sampling multiple future trajectories given the historical context. To learn more about Chronos, check out the publication.

Available Models

📈 Usage

To perform inference with Chronos, the easiest way is to install this package through pip:

pip install chronos-forecasting

[!TIP] For production use, we recommend deploying Chronos-2 to Amazon SageMaker. Two options:

  • AutoGluon-Cloud (recommended) — high-level Python API. Pandas DataFrames in, forecasts out. Real-time, serverless, and batch inference out of the box.
  • SageMaker JumpStart — production-ready real-time endpoints on CPU or GPU, ready to integrate into your existing AWS workflows.

Forecasting

A minimal example showing how to perform forecasting using Chronos-2:

import pandas as pd  # requires: pip install 'pandas[pyarrow]'
from chronos import Chronos2Pipeline

pipeline = Chronos2Pipeline.from_pretrained("amazon/chronos-2", device_map="cuda")

# Load historical target values and past values of covariates
context_df = pd.read_parquet("https://autogluon.s3.amazonaws.com/datasets/timeseries/electricity_price/train.parquet")

# (Optional) Load future values of covariates
test_df = pd.read_parquet("https://autogluon.s3.amazonaws.com/datasets/timeseries/electricity_price/test.parquet")
future_df = test_df.drop(columns="target")

# Generate predictions with covariates
pred_df = pipeline.predict_df(
    context_df,
    future_df=future_df,
    prediction_length=24,  # Number of steps to forecast
    quantile_levels=[0.1, 0.5, 0.9],  # Quantile for probabilistic forecast
    id_column="id",  # Column identifying different time series
    timestamp_column="timestamp",  # Column with datetime information
    target="target",  # Column(s) with time series values to predict
)

We can now visualize the forecast:

import matplotlib.pyplot as plt  # requires: pip install matplotlib

ts_context = context_df.set_index("timestamp")["target"].tail(256)
ts_pred = pred_df.set_index("timestamp")
ts_ground_truth = test_df.set_index("timestamp")["target"]

ts_context.plot(label="historical data", color="xkcd:azure", figsize=(12, 3))
ts_ground_truth.plot(label="future data (ground truth)", color="xkcd:grass green")
ts_pred["predictions"].plot(label="forecast", color="xkcd:violet")
plt.fill_between(
    ts_pred.index,
    ts_pred["0.1"],
    ts_pred["0.9"],
    alpha=0.7,
    label="prediction interval",
    color="xkcd:light lavender",
)
plt.legend()

Example Notebooks

📝 Citation

If you find Chronos models useful for your research, please consider citing the associated papers:

@article{ansari2024chronos,
  title={Chronos: Learning the Language of Time Series},
  author={Ansari, Abdul Fatir and Stella, Lorenzo and Turkmen, Caner and Zhang, Xiyuan, and Mercado, Pedro and Shen, Huibin and Shchur, Oleksandr and Rangapuram, Syama Syndar and Pineda Arango, Sebastian and Kapoor, Shubham and Zschiegner, Jasper and Maddix, Danielle C. and Mahoney, Michael W. and Torkkola, Kari and Gordon Wilson, Andrew and Bohlke-Schneider, Michael and Wang, Yuyang},
  journal={Transactions on Machine Learning Research},
  issn={2835-8856},
  year={2024},
  url={https://openreview.net/forum?id=gerNCVqqtR}
}

@article{ansari2025chronos2,
  title        = {Chronos-2: From Univariate to Universal Forecasting},
  author       = {Abdul Fatir Ansari and Oleksandr Shchur and Jaris Küken and Andreas Auer and Boran Han and Pedro Mercado and Syama Sundar Rangapuram and Huibin Shen and Lorenzo Stella and Xiyuan Zhang and Mononito Goswami and Shubham Kapoor and Danielle C. Maddix and Pablo Guerron and Tony Hu and Junming Yin and Nick Erickson and Prateek Mutalik Desai and Hao Wang and Huzefa Rangwala and George Karypis and Yuyang Wang and Michael Bohlke-Schneider},
  journal      = {arXiv preprint arXiv:2510.15821},
  year         = {2025},
  url          = {https://arxiv.org/abs/2510.15821}
}

🛡️ Security

See CONTRIBUTING for more information.

📃 License

This project is licensed under the Apache-2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timecopilot_chronos_forecasting-0.2.2.tar.gz (950.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timecopilot_chronos_forecasting-0.2.2-py3-none-any.whl (80.3 kB view details)

Uploaded Python 3

File details

Details for the file timecopilot_chronos_forecasting-0.2.2.tar.gz.

File metadata

  • Download URL: timecopilot_chronos_forecasting-0.2.2.tar.gz
  • Upload date:
  • Size: 950.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for timecopilot_chronos_forecasting-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d90eb467eaba3b144078c6dcd4fccf3ccbfe20217a54b66e85852e5ea08b6610
MD5 fc6d335c03418251648cb36c56097ec7
BLAKE2b-256 e98b3f993870d843e1dc158e2d3755089bc71f189885c1a80ef520b58d531aee

See more details on using hashes here.

File details

Details for the file timecopilot_chronos_forecasting-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: timecopilot_chronos_forecasting-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 80.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for timecopilot_chronos_forecasting-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4128f7230a03084c81eb5fd6fd5c041e5cfef5d5d291154901d9d353cf077e2a
MD5 7759c29150918b9d4cfce64b790c99df
BLAKE2b-256 90e178233171db1270a7914c80635b9f4b3b52b55af91d4801ffe889ee45a131

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page