timesfm-forecasting

Generate zero-shot time series forecasts with prediction intervals using Google's TimesFM foundation model.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/littlt-momo-c-yfc/skills --skill timesfm-forecasting-littlt-momo-c-yfc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: timesfm-forecasting
Source: https://github.com/littlt-momo-c-yfc/skills/tree/main/skills/scientific-toolkit-skill/references/scientific-skills/timesfm-forecasting
Command: npx skills add https://github.com/littlt-momo-c-yfc/skills --skill timesfm-forecasting-littlt-momo-c-yfc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires timesfm, torch, numpy, pandas, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve? Forecasting univariate time series traditionally requires training and tuning custom statistical models like ARIMA for each dataset. This Skill applies Google's pretrained TimesFM foundation model to produce point forecasts and calibrated quantile prediction intervals from any time series without training, while a mandatory preflight checker prevents out-of-memory crashes on underpowered machines. ## Core Features & Use Cases - Zero-Shot Forecasting: Feed any univariate series (sales, sensors, energy, vitals, weather) as CSV, DataFrame, or numpy arrays and receive point forecasts plus 10-quantile prediction intervals. - Preflight System Checker: The check_system.py script verifies RAM, GPU/VRAM, disk space, and Python version before the ~800 MB model download, and recommends a safe batch size. - Covariate and Anomaly Workflows: Supports exogenous variables via forecast_with_covariates() (TimesFM 2.5 + xreg) and anomaly detection using quantile-based prediction intervals. - Use Case: Load a CSV of 36 months of sales data, run forecast_csv.py with a 12-step horizon, and export a CSV containing the forecast with 80% and 90% confidence bands for each series. ## Quick Start Ask the agent to run the system check script and then forecast the next 12 months of the sales column in your CSV file using TimesFM with prediction intervals.

Frequently Asked Questions about timesfm-forecasting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I forecast a time series without training a model?

Use TimesFM, a pretrained foundation model that forecasts zero-shot. Load the google/timesfm-2.5-200m-pytorch checkpoint, call compile() with a ForecastConfig, then pass a list of 1-D numpy arrays to model.forecast() with your desired horizon.

How to get prediction intervals from TimesFM forecasts?

TimesFM returns a quantile_forecast array of shape (batch, horizon, 10). Index 1 is the 10th percentile and index 9 is the 90th percentile, giving an 80% prediction interval. Enable use_continuous_quantile_head and fix_quantile_crossing for calibrated, monotonic intervals.

TimesFM vs statsmodels ARIMA for time series forecasting?

TimesFM provides zero-shot forecasts without parameter tuning and handles batches of series at once, while statsmodels ARIMA offers interpretable coefficients and classical statistical diagnostics. The skill documentation recommends ARIMA as a comparison baseline rather than a replacement.

Does TimesFM work on CPU without a GPU?

Yes, TimesFM 2.5 runs on CPU with at least 4 GB RAM, though inference is 5-20x slower than GPU. The check_system.py script detects CUDA, Apple Silicon MPS, or CPU-only environments and recommends an appropriate per_core_batch_size.

Why does TimesFM forecast fail with out of memory errors?

OOM occurs when per_core_batch_size is too large for available VRAM or RAM. Reduce the batch size, lower max_context, and process series in chunks of 50 with garbage collection between chunks. Always run check_system.py before loading the model.

Can TimesFM use covariates like price or holidays?

Yes, TimesFM 2.5 supports exogenous variables through forecast_with_covariates(), requiring the timesfm[xreg] extra. Dynamic covariates must span both the context and forecast horizon, and static categorical covariates like region are passed one value per series.