File size: 2,841 Bytes
d34a7a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
license: apache-2.0
library_name: ts-arena
tags:
- time-series
- forecasting
- foundation-model
- chronos
- ts-arena
pipeline_tag: time-series-forecasting
---

# chronos_t5_tiny_8m_forecasting

TS Arena wrapper for Amazon Chronos T5-Tiny time series forecasting model.

## Model Description

Chronos is a family of pretrained time series forecasting models based on language model architectures.
It tokenizes time series values using scaling and quantization, then uses a T5 model to generate probabilistic forecasts.

| Attribute | Value |
|-----------|-------|
| **Parameters** | 8M |
| **Architecture** | T5 Encoder-Decoder |
| **Original Repo** | [amazon/chronos-t5-tiny](https://huggingface.co/amazon/chronos-t5-tiny) |
| **Paper** | [Chronos: Learning the Language of Time Series](https://arxiv.org/abs/2403.07815) |
| **Task** | Time Series Forecasting |

## Usage with TS Arena

```python
import ts_arena

# Load model
model = ts_arena.load_model("chronos-t5-tiny")

# Generate forecasts
import numpy as np
context = np.random.randn(96)  # 96 timesteps of history
output = model.predict(context, prediction_length=24, num_samples=20)

# Access results
print(output.predictions.shape)      # Point forecasts (median)
print(output.quantiles[0.5].shape)   # Median forecast
print(output.quantiles[0.1].shape)   # 10th percentile
print(output.quantiles[0.9].shape)   # 90th percentile
```

## Direct Usage with Chronos

```python
from chronos import ChronosPipeline
import torch

pipeline = ChronosPipeline.from_pretrained(
    "amazon/chronos-t5-tiny",
    device_map="cuda",
    torch_dtype=torch.bfloat16,
)

context = torch.randn(1, 96)  # (batch, time)
forecast = pipeline.predict(context, prediction_length=24, num_samples=20)
```

## Evaluation Results

### ETTh1 Dataset (context=96, horizon=96)

| Metric | Value |
|--------|-------|
| MSE | 4.37 |
| MAE | 1.66 |
| RMSE | 2.09 |

## Features

- **Zero-shot forecasting**: No training required
- **Probabilistic forecasts**: Returns samples and quantiles
- **Variable horizons**: Supports different prediction lengths
- **Multivariate support**: Processes each channel independently

## Limitations

- Univariate model (multivariate handled channel-by-channel)
- No exogenous variable support
- Recommended max prediction length: 64

## Citation

```bibtex
@article{ansari2024chronos,
  title={Chronos: Learning the Language of Time Series},
  author={Ansari, Abdul Fatir and Stella, Lorenzo and Turkmen, Caner and Zhang, Xiyuan and others},
  journal={arXiv preprint arXiv:2403.07815},
  year={2024}
}
```

## License

Apache-2.0 (following the original Chronos license)

## Links

- [TS Arena GitHub](https://github.com/your-username/ts_arena)
- [Original Chronos](https://github.com/amazon-science/chronos-forecasting)
- [Chronos Paper](https://arxiv.org/abs/2403.07815)