timesfm  by google-research

Foundation model for advanced time-series forecasting

Created 2 years ago
18,741 stars

Top 2.7% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

TimesFM is a pretrained decoder-only foundation model from Google Research, specifically engineered for advanced time-series forecasting. It offers a scalable and flexible solution for researchers and practitioners, enabling enterprise-level predictions via BigQuery ML, daily use in Google Sheets, and agentic integration through Vertex Model Garden. The model's core benefit lies in its ability to handle complex temporal data patterns and long-range dependencies with high accuracy.

How It Works

TimesFM leverages a decoder-only transformer architecture, a modern approach for time-series modeling that allows for effective pretraining on extensive datasets, leading to robust generalization capabilities. The latest TimesFM 2.5 model significantly enhances performance by supporting an extended context length of up to 16,000 tokens and enabling continuous quantile forecasting up to a 1,000-horizon. This provides probabilistic insights beyond simple point estimates. The model also incorporates covariate support through the XReg module, allowing for richer, multi-variate input data.

Quick Start & Requirements

To begin, clone the repository and create a virtual environment. Install dependencies using uv: uv pip install -e .[torch] for PyTorch, uv pip install -e .[flax] for Flax, or uv pip install -e .[xreg] if covariate support is needed. Users must also install their preferred PyTorch or Jax backend, compatible with their OS and accelerators (CPU, GPU, TPU, Apple Silicon). Official documentation, examples, and fine-tuning guides are available within the repository.

Highlighted Details

  • TimesFM 2.5 features a 200M parameter model with a 16k context length and an optional 30M quantile head for continuous quantile forecasts, offering probabilistic predictions.
  • Deep integration with Google Cloud services: available in BigQuery ML, Vertex Model Garden, and Google Sheets for diverse deployment scenarios.
  • Supports covariate inputs through the XReg module, enabling richer, multi-variate time-series forecasting.
  • Includes a comprehensive fine-tuning example using HuggingFace Transformers and PEFT (LoRA) for custom model adaptation and specialization.
  • Agent support is available, with details provided in the TimesFM SKILL.md file, facilitating integration into agentic workflows.

Maintenance & Community

Developed by Google Research, the project actively incorporates community fixes and contributions, with notable mentions of @kashif, @darkpowerxo, and @borealBytes. Specific community channels like Discord or Slack, or a public roadmap, are not detailed in the provided README.

Licensing & Compatibility

The specific open-source license governing this repository is not explicitly stated in the provided README. The project is clearly marked as "This open version is not an officially supported Google product."

Limitations & Caveats

This open-source release is explicitly designated as not an officially supported Google product. Users needing to load older model versions (1.0 and 2.0) must install a specific package version (timesfm==1.3.0). The README does not detail known bugs or platform-specific limitations beyond the general backend installation requirements for PyTorch/Jax.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
26
Issues (30d)
4
Star History
8,187 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.