SAVRN
Search Contact SAVRN

Open-weight model · Time series forecasting

granite-timeseries-patchtst

by IBM Granite ibm-granite/granite-timeseries-patchtst

PatchTST is a transformer-based model for time series modeling tasks, including forecasting, regression, and classification. This repository contains a pre-trained PatchTST model encompassing all seven channels of the ETTh1 dataset.

Parameters616,032
Context
Weights2.5 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads20.4k

Runs On

What it takes to serve granite-timeseries-patchtst (616,032 parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By IBM Granite, published under apache-2.0, revision 7fe295d8bc8f.

PatchTST is a transformer-based model for time series modeling tasks, including forecasting, regression, and classification. This repository contains a pre-trained PatchTST model encompassing all seven channels of the ETTh1 dataset. This particular pre-trained model produces a Mean Squared Error (MSE) of 0.3881 on the test split of the ETTh1 dataset when forecasting 96 hours into the future with a historical data window of 512 hours. For training and evaluating a PatchTST model, you can refer to this demo notebook. The PatchTST model was proposed in A Time Series is Worth 64 Words: Long-term Forecasting with Transformers by Yuqi Nie, Nam H. Nguyen, Phanwadee Sinthong, Jayant Kalagnanam. At…

Read IBM Granite's full model card

PatchTST model pre-trained on ETTh1 dataset

PatchTST is a transformer-based model for time series modeling tasks, including forecasting, regression, and classification. This repository contains a pre-trained PatchTST model encompassing all seven channels of the ETTh1 dataset. This particular pre-trained model produces a Mean Squared Error (MSE) of 0.3881 on the test split of the ETTh1 dataset when forecasting 96 hours into the future with a historical data window of 512 hours.

For training and evaluating a PatchTST model, you can refer to this demo notebook.

Model Details

Model Description

The PatchTST model was proposed in A Time Series is Worth 64 Words: Long-term Forecasting with Transformers by Yuqi Nie, Nam H. Nguyen, Phanwadee Sinthong, Jayant Kalagnanam.

At a high level the model vectorizes time series into patches of a given size and encodes the resulting sequence of vectors via a Transformer that then outputs the prediction length forecast via an appropriate head.

The model is based on two key components: (i) segmentation of time series into subseries-level patches which are served as input tokens to Transformer; (ii) channel-independence where each channel contains a single univariate time series that shares the same embedding and Transformer weights across all the series. The patching design naturally has three-fold benefit: local semantic information is retained in the embedding; computation and memory usage of the attention maps are quadratically reduced given the same look-back window; and the model can attend longer history. Our channel-independent patch time series Transformer (PatchTST) can improve the long-term forecasting accuracy significantly when compared with that of SOTA Transformer-based models.

In addition, PatchTST has a modular design to seamlessly support masked time series pre-training as well as direct time series forecasting, classification, and regression.

Model Sources

Uses

This pre-trained model can be employed for fine-tuning or evaluation using any Electrical Transformer dataset that has the same channels as the ETTh1 dataset, specifically: HUFL, HULL, MUFL, MULL, LUFL, LULL, OT. The model is designed to predict the next 96 hours based on the input values from the preceding 512 hours. It is crucial to normalize the data. For a more comprehensive understanding of data pre-processing, please consult the paper or the demo.

How to Get Started with the Model

Use the code below to get started with the model.

Demo

Training Details

Training Data

ETTh1/train split. Train/validation/test splits are shown in the demo.

Training hyperparameters

The following hyperparameters were used during training: - learning_rate: 5e-05 - train_batch_size: 8 - eval_batch_size: 8 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10

Training Results

Training Loss Epoch Step Validation Loss
0.4306 1.0 1005 0.7268
0.3641 2.0 2010 0.7456
0.348 3.0 3015 0.7161
0.3379 4.0 4020 0.7428
0.3284 5.0 5025 0.7681
0.321 6.0 6030 0.7842
0.314 7.0 7035 0.7991
0.3088 8.0 8040 0.8021
0.3053 9.0 9045 0.8199
0.3019 10.0 10050 0.8173

Evaluation

Testing Data

ETTh1/test split. Train/validation/test splits are shown in the demo.

Metrics

Mean Squared Error (MSE).

Results

It achieves a MSE of 0.3881 on the evaluation dataset.

Hardware

1 NVIDIA A100 GPU

Framework versions
  • Transformers 4.36.0.dev0
  • Pytorch 2.0.1
  • Datasets 2.14.4
  • Tokenizers 0.14.1

Citation

BibTeX:

@misc{nie2023time,
      title={A Time Series is Worth 64 Words: Long-term Forecasting with Transformers}, 
      author={Yuqi Nie and Nam H. Nguyen and Phanwadee Sinthong and Jayant Kalagnanam},
      year={2023},
      eprint={2211.14730},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

APA:

Nie, Y., Nguyen, N., Sinthong, P., & Kalagnanam, J. (2023). A Time Series is Worth 64 Words: Long-term Forecasting with Transformers. arXiv preprint arXiv:2211.14730.

Configuration

Architecture
PatchTSTForPrediction
Layers
3
Attention heads
16
Stored precision
float32
Model type
patchtst

Identity and Version

Repository
ibm-granite/granite-timeseries-patchtst
Publisher
IBM Granite
Task
Time series forecasting
Modality
Time series
Library
transformers
Parameters
616,032 parameters
Languages
Not stated by the source
Revision
7fe295d8bc8fbac8041b60ab351882634165517f
First published
2024-01-19
Last updated
2024-08-01

Files and Weights

6 files, 2.8 MB in total. The weights are 1 file totalling 2.5 MB in safetensors.

Weights1 file · 2.5 MB
Configuration2 files · 1.4 KB
Documentation1 file · 6.5 KB
Other1 file · 338.5 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights2.5 MB c7fca6ed95f1
config.jsonConfiguration1.3 KB
generation_config.jsonConfiguration74 B
README.mdDocumentation6.5 KB
patchtst_architecture.pngOther338.5 KB
.gitattributesRepository1.5 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
2.5 MB
Download from IBM Granite

Released by IBM Granite through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published2.5 MB
16-bit0.0 GB
8-bit0.0 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About granite-timeseries-patchtst

How much GPU memory does granite-timeseries-patchtst need?

About 0 GB at 16-bit and 0 GB at 4-bit: the weights (616,032 parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run granite-timeseries-patchtst on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use granite-timeseries-patchtst commercially?

Yes. granite-timeseries-patchtst is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Time series forecasting

granite-timeseries-ttm-r2

IBM Granite

TinyTimeMixers (TTMs) are compact pre-trained models for Multivariate Time-Series Forecasting, open-sourced by IBM Research. With model sizes starting from 1M params, TTM introduces the notion of the first-ever “tiny” pre-trained models for Time-Series Forecasting. The paper describing TTM was accepted at NeurIPS 24. TTM outperforms other models demanding billions of parameters in several popular zero-shot and few-shot forecasting benchmarks. TTMs are lightweight forecasters, pre-trained on publicly available time series data with various augmentations. TTM provides state-of-the-art zero-shot forecasts and can easily be fine-tuned for multi-variate forecasts with just 5% of the training…

Open weights apache-2.0 805,280 parameters granite-tsfm

Model · Time series forecasting

granite-timeseries-ttm-r1

IBM Granite

TinyTimeMixers (TTMs) are compact pre-trained models for Multivariate Time-Series Forecasting, open-sourced by IBM Research. With less than 1 Million parameters, TTM (accepted in NeurIPS 24) introduces the notion of the first-ever “tiny” pre-trained models for Time-Series Forecasting. TTM outperforms several popular benchmarks demanding billions of parameters in zero-shot and few-shot forecasting. TTMs are lightweight forecasters, pre-trained on publicly available time series data with various augmentations. TTM provides state-of-the-art zero-shot forecasts and can easily be fine-tuned for multi-variate forecasts with just 5% of the training data to be competitive. Refer to our paper for…

Open weights apache-2.0 805,280 parameters granite-tsfm

Model · Time series forecasting

TiRex

NX-AI

This repository provides the pre-trained forecasting model TiRex introduced in the paper TiRex is a 35M parameter pre-trained time series forecasting model based on xLSTM. TiRex is a pre-trained model that performs time series forecasting without requiring any training on your data. Simply download and use it. TiRex provides both point estimates and quantile estimates. - State-of-the-art Performance over Long and Short Horizons: TiRex achieves top scores in various time series forecasting benchmarks, see GiftEval and ChronosZS. These benchmark show that TiRex provides great performance for both long and short-term forecasting. A detailed documentation of TiRex can be found here…

Open weights other tirex

Model · Time series forecasting

TiRex-1.1-gifteval

NX-AI

The 1.1 release introduces long period normalisation, a method applied solely during inference. This specific version (1.1-gifteval) includes the 1.1 improvements plus the pretraining dataset has been cleaned to remove overlaps with the GIFT-Eval test dataset. TiRex is a time-series foundation model designed for time series forecasting, with the emphasis to provide state-of-the-art forecasts for both short- and long-term forecasting horizon. TiRex is 35M parameter small and is based on the xLSTM architecture allowing fast and performant forecasts. The model is described in the paper TiRex: Zero-Shot Forecasting across Long and Short Horizons with Enhanced In-Context Learning. TiRex performs…

Open weights other tirex

Model · Time series forecasting

granite-timeseries-ttm-r3

IBM Granite

Building on top of TTM-R1 and TTM-R2, we introduce the next generation of TinyTimeMixer under the Granite time-series foundation model family — Granite-TTM-R3. This release incorporates several novel tiny-neural architectural innovations designed to push the limits of accuracy in high-speed forecasting, a critical requirement for real-world production deployments. Granite-TTM-R3 is a family of pretrained models supporting multiple real-world forecasting scenarios: - Zero-shot forecasting across unseen datasets - Few-shot adaptation effective with as few as ~1K samples - Full fine-tuning for domain-specific optimization - Multivariate time-series forecasting - Exogenous / control variable…

Open weights apache-2.0 1M parameters

Model · Time series forecasting

Kronos-Tokenizer-base

ShiYu

Kronos is the first open-source foundation model for financial candlesticks (K-lines), trained on data from over 45 global exchanges. It is designed to handle the unique, high-noise characteristics of financial data. Kronos is a family of decoder-only foundation models, pre-trained specifically for the "language" of financial markets—K-line sequences. It leverages a novel two-stage framework: 1. A specialized tokenizer first quantizes continuous, multi-dimensional K-line data (OHLCV) into hierarchical discrete tokens. 2. A large, autoregressive Transformer is then pre-trained on these tokens, enabling it to serve as a unified model for diverse quantitative tasks. The success of large-scale…

Open weights mit 4M parameters pytorch