NanoForecast v0.5
6.5M-Parameter Time Series Foundation Model — Deploy Anywhere
CPU inference · ONNX · Streaming · Quantile forecasts · Edge/ARM
Built by Eulogik — deployable AI for the real world
What is NanoForecast?
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.
Key Features
- Zero-shot forecasting — no training needed for new time series
- Streaming inference — feed one value at a time via stateful DeltaNet RNN (unique to NanoForecast)
- Quantile predictions — p10, p25, p50, p75, p90 with monotonic guarantees
- ONNX export — 9.2MB INT8 / 27.9MB FP32 for edge, IoT, browser deployment
- CPU inference — 19.5ms median latency on Apple M4 (no GPU required)
- Train from CSV — fine-tune on your data in minutes, not days
- Apache 2.0 license — no restrictions on commercial use
- Multi-task heads — point forecast + quantiles + anomaly detection in single forward pass
Benchmark Results
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.
Parameter Efficiency
NanoForecast achieves 26x better parameter efficiency (MASE$^{-1}$ per parameter) than TimesFM and is 2x more efficient than PatchTST.
Head-to-Head Wins
Training-Pipeline Refinement: v0.3 → v0.5
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 |
Quantile Coverage
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.
Architecture
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 |
Deployment Options
FastAPI Server
pip install nanoforecast fastapi uvicorn python-multipart
python3 deploy/fastapi_server.py
# → http://localhost:8000/docs
Docker
docker build -t nanoforecast -f deploy/Dockerfile .
docker run -p 8000:8000 nanoforecast
ONNX (Edge / IoT / Browser)
pip install "nanoforecast[onnx]"
python3 -m nanoforecast.export.onnx_export \
--checkpoint <checkpoint-dir> \
--output nanoforecast.onnx
Inference Latency
NanoForecast runs 19.5ms on CPU (PyTorch) and 10.7ms via ONNX — no GPU required.
Live Gradio Demo
Upload a CSV → get a forecast + prediction intervals + decomposition plot. No code required.
Quick Start
Install
pip install nanoforecast
Zero-Shot Forecasting
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
Streaming / Online Inference (unique to NanoForecast)
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
From Your Own CSV
python3 train_from_csv.py --csv sales.csv --target revenue --horizon 48
How Does It Compare?
| 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 | ✅ | ✅ | ✅ | ✅ | ❌ |
When to Use NanoForecast
✅ Use when:
- Deploying to edge/IoT devices (Raspberry Pi, ARM, browser)
- Streaming/online inference (feed one value at a time)
- Quantile forecasts with uncertainty estimates
- Training on your own data in minutes
- ONNX export for browser/ARM deployment
- Apache 2.0 license required
❌ Don't use when:
- You need SOTA accuracy on all benchmarks (use TimesFM, Chronos)
- You have massive datasets (100K+ rows) — fine-tune a larger model
- You need multivariate cross-series dependencies
Training
Reproduce on Colab (free T4 GPU, ~12h)
| 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 |
Model Files
| File | Size |
|---|---|
model.safetensors |
26.1 MB |
config.json |
343 B |
model_card.json |
710 B |
standard_benchmark.json |
3.1 KB |
Citation
@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
Links
- GitHub: github.com/eulogik/NanoForecast
- Live Demo: huggingface.co/spaces/eulogik/nanoforecast
- Paper: arxiv.org/abs/2609.31669
- PyPI: pypi.org/project/nanoforecast
- Colab Training: Open in Colab
- Website: eulogik.com
- Other models: eulogik/nanoforecast-v03 · eulogik/nanoforecast-patchtst-baselines · eulogik/nanoforecast-200k
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!
- Downloads last month
- 175
Collection including eulogik/nanoforecast-v05
Paper for eulogik/nanoforecast-v05
Evaluation results
- MASE on ETTh1self-reported0.676
- sMAPE (%) on ETTh1self-reported16.630
- MASE on ETTh2self-reported1.110
- sMAPE (%) on ETTh2self-reported10.410
- MASE on ETTm1self-reported0.287
- sMAPE (%) on ETTm1self-reported7.560
- MASE on exchange_rateself-reported4.317
- sMAPE (%) on exchange_rateself-reported3.280







