nanoforecast-200k

NanoForecast is the world's most deployable time series forecasting model (~676K parameters). It trains on a laptop, runs on a Raspberry Pi, and exports to 1.4 MB ONNX for edge/IoT/browser deployment.

This is the v0.1 checkpoint โ€” the smallest variant, designed for ultra-constrained environments (Raspberry Pi Zero, browser, Lambda). For better accuracy, use nanoforecast-500k (1.6M params, 6-dataset training).

Built by Eulogik โ€” deployable AI for the real world.

Open in Spaces

GitHub

Model details

  • Profile: nano-200k
  • Parameters: 676,108
  • Context length: 256
  • Prediction length: 48
  • Patch size: 8
  • Hidden dim / layers: 32 / 4
  • Quantiles: [0.1, 0.25, 0.5, 0.75, 0.9]
  • Architecture: LongConv + DeltaNet RNN + Gated Router + MLP
  • FP32 size: ~2.7 MB
  • INT8 size: ~0.7 MB

Training

  • Dataset: ETTh1 (hourly temperature)
  • Epochs: 20
  • Best epoch: 9 (val_loss 11.28)
  • Learning rate: 1e-4
  • Batch size: 32

When to use this checkpoint

Use nanoforecast-200k when you need the absolute smallest model:

  • Raspberry Pi Zero / Pico deployments
  • AWS Lambda (cold start < 100ms)
  • Browser-based ONNX.js (sub-1 MB download)
  • Battery-powered IoT sensors

Use nanoforecast-500k when you need better accuracy and can spare 6.4 MB:

  • Standard Raspberry Pi 4/5 deployments
  • Docker / FastAPI server
  • Real-time streaming with DeltaNet stateful inference

Quickstart

import numpy as np
from nanoforecast import NanoForecast

model = NanoForecast.from_pretrained('eulogik/nanoforecast-200k')
context = np.sin(np.linspace(0, 8*np.pi, 256)) + 0.1 * np.random.randn(256)
out = model.predict(context, horizon=48, freq=1)
print(out['forecast'].shape)  # (48,) point forecast

Deploy

# ONNX export (0.7 MB INT8)
pip install "nanoforecast[onnx]"
python3 -m nanoforecast.export.onnx_export --checkpoint <checkpoint-dir> --output nanoforecast.onnx

Known limitations

This v0.1 checkpoint was trained on a single dataset (ETTh1, 20 epochs). Accuracy is limited (MASE ~4-11 on ETT benchmarks). What it does well: being the smallest deployable TS model on the Hub. Train on your own data for better accuracy.

Attribution

Built by Eulogik โ€” deployable AI for the real world.

Downloads last month
19
Safetensors
Model size
676k params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using eulogik/nanoforecast-200k 1