Skip to main content

Model-to-firmware compiler for edge AI

Project description

Darml — Model in. Firmware out.

A model-to-firmware compiler for edge AI. Upload a trained model (.tflite, .onnx, or scikit-learn .pkl), pick a target hardware, and get a flashable firmware binary or a drop-in C library.

11 supported targets across five hardware tiers — from a 2 KB AVR up to a multi-GB Jetson — through a single uniform pipeline:

parse → check size → quantize → convert → compile → package

Quick start

pip install darml
darml build path/to/model.tflite --target esp32-s3
darml flash darml-<build_id>.zip --port /dev/ttyUSB0

The first build downloads the cross-compiler toolchain (~5 minutes, ~500 MB per platform). Subsequent builds reuse the toolchain cache.

Hardware support

Target RAM Flash Runtime
avr-mega328 2 KB 32 KB emlearn
avr-mega2560 8 KB 256 KB emlearn
stm32f4 320 KB 1 MB TFLite Micro
stm32h7 1 MB 2 MB TFLite Micro
stm32n6 1.5 MB 4 MB TFLite Micro
esp32 520 KB 4 MB TFLite Micro
esp32-s3 512 KB+8 MB 16 MB TFLite Micro
rpi4 / rpi5 4–8 GB TFLite
jetson-nano 4 GB TensorRT/TFLite
jetson-orin 8 GB TensorRT/TFLite

Run darml targets for the full list with PlatformIO board IDs.

CLI

darml info <model_file>                         # parse + show metadata
darml check <model_file> --target <target>      # estimate fit on hardware
darml targets                                   # list supported hardware
darml build <model_file> --target <target>      # parse → check → compile → zip
darml flash <artifact.zip> --port <serial>      # flash onto a device
darml version                                   # version + license status

darml --help and darml <subcommand> --help for full flags.

Optional dependencies

The base install pulls only what's needed for the CLI to start. Pick extras based on which model formats you'll feed it:

pip install 'darml[onnx]'        # ONNX parsing
pip install 'darml[tflite]'      # TFLite parsing without TensorFlow
pip install 'darml[sklearn]'     # sklearn parsing + emlearn → AVR C
pip install 'darml[build]'       # PlatformIO for MCU firmware compiles
pip install 'darml[all]'         # everything above

Free tier

Darml Core is free under the MIT license, with a soft cap of 5 builds per UTC-day enforced via ~/.darml/counter. The CLI shows your remaining count after each build.

$ darml build model.tflite --target esp32-s3
Build completed: 5f3e…
4 builds remaining today (resets at midnight UTC).

The cap is per-machine and per-user; deleting the counter file resets it. This is friction-as-marketing, not DRM — Darml Pro (which lifts the cap and adds quantization, ONNX conversion, web dashboard, and build cache) is a separate package and a separate purchase.

License

MIT — use Darml Core for anything, commercial or not, no restrictions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

darml-0.1.1.tar.gz (82.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

darml-0.1.1-py3-none-any.whl (106.8 kB view details)

Uploaded Python 3

File details

Details for the file darml-0.1.1.tar.gz.

File metadata

  • Download URL: darml-0.1.1.tar.gz
  • Upload date:
  • Size: 82.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for darml-0.1.1.tar.gz
Algorithm Hash digest
SHA256 59082a69be50f1fe9f661847078255d6e843ef5ef68255e7ed4368aab5408d42
MD5 b27a83657b97ffe3361d1b04d62d5e2b
BLAKE2b-256 a157337c351310f5cc797b13f9bdcf7584d6596a9071c731cb90e93fe65775a9

See more details on using hashes here.

File details

Details for the file darml-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: darml-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 106.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for darml-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c4d759f19be5ec77b935537d1d8aca53b24df22ddff13473fe40e20904e7383
MD5 4ea85cbba6a70f8058e3218c855ada03
BLAKE2b-256 faafb8f64298469b88b4c27ef5155b851b3b87e4096343135bfb10e4313fe81a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page