BharatTS-Large
Licence: CC BY-NC-SA 4.0 — research and non-commercial use only; derivatives must be shared under the same licence. Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai
Access is approved automatically when the email you enter matches your Hugging Face account email and belongs to the organisation you name; other requests are reviewed manually.
A probabilistic forecaster for Indian open government time series (data.gov.in, NITI Aayog NDAP and other government portals): daily, weekly, monthly, quarterly and yearly series such as mandi prices, HMIS health indicators, rainfall, reservoir levels, crop yields and scheme statistics. It is one model with one entry point. Inside, a gate weighs a set of expert forecasters for each series, the way a mixture-of-experts layer does: eight Chronos-2 experts fine-tuned on BharatTS-Corpus, the base Chronos-2 and TimesFM-2.5 models, and statistical forecasters. You never pick components.
Headline result: on held-out series it never saw in training, every BharatTS-Large variant beats Chronos-2, TimesFM-2.5 and seasonal-naive on overall WQL.
Held-out series, overall WQL (lower is better; n = 8,349)
| Model | WQL | GM-MASE vs seasonal-naive |
|---|---|---|
| BharatTS-Large v1 (frequency route) | 0.171 | 0.665 |
| BharatTS-Large distilled (single checkpoint) | 0.175 | 0.662 |
| BharatTS-Large v2 (full gate, default) | 0.184 | 0.670 |
| Chronos-2 | 0.207 | 0.716 |
| TimesFM-2.5 | 0.257 | 0.715 |
| Seasonal-naive | 0.246 | 1.000 |
This release ships the v2 gate (router.json version 2) as the default and the distilled single-checkpoint variant.
Base models: amazon/chronos-2 (Apache-2.0) and google/timesfm-2.5-200m-pytorch (Apache-2.0, bundled unmodified). Their notices are kept in NOTICE.
Quickstart
hf download judicialmind/BharatTS-Large --local-dir BharatTS-Large # gated: accept the terms, then `hf auth login`
pip install -r BharatTS-Large/requirements.txt
import sys
sys.path.insert(0, "BharatTS-Large") # folder with the downloaded repo (bharatts_large.py lives there)
import numpy as np
from bharatts_large import BharatTSLarge
m = BharatTSLarge.from_pretrained("BharatTS-Large") # local folder, or the Hub id "judicialmind/BharatTS-Large"
t = np.arange(72)
monthly = 100 + 10 * np.sin(2 * np.pi * t / 12) + 0.5 * t # 6 years of monthly values, oldest first
monthly[30] = np.nan # missing values are allowed
yearly = np.array([52.0, 55.1, 57.9, 61.2, 60.4, 64.8, 68.0, 71.3])
q = m.predict([monthly, monthly * 2], freq="M") # default horizon for M is 6
print(q.shape) # (2, 6, 9): series x horizon x quantiles 0.1..0.9
print(np.round(q[0, :, 4], 1)) # median forecast of series 0
q = m.predict([yearly], freq="Y", horizon=5, quantiles=[0.05, 0.5, 0.95])
print(q.shape) # (1, 5, 3)
print(np.round(q[0], 1)) # rows = years ahead, columns = 5% / 50% / 95%
Output (CPU): the first forecast has shape (2, 6, 9) (series × horizon × quantiles) and the second (1, 5, 3).
Median monthly forecast, series 0
| Months ahead | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Median | 135.6 | 141.5 | 146.0 | 147.8 | 147.2 | 143.7 |
Yearly forecast with 5% / 50% / 95% quantiles
| Years ahead | 5% | 50% | 95% |
|---|---|---|---|
| 1 | 68.5 | 73.7 | 79.1 |
| 2 | 68.1 | 75.8 | 84.3 |
| 3 | 67.9 | 78.1 | 89.2 |
| 4 | 67.7 | 77.8 | 88.6 |
| 5 | 68.0 | 78.7 | 90.7 |
Input. contexts: a list of 1-D numeric arrays (lists, numpy arrays or tensors), one per series, oldest value first, NaN for missing values, any length (the last 2048 points are used). freq: one frequency code for the whole batch, "D", "W", "M", "Q" or "Y". Optional horizon (defaults: D 30, W 13, M 6, Q 4, Y 3) and quantiles (default 0.1, 0.2, ..., 0.9; other levels are interpolated and clamped to the 0.1 / 0.9 forecasts outside that range).
Output. A numpy.float64 array of shape (n_series, horizon, n_quantiles), in the units of the input; quantiles never cross. Take [..., 4] of the default output for the median.
from_pretrained also accepts device="cuda" / "cpu" (default: CUDA if available; experts run in bf16 on GPU, fp32 on CPU) and batch_size. Experts are loaded on first use; loaded by Hub id, their files are downloaded on first use.
Variant: distilled
m = BharatTSLarge.from_pretrained("BharatTS-Large", variant="distilled") # default (variant=None) is the full gate
q = m.predict([monthly], freq="M")
A single Chronos-2 checkpoint distilled from the gate: one forward pass per series, ~120M parameters.
Files
| file | content |
|---|---|
bharatts_large.py | the runtime: BharatTSLarge.from_pretrained(...), .predict(...), statistical forecasters, gate |
router.json | frozen gate configuration: horizons and seasons per frequency, frequency routes, local-backtest rules, expert list |
experts/*.safetensors | Chronos-2 experts (bf16); experts/chronos2_config_*.json are their shared configs |
experts/timesfm25/ | google/timesfm-2.5-200m-pytorch, unmodified |
eval/leaderboard.md, eval/leaderboard.json | test results, overall and by ministry |
variants/distilled.safetensors | the distilled single-checkpoint variant (Chronos-2 architecture, bf16; config in experts/) |
eval/distilled/ | test results of the distilled variant (same windows): leaderboard.md, leaderboard.json, by_freq.parquet, by_ministry.parquet |
eval/by_freq.parquet, eval/by_ministry.parquet | test results per frequency / per ministry (task, freq or ministry, model, n, mase, wql, gm_rel_mase_vs_snaive) |
requirements.txt | pinned runtime dependencies |
NOTICE | Apache-2.0 notices of the base models |
Experts
| expert | what it is | weights |
|---|---|---|
bharatts_g1 ... bharatts_g5 | BharatTS fine-tunes of amazon/chronos-2 on all frequencies | experts/bharatts_g1.safetensors ... experts/bharatts_g5.safetensors |
bharatts_w | BharatTS fine-tune of amazon/chronos-2, weekly specialist | experts/bharatts_w.safetensors |
bharatts_q | BharatTS fine-tune of amazon/chronos-2, quarterly specialist | experts/bharatts_q.safetensors |
bharatts_y | BharatTS fine-tune of amazon/chronos-2, yearly specialist | experts/bharatts_y.safetensors |
chronos2 | amazon/chronos-2 | experts/chronos2.safetensors |
timesfm25 | google/timesfm-2.5-200m-pytorch (unmodified) | experts/timesfm25 |
seasonal_naive, naive, drift, mean, ets_lite | statistical forecasters with empirical residual quantiles | computed in bharatts_large.py |
Chronos-2 experts are stored as bf16 safetensors; experts with identical configs share one config file. GPU inference runs in bf16, so this loses nothing there; on CPU the weights are upcast to fp32.
Gate
-
Frequency route (
router): each frequency has a fixed quantile blend of experts.freq router D 1/3 bharatts_g4+ 1/3bharatts_g1+ 1/3bharatts_g3W 0.75 bharatts_w+ 0.25seasonal_naiveM 0.5 bharatts_g5+ 0.5bharatts_g2Q bharatts_qY 0.75 bharatts_g1+ 0.25bharatts_y -
Per-series local backtest: for each series the candidates forecast that series' own most recent k windows inside the context you pass (never beyond it). Each candidate gets a scale-free score (pinball loss / sum |y|). The forecast is the best candidate if it beats
routerby the margin, otherwiserouter. A series too short for any backtest window getsrouter.freq k rule candidates D 2 best, margin 0.5 router, chronos2, timesfm25, seasonal_naive, router+chronos2, router+timesfm25, router+chronos2+timesfm25, router+seasonal_naive W 5 best, margin 0.1 router, chronos2, timesfm25, seasonal_naive, router+chronos2, router+timesfm25, router+chronos2+timesfm25, router+seasonal_naive M 5 best, margin 0.1 router, chronos2, timesfm25, seasonal_naive, router+chronos2, router+timesfm25, router+chronos2+timesfm25, router+seasonal_naive Q 3 best, margin 0.25 router, chronos2, timesfm25, seasonal_naive, router+chronos2, router+timesfm25, router+chronos2+timesfm25, router+seasonal_naive Y 1 best, margin 1.0 router, chronos2, timesfm25, seasonal_naive a+bcandidates are equal-weight quantile blends. The gate was frozen before the test windows were scored.
Results
Test windows, one pass of the frozen gate (eval/leaderboard.json, eval/by_freq.parquet). Lower is better for both
metrics. WQL = pooled weighted quantile loss; GM-MASE = geometric mean of the MASE ratio to seasonal-naive.
v2 is the full gate (default); v1 is its frequency route alone (step 1 of the gate); distilled is the single-checkpoint variant. heldout = series never trained on, last h points; time = training series, the h points after the
per-frequency calendar cutoff.
Overall test results (eval/leaderboard.json, eval/distilled/leaderboard.json)
| Split | n | Metric | v2 (default) | distilled | v1 | Chronos-2 | TimesFM-2.5 | Seasonal-naive |
|---|---|---|---|---|---|---|---|---|
| heldout | 8,349 | WQL | 0.184 | 0.175 | 0.171 | 0.207 | 0.257 | 0.246 |
| heldout | 8,349 | GM-MASE | 0.670 | 0.662 | 0.665 | 0.716 | 0.715 | 1.000 |
| time | 5,932 | WQL | 0.188 | 0.191 | 0.187 | 0.195 | 0.202 | 0.276 |
| time | 5,932 | GM-MASE | 0.614 | 0.630 | 0.619 | 0.647 | 0.635 | 1.000 |
Held-out series by frequency, WQL (GM-MASE) — frequencies where a BharatTS-Large variant is best
| Freq | n | v2 (default) | distilled | v1 | Chronos-2 | TimesFM-2.5 | Seasonal-naive |
|---|---|---|---|---|---|---|---|
| D | 2,303 | 0.049 (0.606) | 0.050 (0.593) | 0.053 (0.598) | 0.054 (0.658) | 0.059 (0.635) | 0.091 (1.000) |
| M | 3,208 | 0.184 (0.556) | 0.175 (0.564) | 0.171 (0.549) | 0.207 (0.601) | 0.257 (0.588) | 0.246 (1.000) |
| Q | 300 | 0.444 (0.717) | 0.333 (0.591) | 0.444 (0.711) | 0.396 (0.745) | 0.428 (0.696) | 0.973 (1.000) |
All frequencies and the per-ministry breakdown: eval/by_freq.parquet, eval/leaderboard.md, eval/by_ministry.parquet (distilled: eval/distilled/).
Coverage
Indian government statistics at national, state, district and sub-district level, D/W/M/Q/Y frequencies, series starting between 1901 and 2026, from 8,461 source tables (1,799,285 series in BharatTS-Corpus). The heldout series of BharatTS-Corpus were never trained on.
Source data
Source data: Open Government Data Platform India (data.gov.in) and NDAP (ndap.niti.gov.in), used under the Government Open Data License - India (GODL-India), https://data.gov.in/government-open-data-license-india. Aggregates only; no personal data.
Expert weights derived from or equal to Apache-2.0 models (amazon/chronos-2, google/timesfm-2.5-200m-pytorch); see NOTICE.
Original data: published by the Indian ministries, departments and agencies named per series in the ministry column of BharatTS-Corpus on the Open Government Data Platform India (data.gov.in) and, where marked, NITI Aayog's National Data and Analytics Platform (NDAP), under the Government Open Data License - India (GODL-India). The original public data remains under GODL-India; the CC BY-NC-SA 4.0 licence of this repository covers JudicialMind's compilation, derived fields, annotations, benchmarks and models.
Citation
@misc{judicialmind2026bharattslarge,
title = {BharatTS-Large: A Mixture-of-Experts Forecaster for Indian Open Government Time Series},
author = {JudicialMind},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/judicialmind/BharatTS-Large}}
}
License
CC BY-NC-SA 4.0 (see LICENSE): research, academic, personal and other non-commercial use, with attribution to JudicialMind and to the original data publishers; adaptations must be shared under the same licence. Commercial use requires a separate licence.
Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai.
Base model(s): amazon/chronos-2 (apache-2.0), google/timesfm-2.5-200m-pytorch (apache-2.0). Their licence terms and notices continue to apply to the upstream components; see THIRD_PARTY_NOTICES.md and NOTICE.