Skip to content

Repository files navigation

Toto - Time Series Optimized Transformer for Observability

Toto 2.0: Technical Report | Blog | Model Weights

Toto 1.0: Paper | Blog | Model Card

Toto is a foundation model for multivariate time series forecasting with a focus on observability metrics. Toto 2.0 is the current recommended release, featuring a family of u-μP-scaled models ranging from 4m to 2.5B parameters.

This repository also hosts the code for evaluating time series models on BOOM (Benchmark of Observability Metrics), a large-scale forecasting dataset composed of real-world observability data.

Updates

  • [Apr 2026] 🎉 Toto 2.0 released — five model sizes from 4m to 2.5B parameters.
  • [Feb 2026] Fine-tuning support added to Toto 1.0 (training script, configs, and tutorial notebook).
  • [Feb 2026] Exogenous covariate support added to Toto 1.0 for fine-tuning and inference.

Table of Contents

Toto 2.0

Toto 2.0 is the latest generation, featuring a u-μP-scaled transformer with alternating time/variate attention and quantile-based probabilistic forecasting.

Note: Fine-tuning and exogenous variable (EV) support are planned for a future 2.0 release but not yet available. If you need these features today, use Toto 1.0.

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series.
  • State-of-the-Art Performance: Achieves top scores on diverse benchmarks, including the multi-domain GIFT-Eval benchmark and our observability-focused BOOM benchmark.
  • Multi-Variate Support: Efficiently process multiple variables using alternating time/variate attention.
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates via a quantile head.
  • High-Dimensional Support: Handle time series with a large number of variables efficiently.
  • Decoder-Only Architecture: Supports variable prediction horizons and context lengths.

Inference tips for forecast():

  • decode_block_size selects the decoding strategy:
    • None (single forward pass): faster, better for short-term accuracy. Used for all leaderboard results.
    • e.g. 768 (block decode): better long-term stability for horizons ≳1000. Default in the quick start and notebooks.
  • has_missing_values=False (when your context has no gaps) enables Flash Attention kernels for a meaningful speedup. Leave as True (default) if target_mask contains any False entries.

Model Weights

CheckpointParameters
Toto-2.0-4m4m
Toto-2.0-22m22m
Toto-2.0-313m313m
Toto-2.0-1B1B
Toto-2.0-2.5B2.5B

Installation

Install Toto 2.0 (requires Python 3.12+):

pip install toto-models

Quick Start

importtorchfromtoto2importToto2Modelmodel=Toto2Model.from_pretrained("Datadog/Toto-2.0-22m")
device=torch.device("cuda"iftorch.cuda.is_available() else"cpu")
model=model.to(device).eval()
# (batch, n_variates, time_steps)target=torch.randn(1, 1, 512, device=device)
target_mask=torch.ones_like(target, dtype=torch.bool)
series_ids=torch.zeros(1, 1, dtype=torch.long, device=device)
# Returns quantiles of shape (9, batch, n_variates, horizon)# Quantile levels: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]quantiles=model.forecast(
{"target": target, "target_mask": target_mask, "series_ids": series_ids},
horizon=96,
decode_block_size=768,
has_missing_values=False,
)

Tutorials

  • Quick Start: Load a model, forecast, plot results, handle missing values and multivariate inputs.
  • GluonTS Integration: Use Toto2GluonTSModel with GluonTS evaluation pipelines and built-in datasets.

Evaluation

Requirements

  • Python 3.12+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

dd-unit-scaling

This repository also includes dd-unit-scaling, a compile-friendly, world-size-aware extension of graphcore-research/unit-scaling. It is used internally by Toto 2.0 to make u-μP work correctly with torch.compile and FSDP2. See the dd-unit-scaling README for details.


Toto 1.0 (Legacy)

Toto 1.0 is the previous generation of Toto. It is still the right choice if you need fine-tuning or exogenous variable support, which are planned for 2.0 but not yet available.

Toto 1.0 Model Card | BOOM Dataset Card

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series
  • State-of-the-Art Performance: Achieves top scores in benchmarks covering diverse time series forecasting tasks. This includes the established multi-domain benchmark GIFT-Eval, as well as our own observability-focused benchmark BOOM.
  • Multi-Variate Support: Efficiently process multiple variables using Proportional Factorized Space-Time Attention
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates using a Student-T mixture model
  • High-Dimensional Support: Handle time series with a large number of variables efficiently
  • Decoder-Only Architecture: Support for variable prediction horizons and context lengths
  • Pre-trained on Massive Data: Trained on over 2 trillion time series data points, the largest pretraining dataset for any open-weights time series foundation model to date.

Model Weights

CheckpointParametersNotes
Toto-Open-Base-1.0151MThe initial open release of Toto. Achieves state-of-the-art performance on both general-purpose and observability-focused benchmarking tasks, as described in our paper.

Installation

# Optional: create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install via pip
pip install toto-ts

Or install as a local editable package (recommended for development or fine-tuning):

cd Toto
pip install -r requirements.txt
pip install -e .

For optimal inference speed, it's recommended to install xformers and flash-attention as well.

Quick Start

importtorchfromtoto.data.util.datasetimportMaskedTimeseriesfromtoto.inference.forecasterimportTotoForecasterfromtoto.model.totoimportToto# Load the pre-trained modeltoto=Toto.from_pretrained('Datadog/Toto-Open-Base-1.0')
toto.to('cuda') # Move to GPU# Optionally compile the model for faster inferencetoto.compile() # Uses Torch's JIT compilation for better performanceforecaster=TotoForecaster(toto.model)
# Prepare your input time series (channels, time_steps)input_series=torch.randn(7, 4096).to('cuda') # Example with 7 variables and 4096 timesteps# Prepare timestamp information (optional, but expected by API; not used by the current model release)timestamp_seconds=torch.zeros(7, 4096).to('cuda')
time_interval_seconds=torch.full((7,), 60*15).to('cuda') # 15-minute intervals# Create a MaskedTimeseries objectinputs=MaskedTimeseries(
series=input_series,
padding_mask=torch.full_like(input_series, True, dtype=torch.bool),
id_mask=torch.zeros_like(input_series),
timestamp_seconds=timestamp_seconds,
time_interval_seconds=time_interval_seconds,
)
# Generate forecasts for the next 336 timestepsforecast=forecaster.forecast(
inputs,
prediction_length=336,
num_samples=256, # Number of samples for probabilistic forecastingsamples_per_batch=256, # Control memory usage during inference
)
# Access resultsmedian_prediction=forecast.median# Point forecastsprediction_samples=forecast.samples# Probabilistic sampleslower_quantile=forecast.quantile(0.1) # 10th percentile for lower confidence boundupper_quantile=forecast.quantile(0.9) # 90th percentile for upper confidence bound

Tutorials

Pre-Training Data

Toto was trained on a massive and diverse mixture of time series datasets:

Observability Data

The largest portion of pretraining data comes from a dataset of approximately 1 trillion time series points collected from Datadog metrics. These metrics are generated from Datadog's monitoring of internal systems, and do not include any customer data. They cover a diverse array of software stacks and types of services, and span wide variety of domains within observability, including application performance, infrastructure, networking, security, databases, and more.

Public Datasets

To improve the performance of Toto on general-purpose time series forecasting across many domains, we include publicly available datasets:

Synthetic Data

To improve robustness, approximately 1/3 of the pretraining data mix consists of synthetically-generated time series.

Evaluation

Toto has been rigorously evaluated on multiple benchmarks, including both general-purpose datasets and observability-focused datasets like BOOM. Below, we provide instructions for reproducing our evaluation results.

LSF Evaluation

To reproduce our results on the LSF datasets, follow these steps:

Downloading the Datasets

The LSF evaluation requires three datasets: ETT, Electricity, and Weather. You can download them from the Time-Series-Library repository. Follow the instructions in the repository to obtain the following already pre-processed datasets:

After downloading, ensure the datasets are placed in the data/lsf_datasets/ directory within the repository, with the following structure:

data/
└── lsf_datasets/
├── ETT-small/
├── electricity/
└── weather/
Running the Evaluation Script

Once the datasets are set up, you can run the LSF evaluation script as follows to reproduce our results:

export CUBLAS_WORKSPACE_CONFIG=:4096:8 # For reproducible GPU resultsexport PYTHONPATH="$(pwd):$(pwd)/toto:$PYTHONPATH"# Add current and "toto" dirs to Python module search path
python toto/evaluation/run_lsf_eval.py \
--datasets ETTh1 \
--context-length 2048 \
--eval-stride 1 \
--checkpoint-path [CHECKPOINT-NAME-OR-DIR]

To see all available options for the evaluation script, you can use the --help flag:

python toto/evaluation/run_lsf_eval.py --help
Expected Results

The script evaluates Toto's performance using Mean Absolute Error (MAE) and Mean Squared Error (MSE) across the specified datasets, context lengths, and prediction lengths. It displays a detailed table of results for each prediction length, along with a summary table that averages the results across prediction lengths for each dataset.

To reproduce the results presented in the paper, use the default arguments while setting --eval-stride 1 and specifying all datasets with --datasets ETTh1 ETTh2 ETTm1 ETTm2 weather electricity.

GIFT-Eval Evaluation

To reproduce our results on the GIFT-Eval benchmark, we provide a dedicated notebook:

BOOM Evaluation

For evaluating Toto on the BOOM (Benchmark of Observability Metrics) dataset, refer to:

Fine-tuning

Toto can be fine-tuned on your own domain-specific datasets to improve performance on specialized forecasting tasks. The fine-tuning pipeline supports both standard time series and datasets with exogenous (known future) variables.

Fine-tuning Tutorial

To fine-tune Toto, use the provided finetuning tutorial, which demonstrates fine-tuning with and without exogenous variables.

To customize the fine-tuning recipe, modify the base configuration in finetune_config.yaml.

By default, the tutorial uses the proenfo_gfc12 dataset from the autogluon/fev_datasets collection.

Custom Datasets

There are two ways to use custom datasets for fine-tuning:

Option A: HuggingFace Dataset with Configuration Dictionary

The simplest approach is to use a HuggingFace datasets.Dataset configured via a dictionary. Modify the prepare_dataset() function in benchmark_finetuning.py to load your data:

custom_dataset= {
"dataset": dataset, # HuggingFace Dataset object"target_fields": ["target"], # List of field names for target variables"target_transform_fns": [...], # Transform functions for each target field"ev_fields": ["temp", "humidity"], # List of exogenous covariate field names"ev_transform_fns": [...], # Transform functions for each exogenous field"dataset_name": "my_dataset", # Name of your custom dataset
}

HuggingFace Dataset Requirements:

Your dataset must contain:

  • timestamp: A 1D array of timestamps for each time series
  • Target fields (e.g., target): Arrays of shape (T,) for each target variable
  • Exogenous fields (optional): Arrays of shape (T,) for each dynamic exogenous variable

The pipeline uses FinetuneDataModule, which internally converts your data into CausalMaskedTimeseries objects (the input format expected by Toto during fine-tuning) via GluonTS transforms.

Option B: Custom PyTorch Dataset and DataModule

For full control over data loading, you can implement your own PyTorch Dataset that returns CausalMaskedTimeseries objects and wrap it in a custom LightningDataModule.

Step 1: Create a Dataset class that returns CausalMaskedTimeseries:

fromtorch.utils.dataimportDatasetfromtoto.data.util.datasetimportCausalMaskedTimeseriesclassMyCustomDataset(Dataset):
...
def__getitem__(self, idx: int) ->CausalMaskedTimeseries:
# Build and return a CausalMaskedTimeseries for this sample# See toto/data/datasets/gluonts_dataset.py for a reference implementation
...

Step 2: Create a custom LightningDataModule:

fromlightningimportLightningDataModulefromtorch.utils.dataimportDataLoaderfromtoto.data.util.helpersimportcollate_causalclassMyFinetuneDataModule(LightningDataModule):
def__init__(self, train_dataset: MyCustomDataset, val_dataset: MyCustomDataset, ...):
...
deftrain_dataloader(self) ->DataLoader:
returnDataLoader(self.train_dataset, collate_fn=collate_causal, ...) # collate_fn is requireddefval_dataloader(self) ->DataLoader:
returnDataLoader(self.val_dataset, collate_fn=collate_causal, ...)

Step 3: Modify finetune_toto.py to use your custom DataModule:

# Replace the get_datamodule() call with your custom DataModuledm=MyFinetuneDataModule(train_dataset, val_dataset, batch_size=16)
_=train(module, dm, config)

Evaluations on FEV Datasets

The benchmark_finetuning.py script evaluates Toto on a subset of FEV datasets that are not included in Toto's pretraining corpus. These datasets contain known exogenous variables, enabling a comparison of three approaches:

  • Zero-shot Toto — No fine-tuning
  • Fine-tuned Toto — Fine-tuned without exogenous variables
  • Fine-tuned Toto with Exogenous Variables — Fine-tuned with known future covariates

Models are evaluated using sliding windows on the test set (10% of each dataset), with context length and horizon configured per FEV task. Results are aggregated using the geometric mean across datasets in aggregate_results.ipynb:

ModelMAEWQLMASE
Toto (zero-shot)6150.2420.1110.632
Toto (fine-tuned)5397.9290.1000.574
Toto (fine-tuned + exogenous)5117.0020.0960.535

Requirements

  • Python 3.10+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

Citation (1.0)

If you use Toto 1.0 in your research, please cite:

@misc{cohen2025timedifferentobservabilityperspective,
title={This Time is Different: An Observability Perspective on Time Series Foundation Models},
author={Ben Cohen and Emaad Khwaja and Youssef Doubli and Salahidine Lemaachi and Chris Lettieri and Charles Masson and Hugo Miccinilli and Elise Ramé and Qiqi Ren and Afshin Rostamizadeh and Jean Ogier du Terrail and Anna-Monica Toon and Kan Wang and Stephan Xie and Zongzhe Xu and Viktoriya Zhukova and David Asker and Ameet Talwalkar and Othmane Abou-Amal},
year={2025},
eprint={2505.14766},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.14766},
}

BOOM (Benchmark of Observability Metrics)

BOOM is used for evaluating both Toto 1.0 and 2.0.

BOOM (Benchmark of Observability Metrics) is a large-scale, real-world time series dataset designed for evaluating models on forecasting tasks in complex observability environments. Composed of real-world metrics data collected from Datadog, a leading observability platform, the benchmark captures the irregularity, structural complexity, and heavy-tailed statistics typical of production observability data. Unlike synthetic or curated benchmarks, BOOM reflects the full diversity and unpredictability of operational signals observed in distributed systems, covering infrastructure, networking, databases, security, and application-level metrics.

Note: the metrics comprising BOOM were generated from internal monitoring of pre-production environments, and do not include any customer data.

For more information on the dataset, including details on its preparation and statistical properties, see the dataset card in Hugging Face.

For example evaluations of different time series models on the BOOM dataset, see the boom folder in this repository.

Citation

If you use Toto 2.0 in your research or work, please cite:

@misc{khwaja2026toto20timeseries,
title={Toto 2.0: Time Series Forecasting Enters the Scaling Era}, author={Emaad Khwaja and Chris Lettieri and Gerald Woo and Eden Belouadah and Marc Cenac and Guillaume Jarry and Enguerrand Paquin and Xunyi Zhao and Viktoriya Zhukov and Othmane Abou-Amal and Chenghao Liu and Ameet Talwalkar and David Asker},
year={2026},
eprint={2605.20119},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.20119}, }

For Toto 1.0, see the Toto 1.0 citation.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License - see LICENSE file for details.

This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2025-2026 Datadog, Inc.

Contributing

We welcome contributions! Please check out our contributing guidelines to get started.

About

Time-Series-Optimized Transformer for Observability

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
GitHub - TimeCopilot/toto: Time-Series-Optimized Transformer for Observability · GitHub
Skip to content

