Supersonic Labs logo

Julia 2 Nano

Julia 2 on a microcontroller. Text, images and speech in 15 MB.

Julia 2 β€” monochrome geometric artwork

Julia 2 Nano is the microcontroller version of Julia 2. It takes text decisions (choice, noul and score questions), labels photos and recognises spoken intents. It fits the 16 MB flash of an ESP32-S3 and runs as plain C, with no library beyond the C standard library.

At a glance

Julia 2 Julia 2 Nano
Weights 2.14 GB 15.0 MB (βˆ’99.3 %)
Runs on GPU or CPU ESP32-S3 (16 MB flash, 8 MB PSRAM), or any CPU with a C compiler
Text decision, working memory β€” under 300 KB
Photo (128 Γ— 128), working memory β€” 224 KB
Speech, working memory β€” up to 1.8 MB for a 12 s clip
Dependencies Python, PyTorch none (C, libc, libm)
Languages many English and Portuguese

Quality against Julia 2

Test Size Julia 2 Julia 2 Nano
Text decisions: same answer as Julia 2 (held-out SLCMB split) 231 cases β€” 58 %
Text decisions where Julia 2 is confident: same answer 166 cases β€” 71 %
Images, Imagenette (10 classes): accuracy 3,925 photos 92.8 % 95.5 %
Images, Oxford Flowers (12 options): accuracy 1,020 photos 50.5 % 98.7 %
Speech intents (MInDS-14, en and pt): accuracy 2,413 clips 59.4 % 60.3 %

The text test was scored once, on cases not used to build the model.

Known trade-offs

  • Text is the hard part. The Nano gives Julia 2's answer a little more than half of the time. It is strongest on category questions and weakest on rules with conditions ("only if", "unless") and on ordered levels.
  • Closed label sets for images and speech. Photos are labelled with the trained classes (Imagenette and Oxford Flowers). Speech covers the 14 MInDS-14 banking intents. On these sets the Nano is as accurate as Julia 2 or better, but its answers are not always the same as Julia 2's.
  • No live calls, no long context, no free text.
  • Speed on a real board is not measured yet.

Usage

hf download SupersonicLabs/Julia-2-Nano --local-dir Julia-2-Nano && cd Julia-2-Nano
cc -O2 -o nano_text c/nano_text.c -lm
cc -O2 -o nano_image c/nano_image.c -lm
cc -O2 -o nano_speech c/nano_speech.c -lm
./nano_text text/nano_text.bin items.bin        # one CHOICE line per item
./nano_image image/nano_image.bin photos.bin    # one LOGITS line per photo
./nano_speech speech/nano_speech.bin clips.bin  # one INTENT line per clip

FORMATS.md describes the input and output files. On the ESP32-S3, firmware/ is an ESP-IDF project for the text part: the model is read in place from a flash partition.

Files

File Contents Size
text/nano_text.bin text decisions 8.2 MB
image/nano_image.bin image labels 1.7 MB
speech/nano_speech.bin speech intents 5.1 MB
c/ the three C programs
firmware/ ESP32-S3 project (text)
labels/ image and speech label lists
FORMATS.md, SHA256SUMS file formats and checksums

Download only the parts you use. Each program opens only its own file.

What is inside

  • Text: token tables in int4 and int2 and a small int8 decision head.
  • Images: a small convolutional network in int8.
  • Speech: a small speech encoder in int8 and int4, with an int8 intent head.

Licence

Apache-2.0, as Julia 2. Refer to LICENSE and NOTICE.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for SupersonicLabs/Julia-2-Nano

Finetuned
(2)
this model

Collection including SupersonicLabs/Julia-2-Nano