Skip to content

NetManAIOps/SPRINT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

See More, Forecast Better and Faster: Enhancing Time Series Foundation Models via Inference-Time Plug-and-Play Downsampling

This repository contains the official implementation of SPRINT, accepted at ICML 2026:

See More, Forecast Better and Faster: Enhancing Time Series Foundation Models via Inference-Time Plug-and-Play Downsampling

SPRINT is a training-free, plug-and-play inference-time framework that enhances Time Series Foundation Models (TSFMs) for long-term and ultra-long-term forecasting.

Overview

SPRINT improves forecasting accuracy, memory cost, and inference efficiency.

This codebase is built upon TSLib / Time-Series-Library (https://github.com/thuml/Time-Series-Library).

Repository Structure

README.md
run.py
scripts/
	Base.sh
	SPRINT.sh
models/
	SPRINT.py
	Base.py
	...
dataset/
	ETTh1.csv
	Service.csv
foundation_models/
...
  • models/SPRINT.py: the implementation of SPRINT.
  • scripts/Base.sh: zero-shot evaluation scripts for base TSFMs.
  • scripts/SPRINT.sh: zero-shot evaluation scripts for TSFMs + SPRINT.
  • dataset/: datasets used by the scripts (see below).
  • foundation_models/: downloaded TSFM checkpoints / assets (see below).

Quickstart

Important

SPRINT is training-free. Please run everything in zero-shot mode with --is_training 0 (already the default in our scripts).

1) Environment

This repo follows the dependency conventions of Time-Series-Library and the selected TSFMs. In practice you need at least: python>=3.10, torch, numpy, pandas, einops, and torchcubicspline.

Some TSFMs depend on transformers with specific versions. We summarize the constraints in:

  • foundation_models/env.config

Note

Different TSFMs may require different environments. You can either (1) create separate envs per TSFM, or (2) install a compatible transformers version depending on which TSFM you run.

2) Datasets

Our code is based on Time-Series-Library, so you can use the datasets provided by that benchmark.

  • Put all dataset files under dataset/.
  • Our repository includes:
    • ETTh1.csv as a runnable example.
    • Service.csv (a high-frequency sampled dataset we collected and open-sourced).

The provided scripts may iterate over multiple datasets (e.g., ETTh2, ETTm1, weather, Solar, etc.). If you want to run them, please download the corresponding files from Time-Series-Library and place them into dataset/ with the expected filenames.

3) Foundation Model Checkpoints

SPRINT works as a wrapper around TSFMs. For each TSFM, please download the checkpoints following the official links in our paper, and place them under:

foundation_models/

This repository already provides the folder layout (e.g., timer-base-84m/, timesfm-*/, chronos-t5-small/, moirai-*/, etc.).

Important

Some TSFMs require extra packages or special versions:

  • Timer, Sundial: transformers==4.40.1
  • Chronos: transformers==4.56.2
  • Moirai: may require uni2ts (see the note in foundation_models/env.config)

Run Experiments (Zero-shot)

Option A: Base TSFM (no SPRINT)

Run the base TSFM evaluation script:

bash scripts/Base.sh

Optional arguments:

bash scripts/Base.sh <exp_name> <is_training> <gpu_id>
  • exp_name: experiment name (default: test)
  • is_training: must be 0 for zero-shot evaluation (default: 0)
  • gpu_id: CUDA device id (default: 0)

Option B: TSFM + SPRINT (plug-and-play)

Run the SPRINT evaluation script:

bash scripts/SPRINT.sh

Optional arguments:

bash scripts/SPRINT.sh <exp_name> <is_training> <gpu_id>

What the Scripts Do

scripts/Base.sh and scripts/SPRINT.sh iterate over:

  • multiple datasets (e.g., ETTh1, ETTh2, ETTm1, ..., Service)
  • multiple prediction lengths (e.g., 96 192 336 720 1440)
  • multiple TSFM backbones (e.g., timer, moirai, timesfm, timemoe, chronos, visionts, toto)

Internally, they call:

python -u run.py ...

Where:

  • --model selects the wrapper: Base or SPRINT
  • --model_type selects the TSFM backbone (e.g., timesfm, timer, ...)

Outputs

By default:

  • logs: logs/
  • metrics: logs/metrics/
  • detailed metrics: logs/detail_metrics/
  • raw predictions / test artifacts: test_results/

Acknowledgement

This implementation is based on the Time-Series-Library (TSLib): https://github.com/thuml/Time-Series-Library

License

This project is released under the MIT License. See LICENSE for the full license text.

Copyright 2026 Tsinghua University and ByteDance.

This repository includes source files modified from TSLib / Time-Series-Library, originally released under the MIT License with copyright held by THUML @ Tsinghua University. The modified files are released under the same MIT License and include source headers identifying the original license and modification notice.

utils/timefeatures.py is derived from GluonTS and retains its Apache-2.0 license notice in the source header.

Citation

If you use this code, please cite:

@inproceedings{xu2026sprint,
  title={See More, Forecast Better and Faster: Enhancing Time Series Foundation Models via Inference-Time Plug-and-Play Downsampling},
  author={Xu, Longlong and Li, Zeyan and He, Xiao and Yu, Zhaoyang and Wen, Dazhong and Sun, Mingze and Pei, Changhua and Pei, Dan},
  booktitle={Proceedings of the 43rd International Conference on Machine Learning},
  year={2026}
}

About

The official implementation of *SPRINT* (ICML'26).

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors