Downloads · 30 days
172
38% of all-time downloads
eulogik/nanoforecast-v05
nanoforecast-v05 is a time series forecasting model from eulogik. Use it for the time series forecasting task on the model card, and read the license before you ship it in a product. It is set up for nanoforecast. The card lists the license as apache-2.0.
Downloads · 30 days
172
38% of all-time downloads
All-time downloads
449
Public
Parameters
6.5M
27.9 MB on disk
Likes
5
Public
Click a slice to open those files.
.safetensors26.1 MB · 95%
From the Hugging Face model README
CPU inference · ONNX · Streaming · Quantile forecasts · Edge/ARM
Built by Eulogik — deployable AI for the real world
</div>NanoForecast is a 6.5M-parameter time series foundation model that runs inference on CPUs and, via ONNX, on edge/ARM devices and in the browser. It performs zero-shot forecasting on unseen time series without fine-tuning, producing point forecasts with quantile uncertainty bounds (p10–p90).
Unlike 200M+ parameter alternatives (TimesFM, Chronos), NanoForecast is designed for deployment constraints: 19.5ms CPU inference, ONNX export (9.2MB INT8), streaming RNN mode, and Apache 2.0 license. It matches or beats TimesFM on 4 of 6 standard benchmarks at 31x fewer parameters.
Standard protocol: context 512, horizon 48, non-overlapping test windows, MASE scaled by seasonal-naive in-sample MAE. All models evaluated under identical conditions.
| Dataset | NanoForecast v0.5 (6.5M) | TimesFM (200M) | PatchTST (15M+) |
|---|---|---|---|
| ETTh1 | 0.676 | 0.705 | 0.781 |
| ETTh2 | 1.110 | 1.360 | 1.467 |
| ETTm1 | 0.287 | 0.545 | 0.488 |
| exchange_rate | 4.317 | 4.383 | 3.861 |
| electricity | 2.029 | 0.923 | 1.347 |
| traffic | 1.805 | 0.765 | 1.379 |
| Overall MASE | 1.704 | 1.447 | 1.554 |
Results: NanoForecast v0.5 beats TimesFM on 4 of 6 benchmarks (ETTh1, ETTh2, ETTm1, exchange_rate) at 31x fewer parameters. TimesFM wins on electricity and traffic.

NanoForecast achieves 26x better parameter efficiency (MASE$^{-1}$ per parameter) than TimesFM and is 2x more efficient than PatchTST.



The same 6.5M-parameter architecture gained 43.8% better MASE through three training-pipeline fixes — no architecture changes.
| Version | Params | MASE ↓ | Improvement | Training |
|---|---|---|---|---|
| v0.3 (released) | 6.5M | 3.030 | baseline | Colab T4, 200 epochs |
| v0.5 (released) | 6.5M | 1.704 | ↓ 43.8% | Colab T4, 200 epochs |

Measured under the standard protocol (benchmark_standard.py; empirical P(target ≤ predicted quantile), mean across the six datasets):
| Quantile | Target | Measured |
|---|---|---|
| p10 | 10% | 20.1% |
| p25 | 25% | 30.8% |
| p50 | 50% | 45.4% |
| p75 | 75% | 59.5% |
| p90 | 90% | 71.4% |
Honest note: the predicted intervals are narrower than nominal under this protocol — the p10–p90 band covers 51% of held-out values (target 80%). Quantiles are best read as relative uncertainty signals (e.g., ranking steps by uncertainty) rather than calibrated probabilities. Point forecasts (p50) are unaffected and remain the recommended output for accuracy.

Raw Context (512 steps)
→ Instance Robust Scaler (median/IQR)
→ Adaptive Patching (patch_size=8)
→ Resolution Prefix Tuning (freq_id → 4 covariates)
→ Sequence Mixing Blocks × 8:
├── LongConv (global context, kernel=65)
├── DeltaNet RNN (local streaming, state_size=64)
├── Gated Router (learned blend)
└── GatedMLP (expansion=2)
→ Multi-Task Heads:
├── Point Forecast (d_model → 1)
├── Monotonic Quantiles (p10–p90, 5 quantiles)
├── Context Reconstruction (anomaly detection)
└── Trend / Seasonal Decomposition (3 components)

| Component | Detail |
|---|---|
| Parameters | 6,518,104 (~6.5M) |
| Context length | 512 timesteps |
| Prediction length | 48 steps (configurable) |
| Patch size | 8 |
| Hidden dim / layers | 96 / 8 |
| Quantiles | p10, p25, p50, p75, p90 |
| Streaming | Stateful DeltaNet RNN — feed one value at a time |
| Deployment | ONNX (FP32 + INT8), FastAPI, Docker, Browser |
pip install nanoforecast fastapi uvicorn python-multipart
python3 deploy/fastapi_server.py
# → http://localhost:8000/docs
docker build -t nanoforecast -f deploy/Dockerfile .
docker run -p 8000:8000 nanoforecast
pip install "nanoforecast[onnx]"
python3 -m nanoforecast.export.onnx_export \
--checkpoint <checkpoint-dir> \
--output nanoforecast.onnx
NanoForecast runs 19.5ms on CPU (PyTorch) and 10.7ms via ONNX — no GPU required.

Upload a CSV → get a forecast + prediction intervals + decomposition plot. No code required.
pip install nanoforecast
import numpy as np
from nanoforecast import NanoForecast
model = NanoForecast.from_pretrained("eulogik/nanoforecast-v05")
# Generate context (or load your own time series)
context = np.sin(np.linspace(0, 8*np.pi, 512)) + 0.1 * np.random.randn(512)
# Forecast
result = model.predict(context, horizon=48, freq=1)
print(result["forecast"].shape) # (48,) point forecast
print(result["quantiles"].shape) # (5, 48) p10..p90
result = model.predict(context, horizon=48, return_state=True)
state = result.pop("state")
# Stream new observations one at a time
for new_val in incoming_stream:
result = model.predict_step(new_val, state, horizon=48)
forecast = result["forecast"][0] # updated forecast instantly
python3 train_from_csv.py --csv sales.csv --target revenue --horizon 48
| Feature | NanoForecast v0.5 | TimesFM | Chronos-T5 | Lag-Llama | PatchTST |
|---|---|---|---|---|---|
| Parameters | 6.5M | 200M | 8M–710M | 16.6M | 15M+ |
| CPU inference | 19.5ms | GPU required | GPU required | GPU required | GPU required |
| Streaming | ✅ | ❌ | ❌ | ❌ | ❌ |
| ONNX export | ✅ | ❌ | ❌ | ❌ | ❌ |
| Edge/ARM via ONNX | ✅ | ❌ | ❌ | ❌ | ❌ |
| Quantiles | ✅ (5) | ⚠️ | ✅ | ✅ | ❌ |
| Train from CSV | ✅ | ❌ | ❌ | ⚠️ | ⚠️ |
| License | Apache 2.0 | Apache 2.0 | Apache 2.0 | Apache 2.0 | Apache 2.0 |
| Zero-shot | ✅ | ✅ | ✅ | ✅ | ❌ |
✅ Use when:
❌ Don't use when:
| Parameter | Value |
|---|---|
| Datasets | ETTh1, ETTh2, ETTm1, exchange_rate, electricity, traffic |
| Synthetic records | 10,000 |
| Epochs | 200 (best at 51) |
| Learning rate | 3e-5 (OneCycleLR, peak 3e-4) |
| Batch size | 128 |
| Loss | MultiTaskLoss (point + quantile + anomaly + smooth) |
| Wall time | ~12h on Colab T4 |
| File | Size |
|---|---|
model.safetensors | 26.1 MB |
config.json | 343 B |
model_card.json | 710 B |
standard_benchmark.json | 3.1 KB |
@article{kishore2026nanoforecast,
title={NanoForecast v0.5: Competitive Time Series Forecasting Through Training Pipeline Optimization},
author={Kishore, Gautam},
journal={arXiv preprint arXiv:2609.31669},
year={2026}
}
Paper: arxiv.org/abs/2609.31669
Built by Eulogik — deployable AI for the real world
If you found this useful, please ⭐ the GitHub repo and like this model on Hugging Face!
</div>