Google TimesFM Deep Dive: A 200M-Parameter Time-Series Foundation Model for Zero-Shot Forecasting
> Paper: *A decoder-only foundation model for time-series forecasting* (ICML 2024) > GitHub: google-research/timesfm (16K+ stars) > Latest version: TimesFM 2.5 (September 2025)
TL;DR
TimesFM is Google Research's first open-source time-series foundation model. Using a 200M-parameter decoder-only Transformer pretrained on 100 billion time points, it delivers zero-shot forecasts that approach or exceed fully supervised models tuned per dataset. Version 2.5 (2025) halves the parameters, extends context 8x, and tops the GIFT-Eval zero-shot leaderboard.
Why It Matters
Time-series forecasting underpins finance, energy, retail, and supply chains. Traditionally, each dataset requires separate tuning and training—ARIMA orders, Transformer layers/heads, PatchTST patch sizes. GPT proved NLP could be "pretrain once, zero-shot everywhere." TimesFM asks: can time series do the same? The answer is yes—but with a completely different definition of a token.
Core Architecture: Patched Decoder-Only Transformer
| Component | Configuration | |---|---| | Architecture | Decoder-only Transformer | | Layers | 20 | | Model dimension | 1280 | | Attention heads | 16 | | Parameters | 200M | | Input patch length | 32 | | Output patch length | 128 | | Max context | 512 (original) → 16,384 (2.5) |
Innovation 1: Continuous-Value Patches as Tokens
Time series have no vocabulary—each time point is a continuous float. TimesFM groups consecutive time points into patches treated as tokens: 32 input points form one input token, mapped to model dimension via an InputResidualBlock (MLP + residual), then processed by 20 layers of causal self-attention with positional encoding.
Innovation 2: Output Patches Longer Than Input Patches
Unlike LLMs, where output token length equals input length, TimesFM predicts 128 future points per output patch versus 32 input points. Forecasting 256 steps ahead thus requires only 2 autoregressive steps instead of 8, dramatically cutting inference cost for long horizons.
Innovation 3: Random Context Masking
During training, a random r ∈ [0, 31] of the first patch is masked, exposing the model to every context length from 1 to 512. At inference, non-multiple lengths are zero-padded with mask indicators—no context-length specification needed.
Pretraining Data: 100 Billion Time Points
| Data type | Points | |---|---| | Wikipedia page views (2012–2023) | ~374B (dominant) | | Google Trends (22K queries) | ~540M | | Synthetic data (ARMA + trends + seasonality + steps) | 6.1B | | M4 competition dataset | ~23M | | Electricity/traffic/weather/retail benchmarks | ~200M |
Mix: 80% real / 20% synthetic, with real data grouped equally by granularity. Synthetic series combine 2–8 piecewise linear trends, ARMA components, and sine/cosine waves. Training used TPUv5e, global batch size 4096, peak LR 5e-4 with cosine decay, 1.5M steps—only 2 days for the 200M model.
Results: Zero-Shot ≈ Fully Supervised
Monash Archive (18 datasets, geometric mean Scaled MAE):
| Model | Type | Score | |---|---|---| | TimesFM (ZS) | Zero-shot | 0.6846 | | N-BEATS | Supervised | 0.7005 | | PatchTST (ZS) | Zero-shot | 0.8619 | | llmtime (ZS, GPT-3) | Zero-shot | 0.9371 |
ETT (8 tasks): TimesFM zero-shot average MAE 0.36 vs. PatchTST supervised 0.37 (not significantly different); Informer 0.99. On ETTm1-96, TimesFM zero-shot (0.19) beats PatchTST supervised (0.33) by 42%.
TimesFM 2.5: Smaller, Longer, Stronger
| Dimension | 2.0 | 2.5 | |---|---|---| | Parameters | 500M | 200M | | Context length | 2048 | 16,384 | | Probabilistic forecasting | No | Optional 30M quantile head | | Frequency indicator | Required | Auto-inferred | | GIFT-Eval | Top tier | #1 zero-shot (point + probabilistic) |
Halving parameters while improving accuracy shows architecture and data efficiency matter more than scale. The 16K context captures multiple seasonal structures (yearly + weekly + daily) without manual preprocessing.
Competitive Landscape
| Model | Org | Notes | |---|---|---| | TimesFM | Google | Decoder-only, long output patches, fully open | | Chronos | Amazon | T5-based, tokenized time series | | MOIRAI | Salesforce | Multi-scale patches, native multivariate | | Time-MoE | Independent | 50M params, MoE, 300B training points | | TimeGPT | Nixtla | First concept, but closed-source | | llmtime | Academic | Encodes series as text for LLMs, very costly |
TimesFM's edge isn't size or data volume but engineering completeness: open weights, PyTorch/Flax backends, HuggingFace hosting, BigQuery integration.
Limitations and Open Questions
1. Probabilistic forecasting is post-hoc: the original paper was point-forecast only; the 2.5 quantile head is an add-on rather than built-in, unlike Chronos. 2. Half-hearted covariate support: XReg exogenous variables are supported in 2.5, but the model was not pretrained with covariates—zero-shot use is limited to residual linear regression. 3. Calendar-feature blind spot: the model doesn't know day-of-week, month, or holidays—a real weakness for retail promotions and holiday traffic. 4. Boundaries of generality: Monash benchmarks are relatively "clean"; performance on messy real-world data (missing values, anomalies, structural breaks) is untested. 5. Wikipedia bias: ~374B of the training points are page views, potentially overfitting to human-attention patterns and limiting transfer to industrial sensors or scientific domains.
Key Takeaways
1. A scaling law exists for time series, but the token definition must be reinvented—continuous-value patches with long output patches are the key. 2. Output length > input length effectively reduces autoregressive steps, acknowledging that time series can be predicted in blocks rather than token by token. 3. 200M parameters over 100B points shows data efficiency, not scale, is the core competency. 4. Zero-shot is a starting point: fine-tuning on 10% of data adds 12–19% improvement. Best practice is zero-shot as baseline plus light fine-tuning for production.
References
- Das, A., Kong, W., Sen, R., & Zhou, Y. (2023). *A decoder-only foundation model for time-series forecasting*. arXiv:2310.10688. ICML 2024.
- Das, A., et al. (2024). *TimesFM with experimental quantiles*. GitHub: google-research/timesfm.
- Das, A., Faw, M., Sen, R., & Zhou, Y. (2024). *In-Context Fine-Tuning for Time-Series Foundation Models*. arXiv:2410.24087.
- GIFT-Eval Benchmark: https://huggingface.co/spaces/Salesforce/GIFT-Eval
- TimesFM 2.5 on HuggingFace: https://huggingface.co/google/timesfm-2.5-200m-pytorch