AutoTimes  by thuml

Autoregressive time series forecasting using LLMs

Created 1 year ago
253 stars

Top 99.4% on SourcePulse

GitHubView on GitHub
Project Summary

AutoTimes adapts autoregressive Large Language Models (LLMs) for time series forecasting, addressing the need for flexible, arbitrary-length predictions. It targets researchers and practitioners by enabling zero-shot and in-context forecasting capabilities, leveraging LLMs' general-purpose token transition abilities for enhanced time series analysis without extensive fine-tuning.

How It Works

AutoTimes aligns time series forecasting with the inherent autoregressive nature and architecture of LLMs. It utilizes the transferable token transition capabilities of LLMs, applicable to both natural language and time series data, to predict future sequences. This approach supports arbitrary lookback and prediction lengths, facilitates zero-shot forecasting by exploiting LLM extrapolation, and introduces in-context forecasting via time series prompts for improved accuracy.

Quick Start & Requirements

  • Installation: pip install -r requirements.txt
  • Prerequisites: PyTorch, datasets (download links provided: [Google Drive], [Tsinghua Cloud]), and LLM checkpoints (e.g., LLaMA-7B from Hugging Face).
  • Setup: Requires downloading datasets and LLMs. Custom dataset preprocessing: python ./preprocess.py --gpu 0 --dataset <dataset_name>.
  • Resources: Training LLaMA-7B on ETTh1 takes ~15 minutes on a single RTX 3090-24G.
  • Docs/Demos: run.py for training/evaluation, predict.ipynb for a simple workflow. Task-specific scripts are located in ./scripts/.

Highlighted Details

  • Achieves state-of-the-art performance with only 0.1% trainable parameters.
  • Delivers over 5x training and inference speedup compared to advanced LLM-based forecasters.
  • Accommodates arbitrary-length lookback and prediction sequences.
  • Introduces "in-context forecasting" by incorporating time series prompts to enhance prediction accuracy.

Maintenance & Community

The project has been accepted to NeurIPS 2024, with related slides available. Updates and news are announced periodically. For inquiries, contact Yong Liu (liuyong21@mails.tsinghua.edu.cn) or Guo Qin (qinguo24@mails.tsinghua.edu.cn).

Licensing & Compatibility

The README does not explicitly state the software license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Explicit limitations, unsupported platforms, or known bugs are not detailed in the provided README. The project focuses on leveraging decoder-only LLMs for autoregressive forecasting.

Health Check
Last Commit

5 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 30 days

Explore Similar Projects

Starred by Boris Cherny Boris Cherny(Creator of Claude Code; MTS at Anthropic), Travis Fischer Travis Fischer(Founder of Agentic), and
16 more.

prophet by facebook

0.1%
20k
Forecasting tool for time series data
Created 9 years ago
Updated 2 weeks ago
Feedback? Help us improve.