Distance-Aware Chronos

This is a distance-aware enhancement of the Chronos time series forecasting model.

Model Description

This model extends the original Chronos architecture with distance-aware loss functions and output layers that explicitly consider the ordinal nature of quantized time series bins.

Base Model: amazon/chronos-t5-small
Number of Bins: 4096
Training Epoch: 4
Validation Loss: 1.9132

Key Features

  • Distance-Aware Loss: Combines ordinal cross-entropy, smooth label loss, and Earth Mover's Distance
  • Ordinal Output Layer: Uses Gaussian kernels and sinusoidal position encodings
  • Improved Bin Predictions: Better handling of nearby bin relationships

Installation

pip install torch transformers chronos

Usage

from distance_aware_chronos import DistanceAwareChronos
import numpy as np

# Load model
model = DistanceAwareChronos.from_pretrained("Phoenix21/distance-aware-chronos-t2")

# Prepare your time series
context = np.array([1.0, 2.0, 3.0, 4.0, 5.0])  # Your historical data

# Generate forecasts
predictions = model.predict(context, horizon=24, num_samples=100)

print(f"Forecast shape: {predictions.shape}")

Training Data

Trained on the Chronos datasets from HuggingFace.

Citation

If you use this model, please cite:

@article{chronos2024,
  title={Chronos: Learning the Language of Time Series},
  author={Ansari, Abdul Fatir et al.},
  journal={Transactions on Machine Learning Research},
  year={2024}
}

License

Apache 2.0

Downloads last month
22
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support