MOIRAIOptions<T>
Options & Configuration · AiDotNet.Models.Options
Configuration options for MOIRAI (Salesforce’s Universal Time Series Foundation Model).
Inheritance: ModelOptions → RegressionOptions<T> → TimeSeriesRegressionOptions<T> → MOIRAIOptions<T>
For Beginners
MOIRAI is designed to be a truly universal time series model:
Key Innovations:
- Multi-patch embeddings: Uses multiple patch sizes simultaneously
- Any-variate forecasting: Handles univariate and multivariate series
- Distribution mixture outputs: Combines multiple distributions for flexibility
- Unified masked encoder: Single architecture for all forecasting tasks
Architecture:
- Multi-scale patching: Creates tokens at different time scales
- Masked encoder: Transformer encoder with masking
- Distribution head: Outputs mixture of distributions
- Any-to-any: Can predict any horizon from any context
Model Sizes:
- Small: Lightweight (parameters: ~14M)
- Base: Balanced (parameters: ~91M)
- Large: Maximum capacity (parameters: ~311M)
How It Works
MOIRAI (Masked EncOder-based UnIveRsAl TIme Series Foundation Model) is Salesforce’s foundation model for universal time series forecasting. It uses masked encoder-based training with multiple patches to handle any-to-any forecasting across different frequencies and domains without fine-tuning.
Reference: Woo et al., “Unified Training of Universal Time Series Forecasting Transformers”, 2024.
https://arxiv.org/abs/2402.02592
Constructors
| Constructor | Summary |
|---|---|
MOIRAIOptions() |
Initializes a new instance of the MOIRAIOptions class with default values. |
MOIRAIOptions(MOIRAIOptions<T> other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
FoundationModelSize ModelSize { get; set; } |
Gets or sets the model size variant. |
bool UseDecoderOnly { get; set; } |
Gets or sets whether to use the decoder-only architecture (Moirai 2.0 default). |
double DropoutRate { get; set; } |
Gets or sets the dropout rate for regularization. |
double MaskRatio { get; set; } |
Gets or sets the mask ratio for training. |
int ContextLength { get; set; } |
Gets or sets the context length (input sequence length). |
int ForecastHorizon { get; set; } |
Gets or sets the forecast horizon (prediction length). |
int HiddenDimension { get; set; } |
Gets or sets the hidden dimension of the transformer. |
int IntermediateSize { get; set; } |
Gets or sets the intermediate size for the feed-forward network. |
int MultiTokenSteps { get; set; } |
Gets or sets the number of multi-token prediction steps for Moirai 2.0. |
int NumHeads { get; set; } |
Gets or sets the number of attention heads. |
int NumLayers { get; set; } |
Gets or sets the number of transformer layers. |
int NumMixtures { get; set; } |
Gets or sets the number of mixture components for distribution output. |
int NumQuantiles { get; set; } |
Gets or sets the number of quantiles for Moirai 2.0 quantile forecasting. |
int PatchSize { get; set; } |
Gets or sets the unified patch size for Moirai 2.0. |
int[] PatchSizes { get; set; } |
Gets or sets the patch sizes for multi-scale patching. |