SalesforceAIResearch/uni2ts

Unified Training of Universal Time Series Forecasting Transformers

What it solves

Uni2TS is designed to provide a unified framework for the development of Universal Time Series Transformers. It addresses the challenge of creating models that can perform large-scale pre-training, fine-tuning, and zero-shot forecasting across diverse time series datasets without needing a model for every specific dataset.

How it works

The library is built on PyTorch and integrates with GluonTS for inference and the Hugging Face datasets library for data loading. It supports a variety of model architectures, including the standard Moirai models and the Moirai-MoE (Mixture of Experts) variant. The framework provides a CLI for managing pre-training, fine-tuning, and evaluation jobs using Hydra for configuration management.

Who it’s for

This tool is intended for AI researchers and developers working on time series forecasting, specifically those looking to leverage foundation models for time series data.

Highlights

  • Universal Forecasting: Supports zero-shot forecasts using pre-trained models like Moirai and Moirai-MoE.
  • Comprehensive Pipeline: Includes tools for large-scale pre-training, fine-tuning on custom datasets, and evaluation using metrics like MSE, MASE, and CRPS.
  • Flexible Data Handling: Supports multiple dataset types (wide, long, wide_multivariate) and integrates with the Hugging Face ecosystem.
  • MoE Integration: Implements Moirai-MoE, which uses a sparse Mixture of Experts to empower time series foundation models.