Skip to content

Releases

v0.1.0: flash a language model to an ESP32-S3

Choose a tag to compare

@alikup-ai alikup-ai released this 06 Nov 12:56

First public release: ready-to-flash images for ESP32-S3-N16R8 (16 MB flash, 8 MB octal PSRAM).

Easiest way: open https://alikup-ai.github.io/bytes-per-token/ in Chrome or Edge and press a Flash button.

file model size speed on the board
bpt-demo-varC_long_s0.bin our varC, 8.6M params trained on 70M tokens, 0.63 bits/byte on TinyStories 6.3 MB ~90 tok/s (11.1 ms/token at the start of the context)
bpt-demo-esp32ai_ts.bin slvDev/esp32-ai TinyStories model, 28.9M params (MIT) 16 MB ~87 tok/s vs 10.6 tok/s on its own firmware

Each image holds bootloader, partition table, demo firmware and the model, and is written at offset 0:

python -m esptool --chip esp32s3 -p PORT -b 921600 erase_flash
python -m esptool --chip esp32s3 -p PORT -b 921600 write_flash 0x0 bpt-demo-varC_long_s0.bin

Then talk to it with the browser demo, or over UART at 115200 baud (protocol in engine/demo/README.md).

Checked on the board before release: both images flashed from offset 0 after a full erase; the esp32-ai image
reproduces the output of esp32-ai's own firmware character for character. Checksums: SHA256SUMS.

Not for: the original ESP32, ESP32-C3/C6/H2, or ESP32-S3 boards with quad PSRAM or less than 16 MB flash.

The esp32-ai model weights are by slvDev, MIT license: https://github.com/slvDev/esp32-ai