abdulfatir commited on
Commit
f310bca
Β·
1 Parent(s): b4e823d

Update README

Browse files
Files changed (1) hide show
  1. README.md +145 -3
README.md CHANGED
@@ -1,3 +1,145 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ model_id: chronos-2-synth
4
+ tags:
5
+ - time series
6
+ - forecasting
7
+ - foundation models
8
+ - pretrained models
9
+ - safetensors
10
+ paper:
11
+ - https://arxiv.org/abs/2510.15821
12
+ pipeline_tag: time-series-forecasting
13
+ library_name: chronos-forecasting
14
+
15
+ ---
16
+
17
+ # Chronos-2-Synth
18
+
19
+ **Chronos-2** is a 120M-parameter, encoder-only time series foundation model for zero-shot forecasting.
20
+ It supports **univariate**, **multivariate**, and **covariate-informed** tasks within a single architecture.
21
+ Inspired by the T5 encoder, Chronos-2 produces multi-step-ahead quantile forecasts and uses a group attention mechanism for efficient in-context learning across related series and covariates.
22
+ This variant of Chronos-2 has only been trained large-scale synthetic datasets.
23
+ Despite this, it achieves zero-shot forecasting accuracy comparable to **state-of-the-art** models on [**fev-bench**](https://huggingface.co/spaces/autogluon/fev-leaderboard), [**GIFT-Eval**](https://huggingface.co/spaces/Salesforce/GIFT-Eval), and [**Chronos Benchmark II**](https://arxiv.org/abs/2403.07815).
24
+ Chronos-2 is also **highly efficient**, delivering over 300 time series forecasts per second on a single A10G GPU and supporting both **GPU and CPU inference**.
25
+
26
+ ## Links
27
+ - πŸš€ [Deploy Chronos-2 on Amazon SageMaker](https://github.com/amazon-science/chronos-forecasting/blob/main/notebooks/deploy-chronos-to-amazon-sagemaker.ipynb)
28
+ - πŸ“„ [Technical report](https://arxiv.org/abs/2510.15821v1)
29
+ - πŸ’» [GitHub](https://github.com/amazon-science/chronos-forecasting)
30
+ - πŸ“˜ [Example notebook](https://github.com/amazon-science/chronos-forecasting/blob/main/notebooks/chronos-2-quickstart.ipynb)
31
+ - πŸ“° [Amazon Science Blog](https://www.amazon.science/blog/introducing-chronos-2-from-univariate-to-universal-forecasting)
32
+
33
+
34
+ ## Overview
35
+
36
+ | Capability | Chronos-2 | Chronos-Bolt | Chronos |
37
+ |------------|-----------|--------------|----------|
38
+ | Univariate Forecasting | βœ… | βœ… | βœ… |
39
+ | Cross-learning across items | βœ… | ❌ | ❌ |
40
+ | Multivariate Forecasting | βœ… | ❌ | ❌ |
41
+ | Past-only (real/categorical) covariates | βœ… | ❌ | ❌ |
42
+ | Known future (real/categorical) covariates | βœ… | 🧩 | 🧩 |
43
+ | Max. Context Length | 8192 | 2048 | 512 |
44
+ | Max. Prediction Length | 1024 | 64 | 64 |
45
+
46
+ 🧩 Chronos & Chronos-Bolt do not natively support future covariates, but they can be combined with external covariate regressors (see [AutoGluon tutorial](https://auto.gluon.ai/stable/tutorials/timeseries/forecasting-chronos.html#incorporating-the-covariates)). This only models per-timestep effects, not effects across time. In contrast, Chronos-2 supports all covariate types natively.
47
+
48
+
49
+ ## Usage
50
+
51
+ ### Local usage
52
+
53
+ For experimentation and local inference, you can use the [inference package](https://github.com/amazon-science/chronos-forecasting).
54
+
55
+ Install the package
56
+ ```
57
+ pip install "chronos-forecasting>=2.0"
58
+ ```
59
+
60
+ Make zero-shot predictions using the `pandas` API
61
+
62
+ ```python
63
+ import pandas as pd # requires: pip install 'pandas[pyarrow]'
64
+ from chronos import Chronos2Pipeline
65
+
66
+ pipeline = Chronos2Pipeline.from_pretrained("autogluon/chronos-2-synth", device_map="cuda")
67
+
68
+ # Load historical target values and past values of covariates
69
+ context_df = pd.read_parquet("https://autogluon.s3.amazonaws.com/datasets/timeseries/electricity_price/train.parquet")
70
+
71
+ # (Optional) Load future values of covariates
72
+ test_df = pd.read_parquet("https://autogluon.s3.amazonaws.com/datasets/timeseries/electricity_price/test.parquet")
73
+ future_df = test_df.drop(columns="target")
74
+
75
+ # Generate predictions with covariates
76
+ pred_df = pipeline.predict_df(
77
+ context_df,
78
+ future_df=future_df,
79
+ prediction_length=24, # Number of steps to forecast
80
+ quantile_levels=[0.1, 0.5, 0.9], # Quantiles for probabilistic forecast
81
+ id_column="id", # Column identifying different time series
82
+ timestamp_column="timestamp", # Column with datetime information
83
+ target="target", # Column(s) with time series values to predict
84
+ )
85
+ ```
86
+
87
+ ### Deploying a Chronos-2 endpoint to SageMaker
88
+
89
+ For production use, we recommend deploying Chronos-2 endpoints to Amazon SageMaker.
90
+
91
+ First, update the SageMaker SDK to make sure that all the latest models are available.
92
+
93
+ ```
94
+ pip install -U sagemaker
95
+ ```
96
+
97
+ Deploy an inference endpoint to SageMaker.
98
+
99
+ ```python
100
+ from sagemaker.jumpstart.model import JumpStartModel
101
+
102
+ model = JumpStartModel(
103
+ model_id="pytorch-forecasting-chronos-2",
104
+ instance_type="ml.g5.2xlarge",
105
+ )
106
+ predictor = model.deploy()
107
+ ```
108
+
109
+ Now you can send time series data to the endpoint in JSON format.
110
+
111
+ ```python
112
+ import pandas as pd
113
+ df = pd.read_csv("https://raw.githubusercontent.com/AileenNielsen/TimeSeriesAnalysisWithPython/master/data/AirPassengers.csv")
114
+
115
+ payload = {
116
+ "inputs": [
117
+ {"target": df["#Passengers"].tolist()}
118
+ ],
119
+ "parameters": {
120
+ "prediction_length": 12,
121
+ }
122
+ }
123
+ forecast = predictor.predict(payload)["predictions"]
124
+ ```
125
+
126
+ For more details about the endpoint API, check out the [example notebook](https://github.com/amazon-science/chronos-forecasting/blob/main/notebooks/deploy-chronos-to-amazon-sagemaker.ipynb)
127
+
128
+
129
+ ## Training data
130
+
131
+ This variant of Chronos-2 has only been trained synthetic univariate and multivariate data.
132
+
133
+
134
+ ## Citation
135
+
136
+ If you find Chronos-2 useful for your research, please consider citing the associated paper:
137
+
138
+ ```
139
+ @article{ansari2025chronos2,
140
+ title = {Chronos-2: From Univariate to Universal Forecasting},
141
+ 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},
142
+ year = {2025},
143
+ url = {https://arxiv.org/abs/2510.15821}
144
+ }
145
+ ```