metadata
license: apache-2.0
library_name: pytorch
pipeline_tag: time-series-forecasting
tags:
- time-series
- forecasting
- pytorch
- deployable
- edge-ai
- onnx
- streaming
- raspberry-pi
- transformer
- zero-shot
- iot
- real-time
- tiny-ml
- timesfm-alternative
- huggingface
metrics:
- mase
- smape
- mae
- crps
model-index:
- name: NanoForecast 500k
results:
- task:
type: time-series-forecasting
name: Time Series Forecasting
dataset:
name: ETTh1
type: ett
config: h1
metrics:
- type: mase
value: 3.342
name: MASE
- type: smape
value: 25.13
name: sMAPE (%)
- task:
type: time-series-forecasting
name: Time Series Forecasting
dataset:
name: ETTh2
type: ett
config: h2
metrics:
- type: mase
value: 3.707
name: MASE
- type: smape
value: 17.65
name: sMAPE (%)
- task:
type: time-series-forecasting
name: Time Series Forecasting
dataset:
name: ETTm1
type: ett
config: m1
metrics:
- type: mase
value: 3.578
name: MASE
- type: smape
value: 17.22
name: sMAPE (%)
- task:
type: time-series-forecasting
name: Time Series Forecasting
dataset:
name: Overall
type: multi-dataset
metrics:
- type: mase
value: 3.453
name: Overall MASE
- type: smape
value: 18.68
name: Overall sMAPE (%)
🔮 NanoForecast 500k (v0.2)
Ultra-lightweight time series transformer
1.6M params · 256 context · Streaming RNN · ONNX-ready
Runs on CPU, Raspberry Pi, and in the browser
🚀 New: Try the improved nanoforecast-v03 — 21% better MASE, 6.5M params, 512 context!
📦 Quick Start
pip install nanoforecast
from nanoforecast import NanoForecast
model = NanoForecast.from_pretrained("eulogik/nanoforecast-500k")
🏆 Benchmarks
| Dataset | MASE | sMAPE (%) | MAE | CRPS |
|---|---|---|---|---|
| ETTh1 | 3.342 | 25.13 | 2.402 | 1.800 |
| ETTh2 | 3.707 | 17.65 | 3.212 | 2.518 |
| ETTm1 | 3.578 | 17.22 | 1.174 | 1.003 |
| exchange_rate | 7.306 | 1.63 | 0.010 | 0.009 |
| electricity | 1.536 | 5.65 | 189.748 | 187.256 |
| traffic | 1.246 | 44.80 | 0.006 | 0.005 |
| Overall | 3.453 | 18.68 | 32.759 | 32.099 |
🔥 For better accuracy, upgrade to nanoforecast-v03 (MASE 2.73, 21% improvement).
🔄 Streaming Inference (Unique to NanoForecast)
result = model.predict(context, horizon=48, return_state=True)
state = result.pop("state")
for new_val in incoming_data_stream:
result = model.predict_step(new_val, state, horizon=48)
print(result["forecast"][0, :5])
Perfect for IoT, real-time dashboards, and live financial data.
📋 Model Details
| Attribute | Value |
|---|---|
| Profile | d64-L8 |
| Parameters | 1,606,232 |
| Context | 256 |
| Horizon | 48 |
| Size | 6.4 MB (FP32), ~1.4 MB (ONNX) |
| Architecture | LongConv + DeltaNet RNN + Gated Router + MLP |
| Deploy targets | CPU, ARM, Raspberry Pi, Lambda, iOS, browser |
🎯 Try It in 1 Click
Upload a CSV → forecast + prediction intervals. No code. No GPU.
📚 All Variants
| Model | Params | Context | MASE | Best For |
|---|---|---|---|---|
| nanoforecast-200k | 676K | 256 | ~4-11 | Extreme edge / RPi Zero |
| nanoforecast-500k (you are here) | 1.6M | 256 | 3.45 | General purpose |
| nanoforecast-v03 | 6.5M | 512 | 2.73 | Max accuracy |
⚡ Deploy
# FastAPI
pip install nanoforecast fastapi uvicorn python-multipart
python3 deploy/fastapi_server.py
# ONNX
pip install "nanoforecast[onnx]"
python3 -m nanoforecast.export.onnx_export --checkpoint <dir> --output nanoforecast.onnx
❤️ Built by Eulogik
Eulogik — deployable AI for the real world.
Star the repo ⭐ on GitHub!