Repository files navigation

Toto - Time Series Optimized Transformer for Observability

Toto 2.0: Technical Report | Blog | Model Weights

Toto 1.0: Paper | Blog | Model Card

Toto is a foundation model for multivariate time series forecasting with a focus on observability metrics. Toto 2.0 is the current recommended release, featuring a family of u-μP-scaled models ranging from 4m to 2.5B parameters.

This repository also hosts the code for evaluating time series models on BOOM (Benchmark of Observability Metrics), a large-scale forecasting dataset composed of real-world observability data.

Updates

  • [Apr 2026] 🎉 Toto 2.0 released — five model sizes from 4m to 2.5B parameters.
  • [Feb 2026] Fine-tuning support added to Toto 1.0 (training script, configs, and tutorial notebook).
  • [Feb 2026] Exogenous covariate support added to Toto 1.0 for fine-tuning and inference.

Table of Contents

Toto 2.0

Toto 2.0 is the latest generation, featuring a u-μP-scaled transformer with alternating time/variate attention and quantile-based probabilistic forecasting.

Note: Fine-tuning and exogenous variable (EV) support are planned for a future 2.0 release but not yet available. If you need these features today, use Toto 1.0.

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series.
  • State-of-the-Art Performance: Achieves top scores on diverse benchmarks, including the multi-domain GIFT-Eval benchmark and our observability-focused BOOM benchmark.
  • Multi-Variate Support: Efficiently process multiple variables using alternating time/variate attention.
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates via a quantile head.
  • High-Dimensional Support: Handle time series with a large number of variables efficiently.
  • Decoder-Only Architecture: Supports variable prediction horizons and context lengths.

Inference tips for forecast():

  • decode_block_size selects the decoding strategy:
    • None (single forward pass): faster, better for short-term accuracy. Used for all leaderboard results.
    • e.g. 768 (block decode): better long-term stability for horizons ≳1000. Default in the quick start and notebooks.
  • has_missing_values=False (when your context has no gaps) enables Flash Attention kernels for a meaningful speedup. Leave as True (default) if target_mask contains any False entries.

Model Weights

CheckpointParameters
Toto-2.0-4m4m
Toto-2.0-22m22m
Toto-2.0-313m313m
Toto-2.0-1B1B
Toto-2.0-2.5B2.5B

Installation

Install Toto 2.0 (requires Python 3.12+):

pip install toto-models

Quick Start

importtorchfromtoto2importToto2Modelmodel=Toto2Model.from_pretrained("Datadog/Toto-2.0-22m")
device=torch.device("cuda"iftorch.cuda.is_available() else"cpu")
model=model.to(device).eval()
# (batch, n_variates, time_steps)target=torch.randn(1, 1, 512, device=device)
target_mask=torch.ones_like(target, dtype=torch.bool)
series_ids=torch.zeros(1, 1, dtype=torch.long, device=device)
# Returns quantiles of shape (9, batch, n_variates, horizon)# Quantile levels: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]quantiles=model.forecast(
{"target": target, "target_mask": target_mask, "series_ids": series_ids},
horizon=96,
decode_block_size=768,
has_missing_values=False,
)

Tutorials

  • Quick Start: Load a model, forecast, plot results, handle missing values and multivariate inputs.
  • GluonTS Integration: Use Toto2GluonTSModel with GluonTS evaluation pipelines and built-in datasets.

Evaluation

Requirements

  • Python 3.12+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

dd-unit-scaling

This repository also includes dd-unit-scaling, a compile-friendly, world-size-aware extension of graphcore-research/unit-scaling. It is used internally by Toto 2.0 to make u-μP work correctly with torch.compile and FSDP2. See the dd-unit-scaling README for details.


Toto 1.0 (Legacy)

Toto 1.0 is the previous generation of Toto. It is still the right choice if you need fine-tuning or exogenous variable support, which are planned for 2.0 but not yet available.

Toto 1.0 Model Card | BOOM Dataset Card

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series
  • State-of-the-Art Performance: Achieves top scores in benchmarks covering diverse time series forecasting tasks. This includes the established multi-domain benchmark GIFT-Eval, as well as our own observability-focused benchmark BOOM.
  • Multi-Variate Support: Efficiently process multiple variables using Proportional Factorized Space-Time Attention
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates using a Student-T mixture model
  • High-Dimensional Support: Handle time series with a large number of variables efficiently
  • Decoder-Only Architecture: Support for variable prediction horizons and context lengths
  • Pre-trained on Massive Data: Trained on over 2 trillion time series data points, the largest pretraining dataset for any open-weights time series foundation model to date.

Model Weights

CheckpointParametersNotes
Toto-Open-Base-1.0151MThe initial open release of Toto. Achieves state-of-the-art performance on both general-purpose and observability-focused benchmarking tasks, as described in our paper.

Installation

# Optional: create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install via pip
pip install toto-ts

Or install as a local editable package (recommended for development or fine-tuning):

cd Toto
pip install -r requirements.txt
pip install -e .

For optimal inference speed, it's recommended to install xformers and flash-attention as well.

Quick Start

importtorchfromtoto.data.util.datasetimportMaskedTimeseriesfromtoto.inference.forecasterimportTotoForecasterfromtoto.model.totoimportToto# Load the pre-trained modeltoto=Toto.from_pretrained('Datadog/Toto-Open-Base-1.0')
toto.to('cuda') # Move to GPU# Optionally compile the model for faster inferencetoto.compile() # Uses Torch's JIT compilation for better performanceforecaster=TotoForecaster(toto.model)
# Prepare your input time series (channels, time_steps)input_series=torch.randn(7, 4096).to('cuda') # Example with 7 variables and 4096 timesteps# Prepare timestamp information (optional, but expected by API; not used by the current model release)timestamp_seconds=torch.zeros(7, 4096).to('cuda')
time_interval_seconds=torch.full((7,), 60*15).to('cuda') # 15-minute intervals# Create a MaskedTimeseries objectinputs=MaskedTimeseries(
series=input_series,
padding_mask=torch.full_like(input_series, True, dtype=torch.bool),
id_mask=torch.zeros_like(input_series),
timestamp_seconds=timestamp_seconds,
time_interval_seconds=time_interval_seconds,
)
# Generate forecasts for the next 336 timestepsforecast=forecaster.forecast(
inputs,
prediction_length=336,
num_samples=256, # Number of samples for probabilistic forecastingsamples_per_batch=256, # Control memory usage during inference
)
# Access resultsmedian_prediction=forecast.median# Point forecastsprediction_samples=forecast.samples# Probabilistic sampleslower_quantile=forecast.quantile(0.1) # 10th percentile for lower confidence boundupper_quantile=forecast.quantile(0.9) # 90th percentile for upper confidence bound

Tutorials

Pre-Training Data

Toto was trained on a massive and diverse mixture of time series datasets:

Observability Data

The largest portion of pretraining data comes from a dataset of approximately 1 trillion time series points collected from Datadog metrics. These metrics are generated from Datadog's monitoring of internal systems, and do not include any customer data. They cover a diverse array of software stacks and types of services, and span wide variety of domains within observability, including application performance, infrastructure, networking, security, databases, and more.

Public Datasets

To improve the performance of Toto on general-purpose time series forecasting across many domains, we include publicly available datasets:

Synthetic Data

To improve robustness, approximately 1/3 of the pretraining data mix consists of synthetically-generated time series.

Evaluation

Toto has been rigorously evaluated on multiple benchmarks, including both general-purpose datasets and observability-focused datasets like BOOM. Below, we provide instructions for reproducing our evaluation results.

LSF Evaluation

To reproduce our results on the LSF datasets, follow these steps:

Downloading the Datasets

The LSF evaluation requires three datasets: ETT, Electricity, and Weather. You can download them from the Time-Series-Library repository. Follow the instructions in the repository to obtain the following already pre-processed datasets:

After downloading, ensure the datasets are placed in the data/lsf_datasets/ directory within the repository, with the following structure:

data/
└── lsf_datasets/
├── ETT-small/
├── electricity/
└── weather/
Running the Evaluation Script

Once the datasets are set up, you can run the LSF evaluation script as follows to reproduce our results:

export CUBLAS_WORKSPACE_CONFIG=:4096:8 # For reproducible GPU resultsexport PYTHONPATH="$(pwd):$(pwd)/toto:$PYTHONPATH"# Add current and "toto" dirs to Python module search path
python toto/evaluation/run_lsf_eval.py \
--datasets ETTh1 \
--context-length 2048 \
--eval-stride 1 \
--checkpoint-path [CHECKPOINT-NAME-OR-DIR]

To see all available options for the evaluation script, you can use the --help flag:

python toto/evaluation/run_lsf_eval.py --help
Expected Results

The script evaluates Toto's performance using Mean Absolute Error (MAE) and Mean Squared Error (MSE) across the specified datasets, context lengths, and prediction lengths. It displays a detailed table of results for each prediction length, along with a summary table that averages the results across prediction lengths for each dataset.

To reproduce the results presented in the paper, use the default arguments while setting --eval-stride 1 and specifying all datasets with --datasets ETTh1 ETTh2 ETTm1 ETTm2 weather electricity.

GIFT-Eval Evaluation

To reproduce our results on the GIFT-Eval benchmark, we provide a dedicated notebook:

BOOM Evaluation

For evaluating Toto on the BOOM (Benchmark of Observability Metrics) dataset, refer to:

Fine-tuning

Toto can be fine-tuned on your own domain-specific datasets to improve performance on specialized forecasting tasks. The fine-tuning pipeline supports both standard time series and datasets with exogenous (known future) variables.

Fine-tuning Tutorial

To fine-tune Toto, use the provided finetuning tutorial, which demonstrates fine-tuning with and without exogenous variables.

To customize the fine-tuning recipe, modify the base configuration in finetune_config.yaml.

By default, the tutorial uses the proenfo_gfc12 dataset from the autogluon/fev_datasets collection.

Custom Datasets

There are two ways to use custom datasets for fine-tuning:

Option A: HuggingFace Dataset with Configuration Dictionary

The simplest approach is to use a HuggingFace datasets.Dataset configured via a dictionary. Modify the prepare_dataset() function in benchmark_finetuning.py to load your data:

custom_dataset= {
"dataset": dataset, # HuggingFace Dataset object"target_fields": ["target"], # List of field names for target variables"target_transform_fns": [...], # Transform functions for each target field"ev_fields": ["temp", "humidity"], # List of exogenous covariate field names"ev_transform_fns": [...], # Transform functions for each exogenous field"dataset_name": "my_dataset", # Name of your custom dataset
}

HuggingFace Dataset Requirements:

Your dataset must contain:

  • timestamp: A 1D array of timestamps for each time series
  • Target fields (e.g., target): Arrays of shape (T,) for each target variable
  • Exogenous fields (optional): Arrays of shape (T,) for each dynamic exogenous variable

The pipeline uses FinetuneDataModule, which internally converts your data into CausalMaskedTimeseries objects (the input format expected by Toto during fine-tuning) via GluonTS transforms.

Option B: Custom PyTorch Dataset and DataModule

For full control over data loading, you can implement your own PyTorch Dataset that returns CausalMaskedTimeseries objects and wrap it in a custom LightningDataModule.

Step 1: Create a Dataset class that returns CausalMaskedTimeseries:

fromtorch.utils.dataimportDatasetfromtoto.data.util.datasetimportCausalMaskedTimeseriesclassMyCustomDataset(Dataset):
...
def__getitem__(self, idx: int) ->CausalMaskedTimeseries:
# Build and return a CausalMaskedTimeseries for this sample# See toto/data/datasets/gluonts_dataset.py for a reference implementation
...

Step 2: Create a custom LightningDataModule:

fromlightningimportLightningDataModulefromtorch.utils.dataimportDataLoaderfromtoto.data.util.helpersimportcollate_causalclassMyFinetuneDataModule(LightningDataModule):
def__init__(self, train_dataset: MyCustomDataset, val_dataset: MyCustomDataset, ...):
...
deftrain_dataloader(self) ->DataLoader:
returnDataLoader(self.train_dataset, collate_fn=collate_causal, ...) # collate_fn is requireddefval_dataloader(self) ->DataLoader:
returnDataLoader(self.val_dataset, collate_fn=collate_causal, ...)

Step 3: Modify finetune_toto.py to use your custom DataModule:

# Replace the get_datamodule() call with your custom DataModuledm=MyFinetuneDataModule(train_dataset, val_dataset, batch_size=16)
_=train(module, dm, config)

Evaluations on FEV Datasets

The benchmark_finetuning.py script evaluates Toto on a subset of FEV datasets that are not included in Toto's pretraining corpus. These datasets contain known exogenous variables, enabling a comparison of three approaches:

  • Zero-shot Toto — No fine-tuning
  • Fine-tuned Toto — Fine-tuned without exogenous variables
  • Fine-tuned Toto with Exogenous Variables — Fine-tuned with known future covariates

Models are evaluated using sliding windows on the test set (10% of each dataset), with context length and horizon configured per FEV task. Results are aggregated using the geometric mean across datasets in aggregate_results.ipynb:

ModelMAEWQLMASE
Toto (zero-shot)6150.2420.1110.632
Toto (fine-tuned)5397.9290.1000.574
Toto (fine-tuned + exogenous)5117.0020.0960.535

Requirements

  • Python 3.10+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

Citation (1.0)

If you use Toto 1.0 in your research, please cite:

@misc{cohen2025timedifferentobservabilityperspective,
title={This Time is Different: An Observability Perspective on Time Series Foundation Models},
author={Ben Cohen and Emaad Khwaja and Youssef Doubli and Salahidine Lemaachi and Chris Lettieri and Charles Masson and Hugo Miccinilli and Elise Ramé and Qiqi Ren and Afshin Rostamizadeh and Jean Ogier du Terrail and Anna-Monica Toon and Kan Wang and Stephan Xie and Zongzhe Xu and Viktoriya Zhukova and David Asker and Ameet Talwalkar and Othmane Abou-Amal},
year={2025},
eprint={2505.14766},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.14766},
}

BOOM (Benchmark of Observability Metrics)

BOOM is used for evaluating both Toto 1.0 and 2.0.

BOOM (Benchmark of Observability Metrics) is a large-scale, real-world time series dataset designed for evaluating models on forecasting tasks in complex observability environments. Composed of real-world metrics data collected from Datadog, a leading observability platform, the benchmark captures the irregularity, structural complexity, and heavy-tailed statistics typical of production observability data. Unlike synthetic or curated benchmarks, BOOM reflects the full diversity and unpredictability of operational signals observed in distributed systems, covering infrastructure, networking, databases, security, and application-level metrics.

Note: the metrics comprising BOOM were generated from internal monitoring of pre-production environments, and do not include any customer data.

For more information on the dataset, including details on its preparation and statistical properties, see the dataset card in Hugging Face.

For example evaluations of different time series models on the BOOM dataset, see the boom folder in this repository.

Citation

If you use Toto 2.0 in your research or work, please cite:

@misc{khwaja2026toto20timeseries,
title={Toto 2.0: Time Series Forecasting Enters the Scaling Era}, author={Emaad Khwaja and Chris Lettieri and Gerald Woo and Eden Belouadah and Marc Cenac and Guillaume Jarry and Enguerrand Paquin and Xunyi Zhao and Viktoriya Zhukov and Othmane Abou-Amal and Chenghao Liu and Ameet Talwalkar and David Asker},
year={2026},
eprint={2605.20119},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.20119}, }

For Toto 1.0, see the Toto 1.0 citation.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License - see LICENSE file for details.

This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2025-2026 Datadog, Inc.

Contributing

We welcome contributions! Please check out our contributing guidelines to get started.

About

Time-Series-Optimized Transformer for Observability

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - TimeCopilot/toto: Time-Series-Optimized Transformer for Observability · GitHub
Skip to content

Repository files navigation

