--- license: apache-2.0 library_name: pytorch pipeline_tag: time-series-forecasting tags: - time-series - forecasting - pytorch - safetensors - deployable - edge-ai - onnx - raspberry-pi - tiny-ml - iot - transformer - zero-shot - huggingface - timesfm-alternative metrics: - mase - smape ---

๐Ÿ”ฎ NanoForecast 200k (v0.1)
World's smallest deployable time series transformer

676K params ยท 256 context ยท Just 2.7 MB
Fits on a Raspberry Pi Zero. Ships as a dependency, not an API call.

๐Ÿ’ก Need better accuracy? Check nanoforecast-500k (1.6M params, MASE 3.45) or the latest nanoforecast-v03 (6.5M params, MASE 2.73).

--- ## ๐Ÿ“ฆ Quick Start ```bash pip install nanoforecast python3 train_from_csv.py --csv my_data.csv --target sales --horizon 48 ``` Or use a pretrained model: ```python from nanoforecast import NanoForecast model = NanoForecast.from_pretrained("eulogik/nanoforecast-200k") ``` ## ๐Ÿ“‹ When to Use This Model | Scenario | Pick This Model | |---|---| | Raspberry Pi Zero (512 MB RAM) | โœ… **nanoforecast-200k** | | Browser via ONNX.js (< 1 MB) | โœ… **nanoforecast-200k** | | AWS Lambda cold starts | โœ… **nanoforecast-200k** | | Battery-powered IoT sensor | โœ… **nanoforecast-200k** | | Any accuracy-critical app | โŒ Use [v0.3](https://huggingface.co/eulogik/nanoforecast-v03) instead | ## ๐Ÿ”„ Streaming Inference Feed one value at a time with DeltaNet stateful RNN: ```python 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) ``` ## ๐Ÿ“š All Variants | Model | Params | Context | Size | Best For | |---|---|---|---|---| | **nanoforecast-200k** (you are here) | **676K** | 256 | 2.7 MB | Extreme edge | | [nanoforecast-500k](https://huggingface.co/eulogik/nanoforecast-500k) | 1.6M | 256 | 6.4 MB | General purpose | | [nanoforecast-v03](https://huggingface.co/eulogik/nanoforecast-v03) | 6.5M | 512 | 26 MB | Max accuracy | ## โค๏ธ Built by Eulogik [![Eulogik](https://img.shields.io/badge/by-Eulogik-purple)](https://eulogik.com) **Eulogik** โ€” deployable AI for the real world. Star the repo โญ on [GitHub](https://github.com/eulogik/NanoForecast)!