timesfm

(★ 28,071)

TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.

File Explorer

  • .gitattributes
  • .gitignore
  • AGENTS.md
  • LICENSE
  • pyproject.toml
  • README.md
  • requirements.txt

# Installation Guide

python
Prerequisites

Setup Steps

git clone https://github.com/google-research/timesfm.git

Clone the project repository locally.

uv venv

Create a virtual environment using uv.

source .venv/bin/activate

Activate the virtual environment.

uv pip install -e .[torch]

Install the package in editable mode with the torch backend.

Key Commands

pip install timesfm[torch]

Install the package with the torch backend via PyPI.

uv pip install -e .[torch]

Install the package with the torch backend in editable mode for local development.

You may need to install the appropriate PyTorch or JAX backend based on your OS and accelerators.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

uv pip

View Details ▼

Provides pip-like commands for installing, uninstalling, and managing packages.

uv pip install {{package}}

Install a package:

uv pip install {{[-r|--requirements]}} {{requirements.txt}}

Install packages from a requirements file:

uv pip install {{package==1.2.3}}

Install a package with a specific version:

🔍

uv venv

View Details ▼

Create an isolated Python environment for installing packages.

uv venv

Create a virtual environment in the default location (`.venv`):

uv venv {{path/to/venv}}

Create a virtual environment at a specific path:

uv venv {{[-p|--python]}} {{3.12}}

Create using a specific Python version:

// repository documentation