Toto - Time Series Optimized Transformer for Observability

Toto 2.0: Technical Report | Blog | Model Weights

Toto 1.0: Paper | Blog | Model Card

Toto is a foundation model for multivariate time series forecasting with a focus on observability metrics. Toto 2.0 is the current recommended release, featuring a family of u-μP-scaled models ranging from 4m to 2.5B parameters.

This repository also hosts the code for evaluating time series models on BOOM (Benchmark of Observability Metrics), a large-scale forecasting dataset composed of real-world observability data.

Updates

  • [Apr 2026] 🎉 Toto 2.0 released — five model sizes from 4m to 2.5B parameters.
  • [Feb 2026] Fine-tuning support added to Toto 1.0 (training script, configs, and tutorial notebook).
  • [Feb 2026] Exogenous covariate support added to Toto 1.0 for fine-tuning and inference.

Table of Contents

Toto 2.0

Toto 2.0 is the latest generation, featuring a u-μP-scaled transformer with alternating time/variate attention and quantile-based probabilistic forecasting.

Note: Fine-tuning and exogenous variable (EV) support are planned for a future 2.0 release but not yet available. If you need these features today, use Toto 1.0.

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series.
  • State-of-the-Art Performance: Achieves top scores on diverse benchmarks, including the multi-domain GIFT-Eval benchmark and our observability-focused BOOM benchmark.
  • Multi-Variate Support: Efficiently process multiple variables using alternating time/variate attention.
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates via a quantile head.
  • High-Dimensional Support: Handle time series with a large number of variables efficiently.
  • Decoder-Only Architecture: Supports variable prediction horizons and context lengths.

Inference tips for forecast():

  • decode_block_size selects the decoding strategy:
    • None (single forward pass): faster, better for short-term accuracy. Used for all leaderboard results.
    • e.g. 768 (block decode): better long-term stability for horizons ≳1000. Default in the quick start and notebooks.
  • has_missing_values=False (when your context has no gaps) enables Flash Attention kernels for a meaningful speedup. Leave as True (default) if target_mask contains any False entries.

Model Weights

CheckpointParameters
Toto-2.0-4m4m
Toto-2.0-22m22m
Toto-2.0-313m313m
Toto-2.0-1B1B
Toto-2.0-2.5B2.5B

Installation

Install Toto 2.0 (requires Python 3.12+):

pip install toto-models

Quick Start

importtorchfromtoto2importToto2Modelmodel=Toto2Model.from_pretrained("Datadog/Toto-2.0-22m")
device=torch.device("cuda"iftorch.cuda.is_available() else"cpu")
model=model.to(device).eval()
# (batch, n_variates, time_steps)target=torch.randn(1, 1, 512, device=device)
target_mask=torch.ones_like(target, dtype=torch.bool)
series_ids=torch.zeros(1, 1, dtype=torch.long, device=device)
# Returns quantiles of shape (9, batch, n_variates, horizon)# Quantile levels: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]quantiles=model.forecast(
{"target": target, "target_mask": target_mask, "series_ids": series_ids},
horizon=96,
decode_block_size=768,
has_missing_values=False,
)

Tutorials

  • Quick Start: Load a model, forecast, plot results, handle missing values and multivariate inputs.
  • GluonTS Integration: Use Toto2GluonTSModel with GluonTS evaluation pipelines and built-in datasets.

Evaluation

Requirements

  • Python 3.12+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

dd-unit-scaling

This repository also includes dd-unit-scaling, a compile-friendly, world-size-aware extension of graphcore-research/unit-scaling. It is used internally by Toto 2.0 to make u-μP work correctly with torch.compile and FSDP2. See the dd-unit-scaling README for details.


Toto 1.0 (Legacy)

Toto 1.0 is the previous generation of Toto. It is still the right choice if you need fine-tuning or exogenous variable support, which are planned for 2.0 but not yet available.

Toto 1.0 Model Card | BOOM Dataset Card

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series
  • State-of-the-Art Performance: Achieves top scores in benchmarks covering diverse time series forecasting tasks. This includes the established multi-domain benchmark GIFT-Eval, as well as our own observability-focused benchmark BOOM.
  • Multi-Variate Support: Efficiently process multiple variables using Proportional Factorized Space-Time Attention
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates using a Student-T mixture model
  • High-Dimensional Support: Handle time series with a large number of variables efficiently
  • Decoder-Only Architecture: Support for variable prediction horizons and context lengths
  • Pre-trained on Massive Data: Trained on over 2 trillion time series data points, the largest pretraining dataset for any open-weights time series foundation model to date.

Model Weights

CheckpointParametersNotes
Toto-Open-Base-1.0151MThe initial open release of Toto. Achieves state-of-the-art performance on both general-purpose and observability-focused benchmarking tasks, as described in our paper.

Installation

# Optional: create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install via pip
pip install toto-ts

Or install as a local editable package (recommended for development or fine-tuning):

cd Toto
pip install -r requirements.txt
pip install -e .

For optimal inference speed, it's recommended to install xformers and flash-attention as well.

Quick Start

importtorchfromtoto.data.util.datasetimportMaskedTimeseriesfromtoto.inference.forecasterimportTotoForecasterfromtoto.model.totoimportToto# Load the pre-trained modeltoto=Toto.from_pretrained('Datadog/Toto-Open-Base-1.0')
toto.to('cuda') # Move to GPU# Optionally compile the model for faster inferencetoto.compile() # Uses Torch's JIT compilation for better performanceforecaster=TotoForecaster(toto.model)
# Prepare your input time series (channels, time_steps)input_series=torch.randn(7, 4096).to('cuda') # Example with 7 variables and 4096 timesteps# Prepare timestamp information (optional, but expected by API; not used by the current model release)timestamp_seconds=torch.zeros(7, 4096).to('cuda')
time_interval_seconds=torch.full((7,), 60*15).to('cuda') # 15-minute intervals# Create a MaskedTimeseries objectinputs=MaskedTimeseries(
series=input_series,
padding_mask=torch.full_like(input_series, True, dtype=torch.bool),
id_mask=torch.zeros_like(input_series),
timestamp_seconds=timestamp_seconds,
time_interval_seconds=time_interval_seconds,
)
# Generate forecasts for the next 336 timestepsforecast=forecaster.forecast(
inputs,
prediction_length=336,
num_samples=256, # Number of samples for probabilistic forecastingsamples_per_batch=256, # Control memory usage during inference
)
# Access resultsmedian_prediction=forecast.median# Point forecastsprediction_samples=forecast.samples# Probabilistic sampleslower_quantile=forecast.quantile(0.1) # 10th percentile for lower confidence boundupper_quantile=forecast.quantile(0.9) # 90th percentile for upper confidence bound

Tutorials

Pre-Training Data

Toto was trained on a massive and diverse mixture of time series datasets:

Observability Data

The largest portion of pretraining data comes from a dataset of approximately 1 trillion time series points collected from Datadog metrics. These metrics are generated from Datadog's monitoring of internal systems, and do not include any customer data. They cover a diverse array of software stacks and types of services, and span wide variety of domains within observability, including application performance, infrastructure, networking, security, databases, and more.

Public Datasets

To improve the performance of Toto on general-purpose time series forecasting across many domains, we include publicly available datasets:

Synthetic Data

To improve robustness, approximately 1/3 of the pretraining data mix consists of synthetically-generated time series.

Evaluation

Toto has been rigorously evaluated on multiple benchmarks, including both general-purpose datasets and observability-focused datasets like BOOM. Below, we provide instructions for reproducing our evaluation results.

LSF Evaluation

To reproduce our results on the LSF datasets, follow these steps:

Downloading the Datasets

The LSF evaluation requires three datasets: ETT, Electricity, and Weather. You can download them from the Time-Series-Library repository. Follow the instructions in the repository to obtain the following already pre-processed datasets:

After downloading, ensure the datasets are placed in the data/lsf_datasets/ directory within the repository, with the following structure:

data/
└── lsf_datasets/
├── ETT-small/
├── electricity/
└── weather/
Running the Evaluation Script

Once the datasets are set up, you can run the LSF evaluation script as follows to reproduce our results:

export CUBLAS_WORKSPACE_CONFIG=:4096:8 # For reproducible GPU resultsexport PYTHONPATH="$(pwd):$(pwd)/toto:$PYTHONPATH"# Add current and "toto" dirs to Python module search path
python toto/evaluation/run_lsf_eval.py \
--datasets ETTh1 \
--context-length 2048 \
--eval-stride 1 \
--checkpoint-path [CHECKPOINT-NAME-OR-DIR]

To see all available options for the evaluation script, you can use the --help flag:

python toto/evaluation/run_lsf_eval.py --help
Expected Results

The script evaluates Toto's performance using Mean Absolute Error (MAE) and Mean Squared Error (MSE) across the specified datasets, context lengths, and prediction lengths. It displays a detailed table of results for each prediction length, along with a summary table that averages the results across prediction lengths for each dataset.

To reproduce the results presented in the paper, use the default arguments while setting --eval-stride 1 and specifying all datasets with --datasets ETTh1 ETTh2 ETTm1 ETTm2 weather electricity.

GIFT-Eval Evaluation

To reproduce our results on the GIFT-Eval benchmark, we provide a dedicated notebook:

BOOM Evaluation

For evaluating Toto on the BOOM (Benchmark of Observability Metrics) dataset, refer to:

Fine-tuning

Toto can be fine-tuned on your own domain-specific datasets to improve performance on specialized forecasting tasks. The fine-tuning pipeline supports both standard time series and datasets with exogenous (known future) variables.

Fine-tuning Tutorial

To fine-tune Toto, use the provided finetuning tutorial, which demonstrates fine-tuning with and without exogenous variables.

To customize the fine-tuning recipe, modify the base configuration in finetune_config.yaml.

By default, the tutorial uses the proenfo_gfc12 dataset from the autogluon/fev_datasets collection.

Custom Datasets

There are two ways to use custom datasets for fine-tuning:

Option A: HuggingFace Dataset with Configuration Dictionary

The simplest approach is to use a HuggingFace datasets.Dataset configured via a dictionary. Modify the prepare_dataset() function in benchmark_finetuning.py to load your data:

custom_dataset= {
"dataset": dataset, # HuggingFace Dataset object"target_fields": ["target"], # List of field names for target variables"target_transform_fns": [...], # Transform functions for each target field"ev_fields": ["temp", "humidity"], # List of exogenous covariate field names"ev_transform_fns": [...], # Transform functions for each exogenous field"dataset_name": "my_dataset", # Name of your custom dataset
}

HuggingFace Dataset Requirements:

Your dataset must contain:

  • timestamp: A 1D array of timestamps for each time series
  • Target fields (e.g., target): Arrays of shape (T,) for each target variable
  • Exogenous fields (optional): Arrays of shape (T,) for each dynamic exogenous variable

The pipeline uses FinetuneDataModule, which internally converts your data into CausalMaskedTimeseries objects (the input format expected by Toto during fine-tuning) via GluonTS transforms.

Option B: Custom PyTorch Dataset and DataModule

For full control over data loading, you can implement your own PyTorch Dataset that returns CausalMaskedTimeseries objects and wrap it in a custom LightningDataModule.

Step 1: Create a Dataset class that returns CausalMaskedTimeseries:

fromtorch.utils.dataimportDatasetfromtoto.data.util.datasetimportCausalMaskedTimeseriesclassMyCustomDataset(Dataset):
...
def__getitem__(self, idx: int) ->CausalMaskedTimeseries:
# Build and return a CausalMaskedTimeseries for this sample# See toto/data/datasets/gluonts_dataset.py for a reference implementation
...

Step 2: Create a custom LightningDataModule:

fromlightningimportLightningDataModulefromtorch.utils.dataimportDataLoaderfromtoto.data.util.helpersimportcollate_causalclassMyFinetuneDataModule(LightningDataModule):
def__init__(self, train_dataset: MyCustomDataset, val_dataset: MyCustomDataset, ...):
...
deftrain_dataloader(self) ->DataLoader:
returnDataLoader(self.train_dataset, collate_fn=collate_causal, ...) # collate_fn is requireddefval_dataloader(self) ->DataLoader:
returnDataLoader(self.val_dataset, collate_fn=collate_causal, ...)

Step 3: Modify finetune_toto.py to use your custom DataModule:

# Replace the get_datamodule() call with your custom DataModuledm=MyFinetuneDataModule(train_dataset, val_dataset, batch_size=16)
_=train(module, dm, config)

Evaluations on FEV Datasets

The benchmark_finetuning.py script evaluates Toto on a subset of FEV datasets that are not included in Toto's pretraining corpus. These datasets contain known exogenous variables, enabling a comparison of three approaches:

  • Zero-shot Toto — No fine-tuning
  • Fine-tuned Toto — Fine-tuned without exogenous variables
  • Fine-tuned Toto with Exogenous Variables — Fine-tuned with known future covariates

Models are evaluated using sliding windows on the test set (10% of each dataset), with context length and horizon configured per FEV task. Results are aggregated using the geometric mean across datasets in aggregate_results.ipynb:

ModelMAEWQLMASE
Toto (zero-shot)6150.2420.1110.632
Toto (fine-tuned)5397.9290.1000.574
Toto (fine-tuned + exogenous)5117.0020.0960.535

Requirements

  • Python 3.10+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

Citation (1.0)

If you use Toto 1.0 in your research, please cite:

@misc{cohen2025timedifferentobservabilityperspective,
title={This Time is Different: An Observability Perspective on Time Series Foundation Models},
author={Ben Cohen and Emaad Khwaja and Youssef Doubli and Salahidine Lemaachi and Chris Lettieri and Charles Masson and Hugo Miccinilli and Elise Ramé and Qiqi Ren and Afshin Rostamizadeh and Jean Ogier du Terrail and Anna-Monica Toon and Kan Wang and Stephan Xie and Zongzhe Xu and Viktoriya Zhukova and David Asker and Ameet Talwalkar and Othmane Abou-Amal},
year={2025},
eprint={2505.14766},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.14766},
}

BOOM (Benchmark of Observability Metrics)

BOOM is used for evaluating both Toto 1.0 and 2.0.

BOOM (Benchmark of Observability Metrics) is a large-scale, real-world time series dataset designed for evaluating models on forecasting tasks in complex observability environments. Composed of real-world metrics data collected from Datadog, a leading observability platform, the benchmark captures the irregularity, structural complexity, and heavy-tailed statistics typical of production observability data. Unlike synthetic or curated benchmarks, BOOM reflects the full diversity and unpredictability of operational signals observed in distributed systems, covering infrastructure, networking, databases, security, and application-level metrics.

Note: the metrics comprising BOOM were generated from internal monitoring of pre-production environments, and do not include any customer data.

For more information on the dataset, including details on its preparation and statistical properties, see the dataset card in Hugging Face.

For example evaluations of different time series models on the BOOM dataset, see the boom folder in this repository.

Citation

If you use Toto 2.0 in your research or work, please cite:

@misc{khwaja2026toto20timeseries,
title={Toto 2.0: Time Series Forecasting Enters the Scaling Era}, author={Emaad Khwaja and Chris Lettieri and Gerald Woo and Eden Belouadah and Marc Cenac and Guillaume Jarry and Enguerrand Paquin and Xunyi Zhao and Viktoriya Zhukov and Othmane Abou-Amal and Chenghao Liu and Ameet Talwalkar and David Asker},
year={2026},
eprint={2605.20119},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.20119}, }

For Toto 1.0, see the Toto 1.0 citation.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License - see LICENSE file for details.

This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2025-2026 Datadog, Inc.

Contributing

We welcome contributions! Please check out our contributing guidelines to get started.

About

Time-Series-Optimized Transformer for Observability

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - TimeCopilot/toto: Time-Series-Optimized Transformer for Observability · GitHub
Skip to content

Repository files navigation

Toto - Time Series Optimized Transformer for Observability

