gitmyhub

timesfm

Python ★ 25k updated 1d ago

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

Pre-trained AI model from Google for forecasting time-series data without retraining. Feed it historical numbers, get future predictions with confidence ranges.

PythonPyTorchFlaxsetup: easycomplexity 2/5

TimesFM (Time Series Foundation Model) is a pre-trained AI model developed by Google Research for forecasting time-series data. A time series is any sequence of measurements taken over time — sales figures by day, electricity usage by hour, website traffic by minute. Traditional forecasting models need to be trained from scratch on your own data. TimesFM works differently: it was pre-trained on a large amount of diverse time-series data by Google and can make accurate forecasts on new datasets without any additional training, similar to how a large language model can answer questions about topics it was not explicitly fine-tuned on.

You provide the model with historical data points (the context), and it predicts future values (the horizon). The current version (TimesFM 2.5) uses 200 million parameters, supports context windows of up to 16,000 time steps, and can output not just a single point forecast but also a range of quantile predictions — meaning it can tell you both the most likely future value and a confidence range around it.

The code example in the README shows loading the pre-trained model, configuring it with a forecast horizon of 12 steps, and feeding in two short numerical sequences to get back predicted values and uncertainty ranges.

TimesFM is integrated into several Google products, including BigQuery ML for SQL-based forecasting at scale, Google Sheets for spreadsheet users, and Vertex AI for cloud deployment. It supports fine-tuning via LoRA for adapting the model to specific datasets. The library is written in Python and supports both PyTorch and Flax backends.

Where it fits