IBM's new 385M‑parameter PatchTST-FM-r2 model tops zero‑shot time‑series forecasts while offering Apache‑2.0 licensing.
IBM announced the Granite Time Series PatchTST-FM-r2 model, a 385M‑parameter foundation model that achieves the best zero‑shot performance among permissively licensed models on the GIFT‑Eval benchmark. The model, code, and weights are released on Hugging Face under Apache‑2.0 and OpenMDW‑1.0 licenses and can be integrated with streaming pipelines via Confluent Cloud.
Implement zero‑shot forecasts by loading the model from Hugging Face and calling its inference API.
Generate a 24‑hour demand forecast for a CSV of hourly sensor readings using the provided HF pipeline.
Suggested exercise · not independently tested. Free access suggested; check current availability.
Before you start: Python 3.9+ · Hugging Face account (free)
Create a free Hugging Face account and install the transformers and datasets libraries.
Download the PatchTST-FM-r2 model with `from transformers import AutoModelForSeq2SeqLM, AutoTokenizer`.
Load your CSV, format the series as a list, and call `model.generate` with the desired horizon.
Print or save the forecast array.
Check your result: The output array length equals the requested horizon and values are numeric.
Tags
Also today