Toto 2.0: Technical Report | Blog | Model Weights

Toto 1.0: Paper | Blog | Model Card

Toto is a foundation model for multivariate time series forecasting with a focus on observability metrics. Toto 2.0 is the current recommended release, featuring a family of u-μP-scaled models ranging from 4m to 2.5B parameters.

This repository also hosts the code for evaluating time series models on BOOM (Benchmark of Observability Metrics), a large-scale forecasting dataset composed of real-world observability data.

Updates

  • [Apr 2026] 🎉 Toto 2.0 released — five model sizes from 4m to 2.5B parameters.
  • [Feb 2026] Fine-tuning support added to Toto 1.0 (training script, configs, and tutorial notebook).
  • [Feb 2026] Exogenous covariate support added to Toto 1.0 for fine-tuning and inference.

Table of Contents

Toto 2.0

Toto 2.0 is the latest generation, featuring a u-μP-scaled transformer with alternating time/variate attention and quantile-based probabilistic forecasting.

Note: Fine-tuning and exogenous variable (EV) support are planned for a future 2.0 release but not yet available. If you need these features today, use Toto 1.0.

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series.
  • State-of-the-Art Performance: Achieves top scores on diverse benchmarks, including the multi-domain GIFT-Eval benchmark and our observability-focused BOOM benchmark.
  • Multi-Variate Support: Efficiently process multiple variables using alternating time/variate attention.
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates via a quantile head.
  • High-Dimensional Support: Handle time series with a large number of variables efficiently.
  • Decoder-Only Architecture: Supports variable prediction horizons and context lengths.

Inference tips for forecast():

  • decode_block_size selects the decoding strategy:
    • None (single forward pass): faster, better for short-term accuracy. Used for all leaderboard results.
    • e.g. 768 (block decode): better long-term stability for horizons ≳1000. Default in the quick start and notebooks.
  • has_missing_values=False (when your context has no gaps) enables Flash Attention kernels for a meaningful speedup. Leave as True (default) if target_mask contains any False entries.

Model Weights

CheckpointParameters
Toto-2.0-4m4m
Toto-2.0-22m22m
Toto-2.0-313m313m
Toto-2.0-1B1B
Toto-2.0-2.5B2.5B

Installation

Install Toto 2.0 (requires Python 3.12+):

pip install toto-models

Quick Start

importtorchfromtoto2importToto2Modelmodel=Toto2Model.from_pretrained("Datadog/Toto-2.0-22m")
device=torch.device("cuda"iftorch.cuda.is_available() else"cpu")
model=model.to(device).eval()
# (batch, n_variates, time_steps)target=torch.randn(1, 1, 512, device=device)
target_mask=torch.ones_like(target, dtype=torch.bool)
series_ids=torch.zeros(1, 1, dtype=torch.long, device=device)
# Returns quantiles of shape (9, batch, n_variates, horizon)# Quantile levels: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]quantiles=model.forecast(
{"target": target, "target_mask": target_mask, "series_ids": series_ids},
horizon=96,
decode_block_size=768,
has_missing_values=False,
)

Tutorials

  • Quick Start: Load a model, forecast, plot results, handle missing values and multivariate inputs.
  • GluonTS Integration: Use Toto2GluonTSModel with GluonTS evaluation pipelines and built-in datasets.

Evaluation

Requirements

  • Python 3.12+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

dd-unit-scaling

This repository also includes dd-unit-scaling, a compile-friendly, world-size-aware extension of graphcore-research/unit-scaling. It is used internally by Toto 2.0 to make u-μP work correctly with torch.compile and FSDP2. See the dd-unit-scaling README for details.


Toto 1.0 (Legacy)

Toto 1.0 is the previous generation of Toto. It is still the right choice if you need fine-tuning or exogenous variable support, which are planned for 2.0 but not yet available.

Toto 1.0 Model Card | BOOM Dataset Card

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series
  • State-of-the-Art Performance: Achieves top scores in benchmarks covering diverse time series forecasting tasks. This includes the established multi-domain benchmark GIFT-Eval, as well as our own observability-focused benchmark BOOM.
  • Multi-Variate Support: Efficiently process multiple variables using Proportional Factorized Space-Time Attention
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates using a Student-T mixture model
  • High-Dimensional Support: Handle time series with a large number of variables efficiently
  • Decoder-Only Architecture: Support for variable prediction horizons and context lengths
  • Pre-trained on Massive Data: Trained on over 2 trillion time series data points, the largest pretraining dataset for any open-weights time series foundation model to date.

Model Weights

CheckpointParametersNotes
Toto-Open-Base-1.0151MThe initial open release of Toto. Achieves state-of-the-art performance on both general-purpose and observability-focused benchmarking tasks, as described in our paper.

Installation

# Optional: create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install via pip
pip install toto-ts

Or install as a local editable package (recommended for development or fine-tuning):

cd Toto
pip install -r requirements.txt
pip install -e .

For optimal inference speed, it's recommended to install xformers and flash-attention as well.

Quick Start

importtorchfromtoto.data.util.datasetimportMaskedTimeseriesfromtoto.inference.forecasterimportTotoForecasterfromtoto.model.totoimportToto# Load the pre-trained modeltoto=Toto.from_pretrained('Datadog/Toto-Open-Base-1.0')
toto.to('cuda') # Move to GPU# Optionally compile the model for faster inferencetoto.compile() # Uses Torch's JIT compilation for better performanceforecaster=TotoForecaster(toto.model)
# Prepare your input time series (channels, time_steps)input_series=torch.randn(7, 4096).to('cuda') # Example with 7 variables and 4096 timesteps# Prepare timestamp information (optional, but expected by API; not used by the current model release)timestamp_seconds=torch.zeros(7, 4096).to('cuda')
time_interval_seconds=torch.full((7,), 60*15).to('cuda') # 15-minute intervals# Create a MaskedTimeseries objectinputs=MaskedTimeseries(
series=input_series,
padding_mask=torch.full_like(input_series, True, dtype=torch.bool),
id_mask=torch.zeros_like(input_series),
timestamp_seconds=timestamp_seconds,
time_interval_seconds=time_interval_seconds,
)
# Generate forecasts for the next 336 timestepsforecast=forecaster.forecast(
inputs,
prediction_length=336,
num_samples=256, # Number of samples for probabilistic forecastingsamples_per_batch=256, # Control memory usage during inference
)
# Access resultsmedian_prediction=forecast.median# Point forecastsprediction_samples=forecast.samples# Probabilistic sampleslower_quantile=forecast.quantile(0.1) # 10th percentile for lower confidence boundupper_quantile=forecast.quantile(0.9) # 90th percentile for upper confidence bound

Tutorials

Pre-Training Data

Toto was trained on a massive and diverse mixture of time series datasets:

Observability Data

The largest portion of pretraining data comes from a dataset of approximately 1 trillion time series points collected from Datadog metrics. These metrics are generated from Datadog's monitoring of internal systems, and do not include any customer data. They cover a diverse array of software stacks and types of services, and span wide variety of domains within observability, including application performance, infrastructure, networking, security, databases, and more.

Public Datasets

To improve the performance of Toto on general-purpose time series forecasting across many domains, we include publicly available datasets:

Synthetic Data

To improve robustness, approximately 1/3 of the pretraining data mix consists of synthetically-generated time series.

Evaluation

Toto has been rigorously evaluated on multiple benchmarks, including both general-purpose datasets and observability-focused datasets like BOOM. Below, we provide instructions for reproducing our evaluation results.

LSF Evaluation

To reproduce our results on the LSF datasets, follow these steps:

Downloading the Datasets

The LSF evaluation requires three datasets: ETT, Electricity, and Weather. You can download them from the Time-Series-Library repository. Follow the instructions in the repository to obtain the following already pre-processed datasets:

After downloading, ensure the datasets are placed in the data/lsf_datasets/ directory within the repository, with the following structure:

data/
└── lsf_datasets/
├── ETT-small/
├── electricity/
└── weather/
Running the Evaluation Script

Once the datasets are set up, you can run the LSF evaluation script as follows to reproduce our results:

export CUBLAS_WORKSPACE_CONFIG=:4096:8 # For reproducible GPU resultsexport PYTHONPATH="$(pwd):$(pwd)/toto:$PYTHONPATH"# Add current and "toto" dirs to Python module search path
python toto/evaluation/run_lsf_eval.py \
--datasets ETTh1 \
--context-length 2048 \
--eval-stride 1 \
--checkpoint-path [CHECKPOINT-NAME-OR-DIR]

To see all available options for the evaluation script, you can use the --help flag:

python toto/evaluation/run_lsf_eval.py --help
Expected Results

The script evaluates Toto's performance using Mean Absolute Error (MAE) and Mean Squared Error (MSE) across the specified datasets, context lengths, and prediction lengths. It displays a detailed table of results for each prediction length, along with a summary table that averages the results across prediction lengths for each dataset.

To reproduce the results presented in the paper, use the default arguments while setting --eval-stride 1 and specifying all datasets with --datasets ETTh1 ETTh2 ETTm1 ETTm2 weather electricity.

GIFT-Eval Evaluation

To reproduce our results on the GIFT-Eval benchmark, we provide a dedicated notebook:

BOOM Evaluation

For evaluating Toto on the BOOM (Benchmark of Observability Metrics) dataset, refer to:

Fine-tuning

Toto can be fine-tuned on your own domain-specific datasets to improve performance on specialized forecasting tasks. The fine-tuning pipeline supports both standard time series and datasets with exogenous (known future) variables.

Fine-tuning Tutorial

To fine-tune Toto, use the provided finetuning tutorial, which demonstrates fine-tuning with and without exogenous variables.

To customize the fine-tuning recipe, modify the base configuration in finetune_config.yaml.

By default, the tutorial uses the proenfo_gfc12 dataset from the autogluon/fev_datasets collection.

Custom Datasets

There are two ways to use custom datasets for fine-tuning:

Option A: HuggingFace Dataset with Configuration Dictionary

The simplest approach is to use a HuggingFace datasets.Dataset configured via a dictionary. Modify the prepare_dataset() function in benchmark_finetuning.py to load your data:

custom_dataset= {
"dataset": dataset, # HuggingFace Dataset object"target_fields": ["target"], # List of field names for target variables"target_transform_fns": [...], # Transform functions for each target field"ev_fields": ["temp", "humidity"], # List of exogenous covariate field names"ev_transform_fns": [...], # Transform functions for each exogenous field"dataset_name": "my_dataset", # Name of your custom dataset
}

HuggingFace Dataset Requirements:

Your dataset must contain:

  • timestamp: A 1D array of timestamps for each time series
  • Target fields (e.g., target): Arrays of shape (T,) for each target variable
  • Exogenous fields (optional): Arrays of shape (T,) for each dynamic exogenous variable

The pipeline uses FinetuneDataModule, which internally converts your data into CausalMaskedTimeseries objects (the input format expected by Toto during fine-tuning) via GluonTS transforms.

Option B: Custom PyTorch Dataset and DataModule

For full control over data loading, you can implement your own PyTorch Dataset that returns CausalMaskedTimeseries objects and wrap it in a custom LightningDataModule.

Step 1: Create a Dataset class that returns CausalMaskedTimeseries:

fromtorch.utils.dataimportDatasetfromtoto.data.util.datasetimportCausalMaskedTimeseriesclassMyCustomDataset(Dataset):
...
def__getitem__(self, idx: int) ->CausalMaskedTimeseries:
# Build and return a CausalMaskedTimeseries for this sample# See toto/data/datasets/gluonts_dataset.py for a reference implementation
...

Step 2: Create a custom LightningDataModule:

fromlightningimportLightningDataModulefromtorch.utils.dataimportDataLoaderfromtoto.data.util.helpersimportcollate_causalclassMyFinetuneDataModule(LightningDataModule):
def__init__(self, train_dataset: MyCustomDataset, val_dataset: MyCustomDataset, ...):
...
deftrain_dataloader(self) ->DataLoader:
returnDataLoader(self.train_dataset, collate_fn=collate_causal, ...) # collate_fn is requireddefval_dataloader(self) ->DataLoader:
returnDataLoader(self.val_dataset, collate_fn=collate_causal, ...)

Step 3: Modify finetune_toto.py to use your custom DataModule:

# Replace the get_datamodule() call with your custom DataModuledm=MyFinetuneDataModule(train_dataset, val_dataset, batch_size=16)
_=train(module, dm, config)

Evaluations on FEV Datasets

The benchmark_finetuning.py script evaluates Toto on a subset of FEV datasets that are not included in Toto's pretraining corpus. These datasets contain known exogenous variables, enabling a comparison of three approaches:

  • Zero-shot Toto — No fine-tuning
  • Fine-tuned Toto — Fine-tuned without exogenous variables
  • Fine-tuned Toto with Exogenous Variables — Fine-tuned with known future covariates

Models are evaluated using sliding windows on the test set (10% of each dataset), with context length and horizon configured per FEV task. Results are aggregated using the geometric mean across datasets in aggregate_results.ipynb:

ModelMAEWQLMASE
Toto (zero-shot)6150.2420.1110.632
Toto (fine-tuned)5397.9290.1000.574
Toto (fine-tuned + exogenous)5117.0020.0960.535

Requirements

  • Python 3.10+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

Citation (1.0)

If you use Toto 1.0 in your research, please cite:

@misc{cohen2025timedifferentobservabilityperspective,
title={This Time is Different: An Observability Perspective on Time Series Foundation Models},
author={Ben Cohen and Emaad Khwaja and Youssef Doubli and Salahidine Lemaachi and Chris Lettieri and Charles Masson and Hugo Miccinilli and Elise Ramé and Qiqi Ren and Afshin Rostamizadeh and Jean Ogier du Terrail and Anna-Monica Toon and Kan Wang and Stephan Xie and Zongzhe Xu and Viktoriya Zhukova and David Asker and Ameet Talwalkar and Othmane Abou-Amal},
year={2025},
eprint={2505.14766},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.14766},
}

BOOM (Benchmark of Observability Metrics)

BOOM is used for evaluating both Toto 1.0 and 2.0.

BOOM (Benchmark of Observability Metrics) is a large-scale, real-world time series dataset designed for evaluating models on forecasting tasks in complex observability environments. Composed of real-world metrics data collected from Datadog, a leading observability platform, the benchmark captures the irregularity, structural complexity, and heavy-tailed statistics typical of production observability data. Unlike synthetic or curated benchmarks, BOOM reflects the full diversity and unpredictability of operational signals observed in distributed systems, covering infrastructure, networking, databases, security, and application-level metrics.

Note: the metrics comprising BOOM were generated from internal monitoring of pre-production environments, and do not include any customer data.

For more information on the dataset, including details on its preparation and statistical properties, see the dataset card in Hugging Face.

For example evaluations of different time series models on the BOOM dataset, see the boom folder in this repository.

Citation

If you use Toto 2.0 in your research or work, please cite:

@misc{khwaja2026toto20timeseries,
title={Toto 2.0: Time Series Forecasting Enters the Scaling Era}, author={Emaad Khwaja and Chris Lettieri and Gerald Woo and Eden Belouadah and Marc Cenac and Guillaume Jarry and Enguerrand Paquin and Xunyi Zhao and Viktoriya Zhukov and Othmane Abou-Amal and Chenghao Liu and Ameet Talwalkar and David Asker},
year={2026},
eprint={2605.20119},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.20119}, }

For Toto 1.0, see the Toto 1.0 citation.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License - see LICENSE file for details.

This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2025-2026 Datadog, Inc.

Contributing

We welcome contributions! Please check out our contributing guidelines to get started.

About

Time-Series-Optimized Transformer for Observability

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - TimeCopilot/toto: Time-Series-Optimized Transformer for Observability · GitHub
Skip to content

Repository files navigation

Toto - Time Series Optimized Transformer for Observability

Toto 2.0: Technical Report | Blog | Model Weights

