MTST — RTE Day-Ahead Electricity Consumption Forecasting

A pretrained Multi-Resolution Time Series Transformer (MTST) for French electricity consumption day-ahead forecasting, trained to correct the residual error of an existing RTE day-ahead forecast.

This checkpoint uses the open-source Python library mtst-forecasting. Its predictions are forecast residuals, not electricity consumption directly:

load^t=RTE_forecastt+residual^t. \widehat{\mathrm{load}}_{t} = \mathrm{RTE\_forecast}_{t} + \widehat{\mathrm{residual}}_{t}.

Intended use

  • Forecast electricity demand in France, using the same RTE-related inputs and engineered features used during training.
  • Run inference without retraining, or use the checkpoint as a starting point for further experiments.
  • This is not a general-purpose forecasting foundation model.

Important: Users must provide the full set of engineered features at prediction time. In particular, the RTE forecast input must already be available when the forecast is issued. Do not supply realized future consumption or other future information unavailable at forecast time. The model may not generalize beyond the training distribution.

Repository files

File Purpose
model.pt PyTorch state dictionary and MTST architecture configuration
scaler_X.joblib Fitted input normalizer
scaler_y.joblib Fitted residual-target normalizer
features.json Exact expected feature names and order
inference.py CPU/MPS/CUDA inference CLI and Python function
tests/test_inference.py Smoke, shape, and error-handling tests

Installation

pip install 'mtst-forecasting>=0.3.0' numpy pandas scikit-learn joblib torch pytest

Download the repository files together, for example using huggingface_hub.snapshot_download() once the model has been uploaded. Only load .pt and .joblib files from a trusted repository.

Inference on a new day

Prepare a CSV containing 24 rows, ordered by local hour, and one column for each name in features.json, holding the original, unscaled engineered feature values. An optional timestamp column will be propagated to the output. The rte_forecast_d1_mw_disp column must be in MW.

The same feature engineering, units, missing-value handling, and calendar conventions as training are required. The scalers are loaded from disk, not fitted on inference data.

python inference.py --model-dir . --csv day_features.csv --output forecast.csv --device cpu

Or from Python:

import pandas as pd
from inference import forecast_day

result = forecast_day(pd.read_csv('day_features.csv'), model_dir='.', device='cpu')
print(result[['rte_forecast_mw', 'predicted_residual_mw', 'mtst_forecast_mw']])

The output contains the RTE reference, predicted residual (MW), and corrected MTST forecast (MW), one per hour.

Daylight saving time: Some Europe/Paris calendar days have 23 or 25 actual hours. The original training dataset mapped these into 24 local-hour slots and retained the second occurrence of duplicated autumn hour 02:00; missing hours were masked. inference.py deliberately requires 24 complete, finite rows and does not implement DST or raw-data feature engineering automatically. Prepare the 24-hour grid upstream. Do not treat a missing-hour zero as a valid observation.

Architecture and training

  • Multi-resolution transformer branches with configurable temporal resolutions.
  • 24 hourly input positions and a 24-hour residual forecast output.
  • The supplied checkpoint configuration is stored in model.pt (embedding dimension, head count, layer count, dropout and positional encoding).
  • The Python package provides the architecture and training/inference APIs. This repository provides one specialized fitted instance.

Evaluation and limitations

Evaluate against RTE on a strictly chronological, held-out test set, reporting MAE (MW), RMSE (MW), MAPE (%), R², and—if intervals are calibrated independently—interval coverage and width.

Add the final test-set results here before public release. Validation metrics are not a substitute for held-out test performance. Empirically calibrated intervals are not produced directly by the point-forecast Transformer and their 95% nominal coverage is not guaranteed under distribution shift.

Known limitations include dependence on RTE baseline forecasts, exact feature engineering, French-demand distribution, future-feature availability, and DST/missing-hour handling. Validate any deployment under real-world operational conditions.

Reproducibility

The checkpoint, both fitted scalers, and features.json must be distributed together. To reproduce forecasts, use the matching mtst-forecasting package version and the same feature generation pipeline as training. It is recommended to record the training-period dates, dataset provenance, license/usage rights, and measured test-set performance here before public publication.

Attribution

  • Model/package: MTST Forecasting, Alexandro Bizeul.
  • Domain data and RTE forecasts: cite the specific RTE data source(s) actually used in the project and respect their licensing requirements.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support