Bantham-4.7M
A small probabilistic forecaster for engineering and physical time series, from digiLab.
The larger member of the v0 set. With its pre-trained guide it is ahead of Timestral-28M, a foundation model six times its size, on real engineering data, in a graph of 20.2 MB.
Bantham forecasts several channels of one asset at once: the targets, measurements seen only in the past, and inputs known in advance such as a setpoint, a schedule or a flight plan. It returns joint sample paths and quantiles in the series' own units, inside the physical bounds you give it, so the probability of an event and when it is likely to happen can be read straight from the forecast. It runs on a CPU through ONNX Runtime, with no PyTorch.
- Code and docs: github.com/digiLab-ai/bantham
- Install:
pip install "bantham[hub]" - Licence: Apache-2.0, code and weights
- Report: Bantham: a set of small probabilistic forecasters for engineering time series (arXiv link to follow)
- The other member of the set: digiLab-ai/bantham-1.2M. Bantham-1.2M is two to three times faster on a CPU and a third of the size.
Use
import bantham
from bantham.events import above
model = bantham.Forecaster.from_pretrained("digiLab-ai/bantham-4.7M")
fc = model.forecast(context, prediction_length=64, # context (B, V, T), NaN where missing
known_covariates=schedule, # (B, Ck, T + 64) known over the horizon
floor=0.0) # no path or quantile goes below it
fc.paths # (B, 128, V, 64) joint sample paths
fc.median, fc.interval(0.9) # the central forecast and a 90% band
hot = above(0, 80.0)
fc.prob(hot) # P(above 80 at some step)
fc.prob(hot.for_at_least(6)) # ... for six consecutive steps
fc.prob_by(hot) # (B, 64) P(it has happened by step h)
The quickstart, input preparation from arrays or a DataFrame, events, hard constraints and the maximum-entropy tilt are documented in the GitHub repository.
Files
| File | Size | What it is |
|---|---|---|
bantham-4.7M-guided.onnx |
20.2 MB | The model with its pre-trained guide inside the graph. Loaded by default. |
bantham-4.7M.onnx |
19.4 MB | The backbone alone. About twice as fast. Also used to roll a guided forecast out past 64 steps. |
bantham-4.7M-guided.config.json, bantham-4.7M.config.json |
1 kB | Each graph's spec as JSON, for tooling that cannot read ONNX metadata. |
model = bantham.Forecaster.from_pretrained("digiLab-ai/bantham-4.7M") # guided
model = bantham.Forecaster.from_pretrained("digiLab-ai/bantham-4.7M", guided=False) # backbone only
Both graphs take the same inputs and can be served from any ONNX Runtime binding; the inputs and outputs are a documented contract (docs/onnx-contract.md).
SHA-256:
39eb50cbdf37e5703237d2d1ff47814438d7747cee3e63f6a724d3fd4fd05c50 bantham-4.7M-guided.onnx
4a98a36cd11b6c1cf49fe70f0bf306b6b36243b2d72f5c8f87e583bcb73f560a bantham-4.7M.onnx
The model
| Parameters | 4,696,650; the guide adds 12,694 |
| Context | up to 512 steps |
| Horizon | 64 steps in one pass; longer horizons roll each path forward |
| Channels | up to 32 in a window: targets, past-only inputs and known-future inputs |
| Outputs | joint sample paths (128 by default) and quantiles at eleven levels (0.05, 0.1, 0.2, …, 0.9, 0.95) |
| Bounds | a floor and a ceiling per target, enforced inside the graph on every path and quantile |
| Missing values | NaN in the history is read as a gap |
| Runtime | ONNX Runtime on a CPU |
The backbone is a compact transformer with a recursive decoder. It serves quantiles and a path lane from the same weights; the path lane draws whole joint futures, every target at every step, from one draw of noise.
The guide. A network of about 6,000 parameters per lane sits outside the frozen
backbone. It looks at how the backbone and four simple strategies (a fit on the planned
inputs, a seasonal copy, a straight-line drift, the last observed value) would have done
on the window's own recent past, then moves the centre of the forecast towards what that
evidence supports and sets its spread. The guided graph also returns what the guide
decided (fc.guide_weights, fc.guide_spread). A window whose targets have fewer than
128 steps of history is returned unguided.
Every window is put on its own scale per channel before the model sees it and mapped
back afterwards. The graphs declare the map they were trained with (scaling = v0) and
the package applies it without being told.
Training data
Bantham is trained on a broad sweep of engineering problems: measured records from machines, batteries, water, wind, power systems and buildings; physics-based simulators with randomised parameters and inputs; and synthetic series passed through a model of what sensors do to a signal. Training also draws on a distillation signal from Chronos-2, an openly licensed model. Only sources whose licences permit training and the redistribution of weights are used. Public benchmark collections are not in the training data.
Evaluation
48 test sets of real engineering data (turbomachinery and process plant, batteries, water, wind, power systems and buildings), scored on identical windows for every model. Test windows come from later periods or from units the model has not seen. Accuracy is CRPS relative to Timestral-5M, averaged geometrically over the sets; lower is better. Single runs.
| CRPS, 48 real sets | |
|---|---|
| Bantham-4.7M, backbone | ×0.905 |
| Bantham-4.7M with its pre-trained guide, on datasets the guide has not seen | ×0.883 |
| Bantham-4.7M with a guide fitted to the asset (not part of this release) | ×0.876 |
| Timestral-5M (5.2M parameters) | ×1.000 |
| Timestral-28M | ×0.910 |
The sample paths of the backbone, on the same 48 sets:
| Values inside the physical bounds | 100% on every set |
| 90% interval of the paths: share of outcomes covered | median 90.4%; between 85% and 95% on 43 of 48 sets |
| Variogram score (how well values hang together across steps and channels), relative to Timestral-5M | ×0.754 |
The full comparison, the figures and a worked example are in the report.
Speed and footprint
One 64-step forecast of one window with 32 paths, ONNX Runtime on one CPU thread (AMD EPYC 9554), graph only:
| Single signal | Nine channels, two targets | |
|---|---|---|
| Guided | 118 ms | 0.56 s |
| Backbone only | 60 ms | 0.28 s |
The cost follows the number of channels and the number of paths. Through the package, a forecasting process peaks at about 0.4 GB of memory for the guided graph and about 0.3 GB for the backbone alone. Loading takes a few seconds: on a two-core cloud machine, about 1.5 s for the backbone and about 6 s for the guided graph with its companion.
Intended use and limits
Bantham is built for driven, bounded, multichannel physical systems: sensors on assets, process variables, environmental measurements, sampled on a regular grid.
- It is not a general-purpose forecaster. Series with no physical process behind them, such as retail sales or web traffic, are not well represented in its training; use a general-purpose model for those. It is also less well calibrated on kinds of data it has not seen.
- It is zero-shot: it has not seen your asset. Score it on your own record before you
rely on it (
bantham.backtest_windows). - It reads 512 steps of history and forecasts 64 in one pass. Past 64 steps the paths are rolled out with the backbone, and the guide acts on the first 64 only.
- A window carries at most 32 channels.
- It does not read timestamps, holidays or text. The calendar reaches it only as a known-future input.
- The bounds and coverage figures above are measured on the backbone's paths; the guided paths are scored for accuracy and respect the same bounds by construction.
- It should not be the only thing between a forecast and a safety decision.
Fitting a guide to your own asset, fine-tuning, and assured deployment are available from digiLab through the Uncertainty Engine.
Citation
@techreport{bantham2026v0,
title = {Bantham: a set of small probabilistic forecasters for engineering time series},
author = {Corbett, A. and Dodwell, T. and Van den Elsen, C.},
institution = {digiLab},
year = {2026},
month = dec,
url = {https://github.com/digiLab-ai/bantham}
}