Toto 1.0: Paper | Blog | Model Card

Toto is a foundation model for multivariate time series forecasting with a focus on observability metrics. Toto 2.0 is the current recommended release, featuring a family of u-μP-scaled models ranging from 4m to 2.5B parameters.

This repository also hosts the code for evaluating time series models on BOOM (Benchmark of Observability Metrics), a large-scale forecasting dataset composed of real-world observability data.

Updates

  • [Apr 2026] 🎉 Toto 2.0 released — five model sizes from 4m to 2.5B parameters.
  • [Feb 2026] Fine-tuning support added to Toto 1.0 (training script, configs, and tutorial notebook).
  • [Feb 2026] Exogenous covariate support added to Toto 1.0 for fine-tuning and inference.

Table of Contents

Toto 2.0

Toto 2.0 is the latest generation, featuring a u-μP-scaled transformer with alternating time/variate attention and quantile-based probabilistic forecasting.

Note: Fine-tuning and exogenous variable (EV) support are planned for a future 2.0 release but not yet available. If you need these features today, use Toto 1.0.

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series.
  • State-of-the-Art Performance: Achieves top scores on diverse benchmarks, including the multi-domain GIFT-Eval benchmark and our observability-focused BOOM benchmark.
  • Multi-Variate Support: Efficiently process multiple variables using alternating time/variate attention.
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates via a quantile head.
  • High-Dimensional Support: Handle time series with a large number of variables efficiently.
  • Decoder-Only Architecture: Supports variable prediction horizons and context lengths.

Inference tips for forecast():

  • decode_block_size selects the decoding strategy:
    • None (single forward pass): faster, better for short-term accuracy. Used for all leaderboard results.
    • e.g. 768 (block decode): better long-term stability for horizons ≳1000. Default in the quick start and notebooks.
  • has_missing_values=False (when your context has no gaps) enables Flash Attention kernels for a meaningful speedup. Leave as True (default) if target_mask contains any False entries.

Model Weights

CheckpointParameters
Toto-2.0-4m4m
Toto-2.0-22m22m
Toto-2.0-313m313m
Toto-2.0-1B1B
Toto-2.0-2.5B2.5B

Installation

Install Toto 2.0 (requires Python 3.12+):

pip install toto-models

Quick Start

importtorchfromtoto2importToto2Modelmodel=Toto2Model.from_pretrained("Datadog/Toto-2.0-22m")
device=torch.device("cuda"iftorch.cuda.is_available() else"cpu")
model=model.to(device).eval()
# (batch, n_variates, time_steps)target=torch.randn(1, 1, 512, device=device)
target_mask=torch.ones_like(target, dtype=torch.bool)
series_ids=torch.zeros(1, 1, dtype=torch.long, device=device)
# Returns quantiles of shape (9, batch, n_variates, horizon)# Quantile levels: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]quantiles=model.forecast(
{"target": target, "target_mask": target_mask, "series_ids": series_ids},
horizon=96,
decode_block_size=768,
has_missing_values=False,
)

Tutorials

  • Quick Start: Load a model, forecast, plot results, handle missing values and multivariate inputs.
  • GluonTS Integration: Use Toto2GluonTSModel with GluonTS evaluation pipelines and built-in datasets.

Evaluation

Requirements

  • Python 3.12+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

dd-unit-scaling

This repository also includes dd-unit-scaling, a compile-friendly, world-size-aware extension of graphcore-research/unit-scaling. It is used internally by Toto 2.0 to make u-μP work correctly with torch.compile and FSDP2. See the dd-unit-scaling README for details.


Toto 1.0 (Legacy)

Toto 1.0 is the previous generation of Toto. It is still the right choice if you need fine-tuning or exogenous variable support, which are planned for 2.0 but not yet available.

Toto 1.0 Model Card | BOOM Dataset Card

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series
  • State-of-the-Art Performance: Achieves top scores in benchmarks covering diverse time series forecasting tasks. This includes the established multi-domain benchmark GIFT-Eval, as well as our own observability-focused benchmark BOOM.
  • Multi-Variate Support: Efficiently process multiple variables using Proportional Factorized Space-Time Attention
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates using a Student-T mixture model
  • High-Dimensional Support: Handle time series with a large number of variables efficiently
  • Decoder-Only Architecture: Support for variable prediction horizons and context lengths
  • Pre-trained on Massive Data: Trained on over 2 trillion time series data points, the largest pretraining dataset for any open-weights time series foundation model to date.

Model Weights

CheckpointParametersNotes
Toto-Open-Base-1.0151MThe initial open release of Toto. Achieves state-of-the-art performance on both general-purpose and observability-focused benchmarking tasks, as described in our paper.

Installation

# Optional: create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install via pip
pip install toto-ts

Or install as a local editable package (recommended for development or fine-tuning):

cd Toto
pip install -r requirements.txt
pip install -e .

For optimal inference speed, it's recommended to install xformers and flash-attention as well.

Quick Start

importtorchfromtoto.data.util.datasetimportMaskedTimeseriesfromtoto.inference.forecasterimportTotoForecasterfromtoto.model.totoimportToto# Load the pre-trained modeltoto=Toto.from_pretrained('Datadog/Toto-Open-Base-1.0')
toto.to('cuda') # Move to GPU# Optionally compile the model for faster inferencetoto.compile() # Uses Torch's JIT compilation for better performanceforecaster=TotoForecaster(toto.model)
# Prepare your input time series (channels, time_steps)input_series=torch.randn(7, 4096).to('cuda') # Example with 7 variables and 4096 timesteps# Prepare timestamp information (optional, but expected by API; not used by the current model release)timestamp_seconds=torch.zeros(7, 4096).to('cuda')
time_interval_seconds=torch.full((7,), 60*15).to('cuda') # 15-minute intervals# Create a MaskedTimeseries objectinputs=MaskedTimeseries(
series=input_series,
padding_mask=torch.full_like(input_series, True, dtype=torch.bool),
id_mask=torch.zeros_like(input_series),
timestamp_seconds=timestamp_seconds,
time_interval_seconds=time_interval_seconds,
)
# Generate forecasts for the next 336 timestepsforecast=forecaster.forecast(
inputs,
prediction_length=336,
num_samples=256, # Number of samples for probabilistic forecastingsamples_per_batch=256, # Control memory usage during inference
)
# Access resultsmedian_prediction=forecast.median# Point forecastsprediction_samples=forecast.samples# Probabilistic sampleslower_quantile=forecast.quantile(0.1) # 10th percentile for lower confidence boundupper_quantile=forecast.quantile(0.9) # 90th percentile for upper confidence bound

Tutorials

Pre-Training Data

Toto was trained on a massive and diverse mixture of time series datasets:

Observability Data

The largest portion of pretraining data comes from a dataset of approximately 1 trillion time series points collected from Datadog metrics. These metrics are generated from Datadog's monitoring of internal systems, and do not include any customer data. They cover a diverse array of software stacks and types of services, and span wide variety of domains within observability, including application performance, infrastructure, networking, security, databases, and more.

Public Datasets

To improve the performance of Toto on general-purpose time series forecasting across many domains, we include publicly available datasets:

Synthetic Data

To improve robustness, approximately 1/3 of the pretraining data mix consists of synthetically-generated time series.

Evaluation

Toto has been rigorously evaluated on multiple benchmarks, including both general-purpose datasets and observability-focused datasets like BOOM. Below, we provide instructions for reproducing our evaluation results.

LSF Evaluation

To reproduce our results on the LSF datasets, follow these steps:

Downloading the Datasets

The LSF evaluation requires three datasets: ETT, Electricity, and Weather. You can download them from the Time-Series-Library repository. Follow the instructions in the repository to obtain the following already pre-processed datasets:

After downloading, ensure the datasets are placed in the data/lsf_datasets/ directory within the repository, with the following structure:

data/
└── lsf_datasets/
├── ETT-small/
├── electricity/
└── weather/
Running the Evaluation Script

Once the datasets are set up, you can run the LSF evaluation script as follows to reproduce our results:

export CUBLAS_WORKSPACE_CONFIG=:4096:8 # For reproducible GPU resultsexport PYTHONPATH="$(pwd):$(pwd)/toto:$PYTHONPATH"# Add current and "toto" dirs to Python module search path
python toto/evaluation/run_lsf_eval.py \
--datasets ETTh1 \
--context-length 2048 \
--eval-stride 1 \
--checkpoint-path [CHECKPOINT-NAME-OR-DIR]

To see all available options for the evaluation script, you can use the --help flag:

python toto/evaluation/run_lsf_eval.py --help
Expected Results

The script evaluates Toto's performance using Mean Absolute Error (MAE) and Mean Squared Error (MSE) across the specified datasets, context lengths, and prediction lengths. It displays a detailed table of results for each prediction length, along with a summary table that averages the results across prediction lengths for each dataset.

To reproduce the results presented in the paper, use the default arguments while setting --eval-stride 1 and specifying all datasets with --datasets ETTh1 ETTh2 ETTm1 ETTm2 weather electricity.

GIFT-Eval Evaluation

To reproduce our results on the GIFT-Eval benchmark, we provide a dedicated notebook:

BOOM Evaluation

For evaluating Toto on the BOOM (Benchmark of Observability Metrics) dataset, refer to:

Fine-tuning

Toto can be fine-tuned on your own domain-specific datasets to improve performance on specialized forecasting tasks. The fine-tuning pipeline supports both standard time series and datasets with exogenous (known future) variables.

Fine-tuning Tutorial

To fine-tune Toto, use the provided finetuning tutorial, which demonstrates fine-tuning with and without exogenous variables.

To customize the fine-tuning recipe, modify the base configuration in finetune_config.yaml.

By default, the tutorial uses the proenfo_gfc12 dataset from the autogluon/fev_datasets collection.

Custom Datasets

There are two ways to use custom datasets for fine-tuning:

Option A: HuggingFace Dataset with Configuration Dictionary

The simplest approach is to use a HuggingFace datasets.Dataset configured via a dictionary. Modify the prepare_dataset() function in benchmark_finetuning.py to load your data:

custom_dataset= {
"dataset": dataset, # HuggingFace Dataset object"target_fields": ["target"], # List of field names for target variables"target_transform_fns": [...], # Transform functions for each target field"ev_fields": ["temp", "humidity"], # List of exogenous covariate field names"ev_transform_fns": [...], # Transform functions for each exogenous field"dataset_name": "my_dataset", # Name of your custom dataset
}

HuggingFace Dataset Requirements:

Your dataset must contain:

  • timestamp: A 1D array of timestamps for each time series
  • Target fields (e.g., target): Arrays of shape (T,) for each target variable
  • Exogenous fields (optional): Arrays of shape (T,) for each dynamic exogenous variable

The pipeline uses FinetuneDataModule, which internally converts your data into CausalMaskedTimeseries objects (the input format expected by Toto during fine-tuning) via GluonTS transforms.

Option B: Custom PyTorch Dataset and DataModule

For full control over data loading, you can implement your own PyTorch Dataset that returns CausalMaskedTimeseries objects and wrap it in a custom LightningDataModule.

Step 1: Create a Dataset class that returns CausalMaskedTimeseries:

fromtorch.utils.dataimportDatasetfromtoto.data.util.datasetimportCausalMaskedTimeseriesclassMyCustomDataset(Dataset):
...
def__getitem__(self, idx: int) ->CausalMaskedTimeseries:
# Build and return a CausalMaskedTimeseries for this sample# See toto/data/datasets/gluonts_dataset.py for a reference implementation
...

Step 2: Create a custom LightningDataModule:

fromlightningimportLightningDataModulefromtorch.utils.dataimportDataLoaderfromtoto.data.util.helpersimportcollate_causalclassMyFinetuneDataModule(LightningDataModule):
def__init__(self, train_dataset: MyCustomDataset, val_dataset: MyCustomDataset, ...):
...
deftrain_dataloader(self) ->DataLoader:
returnDataLoader(self.train_dataset, collate_fn=collate_causal, ...) # collate_fn is requireddefval_dataloader(self) ->DataLoader:
returnDataLoader(self.val_dataset, collate_fn=collate_causal, ...)

Step 3: Modify finetune_toto.py to use your custom DataModule:

# Replace the get_datamodule() call with your custom DataModuledm=MyFinetuneDataModule(train_dataset, val_dataset, batch_size=16)
_=train(module, dm, config)

Evaluations on FEV Datasets

The benchmark_finetuning.py script evaluates Toto on a subset of FEV datasets that are not included in Toto's pretraining corpus. These datasets contain known exogenous variables, enabling a comparison of three approaches:

  • Zero-shot Toto — No fine-tuning
  • Fine-tuned Toto — Fine-tuned without exogenous variables
  • Fine-tuned Toto with Exogenous Variables — Fine-tuned with known future covariates

Models are evaluated using sliding windows on the test set (10% of each dataset), with context length and horizon configured per FEV task. Results are aggregated using the geometric mean across datasets in aggregate_results.ipynb:

ModelMAEWQLMASE
Toto (zero-shot)6150.2420.1110.632
Toto (fine-tuned)5397.9290.1000.574
Toto (fine-tuned + exogenous)5117.0020.0960.535

Requirements

  • Python 3.10+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

Citation (1.0)

If you use Toto 1.0 in your research, please cite:

@misc{cohen2025timedifferentobservabilityperspective,
title={This Time is Different: An Observability Perspective on Time Series Foundation Models},
author={Ben Cohen and Emaad Khwaja and Youssef Doubli and Salahidine Lemaachi and Chris Lettieri and Charles Masson and Hugo Miccinilli and Elise Ramé and Qiqi Ren and Afshin Rostamizadeh and Jean Ogier du Terrail and Anna-Monica Toon and Kan Wang and Stephan Xie and Zongzhe Xu and Viktoriya Zhukova and David Asker and Ameet Talwalkar and Othmane Abou-Amal},
year={2025},
eprint={2505.14766},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.14766},
}

BOOM (Benchmark of Observability Metrics)

BOOM is used for evaluating both Toto 1.0 and 2.0.

BOOM (Benchmark of Observability Metrics) is a large-scale, real-world time series dataset designed for evaluating models on forecasting tasks in complex observability environments. Composed of real-world metrics data collected from Datadog, a leading observability platform, the benchmark captures the irregularity, structural complexity, and heavy-tailed statistics typical of production observability data. Unlike synthetic or curated benchmarks, BOOM reflects the full diversity and unpredictability of operational signals observed in distributed systems, covering infrastructure, networking, databases, security, and application-level metrics.

Note: the metrics comprising BOOM were generated from internal monitoring of pre-production environments, and do not include any customer data.

For more information on the dataset, including details on its preparation and statistical properties, see the dataset card in Hugging Face.

For example evaluations of different time series models on the BOOM dataset, see the boom folder in this repository.

Citation

If you use Toto 2.0 in your research or work, please cite:

@misc{khwaja2026toto20timeseries,
title={Toto 2.0: Time Series Forecasting Enters the Scaling Era}, author={Emaad Khwaja and Chris Lettieri and Gerald Woo and Eden Belouadah and Marc Cenac and Guillaume Jarry and Enguerrand Paquin and Xunyi Zhao and Viktoriya Zhukov and Othmane Abou-Amal and Chenghao Liu and Ameet Talwalkar and David Asker},
year={2026},
eprint={2605.20119},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.20119}, }

For Toto 1.0, see the Toto 1.0 citation.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License - see LICENSE file for details.

This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2025-2026 Datadog, Inc.

Contributing

We welcome contributions! Please check out our contributing guidelines to get started.

About

Time-Series-Optimized Transformer for Observability

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - TimeCopilot/toto: Time-Series-Optimized Transformer for Observability · GitHub
Skip to content

Repository files navigation

Toto - Time Series Optimized Transformer for Observability

Toto 2.0: Technical Report | Blog | Model Weights

