chronos-2
简介
Chronos-2 **Chronos-2** is a 120M-parameter, encoder-only time series foundation model for zero-shot forecasting. It supports **univariate**, **multivariate**, and **covariate-informed** tasks within a single architecture. 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. Trained on a combination of real-world and large-scale synthetic datasets, it achieve
模型卡片
模型配置
模型详情
已翻译Chronos-2
Chronos-2 是一个拥有 1.2 亿参数的纯 encoder 时间序列基础模型,专为零样本预测设计。它在单一架构内支持单变量、多变量以及协变量辅助任务。
受 T5 encoder 启发,Chronos-2 能够生成多步 ahead 的分位数预测,并采用组注意力机制(group attention mechanism),在相关序列和协变量之间实现高效的上下文学习(in-context learning)。
该模型基于真实世界与大规模合成数据的组合进行训练,在 fev-bench、GIFT-Eval 和 Chronos Benchmark II 上,于公开模型中达到了最先进的零样本预测精度。
Chronos-2 还非常高效,在单张 A10G GPU 上每秒可完成超过 300 次时间序列预测,并同时支持 GPU 和 CPU 推理。
相关链接
概览
| 能力 | Chronos-2 | Chronos-Bolt | Chronos |
|---|---|---|---|
| 单变量预测 | ✅ | ✅ | ✅ |
| 跨序列交叉学习 | ✅ | ❌ | ❌ |
| 多变量预测 | ✅ | ❌ | ❌ |
| 仅过去(实数/类别)协变量 | ✅ | ❌ | ❌ |
| 已知未来(实数/类别)协变量 | ✅ | 🧩 | 🧩 |
| 最大上下文长度 | 8192 | 2048 | 512 |
| 最大预测长度 | 1024 | 64 | 64 |
🧩 Chronos 和 Chronos-Bolt 原生不支持未来协变量,但可以与外部协变量回归器结合使用(参见 AutoGluon 教程)。这种方式仅建模每个时间步的效应,而非跨时间效应。相比之下,Chronos-2 原生支持所有类型的协变量。
使用方法
本地使用
对于实验和本地推理,您可以使用 inference 包。
安装该包
pip install "chronos-forecasting>=2.0"
使用 pandas API 进行零样本预测
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], # Quantiles 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
)
将 Chronos-2 端点部署到 SageMaker
对于生产环境,我们建议将 Chronos-2 端点部署到 Amazon SageMaker。
首先,更新 SageMaker SDK 以确保所有最新模型可用。
pip install -U sagemaker
将推理端点部署到 SageMaker。
from sagemaker.jumpstart.model import JumpStartModel
model = JumpStartModel(
model_id="pytorch-forecasting-chronos-2",
instance_type="ml.g5.2xlarge",
)
predictor = model.deploy()
现在,您可以以 JSON 格式向端点发送时间序列数据。
import pandas as pd
df = pd.read_csv("https://raw.githubusercontent.com/AileenNielsen/TimeSeriesAnalysisWithPython/master/data/AirPassengers.csv")
payload = {
"inputs": [
{"target": df["#Passengers"].tolist()}
],
"parameters": {
"prediction_length": 12,
}
}
forecast = predictor.predict(payload)["predictions"]
有关端点 API 的更多详细信息,请查看 示例 notebook
训练数据
有关训练数据的更多详细信息,请参阅 技术报告。
- Chronos Datasets 的子集(排除与 GIFT-Eval 重叠的数据集的测试部分)
- GIFT-Eval Pretrain 的子集
- 合成的单变量和多变量数据
引用
如果您发现 Chronos-2 对您的研究有帮助,请考虑引用相关论文:
@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},
year = {2025},
url = {https://arxiv.org/abs/2510.15821}
}
正在翻译中,请稍候...
标签
操作
详细信息
- 厂商
- autogluon
- 任务
- time-series-forecasting
- 框架
- chronos-forecasting
- 模型类型
- t5
- 许可(HF)
- apache-2.0