google/timesfm-2.5-200m-pytorch 已完整同步
TimesFM
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
Updates
- October 2, 2025: We changed the structure of the model to fuse QKV matrices into one for speed optimization. Please reinstall the latest version of the timesfm package to reflect these changes. Results should be unchanged.
Resources and Technical Documentation:
- Paper: A decoder-only foundation model for time-series forecasting, ICML 2024.
- Google Research blog
- GitHub repo
Authors: Google Research
This checkpoint is not an officially supported Google product. See TimesFM in BigQuery for Google official support.
Checkpoint timesfm-2.5-200m
timesfm-2.5-200m is the third open model checkpoint.
Data
timesfm-2.5-200m is pretrained using
- GiftEvalPretrain
- Wikimedia Pageviews, cutoff Nov 2023 (see paper for details).
- Google Trends top queries, cutoff EoY 2022 (see paper for details).
- Synthetic and augmented data.
Install
pip install from PyPI coming soon. At this point, please run
git clone https://github.com/google-research/timesfm.git
cd timesfm
pip install -e .
Code Example
import numpy as np
import timesfm
model = timesfm.TimesFM_2p5_200M_torch.from_pretrained("google/timesfm-2.5-200m-pytorch", torch_compile=True)
model.compile(
timesfm.ForecastConfig(
max_context=1024,
max_horizon=256,
normalize_inputs=True,
use_continuous_quantile_head=True,
force_flip_invariance=True,
infer_is_positive=True,
fix_quantile_crossing=True,
)
)
point_forecast, quantile_forecast = model.forecast(
horizon=12,
inputs=[
np.linspace(0, 1, 100),
np.sin(np.linspace(0, 20, 67)),
], # Two dummy inputs
)
point_forecast.shape # (2, 12)
quantile_forecast.shape # (2, 12, 10): mean, then 10th to 90th quantiles.
4 个文件
浏览文件数据集版权信息
本数据集的许可证为 Apache License 2.0。如有违反相关条款,请联系 WEHUB,我们将及时处理。 查看许可证
通过 WeHub CLI 下载当前数据集快照。下列命令会固定为当前页面展示的数据版本(如果页面提供版本)。文件字节由本机直连存储下载,浏览器不会签发或保存下载链接。
前置要求
需要 Node.js 18 及以上,以及 npm(或 npx)。
1. 安装 CLI
npm install -g wehub-cli@latest
2. 下载此数据集
wehub datasets download ds_ext_3710_1fb9ea6608 --revision 1d952420fba87f3c6dee4f240de0f1a0fbc790e3 --output ./ds_ext_3710_1fb9ea6608
若中断或部分失败,在同一目录重新执行同一命令即可续传。默认会校验 SHA-256。
免全局安装
npx --yes wehub-cli@latest datasets download ds_ext_3710_1fb9ea6608 --revision 1d952420fba87f3c6dee4f240de0f1a0fbc790e3 --output ./ds_ext_3710_1fb9ea6608
高级选项
以下为 wehub datasets download 已支持的参数示例:
强制重新下载,不复用已校验的本地文件
wehub datasets download ds_ext_3710_1fb9ea6608 --revision 1d952420fba87f3c6dee4f240de0f1a0fbc790e3 --output ./ds_ext_3710_1fb9ea6608 --overwrite
仅包含匹配路径
wehub datasets download ds_ext_3710_1fb9ea6608 --revision 1d952420fba87f3c6dee4f240de0f1a0fbc790e3 --output ./ds_ext_3710_1fb9ea6608 --include "*.jsonl"
排除匹配路径
wehub datasets download ds_ext_3710_1fb9ea6608 --revision 1d952420fba87f3c6dee4f240de0f1a0fbc790e3 --output ./ds_ext_3710_1fb9ea6608 --exclude "*.md"
提高并发下载数
wehub datasets download ds_ext_3710_1fb9ea6608 --revision 1d952420fba87f3c6dee4f240de0f1a0fbc790e3 --output ./ds_ext_3710_1fb9ea6608 --jobs 8
完整帮助:wehub datasets download --help