Toto 1.0: Paper | Blog | Model Card

Toto is a foundation model for multivariate time series forecasting with a focus on observability metrics. Toto 2.0 is the current recommended release, featuring a family of u-μP-scaled models ranging from 4m to 2.5B parameters.

This repository also hosts the code for evaluating time series models on BOOM (Benchmark of Observability Metrics), a large-scale forecasting dataset composed of real-world observability data.

Updates

  • [Apr 2026] 🎉 Toto 2.0 released — five model sizes from 4m to 2.5B parameters.
  • [Feb 2026] Fine-tuning support added to Toto 1.0 (training script, configs, and tutorial notebook).
  • [Feb 2026] Exogenous covariate support added to Toto 1.0 for fine-tuning and inference.

Table of Contents

Toto 2.0

Toto 2.0 is the latest generation, featuring a u-μP-scaled transformer with alternating time/variate attention and quantile-based probabilistic forecasting.

Note: Fine-tuning and exogenous variable (EV) support are planned for a future 2.0 release but not yet available. If you need these features today, use Toto 1.0.

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series.
  • State-of-the-Art Performance: Achieves top scores on diverse benchmarks, including the multi-domain GIFT-Eval benchmark and our observability-focused BOOM benchmark.
  • Multi-Variate Support: Efficiently process multiple variables using alternating time/variate attention.
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates via a quantile head.
  • High-Dimensional Support: Handle time series with a large number of variables efficiently.
  • Decoder-Only Architecture: Supports variable prediction horizons and context lengths.

Inference tips for forecast():

  • decode_block_size selects the decoding strategy:
    • None (single forward pass): faster, better for short-term accuracy. Used for all leaderboard results.
    • e.g. 768 (block decode): better long-term stability for horizons ≳1000. Default in the quick start and notebooks.
  • has_missing_values=False (when your context has no gaps) enables Flash Attention kernels for a meaningful speedup. Leave as True (default) if target_mask contains any False entries.

Model Weights

CheckpointParameters
Toto-2.0-4m4m
Toto-2.0-22m22m
Toto-2.0-313m313m
Toto-2.0-1B1B
Toto-2.0-2.5B2.5B

Installation

Install Toto 2.0 (requires Python 3.12+):

pip install toto-models

Quick Start

importtorchfromtoto2importToto2Modelmodel=Toto2Model.from_pretrained("Datadog/Toto-2.0-22m")
device=torch.device("cuda"iftorch.cuda.is_available() else"cpu")
model=model.to(device).eval()
# (batch, n_variates, time_steps)target=torch.randn(1, 1, 512, device=device)
target_mask=torch.ones_like(target, dtype=torch.bool)
series_ids=torch.zeros(1, 1, dtype=torch.long, device=device)
# Returns quantiles of shape (9, batch, n_variates, horizon)# Quantile levels: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]quantiles=model.forecast(
{"target": target, "target_mask": target_mask, "series_ids": series_ids},
horizon=96,
decode_block_size=768,
has_missing_values=False,
)

Tutorials

  • Quick Start: Load a model, forecast, plot results, handle missing values and multivariate inputs.
  • GluonTS Integration: Use Toto2GluonTSModel with GluonTS evaluation pipelines and built-in datasets.

Evaluation

Requirements

  • Python 3.12+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

dd-unit-scaling

This repository also includes dd-unit-scaling, a compile-friendly, world-size-aware extension of graphcore-research/unit-scaling. It is used internally by Toto 2.0 to make u-μP work correctly with torch.compile and FSDP2. See the dd-unit-scaling README for details.


Toto 1.0 (Legacy)

Toto 1.0 is the previous generation of Toto. It is still the right choice if you need fine-tuning or exogenous variable support, which are planned for 2.0 but not yet available.

Toto 1.0 Model Card | BOOM Dataset Card

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series
  • State-of-the-Art Performance: Achieves top scores in benchmarks covering diverse time series forecasting tasks. This includes the established multi-domain benchmark GIFT-Eval, as well as our own observability-focused benchmark BOOM.
  • Multi-Variate Support: Efficiently process multiple variables using Proportional Factorized Space-Time Attention
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates using a Student-T mixture model
  • High-Dimensional Support: Handle time series with a large number of variables efficiently
  • Decoder-Only Architecture: Support for variable prediction horizons and context lengths
  • Pre-trained on Massive Data: Trained on over 2 trillion time series data points, the largest pretraining dataset for any open-weights time series foundation model to date.

Model Weights

CheckpointParametersNotes
Toto-Open-Base-1.0151MThe initial open release of Toto. Achieves state-of-the-art performance on both general-purpose and observability-focused benchmarking tasks, as described in our paper.

Installation

# Optional: create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install via pip
pip install toto-ts

Or install as a local editable package (recommended for development or fine-tuning):

cd Toto
pip install -r requirements.txt
pip install -e .

For optimal inference speed, it's recommended to install xformers and flash-attention as well.

Quick Start

importtorchfromtoto.data.util.datasetimportMaskedTimeseriesfromtoto.inference.forecasterimportTotoForecasterfromtoto.model.totoimportToto# Load the pre-trained modeltoto=Toto.from_pretrained('Datadog/Toto-Open-Base-1.0')
toto.to('cuda') # Move to GPU# Optionally compile the model for faster inferencetoto.compile() # Uses Torch's JIT compilation for better performanceforecaster=TotoForecaster(toto.model)
# Prepare your input time series (channels, time_steps)input_series=torch.randn(7, 4096).to('cuda') # Example with 7 variables and 4096 timesteps# Prepare timestamp information (optional, but expected by API; not used by the current model release)timestamp_seconds=torch.zeros(7, 4096).to('cuda')
time_interval_seconds=torch.full((7,), 60*15).to('cuda') # 15-minute intervals# Create a MaskedTimeseries objectinputs=MaskedTimeseries(
series=input_series,
padding_mask=torch.full_like(input_series, True, dtype=torch.bool),
id_mask=torch.zeros_like(input_series),
timestamp_seconds=timestamp_seconds,
time_interval_seconds=time_interval_seconds,
)
# Generate forecasts for the next 336 timestepsforecast=forecaster.forecast(
inputs,
prediction_length=336,
num_samples=256, # Number of samples for probabilistic forecastingsamples_per_batch=256, # Control memory usage during inference
)
# Access resultsmedian_prediction=forecast.median# Point forecastsprediction_samples=forecast.samples# Probabilistic sampleslower_quantile=forecast.quantile(0.1) # 10th percentile for lower confidence boundupper_quantile=forecast.quantile(0.9) # 90th percentile for upper confidence bound

Tutorials

Pre-Training Data

Toto was trained on a massive and diverse mixture of time series datasets:

Observability Data

The largest portion of pretraining data comes from a dataset of approximately 1 trillion time series points collected from Datadog metrics. These metrics are generated from Datadog's monitoring of internal systems, and do not include any customer data. They cover a diverse array of software stacks and types of services, and span wide variety of domains within observability, including application performance, infrastructure, networking, security, databases, and more.

Public Datasets

To improve the performance of Toto on general-purpose time series forecasting across many domains, we include publicly available datasets:

Synthetic Data

To improve robustness, approximately 1/3 of the pretraining data mix consists of synthetically-generated time series.

Evaluation

Toto has been rigorously evaluated on multiple benchmarks, including both general-purpose datasets and observability-focused datasets like BOOM. Below, we provide instructions for reproducing our evaluation results.

LSF Evaluation

To reproduce our results on the LSF datasets, follow these steps:

Downloading the Datasets

The LSF evaluation requires three datasets: ETT, Electricity, and Weather. You can download them from the Time-Series-Library repository. Follow the instructions in the repository to obtain the following already pre-processed datasets:

After downloading, ensure the datasets are placed in the data/lsf_datasets/ directory within the repository, with the following structure:

data/
└── lsf_datasets/
├── ETT-small/
├── electricity/
└── weather/
Running the Evaluation Script

Once the datasets are set up, you can run the LSF evaluation script as follows to reproduce our results:

export CUBLAS_WORKSPACE_CONFIG=:4096:8 # For reproducible GPU resultsexport PYTHONPATH="$(pwd):$(pwd)/toto:$PYTHONPATH"# Add current and "toto" dirs to Python module search path
python toto/evaluation/run_lsf_eval.py \
--datasets ETTh1 \
--context-length 2048 \
--eval-stride 1 \
--checkpoint-path [CHECKPOINT-NAME-OR-DIR]

To see all available options for the evaluation script, you can use the --help flag:

python toto/evaluation/run_lsf_eval.py --help
Expected Results

The script evaluates Toto's performance using Mean Absolute Error (MAE) and Mean Squared Error (MSE) across the specified datasets, context lengths, and prediction lengths. It displays a detailed table of results for each prediction length, along with a summary table that averages the results across prediction lengths for each dataset.

To reproduce the results presented in the paper, use the default arguments while setting --eval-stride 1 and specifying all datasets with --datasets ETTh1 ETTh2 ETTm1 ETTm2 weather electricity.

GIFT-Eval Evaluation

To reproduce our results on the GIFT-Eval benchmark, we provide a dedicated notebook:

BOOM Evaluation

For evaluating Toto on the BOOM (Benchmark of Observability Metrics) dataset, refer to:

Fine-tuning

Toto can be fine-tuned on your own domain-specific datasets to improve performance on specialized forecasting tasks. The fine-tuning pipeline supports both standard time series and datasets with exogenous (known future) variables.

Fine-tuning Tutorial

To fine-tune Toto, use the provided finetuning tutorial, which demonstrates fine-tuning with and without exogenous variables.

To customize the fine-tuning recipe, modify the base configuration in finetune_config.yaml.

By default, the tutorial uses the proenfo_gfc12 dataset from the autogluon/fev_datasets collection.

Custom Datasets

There are two ways to use custom datasets for fine-tuning:

Option A: HuggingFace Dataset with Configuration Dictionary

The simplest approach is to use a HuggingFace datasets.Dataset configured via a dictionary. Modify the prepare_dataset() function in benchmark_finetuning.py to load your data:

custom_dataset= {
"dataset": dataset, # HuggingFace Dataset object"target_fields": ["target"], # List of field names for target variables"target_transform_fns": [...], # Transform functions for each target field"ev_fields": ["temp", "humidity"], # List of exogenous covariate field names"ev_transform_fns": [...], # Transform functions for each exogenous field"dataset_name": "my_dataset", # Name of your custom dataset
}

HuggingFace Dataset Requirements:

Your dataset must contain:

  • timestamp: A 1D array of timestamps for each time series
  • Target fields (e.g., target): Arrays of shape (T,) for each target variable
  • Exogenous fields (optional): Arrays of shape (T,) for each dynamic exogenous variable

The pipeline uses FinetuneDataModule, which internally converts your data into CausalMaskedTimeseries objects (the input format expected by Toto during fine-tuning) via GluonTS transforms.

Option B: Custom PyTorch Dataset and DataModule

For full control over data loading, you can implement your own PyTorch Dataset that returns CausalMaskedTimeseries objects and wrap it in a custom LightningDataModule.

Step 1: Create a Dataset class that returns CausalMaskedTimeseries:

fromtorch.utils.dataimportDatasetfromtoto.data.util.datasetimportCausalMaskedTimeseriesclassMyCustomDataset(Dataset):
...
def__getitem__(self, idx: int) ->CausalMaskedTimeseries:
# Build and return a CausalMaskedTimeseries for this sample# See toto/data/datasets/gluonts_dataset.py for a reference implementation
...

Step 2: Create a custom LightningDataModule:

fromlightningimportLightningDataModulefromtorch.utils.dataimportDataLoaderfromtoto.data.util.helpersimportcollate_causalclassMyFinetuneDataModule(LightningDataModule):
def__init__(self, train_dataset: MyCustomDataset, val_dataset: MyCustomDataset, ...):
...
deftrain_dataloader(self) ->DataLoader:
returnDataLoader(self.train_dataset, collate_fn=collate_causal, ...) # collate_fn is requireddefval_dataloader(self) ->DataLoader:
returnDataLoader(self.val_dataset, collate_fn=collate_causal, ...)

Step 3: Modify finetune_toto.py to use your custom DataModule:

# Replace the get_datamodule() call with your custom DataModuledm=MyFinetuneDataModule(train_dataset, val_dataset, batch_size=16)
_=train(module, dm, config)

Evaluations on FEV Datasets

The benchmark_finetuning.py script evaluates Toto on a subset of FEV datasets that are not included in Toto's pretraining corpus. These datasets contain known exogenous variables, enabling a comparison of three approaches:

  • Zero-shot Toto — No fine-tuning
  • Fine-tuned Toto — Fine-tuned without exogenous variables
  • Fine-tuned Toto with Exogenous Variables — Fine-tuned with known future covariates

Models are evaluated using sliding windows on the test set (10% of each dataset), with context length and horizon configured per FEV task. Results are aggregated using the geometric mean across datasets in aggregate_results.ipynb:

ModelMAEWQLMASE
Toto (zero-shot)6150.2420.1110.632
Toto (fine-tuned)5397.9290.1000.574
Toto (fine-tuned + exogenous)5117.0020.0960.535

Requirements

  • Python 3.10+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

Citation (1.0)

If you use Toto 1.0 in your research, please cite:

@misc{cohen2025timedifferentobservabilityperspective,
title={This Time is Different: An Observability Perspective on Time Series Foundation Models},
author={Ben Cohen and Emaad Khwaja and Youssef Doubli and Salahidine Lemaachi and Chris Lettieri and Charles Masson and Hugo Miccinilli and Elise Ramé and Qiqi Ren and Afshin Rostamizadeh and Jean Ogier du Terrail and Anna-Monica Toon and Kan Wang and Stephan Xie and Zongzhe Xu and Viktoriya Zhukova and David Asker and Ameet Talwalkar and Othmane Abou-Amal},
year={2025},
eprint={2505.14766},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.14766},
}

BOOM (Benchmark of Observability Metrics)

BOOM is used for evaluating both Toto 1.0 and 2.0.

BOOM (Benchmark of Observability Metrics) is a large-scale, real-world time series dataset designed for evaluating models on forecasting tasks in complex observability environments. Composed of real-world metrics data collected from Datadog, a leading observability platform, the benchmark captures the irregularity, structural complexity, and heavy-tailed statistics typical of production observability data. Unlike synthetic or curated benchmarks, BOOM reflects the full diversity and unpredictability of operational signals observed in distributed systems, covering infrastructure, networking, databases, security, and application-level metrics.

Note: the metrics comprising BOOM were generated from internal monitoring of pre-production environments, and do not include any customer data.

For more information on the dataset, including details on its preparation and statistical properties, see the dataset card in Hugging Face.

For example evaluations of different time series models on the BOOM dataset, see the boom folder in this repository.

Citation

If you use Toto 2.0 in your research or work, please cite:

@misc{khwaja2026toto20timeseries,
title={Toto 2.0: Time Series Forecasting Enters the Scaling Era}, author={Emaad Khwaja and Chris Lettieri and Gerald Woo and Eden Belouadah and Marc Cenac and Guillaume Jarry and Enguerrand Paquin and Xunyi Zhao and Viktoriya Zhukov and Othmane Abou-Amal and Chenghao Liu and Ameet Talwalkar and David Asker},
year={2026},
eprint={2605.20119},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.20119}, }

For Toto 1.0, see the Toto 1.0 citation.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License - see LICENSE file for details.

This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2025-2026 Datadog, Inc.

Contributing

We welcome contributions! Please check out our contributing guidelines to get started.

About

Time-Series-Optimized Transformer for Observability

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - TimeCopilot/toto: Time-Series-Optimized Transformer for Observability · GitHub
Skip to content

Repository files navigation

Toto - Time Series Optimized Transformer for Observability

Toto 2.0: Technical Report | Blog | Model Weights

Toto 1.0: Paper | Blog | Model Card

