ChronosBolt<T>
Models & Types · AiDotNet.Finance.Forecasting.Foundation
Chronos-Bolt — Fast Non-Autoregressive Time Series Forecasting from the Chronos Family.
Inheritance: NeuralNetworkBase<T> → FinancialModelBase<T> → ForecastingModelBase<T> → TimeSeriesFoundationModelBase<T> → ChronosBolt<T>
For Beginners
Chronos-Bolt is a faster version of the Chronos time series forecasting model from Amazon. While the original Chronos generates predictions one step at a time (like writing a sentence word by word), Chronos-Bolt outputs all predictions at once (like writing the whole sentence in one go). This makes it much faster while still providing probabilistic forecasts that tell you the range of likely future values.
How It Works
Chronos-Bolt uses an encoder-decoder architecture with direct quantile forecasting (non-autoregressive), making it significantly faster than autoregressive Chronos v1/v2. The encoder processes the input context and the decoder directly outputs all forecast quantiles in a single forward pass without iterative generation.
Reference: Part of Amazon Chronos family, Nov 2024.
Example
// Create a Chronos-Bolt for fast non-autoregressive time series forecasting
// Outputs all forecast quantiles in a single forward pass instead of iterative generation
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.OneDimensional,
taskType: NeuralNetworkTaskType.Regression,
inputHeight: 512, inputWidth: 1, inputDepth: 1, outputSize: 24);
// Training mode with direct quantile forecasting
var model = new ChronosBolt<double>(architecture);
// ONNX inference mode with pre-trained model
var onnxModel = new ChronosBolt<double>(architecture, "chronos_bolt.onnx");
Constructors
| Constructor | Summary |
|---|---|
ChronosBolt(NeuralNetworkArchitecture<T> architecture, ChronosBoltOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) |
Creates a Chronos-Bolt model in native mode. |
ChronosBolt(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, ChronosBoltOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) |
Creates a Chronos-Bolt model using a pretrained ONNX model. |
Properties
| Property | Summary |
|---|---|
FoundationModelSize ModelSize { get; } |
|
bool IsChannelIndependent { get; } |
|
bool SupportsTraining { get; } |
|
bool UseNativeMode { get; } |
|
int MaxContextLength { get; } |
|
int MaxPredictionHorizon { get; } |
|
int NumFeatures { get; } |
|
int PatchSize { get; } |
|
int PredictionHorizon { get; } |
|
int SequenceLength { get; } |
|
int Stride { get; } |
Methods
| Method | Summary |
|---|---|
Dictionary<string, T> Evaluate(Tensor<T> predictions, Tensor<T> actuals) |
|
Dictionary<string, T> GetFinancialMetrics() |
|
Dictionary<string, Tensor<T>> GetNamedLayerActivations(Tensor<T> input) |
|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> ApplyInstanceNormalization(Tensor<T> input) |
|
Tensor<T> AutoregressiveForecast(Tensor<T> input, int steps) |
|
Tensor<T> ForwardForTraining(Tensor<T> input) |
Tape-aware training forward. |
void SetTrainingMode(bool isTraining) |