v0.2.0open source

Decisions that fit on a chip.

Tiny decision models for agents, robots and microcontrollers. From 47 MB on a laptop to ~2 KB on a chip, with calibrated answers in the same shapes as Strands Decider.

pip install sparrow-decider

9.3 µs per decision on a $10 ESP32-S3. No GPU, no network, no model server.

Unofficial community project. Not an AWS or Strands product.

esp32-s3 · 240 MHzsparrow-pico-rover-v1.1
Example decisions computed with the released models. sparrow-pico-rover-v1.1: battery 6%, front_obstacle_m 7.0, goal_m 30, path clear. What should the robot do next? Answer dock, 9.3 µs on the ESP32-S3. sparrow-nano-robot-v1.2: operator grab that blue bottle. Which skill should the robot run? Answer pick, 3.5 ms on the ESP32-S3.

Probabilities computed with the released models; the C runtime on the ESP32-S3 gives the same answers. Times are measured on the board. See Benchmarks.

Numbers first.

Measured on an ESP32-S3 at 240 MHz and on a laptop. Every figure is on the Benchmarks page with its conditions.

per decision on a $10 ESP32-S3 (sparrow-pico)
9.3 µs
per text decision on the same chip (sparrow-nano-general)
3.8 ms
navigation calls from sensor numbers right with a 1.11 MB nano-robot; the public 2-billion-parameter decider gets 3 / 10
8 / 10
Python install; C99 runtime with no malloc
numpy only
per compiled question (sparrow-pico, 501 parameters)
~2 KB

See every benchmark

The family

From laptop to microcontroller.

Pick the smallest model that fits your input and your hardware.

pico

sparrow-pico-rover-v1.1

~2 KB
per question (501 parameters)
Input
sensor numbers, flags, enums
Runs on
any microcontroller
ESP32-S3
9.3 µs per decision
Laptop
0.18 µs
Quality
94.0% vs the spec's rules (its 2B teacher: 94.2%)

Compare all models


Use it

Small questions. Calibrated answers.

Most decisions in an agent or a robot have a short list of answers. Sparrow answers them about a state you give it, with calibrated probabilities, in the same shapes as Strands Decider.

  • Yes / no noul

    "Is the user upset?" A probability you can threshold.

  • Pick one choice

    "Which skill should run?" A choice from your list, with a probability for each option.

  • Score score

    "How urgent is this?" A rating on the scale you define.

triage.py
from sparrow_decider import Decider

d = Decider.load()   # bundled nano model

tools = {
    "flights":  "search and book flights",
    "refunds":  "refund a payment",
    "weather":  "forecasts for a city",
    "calendar": "create or move meetings",
}
answer = d.ask(
    "User: I was charged twice, I want my money back",
    {"tool": {"type": "choice",
              "instructions": "Which tool fits?",
              "criteria": tools}},
)["tool"]
print(answer["choice"], answer["confidence"])
# refunds 0.97

Choosing

pico or nano?

nano reads text and answers any question you pose at runtime. pico has no text and no vocabulary: you describe your device's sensors and questions, and get C.

Many devices use both: pico in the control loop, nano for anything said or written.

pico or nano flowchartIf inputs are sensor values and questions are known at build time, use sparrow-pico. Otherwise, if decisions hinge on numbers like battery: 6%, use sparrow-nano-robot; if not, use sparrow-nano-general. Sensor values,questions fixedat build time? Decisions hingeon numbers likebattery: 6%? sparrow-pico~2 KB per question · 9.3 µs · any MCU sparrow-nano-robot1.11 MB · 3.5 ms on ESP32-S3 sparrow-nano-general2.2 MB · 3.8 ms on ESP32-S3 yes no yes no

On the chip

Same $10 board. Much faster.

On the ESP32-S3: int8 SIMD on the vector unit (ESP-NN kernel), weights in PSRAM / internal RAM.

Time per decision on the ESP32-S3: sparrow-pico 42.9 µs to 9.3 µs; sparrow-nano-general 9.6 ms to 3.8 ms; sparrow-nano-robot 73.5 ms to 3.5 ms.

First on-chip build vs today, same board. Today's nano models also use a smaller hidden layer. Each row has its own scale. Board: ESP32-S3 (QFN56 rev0.2), 240 MHz, 16 MB flash, 8 MB PSRAM.

Show as table
ModelTime per decision on ESP32-S3, first build to today
sparrow-pico-rover-v1.142.9 µs → 9.3 µs
sparrow-nano-general-v1.19.6 ms → 3.8 ms
sparrow-nano-robot-v1.273.5 ms → 3.5 ms

Parity

The C runtime matches the Python runtime to within 1e-5 on the host; on the ESP32-S3, int8 builds agree with the host on 150-155 of 155 decisions.

Python

pip install sparrow-decider. numpy only.

C99

No malloc, model read from flash. Ships as an ESP-IDF component.

sparrow-pico compiler

Write a device spec, get a C header.

How the chip path works


Honest limits

What it is not.

Sparrow is for fixed-answer decisions about a known kind of state. We publish the misses next to the wins.

Open-ended language it never trained on: well behind the 2B (MASSIVE domain routing 0.37-0.67 across released Sparrow models vs 0.86).

Yes/no judgement on JevBench is near chance at every tier.

pico answers only the questions it was compiled for.

A pico model is as good as its teacher on your spec, and no better. Never use a learned model as the only safety stop.

Keep an LLM or a full decider for open-ended reasoning. Use confidence to fall back to it.

Read the limits

Give your device a decider.

Install in one line, or flash a model to a $10 board.

pip install sparrow-decider