Toto is a foundation model for multivariate time series forecasting with a focus on observability metrics. Toto 2.0 is the current recommended release, featuring a family of u-μP-scaled models ranging from 4m to 2.5B parameters.

This repository also hosts the code for evaluating time series models on BOOM (Benchmark of Observability Metrics), a large-scale forecasting dataset composed of real-world observability data.

Updates

  • [Apr 2026] 🎉 Toto 2.0 released — five model sizes from 4m to 2.5B parameters.
  • [Feb 2026] Fine-tuning support added to Toto 1.0 (training script, configs, and tutorial notebook).
  • [Feb 2026] Exogenous covariate support added to Toto 1.0 for fine-tuning and inference.

Table of Contents

Toto 2.0

Toto 2.0 is the latest generation, featuring a u-μP-scaled transformer with alternating time/variate attention and quantile-based probabilistic forecasting.

Note: Fine-tuning and exogenous variable (EV) support are planned for a future 2.0 release but not yet available. If you need these features today, use Toto 1.0.

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series.
  • State-of-the-Art Performance: Achieves top scores on diverse benchmarks, including the multi-domain GIFT-Eval benchmark and our observability-focused BOOM benchmark.
  • Multi-Variate Support: Efficiently process multiple variables using alternating time/variate attention.
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates via a quantile head.
  • High-Dimensional Support: Handle time series with a large number of variables efficiently.
  • Decoder-Only Architecture: Supports variable prediction horizons and context lengths.

Inference tips for forecast():

  • decode_block_size selects the decoding strategy:
    • None (single forward pass): faster, better for short-term accuracy. Used for all leaderboard results.
    • e.g. 768 (block decode): better long-term stability for horizons ≳1000. Default in the quick start and notebooks.
  • has_missing_values=False (when your context has no gaps) enables Flash Attention kernels for a meaningful speedup. Leave as True (default) if target_mask contains any False entries.

Model Weights

CheckpointParameters
Toto-2.0-4m4m
Toto-2.0-22m22m
Toto-2.0-313m313m
Toto-2.0-1B1B
Toto-2.0-2.5B2.5B

Installation

Install Toto 2.0 (requires Python 3.12+):

pip install toto-models

Quick Start

importtorchfromtoto2importToto2Modelmodel=Toto2Model.from_pretrained("Datadog/Toto-2.0-22m")
device=torch.device("cuda"iftorch.cuda.is_available() else"cpu")
model=model.to(device).eval()
# (batch, n_variates, time_steps)target=torch.randn(1, 1, 512, device=device)
target_mask=torch.ones_like(target, dtype=torch.bool)
series_ids=torch.zeros(1, 1, dtype=torch.long, device=device)
# Returns quantiles of shape (9, batch, n_variates, horizon)# Quantile levels: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]quantiles=model.forecast(
{"target": target, "target_mask": target_mask, "series_ids": series_ids},
horizon=96,
decode_block_size=768,
has_missing_values=False,
)

Tutorials

  • Quick Start: Load a model, forecast, plot results, handle missing values and multivariate inputs.
  • GluonTS Integration: Use Toto2GluonTSModel with GluonTS evaluation pipelines and built-in datasets.

Evaluation

Requirements

  • Python 3.12+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

dd-unit-scaling

This repository also includes dd-unit-scaling, a compile-friendly, world-size-aware extension of graphcore-research/unit-scaling. It is used internally by Toto 2.0 to make u-μP work correctly with torch.compile and FSDP2. See the dd-unit-scaling README for details.


Toto 1.0 (Legacy)

Toto 1.0 is the previous generation of Toto. It is still the right choice if you need fine-tuning or exogenous variable support, which are planned for 2.0 but not yet available.

Toto 1.0 Model Card | BOOM Dataset Card

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series
  • State-of-the-Art Performance: Achieves top scores in benchmarks covering diverse time series forecasting tasks. This includes the established multi-domain benchmark GIFT-Eval, as well as our own observability-focused benchmark BOOM.
  • Multi-Variate Support: Efficiently process multiple variables using Proportional Factorized Space-Time Attention
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates using a Student-T mixture model
  • High-Dimensional Support: Handle time series with a large number of variables efficiently
  • Decoder-Only Architecture: Support for variable prediction horizons and context lengths
  • Pre-trained on Massive Data: Trained on over 2 trillion time series data points, the largest pretraining dataset for any open-weights time series foundation model to date.

Model Weights

CheckpointParametersNotes
Toto-Open-Base-1.0151MThe initial open release of Toto. Achieves state-of-the-art performance on both general-purpose and observability-focused benchmarking tasks, as described in our paper.

Installation

# Optional: create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install via pip
pip install toto-ts

Or install as a local editable package (recommended for development or fine-tuning):

cd Toto
pip install -r requirements.txt
pip install -e .

For optimal inference speed, it's recommended to install xformers and flash-attention as well.

Quick Start

importtorchfromtoto.data.util.datasetimportMaskedTimeseriesfromtoto.inference.forecasterimportTotoForecasterfromtoto.model.totoimportToto# Load the pre-trained modeltoto=Toto.from_pretrained('Datadog/Toto-Open-Base-1.0')
toto.to('cuda') # Move to GPU# Optionally compile the model for faster inferencetoto.compile() # Uses Torch's JIT compilation for better performanceforecaster=TotoForecaster(toto.model)
# Prepare your input time series (channels, time_steps)input_series=torch.randn(7, 4096).to('cuda') # Example with 7 variables and 4096 timesteps# Prepare timestamp information (optional, but expected by API; not used by the current model release)timestamp_seconds=torch.zeros(7, 4096).to('cuda')
time_interval_seconds=torch.full((7,), 60*15).to('cuda') # 15-minute intervals# Create a MaskedTimeseries objectinputs=MaskedTimeseries(
series=input_series,
padding_mask=torch.full_like(input_series, True, dtype=torch.bool),
id_mask=torch.zeros_like(input_series),
timestamp_seconds=timestamp_seconds,
time_interval_seconds=time_interval_seconds,
)
# Generate forecasts for the next 336 timestepsforecast=forecaster.forecast(
inputs,
prediction_length=336,
num_samples=256, # Number of samples for probabilistic forecastingsamples_per_batch=256, # Control memory usage during inference
)
# Access resultsmedian_prediction=forecast.median# Point forecastsprediction_samples=forecast.samples# Probabilistic sampleslower_quantile=forecast.quantile(0.1) # 10th percentile for lower confidence boundupper_quantile=forecast.quantile(0.9) # 90th percentile for upper confidence bound

Tutorials

Pre-Training Data

Toto was trained on a massive and diverse mixture of time series datasets:

Observability Data

The largest portion of pretraining data comes from a dataset of approximately 1 trillion time series points collected from Datadog metrics. These metrics are generated from Datadog's monitoring of internal systems, and do not include any customer data. They cover a diverse array of software stacks and types of services, and span wide variety of domains within observability, including application performance, infrastructure, networking, security, databases, and more.

Public Datasets

To improve the performance of Toto on general-purpose time series forecasting across many domains, we include publicly available datasets:

Synthetic Data

To improve robustness, approximately 1/3 of the pretraining data mix consists of synthetically-generated time series.

Evaluation

Toto has been rigorously evaluated on multiple benchmarks, including both general-purpose datasets and observability-focused datasets like BOOM. Below, we provide instructions for reproducing our evaluation results.

LSF Evaluation

To reproduce our results on the LSF datasets, follow these steps:

Downloading the Datasets

The LSF evaluation requires three datasets: ETT, Electricity, and Weather. You can download them from the Time-Series-Library repository. Follow the instructions in the repository to obtain the following already pre-processed datasets:

After downloading, ensure the datasets are placed in the data/lsf_datasets/ directory within the repository, with the following structure:

data/
└── lsf_datasets/
├── ETT-small/
├── electricity/
└── weather/
Running the Evaluation Script

Once the datasets are set up, you can run the LSF evaluation script as follows to reproduce our results:

export CUBLAS_WORKSPACE_CONFIG=:4096:8 # For reproducible GPU resultsexport PYTHONPATH="$(pwd):$(pwd)/toto:$PYTHONPATH"# Add current and "toto" dirs to Python module search path
python toto/evaluation/run_lsf_eval.py \
--datasets ETTh1 \
--context-length 2048 \
--eval-stride 1 \
--checkpoint-path [CHECKPOINT-NAME-OR-DIR]

To see all available options for the evaluation script, you can use the --help flag:

python toto/evaluation/run_lsf_eval.py --help
Expected Results

The script evaluates Toto's performance using Mean Absolute Error (MAE) and Mean Squared Error (MSE) across the specified datasets, context lengths, and prediction lengths. It displays a detailed table of results for each prediction length, along with a summary table that averages the results across prediction lengths for each dataset.

To reproduce the results presented in the paper, use the default arguments while setting --eval-stride 1 and specifying all datasets with --datasets ETTh1 ETTh2 ETTm1 ETTm2 weather electricity.

GIFT-Eval Evaluation

To reproduce our results on the GIFT-Eval benchmark, we provide a dedicated notebook:

BOOM Evaluation

For evaluating Toto on the BOOM (Benchmark of Observability Metrics) dataset, refer to:

Fine-tuning

Toto can be fine-tuned on your own domain-specific datasets to improve performance on specialized forecasting tasks. The fine-tuning pipeline supports both standard time series and datasets with exogenous (known future) variables.

Fine-tuning Tutorial

To fine-tune Toto, use the provided finetuning tutorial, which demonstrates fine-tuning with and without exogenous variables.

To customize the fine-tuning recipe, modify the base configuration in finetune_config.yaml.

By default, the tutorial uses the proenfo_gfc12 dataset from the autogluon/fev_datasets collection.

Custom Datasets

There are two ways to use custom datasets for fine-tuning:

Option A: HuggingFace Dataset with Configuration Dictionary

The simplest approach is to use a HuggingFace datasets.Dataset configured via a dictionary. Modify the prepare_dataset() function in benchmark_finetuning.py to load your data:

custom_dataset= {
"dataset": dataset, # HuggingFace Dataset object"target_fields": ["target"], # List of field names for target variables"target_transform_fns": [...], # Transform functions for each target field"ev_fields": ["temp", "humidity"], # List of exogenous covariate field names"ev_transform_fns": [...], # Transform functions for each exogenous field"dataset_name": "my_dataset", # Name of your custom dataset
}

HuggingFace Dataset Requirements:

Your dataset must contain:

  • timestamp: A 1D array of timestamps for each time series
  • Target fields (e.g., target): Arrays of shape (T,) for each target variable
  • Exogenous fields (optional): Arrays of shape (T,) for each dynamic exogenous variable

The pipeline uses FinetuneDataModule, which internally converts your data into CausalMaskedTimeseries objects (the input format expected by Toto during fine-tuning) via GluonTS transforms.

Option B: Custom PyTorch Dataset and DataModule

For full control over data loading, you can implement your own PyTorch Dataset that returns CausalMaskedTimeseries objects and wrap it in a custom LightningDataModule.

Step 1: Create a Dataset class that returns CausalMaskedTimeseries:

fromtorch.utils.dataimportDatasetfromtoto.data.util.datasetimportCausalMaskedTimeseriesclassMyCustomDataset(Dataset):
...
def__getitem__(self, idx: int) ->CausalMaskedTimeseries:
# Build and return a CausalMaskedTimeseries for this sample# See toto/data/datasets/gluonts_dataset.py for a reference implementation
...

Step 2: Create a custom LightningDataModule:

fromlightningimportLightningDataModulefromtorch.utils.dataimportDataLoaderfromtoto.data.util.helpersimportcollate_causalclassMyFinetuneDataModule(LightningDataModule):
def__init__(self, train_dataset: MyCustomDataset, val_dataset: MyCustomDataset, ...):
...
deftrain_dataloader(self) ->DataLoader:
returnDataLoader(self.train_dataset, collate_fn=collate_causal, ...) # collate_fn is requireddefval_dataloader(self) ->DataLoader:
returnDataLoader(self.val_dataset, collate_fn=collate_causal, ...)

Step 3: Modify finetune_toto.py to use your custom DataModule:

# Replace the get_datamodule() call with your custom DataModuledm=MyFinetuneDataModule(train_dataset, val_dataset, batch_size=16)
_=train(module, dm, config)

Evaluations on FEV Datasets

The benchmark_finetuning.py script evaluates Toto on a subset of FEV datasets that are not included in Toto's pretraining corpus. These datasets contain known exogenous variables, enabling a comparison of three approaches:

  • Zero-shot Toto — No fine-tuning
  • Fine-tuned Toto — Fine-tuned without exogenous variables
  • Fine-tuned Toto with Exogenous Variables — Fine-tuned with known future covariates

Models are evaluated using sliding windows on the test set (10% of each dataset), with context length and horizon configured per FEV task. Results are aggregated using the geometric mean across datasets in aggregate_results.ipynb:

ModelMAEWQLMASE
Toto (zero-shot)6150.2420.1110.632
Toto (fine-tuned)5397.9290.1000.574
Toto (fine-tuned + exogenous)5117.0020.0960.535

Requirements

  • Python 3.10+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

Citation (1.0)

If you use Toto 1.0 in your research, please cite:

@misc{cohen2025timedifferentobservabilityperspective,
title={This Time is Different: An Observability Perspective on Time Series Foundation Models},
author={Ben Cohen and Emaad Khwaja and Youssef Doubli and Salahidine Lemaachi and Chris Lettieri and Charles Masson and Hugo Miccinilli and Elise Ramé and Qiqi Ren and Afshin Rostamizadeh and Jean Ogier du Terrail and Anna-Monica Toon and Kan Wang and Stephan Xie and Zongzhe Xu and Viktoriya Zhukova and David Asker and Ameet Talwalkar and Othmane Abou-Amal},
year={2025},
eprint={2505.14766},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.14766},
}

BOOM (Benchmark of Observability Metrics)

BOOM is used for evaluating both Toto 1.0 and 2.0.

BOOM (Benchmark of Observability Metrics) is a large-scale, real-world time series dataset designed for evaluating models on forecasting tasks in complex observability environments. Composed of real-world metrics data collected from Datadog, a leading observability platform, the benchmark captures the irregularity, structural complexity, and heavy-tailed statistics typical of production observability data. Unlike synthetic or curated benchmarks, BOOM reflects the full diversity and unpredictability of operational signals observed in distributed systems, covering infrastructure, networking, databases, security, and application-level metrics.

Note: the metrics comprising BOOM were generated from internal monitoring of pre-production environments, and do not include any customer data.

For more information on the dataset, including details on its preparation and statistical properties, see the dataset card in Hugging Face.

For example evaluations of different time series models on the BOOM dataset, see the boom folder in this repository.

Citation

If you use Toto 2.0 in your research or work, please cite:

@misc{khwaja2026toto20timeseries,
title={Toto 2.0: Time Series Forecasting Enters the Scaling Era}, author={Emaad Khwaja and Chris Lettieri and Gerald Woo and Eden Belouadah and Marc Cenac and Guillaume Jarry and Enguerrand Paquin and Xunyi Zhao and Viktoriya Zhukov and Othmane Abou-Amal and Chenghao Liu and Ameet Talwalkar and David Asker},
year={2026},
eprint={2605.20119},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.20119}, }

For Toto 1.0, see the Toto 1.0 citation.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License - see LICENSE file for details.

This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2025-2026 Datadog, Inc.

Contributing

We welcome contributions! Please check out our contributing guidelines to get started.

About

Time-Series-Optimized Transformer for Observability

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); GitHub - TimeCopilot/toto: Time-Series-Optimized Transformer for Observability · GitHub
Skip to content

Repository files navigation

Toto - Time Series Optimized Transformer for Observability

Toto 2.0: Technical Report | Blog | Model Weights

Toto 1.0: Paper | Blog | Model Card

