timesfm
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
File Explorer
- main.yml
- manual_publish.yml
- __init__.py
- dense.py
- normalization.py
- transformer.py
- util.py
- timesfm_2p5_base.py
- timesfm_2p5_flax.py
- timesfm_2p5_torch.py
- __init__.py
- dense.py
- normalization.py
- transformer.py
- util.py
- xreg_lib.py
- __init__.py
- configs.py
- __init__.py
- test_base_utils.py
- test_configs.py
- test_force_flip_invariance.py
- test_model_loading.py
- test_torch_layers.py
- test_torch_utils.py
- anomaly_detection.json
- anomaly_detection.png
- detect_anomalies.py
- covariates_data.png
- covariates_metadata.json
- sales_with_covariates.csv
- demo_covariates.py
- finetune_lora.py
- README.md
- animation_data.json
- forecast_animation.gif
- forecast_output.csv
- forecast_output.json
- forecast_visualization.png
- interactive_forecast.html
- generate_animation_data.py
- generate_gif.py
- generate_html.py
- README.md
- run_example.sh
- run_forecast.py
- temperature_anomaly.csv
- visualize_forecast.py
- api_reference.md
- data_preparation.md
- system_requirements.md
- check_system.py
- forecast_csv.py
- SKILL.md
- contributing.md
- __init__.py
- timegpt_pipeline.py
- README.md
- run_timegpt.py
- run_timesfm.py
- tfm_extended_new.png
- tfm_results.png
- utils.py
- README.md
- run_eval.py
- tfm_long_horizon.png
- covariates.ipynb
- finetuning.ipynb
- finetuning_torch.ipynb
- finetune.py
- finetune.sh
- README.md
- usage.ipynb
- __init__.py
- dora_layers.py
- lora_layers.py
- utils.py
- __init__.py
- finetuning_example.py
- finetuning_torch.py
- __init__.py
- data_loader.py
- patched_decoder.py
- pytorch_patched_decoder.py
- time_features.py
- timesfm_base.py
- timesfm_jax.py
- timesfm_torch.py
- xreg_lib.py
- test_data_loader.py
- test_timesfm.py
- LICENSE
- poetry.lock
- pyproject.toml
- README.md
- TROUBLESHOOTING.md
- .gitattributes
- .gitignore
- AGENTS.md
- LICENSE
- pyproject.toml
- README.md
- requirements.txt
# Installation Guide
python- Python >=3.10
- uv
- PyTorch / JAX
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.
# Use via CDN
jsDelivrjsDelivr 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 ▼
git clone
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 ▼
pip install
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 ▼
uv pip
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 ▼
uv venv
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:
