Moirai
By Salesforce
Moirai is a time-series forecasting foundation model developed by Salesforce AI Research that is pretrained on a large, diverse collection of time series spanning many domains and frequencies, allowing it to generate accurate forecasts for…
Definition
Moirai is a time-series forecasting foundation model developed by Salesforce AI Research that is pretrained on a large, diverse collection of time series spanning many domains and frequencies, allowing it to generate accurate forecasts for new series without dataset-specific training. It is designed to handle time series with varying numbers of variables and observation frequencies within a single unified architecture.
Overview
Forecasting practitioners historically had to build or select a different model for each combination of data frequency, number of variables, and domain, since classical statistical methods and most neural forecasters are tuned to a fixed input shape. Moirai addresses this by pretraining a single transformer-based model on a very large, heterogeneous corpus spanning energy, finance, retail, weather, and other domains, so that one set of weights can generalize across series with different characteristics. Mechanically, Moirai uses a masked-encoder transformer architecture paired with a flexible patching scheme that groups consecutive time steps into patches whose size adapts to the series' sampling frequency, which lets the same model ingest hourly, daily, or monthly data without architectural changes. It also supports multivariate series through a mechanism that lets attention operate across variables as well as across time, and it outputs a full probability distribution over future values via a mixture-distribution output head rather than a single point forecast. Among pretrained time-series foundation models, Moirai is typically compared with Amazon's Chronos and Nixtla's TimeGPT; its differentiator is the explicit design for variable input frequency and multivariate series within one architecture, rather than treating each series as an independent univariate sequence. This makes it a closer fit for datasets where several correlated signals need to be forecast jointly. In practice, teams apply Moirai to get zero-shot forecasts across heterogeneous datasets, such as multiple product lines or sensor arrays sampled at different rates, without retraining a separate model per series, and they may fine-tune it on a specific domain corpus when zero-shot accuracy needs improvement. Its openly released weights and accompanying benchmark suite make it straightforward to evaluate against existing pipelines. A key trade-off is that the flexibility to handle arbitrary frequencies and multivariate inputs adds architectural and inference complexity compared to a narrowly scoped univariate model, and zero-shot accuracy, though strong on the benchmark domains used during evaluation, can still be surpassed by a well-tuned model built specifically for a narrow, well-understood forecasting problem. Choosing Moirai over a bespoke model makes the most sense when the value of avoiding per-dataset training outweighs the marginal accuracy a specialized model might offer. Interpreting Moirai's mixture-distribution output also requires more statistical familiarity than reading a single point forecast, which can add friction for teams accustomed to simpler forecasting tools that report a single number per period. Choosing an appropriate patch size and evaluation window for a new domain can likewise take some experimentation, since the model's default settings are tuned to perform well across the benchmark domains rather than any one narrow use case.
Key Concepts
- Single transformer architecture handles multiple time-series frequencies
- Supports multivariate series through cross-variable attention
- Pretrained on a large, heterogeneous corpus spanning many domains
- Adaptive patching scheme adjusts to a series' sampling rate
- Outputs full probabilistic forecasts via a mixture-distribution head
- Zero-shot forecasting without dataset-specific retraining
- Openly released model weights and benchmark evaluation suite
- Available in multiple parameter-size variants