Toto is a foundation model for multivariate time series forecasting with a focus on observability metrics. Toto 2.0 is the current recommended release, featuring a family of u-μP-scaled models ranging from 4m to 2.5B parameters.

This repository also hosts the code for evaluating time series models on BOOM (Benchmark of Observability Metrics), a large-scale forecasting dataset composed of real-world observability data.

Updates

  • [Apr 2026] 🎉 Toto 2.0 released — five model sizes from 4m to 2.5B parameters.
  • [Feb 2026] Fine-tuning support added to Toto 1.0 (training script, configs, and tutorial notebook).
  • [Feb 2026] Exogenous covariate support added to Toto 1.0 for fine-tuning and inference.

Table of Contents

Toto 2.0

Toto 2.0 is the latest generation, featuring a u-μP-scaled transformer with alternating time/variate attention and quantile-based probabilistic forecasting.

Note: Fine-tuning and exogenous variable (EV) support are planned for a future 2.0 release but not yet available. If you need these features today, use Toto 1.0.

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series.
  • State-of-the-Art Performance: Achieves top scores on diverse benchmarks, including the multi-domain GIFT-Eval benchmark and our observability-focused BOOM benchmark.
  • Multi-Variate Support: Efficiently process multiple variables using alternating time/variate attention.
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates via a quantile head.
  • High-Dimensional Support: Handle time series with a large number of variables efficiently.
  • Decoder-Only Architecture: Supports variable prediction horizons and context lengths.

Inference tips for forecast():

  • decode_block_size selects the decoding strategy:
    • None (single forward pass): faster, better for short-term accuracy. Used for all leaderboard results.
    • e.g. 768 (block decode): better long-term stability for horizons ≳1000. Default in the quick start and notebooks.
  • has_missing_values=False (when your context has no gaps) enables Flash Attention kernels for a meaningful speedup. Leave as True (default) if target_mask contains any False entries.

Model Weights

CheckpointParameters
Toto-2.0-4m4m
Toto-2.0-22m22m
Toto-2.0-313m313m
Toto-2.0-1B1B
Toto-2.0-2.5B2.5B

Installation

Install Toto 2.0 (requires Python 3.12+):

pip install toto-models

Quick Start

importtorchfromtoto2importToto2Modelmodel=Toto2Model.from_pretrained("Datadog/Toto-2.0-22m")
device=torch.device("cuda"iftorch.cuda.is_available() else"cpu")
model=model.to(device).eval()
# (batch, n_variates, time_steps)target=torch.randn(1, 1, 512, device=device)
target_mask=torch.ones_like(target, dtype=torch.bool)
series_ids=torch.zeros(1, 1, dtype=torch.long, device=device)
# Returns quantiles of shape (9, batch, n_variates, horizon)# Quantile levels: [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]quantiles=model.forecast(
{"target": target, "target_mask": target_mask, "series_ids": series_ids},
horizon=96,
decode_block_size=768,
has_missing_values=False,
)

Tutorials

  • Quick Start: Load a model, forecast, plot results, handle missing values and multivariate inputs.
  • GluonTS Integration: Use Toto2GluonTSModel with GluonTS evaluation pipelines and built-in datasets.

Evaluation

Requirements

  • Python 3.12+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

dd-unit-scaling

This repository also includes dd-unit-scaling, a compile-friendly, world-size-aware extension of graphcore-research/unit-scaling. It is used internally by Toto 2.0 to make u-μP work correctly with torch.compile and FSDP2. See the dd-unit-scaling README for details.


Toto 1.0 (Legacy)

Toto 1.0 is the previous generation of Toto. It is still the right choice if you need fine-tuning or exogenous variable support, which are planned for 2.0 but not yet available.

Toto 1.0 Model Card | BOOM Dataset Card

Features

  • Zero-Shot Forecasting: Perform forecasting without fine-tuning on your specific time series
  • State-of-the-Art Performance: Achieves top scores in benchmarks covering diverse time series forecasting tasks. This includes the established multi-domain benchmark GIFT-Eval, as well as our own observability-focused benchmark BOOM.
  • Multi-Variate Support: Efficiently process multiple variables using Proportional Factorized Space-Time Attention
  • Probabilistic Predictions: Generate both point forecasts and uncertainty estimates using a Student-T mixture model
  • High-Dimensional Support: Handle time series with a large number of variables efficiently
  • Decoder-Only Architecture: Support for variable prediction horizons and context lengths
  • Pre-trained on Massive Data: Trained on over 2 trillion time series data points, the largest pretraining dataset for any open-weights time series foundation model to date.

Model Weights

CheckpointParametersNotes
Toto-Open-Base-1.0151MThe initial open release of Toto. Achieves state-of-the-art performance on both general-purpose and observability-focused benchmarking tasks, as described in our paper.

Installation

# Optional: create a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install via pip
pip install toto-ts

Or install as a local editable package (recommended for development or fine-tuning):

cd Toto
pip install -r requirements.txt
pip install -e .

For optimal inference speed, it's recommended to install xformers and flash-attention as well.

Quick Start

importtorchfromtoto.data.util.datasetimportMaskedTimeseriesfromtoto.inference.forecasterimportTotoForecasterfromtoto.model.totoimportToto# Load the pre-trained modeltoto=Toto.from_pretrained('Datadog/Toto-Open-Base-1.0')
toto.to('cuda') # Move to GPU# Optionally compile the model for faster inferencetoto.compile() # Uses Torch's JIT compilation for better performanceforecaster=TotoForecaster(toto.model)
# Prepare your input time series (channels, time_steps)input_series=torch.randn(7, 4096).to('cuda') # Example with 7 variables and 4096 timesteps# Prepare timestamp information (optional, but expected by API; not used by the current model release)timestamp_seconds=torch.zeros(7, 4096).to('cuda')
time_interval_seconds=torch.full((7,), 60*15).to('cuda') # 15-minute intervals# Create a MaskedTimeseries objectinputs=MaskedTimeseries(
series=input_series,
padding_mask=torch.full_like(input_series, True, dtype=torch.bool),
id_mask=torch.zeros_like(input_series),
timestamp_seconds=timestamp_seconds,
time_interval_seconds=time_interval_seconds,
)
# Generate forecasts for the next 336 timestepsforecast=forecaster.forecast(
inputs,
prediction_length=336,
num_samples=256, # Number of samples for probabilistic forecastingsamples_per_batch=256, # Control memory usage during inference
)
# Access resultsmedian_prediction=forecast.median# Point forecastsprediction_samples=forecast.samples# Probabilistic sampleslower_quantile=forecast.quantile(0.1) # 10th percentile for lower confidence boundupper_quantile=forecast.quantile(0.9) # 90th percentile for upper confidence bound

Tutorials

Pre-Training Data

Toto was trained on a massive and diverse mixture of time series datasets:

Observability Data

The largest portion of pretraining data comes from a dataset of approximately 1 trillion time series points collected from Datadog metrics. These metrics are generated from Datadog's monitoring of internal systems, and do not include any customer data. They cover a diverse array of software stacks and types of services, and span wide variety of domains within observability, including application performance, infrastructure, networking, security, databases, and more.

Public Datasets

To improve the performance of Toto on general-purpose time series forecasting across many domains, we include publicly available datasets:

Synthetic Data

To improve robustness, approximately 1/3 of the pretraining data mix consists of synthetically-generated time series.

Evaluation

Toto has been rigorously evaluated on multiple benchmarks, including both general-purpose datasets and observability-focused datasets like BOOM. Below, we provide instructions for reproducing our evaluation results.

LSF Evaluation

To reproduce our results on the LSF datasets, follow these steps:

Downloading the Datasets

The LSF evaluation requires three datasets: ETT, Electricity, and Weather. You can download them from the Time-Series-Library repository. Follow the instructions in the repository to obtain the following already pre-processed datasets:

After downloading, ensure the datasets are placed in the data/lsf_datasets/ directory within the repository, with the following structure:

data/
└── lsf_datasets/
├── ETT-small/
├── electricity/
└── weather/
Running the Evaluation Script

Once the datasets are set up, you can run the LSF evaluation script as follows to reproduce our results:

export CUBLAS_WORKSPACE_CONFIG=:4096:8 # For reproducible GPU resultsexport PYTHONPATH="$(pwd):$(pwd)/toto:$PYTHONPATH"# Add current and "toto" dirs to Python module search path
python toto/evaluation/run_lsf_eval.py \
--datasets ETTh1 \
--context-length 2048 \
--eval-stride 1 \
--checkpoint-path [CHECKPOINT-NAME-OR-DIR]

To see all available options for the evaluation script, you can use the --help flag:

python toto/evaluation/run_lsf_eval.py --help
Expected Results

The script evaluates Toto's performance using Mean Absolute Error (MAE) and Mean Squared Error (MSE) across the specified datasets, context lengths, and prediction lengths. It displays a detailed table of results for each prediction length, along with a summary table that averages the results across prediction lengths for each dataset.

To reproduce the results presented in the paper, use the default arguments while setting --eval-stride 1 and specifying all datasets with --datasets ETTh1 ETTh2 ETTm1 ETTm2 weather electricity.

GIFT-Eval Evaluation

To reproduce our results on the GIFT-Eval benchmark, we provide a dedicated notebook:

BOOM Evaluation

For evaluating Toto on the BOOM (Benchmark of Observability Metrics) dataset, refer to:

Fine-tuning

Toto can be fine-tuned on your own domain-specific datasets to improve performance on specialized forecasting tasks. The fine-tuning pipeline supports both standard time series and datasets with exogenous (known future) variables.

Fine-tuning Tutorial

To fine-tune Toto, use the provided finetuning tutorial, which demonstrates fine-tuning with and without exogenous variables.

To customize the fine-tuning recipe, modify the base configuration in finetune_config.yaml.

By default, the tutorial uses the proenfo_gfc12 dataset from the autogluon/fev_datasets collection.

Custom Datasets

There are two ways to use custom datasets for fine-tuning:

Option A: HuggingFace Dataset with Configuration Dictionary

The simplest approach is to use a HuggingFace datasets.Dataset configured via a dictionary. Modify the prepare_dataset() function in benchmark_finetuning.py to load your data:

custom_dataset= {
"dataset": dataset, # HuggingFace Dataset object"target_fields": ["target"], # List of field names for target variables"target_transform_fns": [...], # Transform functions for each target field"ev_fields": ["temp", "humidity"], # List of exogenous covariate field names"ev_transform_fns": [...], # Transform functions for each exogenous field"dataset_name": "my_dataset", # Name of your custom dataset
}

HuggingFace Dataset Requirements:

Your dataset must contain:

  • timestamp: A 1D array of timestamps for each time series
  • Target fields (e.g., target): Arrays of shape (T,) for each target variable
  • Exogenous fields (optional): Arrays of shape (T,) for each dynamic exogenous variable

The pipeline uses FinetuneDataModule, which internally converts your data into CausalMaskedTimeseries objects (the input format expected by Toto during fine-tuning) via GluonTS transforms.

Option B: Custom PyTorch Dataset and DataModule

For full control over data loading, you can implement your own PyTorch Dataset that returns CausalMaskedTimeseries objects and wrap it in a custom LightningDataModule.

Step 1: Create a Dataset class that returns CausalMaskedTimeseries:

fromtorch.utils.dataimportDatasetfromtoto.data.util.datasetimportCausalMaskedTimeseriesclassMyCustomDataset(Dataset):
...
def__getitem__(self, idx: int) ->CausalMaskedTimeseries:
# Build and return a CausalMaskedTimeseries for this sample# See toto/data/datasets/gluonts_dataset.py for a reference implementation
...

Step 2: Create a custom LightningDataModule:

fromlightningimportLightningDataModulefromtorch.utils.dataimportDataLoaderfromtoto.data.util.helpersimportcollate_causalclassMyFinetuneDataModule(LightningDataModule):
def__init__(self, train_dataset: MyCustomDataset, val_dataset: MyCustomDataset, ...):
...
deftrain_dataloader(self) ->DataLoader:
returnDataLoader(self.train_dataset, collate_fn=collate_causal, ...) # collate_fn is requireddefval_dataloader(self) ->DataLoader:
returnDataLoader(self.val_dataset, collate_fn=collate_causal, ...)

Step 3: Modify finetune_toto.py to use your custom DataModule:

# Replace the get_datamodule() call with your custom DataModuledm=MyFinetuneDataModule(train_dataset, val_dataset, batch_size=16)
_=train(module, dm, config)

Evaluations on FEV Datasets

The benchmark_finetuning.py script evaluates Toto on a subset of FEV datasets that are not included in Toto's pretraining corpus. These datasets contain known exogenous variables, enabling a comparison of three approaches:

  • Zero-shot Toto — No fine-tuning
  • Fine-tuned Toto — Fine-tuned without exogenous variables
  • Fine-tuned Toto with Exogenous Variables — Fine-tuned with known future covariates

Models are evaluated using sliding windows on the test set (10% of each dataset), with context length and horizon configured per FEV task. Results are aggregated using the geometric mean across datasets in aggregate_results.ipynb:

ModelMAEWQLMASE
Toto (zero-shot)6150.2420.1110.632
Toto (fine-tuned)5397.9290.1000.574
Toto (fine-tuned + exogenous)5117.0020.0960.535

Requirements

  • Python 3.10+
  • PyTorch 2.5+
  • CUDA-capable device (Ampere generation or newer recommended for optimal performance)

Citation (1.0)

If you use Toto 1.0 in your research, please cite:

@misc{cohen2025timedifferentobservabilityperspective,
title={This Time is Different: An Observability Perspective on Time Series Foundation Models},
author={Ben Cohen and Emaad Khwaja and Youssef Doubli and Salahidine Lemaachi and Chris Lettieri and Charles Masson and Hugo Miccinilli and Elise Ramé and Qiqi Ren and Afshin Rostamizadeh and Jean Ogier du Terrail and Anna-Monica Toon and Kan Wang and Stephan Xie and Zongzhe Xu and Viktoriya Zhukova and David Asker and Ameet Talwalkar and Othmane Abou-Amal},
year={2025},
eprint={2505.14766},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.14766},
}

BOOM (Benchmark of Observability Metrics)

BOOM is used for evaluating both Toto 1.0 and 2.0.

BOOM (Benchmark of Observability Metrics) is a large-scale, real-world time series dataset designed for evaluating models on forecasting tasks in complex observability environments. Composed of real-world metrics data collected from Datadog, a leading observability platform, the benchmark captures the irregularity, structural complexity, and heavy-tailed statistics typical of production observability data. Unlike synthetic or curated benchmarks, BOOM reflects the full diversity and unpredictability of operational signals observed in distributed systems, covering infrastructure, networking, databases, security, and application-level metrics.

Note: the metrics comprising BOOM were generated from internal monitoring of pre-production environments, and do not include any customer data.

For more information on the dataset, including details on its preparation and statistical properties, see the dataset card in Hugging Face.

For example evaluations of different time series models on the BOOM dataset, see the boom folder in this repository.

Citation

If you use Toto 2.0 in your research or work, please cite:

@misc{khwaja2026toto20timeseries,
title={Toto 2.0: Time Series Forecasting Enters the Scaling Era}, author={Emaad Khwaja and Chris Lettieri and Gerald Woo and Eden Belouadah and Marc Cenac and Guillaume Jarry and Enguerrand Paquin and Xunyi Zhao and Viktoriya Zhukov and Othmane Abou-Amal and Chenghao Liu and Ameet Talwalkar and David Asker},
year={2026},
eprint={2605.20119},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2605.20119}, }

For Toto 1.0, see the Toto 1.0 citation.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License - see LICENSE file for details.

This product includes software developed at Datadog (https://www.datadoghq.com/) Copyright 2025-2026 Datadog, Inc.

Contributing

We welcome contributions! Please check out our contributing guidelines to get started.

About

Time-Series-Optimized Transformer for Observability

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages