
Weekly Rossmann sales. The FEV backbone and adapter use 26 weeks of history, with store opening, promotion and holiday information available over the next 13 weeks. Shading spans q0.2–q0.8 and q0.1–q0.9.
Quick start
Install the Tafsut 0.2.0 inference package from its source checkout with python -m pip install .. To run offline, replace the Hub IDs below with local model directories. Package source
import torch
from tafsut import TafsutAdapter, TafsutModel, forecast
model = TafsutModel.from_pretrained("Tafsut-FM/tafsut-fev", device="cpu")
adapter = TafsutAdapter.from_pretrained("Tafsut-FM/tafsut-adapter", device="cpu")
time = torch.arange(192, dtype=torch.float32)
weekday = time.remainder(7)
history = 20 + 2 * torch.sin(time / 7) + weekday
future_weekday = torch.arange(192, 216, dtype=torch.float32).remainder(7)
pred = forecast(model, history, horizon=24, adapter=adapter,
past_covariates=weekday, future_covariates=future_weekday)
print(pred.shape) # (1, 24, 9)
Model details
The adapter was trained on the FEV source corpus with synthetic relationship drivers. The single weight file includes the three-quantile covariate model and the learned spacing for the six intermediate deciles.
The adapter has 50.3M parameters and accepts up to 16 covariates and 8,192 history steps. Pass the last observations before the forecast origin as past covariates and only known values as future covariates. Batched arrays use (batch, channels, time) with stable channel order. NaN marks unknown values. The paired FEV backbone can use up to 32,768 history steps.
Forecasts use the original target units. The output shape is (batch, horizon, 9), ordered from q0.1 through q0.9. Index 4 is the median.
Use a different backbone
Supply your model’s quantile forecasts in original units, shaped (batch, horizon, quantiles). The example below uses empirical deciles from the history above as a target-only forecast. Replace prior with your model's output.
levels = [i / 10 for i in range(1, 10)]
prior = torch.nanquantile(history, history.new_tensor(levels)).expand(24, -1)
pred = adapter.refine(
history, prior, quantile_levels=levels,
past_covariates=weekday, future_covariates=future_weekday,
)
With all nine deciles, the adapter uses learned spacing. With q0.1, q0.5, and q0.9, it refines the three anchors and linearly interpolates the other six deciles. Set mode="anchors" to use the TiRex-2 transfer protocol when a model supplies all nine. Point-only inputs need a predictive distribution to supply those anchors. The external forecast defines the horizon, from 1 to 1,024 steps. The inference package also accepts a Python forecast callback. Package examples
The release interface was tested with TiRex-2, Chronos-2, t0-beta, Toto 2.0 313M, TiRex, TimesFM 2.5, and Granite PatchTST-FM-r2. On four FEV series-windows per backbone, both modes matched their reference outputs exactly.
Evaluation and limitations
The evaluated Tafsut-FEV system uses this adapter on the 42 FEV-Bench tasks with dynamic covariates and the backbone alone on the other 58. Across all 100 tasks and 235,039 forecast windows it obtains 36.43% MASE skill and 47.77% SQL skill. The combined scores apply to the entire system. Forecast calibration depends on the application and forecast horizon.
Files and license
Load this directory as a unit. config.json describes the architecture and model.safetensors contains its inference weights. Verify the weight file with sha256sum -c SHA256SUMS. The weights use the MIT license. License