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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

darml-0.1.2-py3-none-any.whl (74.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: darml-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 74.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 48972bba274f9ddd09a7353cc55a0297bd7556c041b9f50a84022c75f16e7480
MD5 48c68ee473527e3aca5bd24445f40ccf
BLAKE2b-256 dd0adec5b82a14b55bd20c97cf510a5c91bca2e4654d6bb5d7b26055f2b282f9

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