Zero-shot probabilistic forecasts across real-world time series.
Give the model a history of scalar observations and a horizon; it returns nine forecast quantiles (q0.1 through q0.9) for every future time step. That gives you a median forecast and an estimate of its uncertainty.
No manual download needed. The tafsut package fetches and caches these weights for you. Don't clone this repository or download model.safetensors by hand.
Zero-shot
Probabilistic
Long context
No retraining or per-series fine-tuning.
Nine quantiles per step, not a point estimate.
Up to 32,768 observations, handled as temporal patches.
Tafsut Univariate Base is a univariate backbone patch-based transformer encoder for probabilistic forecasting.
Univariate. One channel of scalar observations per series; batches of independent series can be forecast together.
Zero-shot. Intended for direct use on new series, with no retraining or per-series fine-tuning.
Temporal patches. Observations are grouped into non-overlapping patches of 32 steps and embedded into the hidden dimension, so a full context becomes 32,768 / 32 = 1,024 patches — far cheaper than attending over every scalar value.
Transformer encoder. 14 blocks, each running RMS-style normalization → multi-head self-attention with rotary positional embeddings → residual, then normalization → feed-forward → residual. Attention uses torch.nn.functional.scaled_dot_product_attention where the installed PyTorch supports it, with an eager fallback.
Normalization. Per-series parameters computed from the visible context, with an arcsinh-based transformation enabled. Forecasts are mapped back to the original data scale before return — so pass raw values rather than standardizing each series yourself.
Probabilistic output. The model projects to nine quantiles rather than one deterministic value.
`model.safetensors` is roughly 421 MB, consistent with ~105M float32 parameters.
Benchmark performance
Evaluated on GIFT-Eval 23 datasets, 144,000 time series, 177M data points, 7 domains, 10 frequencies, and short- to long-term horizons across Econ/Fin, Energy, Healthcare, Nature, Sales, Transport, and Web/CloudOps.
GIFT-Eval benchmark results for Tafsut
Among the twelve models compared here, Tafsut places 3rd on CRPS (0.481) and 4th on MASE (0.693) at 105M parameters — ahead of several entries one to two orders of magnitude larger. Lower is better on both metrics.
For one series and a 128-step horizon, forecast() returns (1, 128, 9) — (batch, horizon, quantile).
Want
Index
Quantile
Median forecast
prediction[..., 4]
0.5
Lower bound
prediction[..., 0]
0.1
Upper bound
prediction[..., 8]
0.9
q0.1–q0.9 spans a nominal 80% forecast interval. In library code, look the index up from model.cfg.quantiles instead of hard-coding it.
Any horizon. The output patch size is 32, but forecast() accepts arbitrary positive horizons: it forecasts in blocks and extends the context with the median forecast when more horizon is needed. No manual loop required.
Missing values
Encode gaps as np.nan and the validity mask is derived from the finite observations:
forecast() accepts a numpy.ndarray or torch.Tensor of shape (T,) for one series or (B, T) for a batch, converts values to float32, and truncates over-long contexts to the most recent 32,768 observations.
python
1model = TafsutModel.from_pretrained(2"Tafsut-FM/tafsut-univariate-base",3 device="cuda",# or "cpu"4)
Without an explicit device, the loader uses CUDA when PyTorch reports it available, otherwise CPU. It also accepts revision=, token=, cache_dir= and local_files_only=, and caches downloads through the standard Hugging Face cache.
forecast() currently returns its tensor on CPU. Validate with PyTorch:
The plot shows observed history, the forecast origin, the median prediction, central quantile bands, and optional observed future values. save_forecast_plot writes a figure directly to a file.
Limitations
Univariate only. This release is a univarite backbone with no covariates, exogenous variables, or cross-series structure.
Bounded context. Inputs beyond 32,768 steps are truncated to their most recent portion.
Extended horizons. Past the configured prediction length of 1,024, forecasts are produced by feeding the median back as context, so they are conditioned on the model's own median continuation.
Inference-focused release. Training scripts, optimizer and scheduler state, and training checkpoint metadata are not included.
Benchmark scope. The results above cover GIFT-Eval only, against the twelve models compared, at a single point in time.
Training data and methodology
The model was trained in two stages:
Synthetic pretraining: approximately 40 million in-house generated synthetic time series.
Real-world post-training: approximately 30 million real-world time series drawn from the GIFT-Eval pretraining corpus and the Chronos pretraining dataset.
To prevent benchmark contamination, any time series overlapping with the evaluation benchmark were excluded from the training data.
License
This project is released under the MIT License. The full license is available in the LICENSE file and is reproduced below for convenience:
text
1MIT License
23Copyright (c) 2026 Tafsut-FM
45Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
1112The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
1415THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.