Instructions to use amazon/chronos-t5-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Chronos
How to use amazon/chronos-t5-tiny with Chronos:
pip install chronos-forecasting
import pandas as pd from chronos import BaseChronosPipeline pipeline = BaseChronosPipeline.from_pretrained("amazon/chronos-t5-tiny", device_map="cuda") # Load historical data context_df = pd.read_csv("https://autogluon.s3.us-west-2.amazonaws.com/datasets/timeseries/misc/AirPassengers.csv") # Generate predictions pred_df = pipeline.predict_df( context_df, prediction_length=36, # Number of steps to forecast quantile_levels=[0.1, 0.5, 0.9], # Quantiles for probabilistic forecast id_column="item_id", # Column identifying different time series timestamp_column="Month", # Column with datetime information target="#Passengers", # Column(s) with time series values to predict ) - Notebooks
- Google Colab
- Kaggle
[AUTOMATED] Model Memory Requirements
Model Memory Requirements
You will need about {'dtype': 'float16/bfloat16', 'Largest Layer or Residual Group': '2.0 MB', 'Total Size': '16.01 MB', 'Training using Adam (Peak vRAM)': {'model': 33577984, 'optimizer': 67155968, 'gradients': 50366976, 'step': 67155968}} VRAM to load this model for inference, and {'dtype': 'int4', 'Largest Layer or Residual Group': '512.44 KB', 'Total Size': '4.0 MB', 'Training using Adam (Peak vRAM)': {'model': -1, 'optimizer': -1, 'gradients': -1, 'step': -1}} VRAM to train it using Adam.
These calculations were measured from the Model Memory Utility Space on the Hub.
The minimum recommended vRAM needed for this model assumes using Accelerate or device_map="auto" and is denoted by the size of the "largest layer".
When performing inference, expect to add up to an additional 20% to this, as found by EleutherAI. More tests will be performed in the future to get a more accurate benchmark for each model.
When training with Adam, you can expect roughly 4x the reported results to be used. (1x for the model, 1x for the gradients, and 2x for the optimizer).
Results:
| dtype | Largest Layer or Residual Group | Total Size | Training using Adam (Peak vRAM) |
|---|---|---|---|
| float32 | 4.0 MB | 32.02 MB | {'model': 33577984, 'optimizer': 67155968, 'gradients': 33577984, 'step': 134311936} |
| float16/bfloat16 | 2.0 MB | 16.01 MB | {'model': 33577984, 'optimizer': 67155968, 'gradients': 50366976, 'step': 67155968} |
| int8 | 1.0 MB | 8.01 MB | {'model': -1, 'optimizer': -1, 'gradients': -1, 'step': -1} |
| int4 | 512.44 KB | 4.0 MB | {'model': -1, 'optimizer': -1, 'gradients': -1, 'step': -1} |